diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 7ee096fcdc10..d64e3e66b5e9 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1906,6 +1906,18 @@ packages: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} dev: false + /@isaacs/cliui@8.0.2: + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + dependencies: + string-width: 5.1.2 + string-width-cjs: /string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: /strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: /wrap-ansi@7.0.0 + dev: false + /@istanbuljs/load-nyc-config@1.1.0: resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} engines: {node: '>=8'} @@ -2330,6 +2342,13 @@ packages: '@opentelemetry/core': 1.17.0(@opentelemetry/api@1.6.0) dev: false + /@pkgjs/parseargs@0.11.0: + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + requiresBuild: true + dev: false + optional: true + /@protobufjs/aspromise@1.1.2: resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} dev: false @@ -3407,6 +3426,11 @@ packages: engines: {node: '>=8'} dev: false + /ansi-regex@6.0.1: + resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + engines: {node: '>=12'} + dev: false + /ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} @@ -3421,6 +3445,11 @@ packages: color-convert: 2.0.1 dev: false + /ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + dev: false + /anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -4451,6 +4480,10 @@ packages: typescript: 5.3.0-dev.20230919 dev: false + /eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + dev: false + /ecdsa-sig-formatter@1.0.11: resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==} dependencies: @@ -4477,6 +4510,10 @@ packages: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: false + /emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + dev: false + /encodeurl@1.0.2: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} @@ -5229,6 +5266,14 @@ packages: signal-exit: 3.0.7 dev: false + /foreground-child@3.1.1: + resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} + engines: {node: '>=14'} + dependencies: + cross-spawn: 7.0.3 + signal-exit: 4.1.0 + dev: false + /form-data-encoder@1.7.2: resolution: {integrity: sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==} dev: false @@ -5430,6 +5475,18 @@ packages: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} dev: false + /glob@10.3.4: + resolution: {integrity: sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + dependencies: + foreground-child: 3.1.1 + jackspeak: 2.3.3 + minimatch: 9.0.3 + minipass: 7.0.3 + path-scurry: 1.10.1 + dev: false + /glob@7.1.3: resolution: {integrity: sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==} dependencies: @@ -6131,6 +6188,15 @@ packages: istanbul-lib-report: 3.0.1 dev: false + /jackspeak@2.3.3: + resolution: {integrity: sha512-R2bUw+kVZFS/h1AZqBKrSgDmdmjApzgY0AlCPumopFiAlbUxE2gf+SCuBzQ0cP5hHmUmFYF5yw55T97Th5Kstg==} + engines: {node: '>=14'} + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + dev: false + /jju@1.4.0: resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} dev: false @@ -6622,6 +6688,11 @@ packages: get-func-name: 2.0.0 dev: false + /lru-cache@10.0.1: + resolution: {integrity: sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==} + engines: {node: 14 || >=16.14} + dev: false + /lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: @@ -6871,6 +6942,13 @@ packages: brace-expansion: 2.0.1 dev: false + /minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: false + /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: false @@ -6880,6 +6958,11 @@ packages: engines: {node: '>=8'} dev: false + /minipass@7.0.3: + resolution: {integrity: sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==} + engines: {node: '>=16 || 14 >=14.17'} + dev: false + /mitt@3.0.0: resolution: {integrity: sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==} dev: false @@ -7570,6 +7653,14 @@ packages: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: false + /path-scurry@1.10.1: + resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + lru-cache: 10.0.1 + minipass: 7.0.3 + dev: false + /path-scurry@1.6.3: resolution: {integrity: sha512-RAmB+n30SlN+HnNx6EbcpoDy9nwdpcGPnEKrJnu6GZoDWBdIjo1UQMVtW2ybtC7LC2oKLcMq8y5g8WnKLiod9g==} engines: {node: '>=16 || 14 >=14.17'} @@ -8158,6 +8249,14 @@ packages: glob: 7.2.3 dev: false + /rimraf@5.0.1: + resolution: {integrity: sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==} + engines: {node: '>=14'} + hasBin: true + dependencies: + glob: 10.3.4 + dev: false + /rollup-plugin-polyfill-node@0.12.0(rollup@2.79.1): resolution: {integrity: sha512-PWEVfDxLEKt8JX1nZ0NkUAgXpkZMTb85rO/Ru9AQ69wYW8VUCfDgP4CGRXXWYni5wDF0vIeR1UoF3Jmw/Lt3Ug==} peerDependencies: @@ -8407,6 +8506,11 @@ packages: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} dev: false + /signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + dev: false + /simple-concat@1.0.1: resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} dev: false @@ -8600,6 +8704,15 @@ packages: strip-ansi: 6.0.1 dev: false + /string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + dev: false + /string.prototype.padend@3.1.4: resolution: {integrity: sha512-67otBXoksdjsnXXRUq+KMVTdlVRZ2af422Y0aTyTjVaoQkGr3mxl2Bc5emi7dOQ3OGVVQQskmLEWwFXwommpNw==} engines: {node: '>= 0.4'} @@ -8671,6 +8784,13 @@ packages: ansi-regex: 5.0.1 dev: false + /strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + dependencies: + ansi-regex: 6.0.1 + dev: false + /strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} @@ -9361,6 +9481,15 @@ packages: strip-ansi: 6.0.1 dev: false + /wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + dev: false + /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: false @@ -11123,7 +11252,7 @@ packages: dev: false file:projects/arm-cdn.tgz: - resolution: {integrity: sha512-uO9+tD4hlw0xSMsvlz7siIgr3bqSCRIwSaLQfWP4RLYCDkErE1rEo0QRJZtiRfEawSSrKVMLsopHP//Ht4TvEw==, tarball: file:projects/arm-cdn.tgz} + resolution: {integrity: sha512-AHRWXN672Yw+aLMwMqeOZDjXudDqQ9N7k9PeZ02L74pi8haxy+mSp/8aWoiynQqWjD4cpLCyMDc1qeoWOWMJmw==, tarball: file:projects/arm-cdn.tgz} name: '@rush-temp/arm-cdn' version: 0.0.0 dependencies: @@ -11137,9 +11266,10 @@ packages: '@types/node': 14.18.56 chai: 4.3.8 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.3.1 + mkdirp: 2.1.6 mocha: 7.2.0 - rimraf: 3.0.2 + rimraf: 5.0.1 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3(@types/node@14.18.56)(rollup@2.79.1) ts-node: 10.9.1(@types/node@14.18.56)(typescript@5.0.4) diff --git a/sdk/cdn/arm-cdn/CHANGELOG.md b/sdk/cdn/arm-cdn/CHANGELOG.md index 5294e2a1fa00..2faf83f442b2 100644 --- a/sdk/cdn/arm-cdn/CHANGELOG.md +++ b/sdk/cdn/arm-cdn/CHANGELOG.md @@ -1,15 +1,136 @@ # Release History + +## 9.0.0 (2023-09-19) + +**Features** -## 8.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation AfdProfiles.beginUpgrade + - Added operation AfdProfiles.beginUpgradeAndWait + - Added operation AfdProfiles.checkEndpointNameAvailability + - Added operation AfdProfiles.validateSecret + - Added operation Profiles.beginCanMigrate + - Added operation Profiles.beginCanMigrateAndWait + - Added operation Profiles.beginMigrate + - Added operation Profiles.beginMigrateAndWait + - Added operation Profiles.beginMigrationCommit + - Added operation Profiles.beginMigrationCommitAndWait + - Added Interface AfdCustomDomainsCreateHeaders + - Added Interface AfdCustomDomainsDeleteHeaders + - Added Interface AfdCustomDomainsRefreshValidationTokenHeaders + - Added Interface AfdCustomDomainsUpdateHeaders + - Added Interface AfdEndpointsCreateHeaders + - Added Interface AfdEndpointsDeleteHeaders + - Added Interface AfdEndpointsPurgeContentHeaders + - Added Interface AfdEndpointsUpdateHeaders + - Added Interface AfdOriginGroupsCreateHeaders + - Added Interface AfdOriginGroupsDeleteHeaders + - Added Interface AfdOriginGroupsUpdateHeaders + - Added Interface AfdOriginsCreateHeaders + - Added Interface AfdOriginsDeleteHeaders + - Added Interface AfdOriginsUpdateHeaders + - Added Interface AfdProfilesCheckEndpointNameAvailabilityOptionalParams + - Added Interface AfdProfilesUpgradeHeaders + - Added Interface AfdProfilesUpgradeOptionalParams + - Added Interface AfdProfilesValidateSecretOptionalParams + - Added Interface CanMigrateParameters + - Added Interface CanMigrateResult + - Added Interface CustomDomainsCreateHeaders + - Added Interface CustomDomainsDeleteHeaders + - Added Interface CustomDomainsDisableCustomHttpsHeaders + - Added Interface CustomDomainsEnableCustomHttpsHeaders + - Added Interface EndpointsCreateHeaders + - Added Interface EndpointsDeleteHeaders + - Added Interface EndpointsLoadContentHeaders + - Added Interface EndpointsPurgeContentHeaders + - Added Interface EndpointsStartHeaders + - Added Interface EndpointsStopHeaders + - Added Interface EndpointsUpdateHeaders + - Added Interface ManagedServiceIdentity + - Added Interface MigrateResult + - Added Interface MigrationErrorType + - Added Interface MigrationParameters + - Added Interface MigrationWebApplicationFirewallMapping + - Added Interface OriginGroupsCreateHeaders + - Added Interface OriginGroupsDeleteHeaders + - Added Interface OriginGroupsUpdateHeaders + - Added Interface OriginsCreateHeaders + - Added Interface OriginsDeleteHeaders + - Added Interface OriginsUpdateHeaders + - Added Interface PoliciesCreateOrUpdateHeaders + - Added Interface PoliciesUpdateHeaders + - Added Interface ProfileChangeSkuWafMapping + - Added Interface ProfilesCanMigrateHeaders + - Added Interface ProfilesCanMigrateOptionalParams + - Added Interface ProfilesCreateHeaders + - Added Interface ProfilesDeleteHeaders + - Added Interface ProfilesMigrateHeaders + - Added Interface ProfilesMigrateOptionalParams + - Added Interface ProfilesMigrationCommitHeaders + - Added Interface ProfilesMigrationCommitOptionalParams + - Added Interface ProfilesUpdateHeaders + - Added Interface ProfileUpgradeParameters + - Added Interface RoutesCreateHeaders + - Added Interface RoutesDeleteHeaders + - Added Interface RoutesUpdateHeaders + - Added Interface RulesCreateHeaders + - Added Interface RulesDeleteHeaders + - Added Interface RuleSetsDeleteHeaders + - Added Interface RulesUpdateHeaders + - Added Interface SecretsCreateHeaders + - Added Interface SecretsDeleteHeaders + - Added Interface SecurityPoliciesCreateHeaders + - Added Interface SecurityPoliciesDeleteHeaders + - Added Interface SecurityPoliciesPatchHeaders + - Added Interface UserAssignedIdentity + - Added Type Alias AfdProfilesCheckEndpointNameAvailabilityResponse + - Added Type Alias AfdProfilesUpgradeResponse + - Added Type Alias AfdProfilesValidateSecretResponse + - Added Type Alias CanMigrateDefaultSku + - Added Type Alias ManagedServiceIdentityType + - Added Type Alias MetricsGranularity + - Added Type Alias MetricsSeriesUnit + - Added Type Alias ProfilesCanMigrateResponse + - Added Type Alias ProfilesMigrateResponse + - Added Type Alias WafMetricsGranularity + - Added Type Alias WafMetricsSeriesUnit + - Interface AFDDomain has a new optional parameter extendedProperties + - Interface AFDDomainProperties has a new optional parameter extendedProperties + - Interface AzureFirstPartyManagedCertificateParameters has a new optional parameter certificateAuthority + - Interface AzureFirstPartyManagedCertificateParameters has a new optional parameter expirationDate + - Interface AzureFirstPartyManagedCertificateParameters has a new optional parameter secretSource + - Interface AzureFirstPartyManagedCertificateParameters has a new optional parameter subject + - Interface AzureFirstPartyManagedCertificateParameters has a new optional parameter subjectAlternativeNames + - Interface AzureFirstPartyManagedCertificateParameters has a new optional parameter thumbprint + - Interface CdnWebApplicationFirewallPolicy has a new optional parameter extendedProperties + - Interface Profile has a new optional parameter extendedProperties + - Interface Profile has a new optional parameter identity + - Interface ProfileUpdateParameters has a new optional parameter identity + - Added Enum KnownCanMigrateDefaultSku + - Added Enum KnownManagedServiceIdentityType + - Added Enum KnownMetricsGranularity + - Added Enum KnownMetricsSeriesUnit + - Added Enum KnownWafMetricsGranularity + - Added Enum KnownWafMetricsSeriesUnit + - Enum KnownProfileResourceState has a new value AbortingMigration + - Enum KnownProfileResourceState has a new value CommittingMigration + - Enum KnownProfileResourceState has a new value Migrated + - Enum KnownProfileResourceState has a new value Migrating + - Enum KnownProfileResourceState has a new value PendingMigrationCommit -### Other Changes +**Breaking Changes** + - Removed operation group Validate + - Class CdnManagementClient has a new signature + - Type of parameter granularity of interface MetricsResponse is changed from MetricsResponseGranularity to MetricsGranularity + - Type of parameter unit of interface MetricsResponseSeriesItem is changed from MetricsResponseSeriesItemUnit to MetricsSeriesUnit + - Type of parameter granularity of interface WafMetricsResponse is changed from WafMetricsResponseGranularity to WafMetricsGranularity + - Type of parameter unit of interface WafMetricsResponseSeriesItem is changed from "count" to WafMetricsSeriesUnit + - Class CdnManagementClient no longer has parameter validate + - Removed Enum KnownMetricsResponseGranularity + - Removed Enum KnownMetricsResponseSeriesItemUnit + - Removed Enum KnownWafMetricsResponseGranularity + + ## 8.0.0 (2022-11-17) **Features** diff --git a/sdk/cdn/arm-cdn/LICENSE b/sdk/cdn/arm-cdn/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/cdn/arm-cdn/LICENSE +++ b/sdk/cdn/arm-cdn/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/cdn/arm-cdn/_meta.json b/sdk/cdn/arm-cdn/_meta.json index e2fd9d3c463b..62f49ecca561 100644 --- a/sdk/cdn/arm-cdn/_meta.json +++ b/sdk/cdn/arm-cdn/_meta.json @@ -1,8 +1,8 @@ { - "commit": "20df2424a278ca19437e437a7dbf3a7857a0dd9d", + "commit": "bc83cefee5b6eb4073eecb22cae8b0598940188b", "readme": "specification/cdn/resource-manager/readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\cdn\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/cdn/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.2", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/cdn/arm-cdn/package.json b/sdk/cdn/arm-cdn/package.json index 9d24863b61ed..1f93c017e2e5 100644 --- a/sdk/cdn/arm-cdn/package.json +++ b/sdk/cdn/arm-cdn/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for CdnManagementClient.", - "version": "8.0.1", + "version": "9.0.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -33,12 +33,13 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~5.0.0", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", + "rimraf": "^5.0.0", + "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", @@ -47,10 +48,9 @@ "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^14.0.0", - "@azure/dev-tool": "^1.0.0", - "ts-node": "^10.0.0" + "ts-node": "^10.0.0", + "@azure/dev-tool": "^1.0.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cdn/arm-cdn", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -84,7 +84,7 @@ "extract-api": "api-extractor run --local", "lint": "echo skipped", "audit": "echo skipped", - "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -112,12 +112,5 @@ ] }, "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-cdn?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cdn/arm-cdn" +} \ No newline at end of file diff --git a/sdk/cdn/arm-cdn/review/arm-cdn.api.md b/sdk/cdn/arm-cdn/review/arm-cdn.api.md index 21aa7cdbd147..433b704163c2 100644 --- a/sdk/cdn/arm-cdn/review/arm-cdn.api.md +++ b/sdk/cdn/arm-cdn/review/arm-cdn.api.md @@ -6,9 +6,9 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export type ActionType = string; @@ -24,18 +24,24 @@ export type AfdCertificateType = string; // @public export interface AfdCustomDomains { - beginCreate(resourceGroupName: string, profileName: string, customDomainName: string, customDomain: AFDDomain, options?: AfdCustomDomainsCreateOptionalParams): Promise, AfdCustomDomainsCreateResponse>>; + beginCreate(resourceGroupName: string, profileName: string, customDomainName: string, customDomain: AFDDomain, options?: AfdCustomDomainsCreateOptionalParams): Promise, AfdCustomDomainsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, profileName: string, customDomainName: string, customDomain: AFDDomain, options?: AfdCustomDomainsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, profileName: string, customDomainName: string, options?: AfdCustomDomainsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, profileName: string, customDomainName: string, options?: AfdCustomDomainsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, profileName: string, customDomainName: string, options?: AfdCustomDomainsDeleteOptionalParams): Promise; - beginRefreshValidationToken(resourceGroupName: string, profileName: string, customDomainName: string, options?: AfdCustomDomainsRefreshValidationTokenOptionalParams): Promise, void>>; + beginRefreshValidationToken(resourceGroupName: string, profileName: string, customDomainName: string, options?: AfdCustomDomainsRefreshValidationTokenOptionalParams): Promise, void>>; beginRefreshValidationTokenAndWait(resourceGroupName: string, profileName: string, customDomainName: string, options?: AfdCustomDomainsRefreshValidationTokenOptionalParams): Promise; - beginUpdate(resourceGroupName: string, profileName: string, customDomainName: string, customDomainUpdateProperties: AFDDomainUpdateParameters, options?: AfdCustomDomainsUpdateOptionalParams): Promise, AfdCustomDomainsUpdateResponse>>; + beginUpdate(resourceGroupName: string, profileName: string, customDomainName: string, customDomainUpdateProperties: AFDDomainUpdateParameters, options?: AfdCustomDomainsUpdateOptionalParams): Promise, AfdCustomDomainsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, profileName: string, customDomainName: string, customDomainUpdateProperties: AFDDomainUpdateParameters, options?: AfdCustomDomainsUpdateOptionalParams): Promise; get(resourceGroupName: string, profileName: string, customDomainName: string, options?: AfdCustomDomainsGetOptionalParams): Promise; listByProfile(resourceGroupName: string, profileName: string, options?: AfdCustomDomainsListByProfileOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface AfdCustomDomainsCreateHeaders { + // (undocumented) + location?: string; +} + // @public export interface AfdCustomDomainsCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -45,6 +51,12 @@ export interface AfdCustomDomainsCreateOptionalParams extends coreClient.Operati // @public export type AfdCustomDomainsCreateResponse = AFDDomain; +// @public +export interface AfdCustomDomainsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface AfdCustomDomainsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -72,12 +84,24 @@ export interface AfdCustomDomainsListByProfileOptionalParams extends coreClient. // @public export type AfdCustomDomainsListByProfileResponse = AFDDomainListResult; +// @public +export interface AfdCustomDomainsRefreshValidationTokenHeaders { + // (undocumented) + location?: string; +} + // @public export interface AfdCustomDomainsRefreshValidationTokenOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export interface AfdCustomDomainsUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface AfdCustomDomainsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -92,6 +116,9 @@ export interface AFDDomain extends ProxyResource { azureDnsZone?: ResourceReference; readonly deploymentStatus?: DeploymentStatus; readonly domainValidationState?: DomainValidationState; + extendedProperties?: { + [propertyName: string]: string; + }; hostName?: string; preValidatedCustomDomainResourceId?: ResourceReference; readonly profileName?: string; @@ -116,6 +143,9 @@ export interface AFDDomainListResult { // @public export interface AFDDomainProperties extends AFDDomainUpdatePropertiesParameters, AFDStateProperties { readonly domainValidationState?: DomainValidationState; + extendedProperties?: { + [propertyName: string]: string; + }; hostName: string; readonly validationProperties?: DomainValidationProperties; } @@ -169,13 +199,13 @@ export type AFDEndpointProtocols = string; // @public export interface AfdEndpoints { - beginCreate(resourceGroupName: string, profileName: string, endpointName: string, endpoint: AFDEndpoint, options?: AfdEndpointsCreateOptionalParams): Promise, AfdEndpointsCreateResponse>>; + beginCreate(resourceGroupName: string, profileName: string, endpointName: string, endpoint: AFDEndpoint, options?: AfdEndpointsCreateOptionalParams): Promise, AfdEndpointsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, profileName: string, endpointName: string, endpoint: AFDEndpoint, options?: AfdEndpointsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, profileName: string, endpointName: string, options?: AfdEndpointsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, profileName: string, endpointName: string, options?: AfdEndpointsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, profileName: string, endpointName: string, options?: AfdEndpointsDeleteOptionalParams): Promise; - beginPurgeContent(resourceGroupName: string, profileName: string, endpointName: string, contents: AfdPurgeParameters, options?: AfdEndpointsPurgeContentOptionalParams): Promise, void>>; + beginPurgeContent(resourceGroupName: string, profileName: string, endpointName: string, contents: AfdPurgeParameters, options?: AfdEndpointsPurgeContentOptionalParams): Promise, void>>; beginPurgeContentAndWait(resourceGroupName: string, profileName: string, endpointName: string, contents: AfdPurgeParameters, options?: AfdEndpointsPurgeContentOptionalParams): Promise; - beginUpdate(resourceGroupName: string, profileName: string, endpointName: string, endpointUpdateProperties: AFDEndpointUpdateParameters, options?: AfdEndpointsUpdateOptionalParams): Promise, AfdEndpointsUpdateResponse>>; + beginUpdate(resourceGroupName: string, profileName: string, endpointName: string, endpointUpdateProperties: AFDEndpointUpdateParameters, options?: AfdEndpointsUpdateOptionalParams): Promise, AfdEndpointsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, profileName: string, endpointName: string, endpointUpdateProperties: AFDEndpointUpdateParameters, options?: AfdEndpointsUpdateOptionalParams): Promise; get(resourceGroupName: string, profileName: string, endpointName: string, options?: AfdEndpointsGetOptionalParams): Promise; listByProfile(resourceGroupName: string, profileName: string, options?: AfdEndpointsListByProfileOptionalParams): PagedAsyncIterableIterator; @@ -183,6 +213,12 @@ export interface AfdEndpoints { validateCustomDomain(resourceGroupName: string, profileName: string, endpointName: string, customDomainProperties: ValidateCustomDomainInput, options?: AfdEndpointsValidateCustomDomainOptionalParams): Promise; } +// @public +export interface AfdEndpointsCreateHeaders { + // (undocumented) + location?: string; +} + // @public export interface AfdEndpointsCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -192,6 +228,12 @@ export interface AfdEndpointsCreateOptionalParams extends coreClient.OperationOp // @public export type AfdEndpointsCreateResponse = AFDEndpoint; +// @public +export interface AfdEndpointsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface AfdEndpointsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -233,12 +275,24 @@ export interface AfdEndpointsListResourceUsageOptionalParams extends coreClient. // @public export type AfdEndpointsListResourceUsageResponse = UsagesListResult; +// @public +export interface AfdEndpointsPurgeContentHeaders { + // (undocumented) + location?: string; +} + // @public export interface AfdEndpointsPurgeContentOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export interface AfdEndpointsUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface AfdEndpointsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -312,17 +366,23 @@ export interface AFDOriginGroupProperties extends AFDOriginGroupUpdateProperties // @public export interface AfdOriginGroups { - beginCreate(resourceGroupName: string, profileName: string, originGroupName: string, originGroup: AFDOriginGroup, options?: AfdOriginGroupsCreateOptionalParams): Promise, AfdOriginGroupsCreateResponse>>; + beginCreate(resourceGroupName: string, profileName: string, originGroupName: string, originGroup: AFDOriginGroup, options?: AfdOriginGroupsCreateOptionalParams): Promise, AfdOriginGroupsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, profileName: string, originGroupName: string, originGroup: AFDOriginGroup, options?: AfdOriginGroupsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, profileName: string, originGroupName: string, options?: AfdOriginGroupsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, profileName: string, originGroupName: string, options?: AfdOriginGroupsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, profileName: string, originGroupName: string, options?: AfdOriginGroupsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, profileName: string, originGroupName: string, originGroupUpdateProperties: AFDOriginGroupUpdateParameters, options?: AfdOriginGroupsUpdateOptionalParams): Promise, AfdOriginGroupsUpdateResponse>>; + beginUpdate(resourceGroupName: string, profileName: string, originGroupName: string, originGroupUpdateProperties: AFDOriginGroupUpdateParameters, options?: AfdOriginGroupsUpdateOptionalParams): Promise, AfdOriginGroupsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, profileName: string, originGroupName: string, originGroupUpdateProperties: AFDOriginGroupUpdateParameters, options?: AfdOriginGroupsUpdateOptionalParams): Promise; get(resourceGroupName: string, profileName: string, originGroupName: string, options?: AfdOriginGroupsGetOptionalParams): Promise; listByProfile(resourceGroupName: string, profileName: string, options?: AfdOriginGroupsListByProfileOptionalParams): PagedAsyncIterableIterator; listResourceUsage(resourceGroupName: string, profileName: string, originGroupName: string, options?: AfdOriginGroupsListResourceUsageOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface AfdOriginGroupsCreateHeaders { + // (undocumented) + location?: string; +} + // @public export interface AfdOriginGroupsCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -332,6 +392,12 @@ export interface AfdOriginGroupsCreateOptionalParams extends coreClient.Operatio // @public export type AfdOriginGroupsCreateResponse = AFDOriginGroup; +// @public +export interface AfdOriginGroupsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface AfdOriginGroupsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -373,6 +439,12 @@ export interface AfdOriginGroupsListResourceUsageOptionalParams extends coreClie // @public export type AfdOriginGroupsListResourceUsageResponse = UsagesListResult; +// @public +export interface AfdOriginGroupsUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface AfdOriginGroupsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -412,16 +484,22 @@ export interface AFDOriginProperties extends AFDOriginUpdatePropertiesParameters // @public export interface AfdOrigins { - beginCreate(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, origin: AFDOrigin, options?: AfdOriginsCreateOptionalParams): Promise, AfdOriginsCreateResponse>>; + beginCreate(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, origin: AFDOrigin, options?: AfdOriginsCreateOptionalParams): Promise, AfdOriginsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, origin: AFDOrigin, options?: AfdOriginsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, options?: AfdOriginsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, options?: AfdOriginsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, options?: AfdOriginsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, originUpdateProperties: AFDOriginUpdateParameters, options?: AfdOriginsUpdateOptionalParams): Promise, AfdOriginsUpdateResponse>>; + beginUpdate(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, originUpdateProperties: AFDOriginUpdateParameters, options?: AfdOriginsUpdateOptionalParams): Promise, AfdOriginsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, originUpdateProperties: AFDOriginUpdateParameters, options?: AfdOriginsUpdateOptionalParams): Promise; get(resourceGroupName: string, profileName: string, originGroupName: string, originName: string, options?: AfdOriginsGetOptionalParams): Promise; listByOriginGroup(resourceGroupName: string, profileName: string, originGroupName: string, options?: AfdOriginsListByOriginGroupOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface AfdOriginsCreateHeaders { + // (undocumented) + location?: string; +} + // @public export interface AfdOriginsCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -431,6 +509,12 @@ export interface AfdOriginsCreateOptionalParams extends coreClient.OperationOpti // @public export type AfdOriginsCreateResponse = AFDOrigin; +// @public +export interface AfdOriginsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface AfdOriginsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -458,6 +542,12 @@ export interface AfdOriginsListByOriginGroupOptionalParams extends coreClient.Op // @public export type AfdOriginsListByOriginGroupResponse = AFDOriginListResult; +// @public +export interface AfdOriginsUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface AfdOriginsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -499,10 +589,21 @@ export interface AFDOriginUpdatePropertiesParameters { // @public export interface AfdProfiles { + beginUpgrade(resourceGroupName: string, profileName: string, profileUpgradeParameters: ProfileUpgradeParameters, options?: AfdProfilesUpgradeOptionalParams): Promise, AfdProfilesUpgradeResponse>>; + beginUpgradeAndWait(resourceGroupName: string, profileName: string, profileUpgradeParameters: ProfileUpgradeParameters, options?: AfdProfilesUpgradeOptionalParams): Promise; + checkEndpointNameAvailability(resourceGroupName: string, profileName: string, checkEndpointNameAvailabilityInput: CheckEndpointNameAvailabilityInput, options?: AfdProfilesCheckEndpointNameAvailabilityOptionalParams): Promise; checkHostNameAvailability(resourceGroupName: string, profileName: string, checkHostNameAvailabilityInput: CheckHostNameAvailabilityInput, options?: AfdProfilesCheckHostNameAvailabilityOptionalParams): Promise; listResourceUsage(resourceGroupName: string, profileName: string, options?: AfdProfilesListResourceUsageOptionalParams): PagedAsyncIterableIterator; + validateSecret(resourceGroupName: string, profileName: string, validateSecretInput: ValidateSecretInput, options?: AfdProfilesValidateSecretOptionalParams): Promise; +} + +// @public +export interface AfdProfilesCheckEndpointNameAvailabilityOptionalParams extends coreClient.OperationOptions { } +// @public +export type AfdProfilesCheckEndpointNameAvailabilityResponse = CheckEndpointNameAvailabilityOutput; + // @public export interface AfdProfilesCheckHostNameAvailabilityOptionalParams extends coreClient.OperationOptions { } @@ -524,6 +625,28 @@ export interface AfdProfilesListResourceUsageOptionalParams extends coreClient.O // @public export type AfdProfilesListResourceUsageResponse = UsagesListResult; +// @public +export interface AfdProfilesUpgradeHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface AfdProfilesUpgradeOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type AfdProfilesUpgradeResponse = Profile; + +// @public +export interface AfdProfilesValidateSecretOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AfdProfilesValidateSecretResponse = ValidateSecretOutput; + // @public export type AfdProvisioningState = string; @@ -562,6 +685,12 @@ export interface AzureFirstPartyManagedCertificate extends Certificate { // @public export interface AzureFirstPartyManagedCertificateParameters extends SecretParameters { + readonly certificateAuthority?: string; + readonly expirationDate?: string; + readonly secretSource?: ResourceReference; + readonly subject?: string; + subjectAlternativeNames?: string[]; + readonly thumbprint?: string; type: "AzureFirstPartyManagedCertificate"; } @@ -597,6 +726,24 @@ export interface CacheKeyQueryStringActionParameters { // @public export type CacheType = string; +// @public +export type CanMigrateDefaultSku = string; + +// @public +export interface CanMigrateParameters { + classicResourceReference: ResourceReference; +} + +// @public +export interface CanMigrateResult { + readonly canMigrate?: boolean; + readonly defaultSku?: CanMigrateDefaultSku; + // (undocumented) + errors?: MigrationErrorType[]; + readonly id?: string; + readonly type?: string; +} + // @public export interface CdnCertificateSourceParameters { certificateType: CertificateType; @@ -620,6 +767,7 @@ export class CdnManagementClient extends coreClient.ServiceClient { // (undocumented) $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: CdnManagementClientOptionalParams); + constructor(credentials: coreAuth.TokenCredential, options?: CdnManagementClientOptionalParams); // (undocumented) afdCustomDomains: AfdCustomDomains; // (undocumented) @@ -668,9 +816,7 @@ export class CdnManagementClient extends coreClient.ServiceClient { // (undocumented) securityPolicies: SecurityPolicies; // (undocumented) - subscriptionId: string; - // (undocumented) - validate: Validate; + subscriptionId?: string; validateProbe(validateProbeInput: ValidateProbeInput, options?: ValidateProbeOptionalParams): Promise; } @@ -686,6 +832,9 @@ export interface CdnWebApplicationFirewallPolicy extends TrackedResource { customRules?: CustomRuleList; readonly endpointLinks?: CdnEndpoint[]; etag?: string; + extendedProperties?: { + [propertyName: string]: string; + }; managedRules?: ManagedRuleSetList; policySettings?: PolicySettings; readonly provisioningState?: ProvisioningState; @@ -898,18 +1047,24 @@ export type CustomDomainResourceState = string; // @public export interface CustomDomains { - beginCreate(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, customDomainProperties: CustomDomainParameters, options?: CustomDomainsCreateOptionalParams): Promise, CustomDomainsCreateResponse>>; + beginCreate(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, customDomainProperties: CustomDomainParameters, options?: CustomDomainsCreateOptionalParams): Promise, CustomDomainsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, customDomainProperties: CustomDomainParameters, options?: CustomDomainsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: CustomDomainsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: CustomDomainsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: CustomDomainsDeleteOptionalParams): Promise; - beginDisableCustomHttps(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: CustomDomainsDisableCustomHttpsOptionalParams): Promise, CustomDomainsDisableCustomHttpsResponse>>; + beginDisableCustomHttps(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: CustomDomainsDisableCustomHttpsOptionalParams): Promise, CustomDomainsDisableCustomHttpsResponse>>; beginDisableCustomHttpsAndWait(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: CustomDomainsDisableCustomHttpsOptionalParams): Promise; - beginEnableCustomHttps(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: CustomDomainsEnableCustomHttpsOptionalParams): Promise, CustomDomainsEnableCustomHttpsResponse>>; + beginEnableCustomHttps(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: CustomDomainsEnableCustomHttpsOptionalParams): Promise, CustomDomainsEnableCustomHttpsResponse>>; beginEnableCustomHttpsAndWait(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: CustomDomainsEnableCustomHttpsOptionalParams): Promise; get(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: CustomDomainsGetOptionalParams): Promise; listByEndpoint(resourceGroupName: string, profileName: string, endpointName: string, options?: CustomDomainsListByEndpointOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface CustomDomainsCreateHeaders { + // (undocumented) + location?: string; +} + // @public export interface CustomDomainsCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -919,12 +1074,24 @@ export interface CustomDomainsCreateOptionalParams extends coreClient.OperationO // @public export type CustomDomainsCreateResponse = CustomDomain; +// @public +export interface CustomDomainsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface CustomDomainsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export interface CustomDomainsDisableCustomHttpsHeaders { + // (undocumented) + location?: string; +} + // @public export interface CustomDomainsDisableCustomHttpsOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -934,6 +1101,12 @@ export interface CustomDomainsDisableCustomHttpsOptionalParams extends coreClien // @public export type CustomDomainsDisableCustomHttpsResponse = CustomDomain; +// @public +export interface CustomDomainsEnableCustomHttpsHeaders { + // (undocumented) + location?: string; +} + // @public export interface CustomDomainsEnableCustomHttpsOptionalParams extends coreClient.OperationOptions { customDomainHttpsParameters?: CustomDomainHttpsParametersUnion; @@ -1350,19 +1523,19 @@ export type EndpointResourceState = string; // @public export interface Endpoints { - beginCreate(resourceGroupName: string, profileName: string, endpointName: string, endpoint: Endpoint, options?: EndpointsCreateOptionalParams): Promise, EndpointsCreateResponse>>; + beginCreate(resourceGroupName: string, profileName: string, endpointName: string, endpoint: Endpoint, options?: EndpointsCreateOptionalParams): Promise, EndpointsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, profileName: string, endpointName: string, endpoint: Endpoint, options?: EndpointsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, profileName: string, endpointName: string, options?: EndpointsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, profileName: string, endpointName: string, options?: EndpointsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, profileName: string, endpointName: string, options?: EndpointsDeleteOptionalParams): Promise; - beginLoadContent(resourceGroupName: string, profileName: string, endpointName: string, contentFilePaths: LoadParameters, options?: EndpointsLoadContentOptionalParams): Promise, void>>; + beginLoadContent(resourceGroupName: string, profileName: string, endpointName: string, contentFilePaths: LoadParameters, options?: EndpointsLoadContentOptionalParams): Promise, void>>; beginLoadContentAndWait(resourceGroupName: string, profileName: string, endpointName: string, contentFilePaths: LoadParameters, options?: EndpointsLoadContentOptionalParams): Promise; - beginPurgeContent(resourceGroupName: string, profileName: string, endpointName: string, contentFilePaths: PurgeParameters, options?: EndpointsPurgeContentOptionalParams): Promise, void>>; + beginPurgeContent(resourceGroupName: string, profileName: string, endpointName: string, contentFilePaths: PurgeParameters, options?: EndpointsPurgeContentOptionalParams): Promise, void>>; beginPurgeContentAndWait(resourceGroupName: string, profileName: string, endpointName: string, contentFilePaths: PurgeParameters, options?: EndpointsPurgeContentOptionalParams): Promise; - beginStart(resourceGroupName: string, profileName: string, endpointName: string, options?: EndpointsStartOptionalParams): Promise, EndpointsStartResponse>>; + beginStart(resourceGroupName: string, profileName: string, endpointName: string, options?: EndpointsStartOptionalParams): Promise, EndpointsStartResponse>>; beginStartAndWait(resourceGroupName: string, profileName: string, endpointName: string, options?: EndpointsStartOptionalParams): Promise; - beginStop(resourceGroupName: string, profileName: string, endpointName: string, options?: EndpointsStopOptionalParams): Promise, EndpointsStopResponse>>; + beginStop(resourceGroupName: string, profileName: string, endpointName: string, options?: EndpointsStopOptionalParams): Promise, EndpointsStopResponse>>; beginStopAndWait(resourceGroupName: string, profileName: string, endpointName: string, options?: EndpointsStopOptionalParams): Promise; - beginUpdate(resourceGroupName: string, profileName: string, endpointName: string, endpointUpdateProperties: EndpointUpdateParameters, options?: EndpointsUpdateOptionalParams): Promise, EndpointsUpdateResponse>>; + beginUpdate(resourceGroupName: string, profileName: string, endpointName: string, endpointUpdateProperties: EndpointUpdateParameters, options?: EndpointsUpdateOptionalParams): Promise, EndpointsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, profileName: string, endpointName: string, endpointUpdateProperties: EndpointUpdateParameters, options?: EndpointsUpdateOptionalParams): Promise; get(resourceGroupName: string, profileName: string, endpointName: string, options?: EndpointsGetOptionalParams): Promise; listByProfile(resourceGroupName: string, profileName: string, options?: EndpointsListByProfileOptionalParams): PagedAsyncIterableIterator; @@ -1370,6 +1543,12 @@ export interface Endpoints { validateCustomDomain(resourceGroupName: string, profileName: string, endpointName: string, customDomainProperties: ValidateCustomDomainInput, options?: EndpointsValidateCustomDomainOptionalParams): Promise; } +// @public +export interface EndpointsCreateHeaders { + // (undocumented) + location?: string; +} + // @public export interface EndpointsCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1379,6 +1558,12 @@ export interface EndpointsCreateOptionalParams extends coreClient.OperationOptio // @public export type EndpointsCreateResponse = Endpoint; +// @public +export interface EndpointsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface EndpointsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1420,18 +1605,36 @@ export interface EndpointsListResourceUsageOptionalParams extends coreClient.Ope // @public export type EndpointsListResourceUsageResponse = ResourceUsageListResult; +// @public +export interface EndpointsLoadContentHeaders { + // (undocumented) + location?: string; +} + // @public export interface EndpointsLoadContentOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export interface EndpointsPurgeContentHeaders { + // (undocumented) + location?: string; +} + // @public export interface EndpointsPurgeContentOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export interface EndpointsStartHeaders { + // (undocumented) + location?: string; +} + // @public export interface EndpointsStartOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1441,6 +1644,12 @@ export interface EndpointsStartOptionalParams extends coreClient.OperationOption // @public export type EndpointsStartResponse = Endpoint; +// @public +export interface EndpointsStopHeaders { + // (undocumented) + location?: string; +} + // @public export interface EndpointsStopOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1450,6 +1659,12 @@ export interface EndpointsStopOptionalParams extends coreClient.OperationOptions // @public export type EndpointsStopResponse = Endpoint; +// @public +export interface EndpointsUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface EndpointsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1694,6 +1909,12 @@ export enum KnownCacheType { All = "All" } +// @public +export enum KnownCanMigrateDefaultSku { + PremiumAzureFrontDoor = "Premium_AzureFrontDoor", + StandardAzureFrontDoor = "Standard_AzureFrontDoor" +} + // @public export enum KnownCertificateSource { AzureKeyVault = "AzureKeyVault", @@ -1956,6 +2177,14 @@ export enum KnownManagedRuleEnabledState { Enabled = "Enabled" } +// @public +export enum KnownManagedServiceIdentityType { + None = "None", + SystemAssigned = "SystemAssigned", + SystemAssignedUserAssigned = "SystemAssigned, UserAssigned", + UserAssigned = "UserAssigned" +} + // @public export enum KnownMatchProcessingBehavior { Continue = "Continue", @@ -1986,14 +2215,14 @@ export enum KnownMatchVariable { } // @public -export enum KnownMetricsResponseGranularity { +export enum KnownMetricsGranularity { P1D = "P1D", PT1H = "PT1H", PT5M = "PT5M" } // @public -export enum KnownMetricsResponseSeriesItemUnit { +export enum KnownMetricsSeriesUnit { BitsPerSecond = "bitsPerSecond", Bytes = "bytes", Count = "count", @@ -2129,10 +2358,15 @@ export enum KnownProfileProvisioningState { // @public export enum KnownProfileResourceState { + AbortingMigration = "AbortingMigration", Active = "Active", + CommittingMigration = "CommittingMigration", Creating = "Creating", Deleting = "Deleting", - Disabled = "Disabled" + Disabled = "Disabled", + Migrated = "Migrated", + Migrating = "Migrating", + PendingMigrationCommit = "PendingMigrationCommit" } // @public @@ -2458,12 +2692,17 @@ export enum KnownWafMetric { } // @public -export enum KnownWafMetricsResponseGranularity { +export enum KnownWafMetricsGranularity { P1D = "P1D", PT1H = "PT1H", PT5M = "PT5M" } +// @public +export enum KnownWafMetricsSeriesUnit { + Count = "count" +} + // @public export enum KnownWafRankingGroupBy { CustomDomain = "customDomain", @@ -2675,6 +2914,19 @@ export interface ManagedRuleSetsListOptionalParams extends coreClient.OperationO // @public export type ManagedRuleSetsListResponse = ManagedRuleSetDefinitionList; +// @public +export interface ManagedServiceIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type: ManagedServiceIdentityType; + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentity; + }; +} + +// @public +export type ManagedServiceIdentityType = string; + // @public export interface MatchCondition { matchValue: string[]; @@ -2699,6 +2951,9 @@ export interface MetricAvailability { timeGrain?: string; } +// @public +export type MetricsGranularity = string; + // @public export interface MetricSpecification { aggregationType?: string; @@ -2721,14 +2976,11 @@ export interface MetricsResponse { // (undocumented) dateTimeEnd?: Date; // (undocumented) - granularity?: MetricsResponseGranularity; + granularity?: MetricsGranularity; // (undocumented) series?: MetricsResponseSeriesItem[]; } -// @public -export type MetricsResponseGranularity = string; - // @public (undocumented) export interface MetricsResponseSeriesItem { // (undocumented) @@ -2738,12 +2990,9 @@ export interface MetricsResponseSeriesItem { // (undocumented) metric?: string; // (undocumented) - unit?: MetricsResponseSeriesItemUnit; + unit?: MetricsSeriesUnit; } -// @public -export type MetricsResponseSeriesItemUnit = string; - // @public (undocumented) export interface MetricsResponseSeriesPropertiesItemsItem { // (undocumented) @@ -2752,6 +3001,38 @@ export interface MetricsResponseSeriesPropertiesItemsItem { value?: string; } +// @public +export type MetricsSeriesUnit = string; + +// @public +export interface MigrateResult { + readonly id?: string; + readonly migratedProfileResourceId?: ResourceReference; + readonly type?: string; +} + +// @public +export interface MigrationErrorType { + readonly code?: string; + readonly errorMessage?: string; + readonly nextSteps?: string; + readonly resourceName?: string; +} + +// @public +export interface MigrationParameters { + classicResourceReference: ResourceReference; + migrationWebApplicationFirewallMappings?: MigrationWebApplicationFirewallMapping[]; + profileName: string; + sku: Sku; +} + +// @public +export interface MigrationWebApplicationFirewallMapping { + migratedFrom?: ResourceReference; + migratedTo?: ResourceReference; +} + // @public export type MinimumTlsVersion = "None" | "TLS10" | "TLS12"; @@ -2870,16 +3151,22 @@ export type OriginGroupResourceState = string; // @public export interface OriginGroups { - beginCreate(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, originGroup: OriginGroup, options?: OriginGroupsCreateOptionalParams): Promise, OriginGroupsCreateResponse>>; + beginCreate(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, originGroup: OriginGroup, options?: OriginGroupsCreateOptionalParams): Promise, OriginGroupsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, originGroup: OriginGroup, options?: OriginGroupsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, options?: OriginGroupsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, options?: OriginGroupsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, options?: OriginGroupsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, originGroupUpdateProperties: OriginGroupUpdateParameters, options?: OriginGroupsUpdateOptionalParams): Promise, OriginGroupsUpdateResponse>>; + beginUpdate(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, originGroupUpdateProperties: OriginGroupUpdateParameters, options?: OriginGroupsUpdateOptionalParams): Promise, OriginGroupsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, originGroupUpdateProperties: OriginGroupUpdateParameters, options?: OriginGroupsUpdateOptionalParams): Promise; get(resourceGroupName: string, profileName: string, endpointName: string, originGroupName: string, options?: OriginGroupsGetOptionalParams): Promise; listByEndpoint(resourceGroupName: string, profileName: string, endpointName: string, options?: OriginGroupsListByEndpointOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface OriginGroupsCreateHeaders { + // (undocumented) + location?: string; +} + // @public export interface OriginGroupsCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2889,6 +3176,12 @@ export interface OriginGroupsCreateOptionalParams extends coreClient.OperationOp // @public export type OriginGroupsCreateResponse = OriginGroup; +// @public +export interface OriginGroupsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface OriginGroupsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2916,6 +3209,12 @@ export interface OriginGroupsListByEndpointOptionalParams extends coreClient.Ope // @public export type OriginGroupsListByEndpointResponse = OriginGroupListResult; +// @public +export interface OriginGroupsUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface OriginGroupsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2962,16 +3261,22 @@ export type OriginResourceState = string; // @public export interface Origins { - beginCreate(resourceGroupName: string, profileName: string, endpointName: string, originName: string, origin: Origin, options?: OriginsCreateOptionalParams): Promise, OriginsCreateResponse>>; + beginCreate(resourceGroupName: string, profileName: string, endpointName: string, originName: string, origin: Origin, options?: OriginsCreateOptionalParams): Promise, OriginsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, profileName: string, endpointName: string, originName: string, origin: Origin, options?: OriginsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, profileName: string, endpointName: string, originName: string, options?: OriginsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, profileName: string, endpointName: string, originName: string, options?: OriginsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, profileName: string, endpointName: string, originName: string, options?: OriginsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, profileName: string, endpointName: string, originName: string, originUpdateProperties: OriginUpdateParameters, options?: OriginsUpdateOptionalParams): Promise, OriginsUpdateResponse>>; + beginUpdate(resourceGroupName: string, profileName: string, endpointName: string, originName: string, originUpdateProperties: OriginUpdateParameters, options?: OriginsUpdateOptionalParams): Promise, OriginsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, profileName: string, endpointName: string, originName: string, originUpdateProperties: OriginUpdateParameters, options?: OriginsUpdateOptionalParams): Promise; get(resourceGroupName: string, profileName: string, endpointName: string, originName: string, options?: OriginsGetOptionalParams): Promise; listByEndpoint(resourceGroupName: string, profileName: string, endpointName: string, options?: OriginsListByEndpointOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface OriginsCreateHeaders { + // (undocumented) + location?: string; +} + // @public export interface OriginsCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2981,6 +3286,12 @@ export interface OriginsCreateOptionalParams extends coreClient.OperationOptions // @public export type OriginsCreateResponse = Origin; +// @public +export interface OriginsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface OriginsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3008,6 +3319,12 @@ export interface OriginsListByEndpointOptionalParams extends coreClient.Operatio // @public export type OriginsListByEndpointResponse = OriginListResult; +// @public +export interface OriginsUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface OriginsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3052,15 +3369,21 @@ export type ParamIndicator = string; // @public export interface Policies { - beginCreateOrUpdate(resourceGroupName: string, policyName: string, cdnWebApplicationFirewallPolicy: CdnWebApplicationFirewallPolicy, options?: PoliciesCreateOrUpdateOptionalParams): Promise, PoliciesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, policyName: string, cdnWebApplicationFirewallPolicy: CdnWebApplicationFirewallPolicy, options?: PoliciesCreateOrUpdateOptionalParams): Promise, PoliciesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, policyName: string, cdnWebApplicationFirewallPolicy: CdnWebApplicationFirewallPolicy, options?: PoliciesCreateOrUpdateOptionalParams): Promise; - beginUpdate(resourceGroupName: string, policyName: string, cdnWebApplicationFirewallPolicyPatchParameters: CdnWebApplicationFirewallPolicyPatchParameters, options?: PoliciesUpdateOptionalParams): Promise, PoliciesUpdateResponse>>; + beginUpdate(resourceGroupName: string, policyName: string, cdnWebApplicationFirewallPolicyPatchParameters: CdnWebApplicationFirewallPolicyPatchParameters, options?: PoliciesUpdateOptionalParams): Promise, PoliciesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, policyName: string, cdnWebApplicationFirewallPolicyPatchParameters: CdnWebApplicationFirewallPolicyPatchParameters, options?: PoliciesUpdateOptionalParams): Promise; delete(resourceGroupName: string, policyName: string, options?: PoliciesDeleteOptionalParams): Promise; get(resourceGroupName: string, policyName: string, options?: PoliciesGetOptionalParams): Promise; list(resourceGroupName: string, options?: PoliciesListOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface PoliciesCreateOrUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface PoliciesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3095,6 +3418,12 @@ export interface PoliciesListOptionalParams extends coreClient.OperationOptions // @public export type PoliciesListResponse = CdnWebApplicationFirewallPolicyList; +// @public +export interface PoliciesUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface PoliciesUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3147,7 +3476,11 @@ export type ProbeProtocol = "NotSet" | "Http" | "Https"; // @public export interface Profile extends TrackedResource { + readonly extendedProperties?: { + [propertyName: string]: string; + }; readonly frontDoorId?: string; + identity?: ManagedServiceIdentity; readonly kind?: string; originResponseTimeoutSeconds?: number; readonly provisioningState?: ProfileProvisioningState; @@ -3155,6 +3488,12 @@ export interface Profile extends TrackedResource { sku: Sku; } +// @public +export interface ProfileChangeSkuWafMapping { + changeToWafPolicy: ResourceReference; + securityPolicyName: string; +} + // @public export interface ProfileListResult { nextLink?: string; @@ -3169,11 +3508,17 @@ export type ProfileResourceState = string; // @public export interface Profiles { - beginCreate(resourceGroupName: string, profileName: string, profile: Profile, options?: ProfilesCreateOptionalParams): Promise, ProfilesCreateResponse>>; + beginCanMigrate(resourceGroupName: string, canMigrateParameters: CanMigrateParameters, options?: ProfilesCanMigrateOptionalParams): Promise, ProfilesCanMigrateResponse>>; + beginCanMigrateAndWait(resourceGroupName: string, canMigrateParameters: CanMigrateParameters, options?: ProfilesCanMigrateOptionalParams): Promise; + beginCreate(resourceGroupName: string, profileName: string, profile: Profile, options?: ProfilesCreateOptionalParams): Promise, ProfilesCreateResponse>>; beginCreateAndWait(resourceGroupName: string, profileName: string, profile: Profile, options?: ProfilesCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, profileName: string, options?: ProfilesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, profileName: string, options?: ProfilesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, profileName: string, options?: ProfilesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, profileName: string, profileUpdateParameters: ProfileUpdateParameters, options?: ProfilesUpdateOptionalParams): Promise, ProfilesUpdateResponse>>; + beginMigrate(resourceGroupName: string, migrationParameters: MigrationParameters, options?: ProfilesMigrateOptionalParams): Promise, ProfilesMigrateResponse>>; + beginMigrateAndWait(resourceGroupName: string, migrationParameters: MigrationParameters, options?: ProfilesMigrateOptionalParams): Promise; + beginMigrationCommit(resourceGroupName: string, profileName: string, options?: ProfilesMigrationCommitOptionalParams): Promise, void>>; + beginMigrationCommitAndWait(resourceGroupName: string, profileName: string, options?: ProfilesMigrationCommitOptionalParams): Promise; + beginUpdate(resourceGroupName: string, profileName: string, profileUpdateParameters: ProfileUpdateParameters, options?: ProfilesUpdateOptionalParams): Promise, ProfilesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, profileName: string, profileUpdateParameters: ProfileUpdateParameters, options?: ProfilesUpdateOptionalParams): Promise; generateSsoUri(resourceGroupName: string, profileName: string, options?: ProfilesGenerateSsoUriOptionalParams): Promise; get(resourceGroupName: string, profileName: string, options?: ProfilesGetOptionalParams): Promise; @@ -3183,6 +3528,27 @@ export interface Profiles { listSupportedOptimizationTypes(resourceGroupName: string, profileName: string, options?: ProfilesListSupportedOptimizationTypesOptionalParams): Promise; } +// @public +export interface ProfilesCanMigrateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ProfilesCanMigrateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ProfilesCanMigrateResponse = CanMigrateResult; + +// @public +export interface ProfilesCreateHeaders { + // (undocumented) + location?: string; +} + // @public export interface ProfilesCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3192,6 +3558,12 @@ export interface ProfilesCreateOptionalParams extends coreClient.OperationOption // @public export type ProfilesCreateResponse = Profile; +// @public +export interface ProfilesDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface ProfilesDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3261,6 +3633,39 @@ export interface ProfilesListSupportedOptimizationTypesOptionalParams extends co // @public export type ProfilesListSupportedOptimizationTypesResponse = SupportedOptimizationTypesListResult; +// @public +export interface ProfilesMigrateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ProfilesMigrateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ProfilesMigrateResponse = MigrateResult; + +// @public +export interface ProfilesMigrationCommitHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ProfilesMigrationCommitOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ProfilesUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface ProfilesUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3272,12 +3677,18 @@ export type ProfilesUpdateResponse = Profile; // @public export interface ProfileUpdateParameters { + identity?: ManagedServiceIdentity; originResponseTimeoutSeconds?: number; tags?: { [propertyName: string]: string; }; } +// @public +export interface ProfileUpgradeParameters { + wafMappingList: ProfileChangeSkuWafMapping[]; +} + // @public export type ProtocolType = string; @@ -3588,16 +3999,22 @@ export interface RouteProperties extends RouteUpdatePropertiesParameters, AFDSta // @public export interface Routes { - beginCreate(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, route: Route, options?: RoutesCreateOptionalParams): Promise, RoutesCreateResponse>>; + beginCreate(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, route: Route, options?: RoutesCreateOptionalParams): Promise, RoutesCreateResponse>>; beginCreateAndWait(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, route: Route, options?: RoutesCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, options?: RoutesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, options?: RoutesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, options?: RoutesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, routeUpdateProperties: RouteUpdateParameters, options?: RoutesUpdateOptionalParams): Promise, RoutesUpdateResponse>>; + beginUpdate(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, routeUpdateProperties: RouteUpdateParameters, options?: RoutesUpdateOptionalParams): Promise, RoutesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, routeUpdateProperties: RouteUpdateParameters, options?: RoutesUpdateOptionalParams): Promise; get(resourceGroupName: string, profileName: string, endpointName: string, routeName: string, options?: RoutesGetOptionalParams): Promise; listByEndpoint(resourceGroupName: string, profileName: string, endpointName: string, options?: RoutesListByEndpointOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface RoutesCreateHeaders { + // (undocumented) + location?: string; +} + // @public export interface RoutesCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3607,6 +4024,12 @@ export interface RoutesCreateOptionalParams extends coreClient.OperationOptions // @public export type RoutesCreateResponse = Route; +// @public +export interface RoutesDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface RoutesDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3634,6 +4057,12 @@ export interface RoutesListByEndpointOptionalParams extends coreClient.Operation // @public export type RoutesListByEndpointResponse = RouteListResult; +// @public +export interface RoutesUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface RoutesUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3707,16 +4136,22 @@ export type RuleQueryStringCachingBehavior = string; // @public export interface Rules { - beginCreate(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, rule: Rule, options?: RulesCreateOptionalParams): Promise, RulesCreateResponse>>; + beginCreate(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, rule: Rule, options?: RulesCreateOptionalParams): Promise, RulesCreateResponse>>; beginCreateAndWait(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, rule: Rule, options?: RulesCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, options?: RulesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, options?: RulesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, options?: RulesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, ruleUpdateProperties: RuleUpdateParameters, options?: RulesUpdateOptionalParams): Promise, RulesUpdateResponse>>; + beginUpdate(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, ruleUpdateProperties: RuleUpdateParameters, options?: RulesUpdateOptionalParams): Promise, RulesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, ruleUpdateProperties: RuleUpdateParameters, options?: RulesUpdateOptionalParams): Promise; get(resourceGroupName: string, profileName: string, ruleSetName: string, ruleName: string, options?: RulesGetOptionalParams): Promise; listByRuleSet(resourceGroupName: string, profileName: string, ruleSetName: string, options?: RulesListByRuleSetOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface RulesCreateHeaders { + // (undocumented) + location?: string; +} + // @public export interface RulesCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3726,6 +4161,12 @@ export interface RulesCreateOptionalParams extends coreClient.OperationOptions { // @public export type RulesCreateResponse = Rule; +// @public +export interface RulesDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface RulesDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3752,7 +4193,7 @@ export interface RuleSetProperties extends AFDStateProperties { // @public export interface RuleSets { - beginDelete(resourceGroupName: string, profileName: string, ruleSetName: string, options?: RuleSetsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, profileName: string, ruleSetName: string, options?: RuleSetsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, profileName: string, ruleSetName: string, options?: RuleSetsDeleteOptionalParams): Promise; create(resourceGroupName: string, profileName: string, ruleSetName: string, options?: RuleSetsCreateOptionalParams): Promise; get(resourceGroupName: string, profileName: string, ruleSetName: string, options?: RuleSetsGetOptionalParams): Promise; @@ -3767,6 +4208,12 @@ export interface RuleSetsCreateOptionalParams extends coreClient.OperationOption // @public export type RuleSetsCreateResponse = RuleSet; +// @public +export interface RuleSetsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface RuleSetsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3829,6 +4276,12 @@ export interface RulesListByRuleSetOptionalParams extends coreClient.OperationOp // @public export type RulesListByRuleSetResponse = RuleListResult; +// @public +export interface RulesUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface RulesUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3886,14 +4339,20 @@ export interface SecretProperties extends AFDStateProperties { // @public export interface Secrets { - beginCreate(resourceGroupName: string, profileName: string, secretName: string, secret: Secret, options?: SecretsCreateOptionalParams): Promise, SecretsCreateResponse>>; + beginCreate(resourceGroupName: string, profileName: string, secretName: string, secret: Secret, options?: SecretsCreateOptionalParams): Promise, SecretsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, profileName: string, secretName: string, secret: Secret, options?: SecretsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, profileName: string, secretName: string, options?: SecretsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, profileName: string, secretName: string, options?: SecretsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, profileName: string, secretName: string, options?: SecretsDeleteOptionalParams): Promise; get(resourceGroupName: string, profileName: string, secretName: string, options?: SecretsGetOptionalParams): Promise; listByProfile(resourceGroupName: string, profileName: string, options?: SecretsListByProfileOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface SecretsCreateHeaders { + // (undocumented) + location?: string; +} + // @public export interface SecretsCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3903,6 +4362,12 @@ export interface SecretsCreateOptionalParams extends coreClient.OperationOptions // @public export type SecretsCreateResponse = Secret; +// @public +export interface SecretsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface SecretsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3935,16 +4400,22 @@ export type SecretType = string; // @public export interface SecurityPolicies { - beginCreate(resourceGroupName: string, profileName: string, securityPolicyName: string, securityPolicy: SecurityPolicy, options?: SecurityPoliciesCreateOptionalParams): Promise, SecurityPoliciesCreateResponse>>; + beginCreate(resourceGroupName: string, profileName: string, securityPolicyName: string, securityPolicy: SecurityPolicy, options?: SecurityPoliciesCreateOptionalParams): Promise, SecurityPoliciesCreateResponse>>; beginCreateAndWait(resourceGroupName: string, profileName: string, securityPolicyName: string, securityPolicy: SecurityPolicy, options?: SecurityPoliciesCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, profileName: string, securityPolicyName: string, options?: SecurityPoliciesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, profileName: string, securityPolicyName: string, options?: SecurityPoliciesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, profileName: string, securityPolicyName: string, options?: SecurityPoliciesDeleteOptionalParams): Promise; - beginPatch(resourceGroupName: string, profileName: string, securityPolicyName: string, securityPolicyUpdateProperties: SecurityPolicyUpdateParameters, options?: SecurityPoliciesPatchOptionalParams): Promise, SecurityPoliciesPatchResponse>>; + beginPatch(resourceGroupName: string, profileName: string, securityPolicyName: string, securityPolicyUpdateProperties: SecurityPolicyUpdateParameters, options?: SecurityPoliciesPatchOptionalParams): Promise, SecurityPoliciesPatchResponse>>; beginPatchAndWait(resourceGroupName: string, profileName: string, securityPolicyName: string, securityPolicyUpdateProperties: SecurityPolicyUpdateParameters, options?: SecurityPoliciesPatchOptionalParams): Promise; get(resourceGroupName: string, profileName: string, securityPolicyName: string, options?: SecurityPoliciesGetOptionalParams): Promise; listByProfile(resourceGroupName: string, profileName: string, options?: SecurityPoliciesListByProfileOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface SecurityPoliciesCreateHeaders { + // (undocumented) + location?: string; +} + // @public export interface SecurityPoliciesCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3954,6 +4425,12 @@ export interface SecurityPoliciesCreateOptionalParams extends coreClient.Operati // @public export type SecurityPoliciesCreateResponse = SecurityPolicy; +// @public +export interface SecurityPoliciesDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface SecurityPoliciesDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3981,6 +4458,12 @@ export interface SecurityPoliciesListByProfileOptionalParams extends coreClient. // @public export type SecurityPoliciesListByProfileResponse = SecurityPolicyListResult; +// @public +export interface SecurityPoliciesPatchHeaders { + // (undocumented) + location?: string; +} + // @public export interface SecurityPoliciesPatchOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -4278,14 +4761,15 @@ export interface UsagesListResult { export type UsageUnit = string; // @public -export interface UserManagedHttpsParameters extends CustomDomainHttpsParameters { - certificateSource: "AzureKeyVault"; - certificateSourceParameters: KeyVaultCertificateSourceParameters; +export interface UserAssignedIdentity { + readonly clientId?: string; + readonly principalId?: string; } // @public -export interface Validate { - secret(validateSecretInput: ValidateSecretInput, options?: ValidateSecretOptionalParams): Promise; +export interface UserManagedHttpsParameters extends CustomDomainHttpsParameters { + certificateSource: "AzureKeyVault"; + certificateSourceParameters: KeyVaultCertificateSourceParameters; } // @public @@ -4326,19 +4810,12 @@ export interface ValidateSecretInput { secretVersion?: string; } -// @public -export interface ValidateSecretOptionalParams extends coreClient.OperationOptions { -} - // @public export interface ValidateSecretOutput { message?: string; status?: Status; } -// @public -export type ValidateSecretResponse = ValidateSecretOutput; - // @public export interface ValidationToken { readonly token?: string; @@ -4356,6 +4833,9 @@ export type WafMatchVariable = string; // @public export type WafMetric = string; +// @public +export type WafMetricsGranularity = string; + // @public export interface WafMetricsResponse { // (undocumented) @@ -4363,14 +4843,11 @@ export interface WafMetricsResponse { // (undocumented) dateTimeEnd?: Date; // (undocumented) - granularity?: WafMetricsResponseGranularity; + granularity?: WafMetricsGranularity; // (undocumented) series?: WafMetricsResponseSeriesItem[]; } -// @public -export type WafMetricsResponseGranularity = string; - // @public (undocumented) export interface WafMetricsResponseSeriesItem { // (undocumented) @@ -4380,7 +4857,7 @@ export interface WafMetricsResponseSeriesItem { // (undocumented) metric?: string; // (undocumented) - unit?: "count"; + unit?: WafMetricsSeriesUnit; } // @public (undocumented) @@ -4391,6 +4868,9 @@ export interface WafMetricsResponseSeriesPropertiesItemsItem { value?: string; } +// @public +export type WafMetricsSeriesUnit = string; + // @public export type WafRankingGroupBy = string; diff --git a/sdk/cdn/arm-cdn/src/cdnManagementClient.ts b/sdk/cdn/arm-cdn/src/cdnManagementClient.ts index 34af598751f0..8e8b2b902baa 100644 --- a/sdk/cdn/arm-cdn/src/cdnManagementClient.ts +++ b/sdk/cdn/arm-cdn/src/cdnManagementClient.ts @@ -25,7 +25,6 @@ import { RulesImpl, SecurityPoliciesImpl, SecretsImpl, - ValidateImpl, LogAnalyticsImpl, ProfilesImpl, EndpointsImpl, @@ -49,7 +48,6 @@ import { Rules, SecurityPolicies, Secrets, - Validate, LogAnalytics, Profiles, Endpoints, @@ -81,7 +79,7 @@ import { export class CdnManagementClient extends coreClient.ServiceClient { $host: string; - subscriptionId: string; + subscriptionId?: string; apiVersion: string; /** @@ -94,12 +92,26 @@ export class CdnManagementClient extends coreClient.ServiceClient { credentials: coreAuth.TokenCredential, subscriptionId: string, options?: CdnManagementClientOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + options?: CdnManagementClientOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionIdOrOptions?: CdnManagementClientOptionalParams | string, + options?: CdnManagementClientOptionalParams ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); + + let subscriptionId: string | undefined; + + if (typeof subscriptionIdOrOptions === "string") { + subscriptionId = subscriptionIdOrOptions; + } else if (typeof subscriptionIdOrOptions === "object") { + options = subscriptionIdOrOptions; } // Initializing default values for options @@ -111,7 +123,7 @@ export class CdnManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-cdn/8.0.1`; + const packageDetails = `azsdk-js-arm-cdn/9.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -164,7 +176,7 @@ export class CdnManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-06-01"; + this.apiVersion = options.apiVersion || "2023-05-01"; this.afdProfiles = new AfdProfilesImpl(this); this.afdCustomDomains = new AfdCustomDomainsImpl(this); this.afdEndpoints = new AfdEndpointsImpl(this); @@ -175,7 +187,6 @@ export class CdnManagementClient extends coreClient.ServiceClient { this.rules = new RulesImpl(this); this.securityPolicies = new SecurityPoliciesImpl(this); this.secrets = new SecretsImpl(this); - this.validate = new ValidateImpl(this); this.logAnalytics = new LogAnalyticsImpl(this); this.profiles = new ProfilesImpl(this); this.endpoints = new EndpointsImpl(this); @@ -295,7 +306,6 @@ export class CdnManagementClient extends coreClient.ServiceClient { rules: Rules; securityPolicies: SecurityPolicies; secrets: Secrets; - validate: Validate; logAnalytics: LogAnalytics; profiles: Profiles; endpoints: Endpoints; diff --git a/sdk/cdn/arm-cdn/src/lroImpl.ts b/sdk/cdn/arm-cdn/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/cdn/arm-cdn/src/lroImpl.ts +++ b/sdk/cdn/arm-cdn/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; } diff --git a/sdk/cdn/arm-cdn/src/models/index.ts b/sdk/cdn/arm-cdn/src/models/index.ts index fb3a98f90362..c6dec8970842 100644 --- a/sdk/cdn/arm-cdn/src/models/index.ts +++ b/sdk/cdn/arm-cdn/src/models/index.ts @@ -195,6 +195,137 @@ export interface CheckNameAvailabilityOutput { readonly message?: string; } +/** Input of the secret to be validated. */ +export interface ValidateSecretInput { + /** The secret type. */ + secretType: SecretType; + /** 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}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ */ + secretSource: ResourceReference; + /** Secret version, if customer is using a specific version. */ + secretVersion?: string; +} + +/** Reference to another resource. */ +export interface ResourceReference { + /** Resource ID. */ + id?: string; +} + +/** Output of the validated secret. */ +export interface ValidateSecretOutput { + /** The validation status. */ + status?: Status; + /** Detailed error message */ + message?: string; +} + +/** Parameters required for profile upgrade. */ +export interface ProfileUpgradeParameters { + /** Web Application Firewall (WAF) and security policy mapping for the profile upgrade */ + wafMappingList: ProfileChangeSkuWafMapping[]; +} + +/** Parameters required for profile upgrade. */ +export interface ProfileChangeSkuWafMapping { + /** The security policy name. */ + securityPolicyName: string; + /** The new waf resource for the security policy to use. */ + changeToWafPolicy: ResourceReference; +} + +/** + * 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. + * + */ +export interface Sku { + /** Name of the pricing tier. */ + name?: SkuName; +} + +/** Managed service identity (system assigned and/or user assigned identities) */ +export interface ManagedServiceIdentity { + /** + * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ + type: ManagedServiceIdentityType; + /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ + userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; +} + +/** User assigned identity properties */ +export interface UserAssignedIdentity { + /** + * The principal ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The client ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clientId?: string; +} + +/** The core properties of ARM resources */ +export interface Resource { + /** + * Resource ID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Resource name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Resource type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Read only system data + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Read only system data */ +export interface SystemData { + /** An identifier for the identity that created the resource */ + createdBy?: string; + /** The type of identity that created the resource */ + createdByType?: IdentityType; + /** The timestamp of resource creation (UTC) */ + createdAt?: Date; + /** An identifier for the identity that last modified the resource */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource */ + lastModifiedByType?: IdentityType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + /** 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. */ export interface AFDDomainListResult { /** @@ -245,12 +376,6 @@ export interface AFDDomainHttpsParameters { secret?: ResourceReference; } -/** Reference to another resource. */ -export interface ResourceReference { - /** Resource ID. */ - id?: string; -} - /** The tracking states for afd resources. */ export interface AFDStateProperties { /** @@ -262,46 +387,6 @@ export interface AFDStateProperties { readonly deploymentStatus?: DeploymentStatus; } -/** The core properties of ARM resources */ -export interface Resource { - /** - * Resource ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Resource name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * Read only system data - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; -} - -/** Read only system data */ -export interface SystemData { - /** An identifier for the identity that created the resource */ - createdBy?: string; - /** The type of identity that created the resource */ - createdByType?: IdentityType; - /** The timestamp of resource creation (UTC) */ - createdAt?: Date; - /** An identifier for the identity that last modified the resource */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource */ - lastModifiedByType?: IdentityType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; -} - /** The domain JSON object required for domain creation or update. */ export interface AFDDomainUpdateParameters { /** @@ -388,7 +473,7 @@ export interface ValidateCustomDomainOutput { /** 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. */ export interface AFDOriginGroupListResult { /** - * List of CDN origin groups within an endpoint + * List of Azure Front Door origin groups within an Azure Front Door endpoint * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly value?: AFDOriginGroup[]; @@ -455,7 +540,7 @@ export interface AFDOriginGroupUpdateParameters { /** 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. */ export interface AFDOriginListResult { /** - * List of CDN origins within an endpoint + * List of Azure Front Door origins within an Azure Front Door endpoint * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly value?: AFDOrigin[]; @@ -478,7 +563,7 @@ export interface AFDOriginUpdatePropertiesParameters { httpPort?: number; /** The value of the HTTPS port. Must be between 1 and 65535. */ httpsPort?: number; - /** 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 */ + /** The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door 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?: string; /** 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?: number; @@ -521,7 +606,7 @@ export interface AFDOriginUpdateParameters { httpPort?: number; /** The value of the HTTPS port. Must be between 1 and 65535. */ httpsPort?: number; - /** 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 */ + /** The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door 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?: string; /** 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?: number; @@ -777,35 +862,17 @@ export interface SecretParameters { | "AzureFirstPartyManagedCertificate"; } -/** Input of the secret to be validated. */ -export interface ValidateSecretInput { - /** The secret type. */ - secretType: SecretType; - /** 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}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ */ - secretSource: ResourceReference; - /** Secret version, if customer is using a specific version. */ - secretVersion?: string; -} - -/** Output of the validated secret. */ -export interface ValidateSecretOutput { - /** The validation status. */ - status?: Status; - /** Detailed error message */ - message?: string; -} - /** Metrics Response */ export interface MetricsResponse { dateTimeBegin?: Date; dateTimeEnd?: Date; - granularity?: MetricsResponseGranularity; + granularity?: MetricsGranularity; series?: MetricsResponseSeriesItem[]; } export interface MetricsResponseSeriesItem { metric?: string; - unit?: MetricsResponseSeriesItemUnit; + unit?: MetricsSeriesUnit; groups?: MetricsResponseSeriesPropertiesItemsItem[]; data?: Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems[]; } @@ -889,13 +956,13 @@ export interface ResourcesResponseCustomDomainsItem { export interface WafMetricsResponse { dateTimeBegin?: Date; dateTimeEnd?: Date; - granularity?: WafMetricsResponseGranularity; + granularity?: WafMetricsGranularity; series?: WafMetricsResponseSeriesItem[]; } export interface WafMetricsResponseSeriesItem { metric?: string; - unit?: "count"; + unit?: WafMetricsSeriesUnit; groups?: WafMetricsResponseSeriesPropertiesItemsItem[]; data?: Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems[]; } @@ -940,27 +1007,6 @@ export interface ProfileListResult { nextLink?: string; } -/** - * 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. - * - */ -export interface Sku { - /** Name of the pricing tier. */ - name?: SkuName; -} - /** 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. */ export interface ErrorResponse { /** The error object. */ @@ -971,10 +1017,106 @@ export interface ErrorResponse { export interface ProfileUpdateParameters { /** Profile tags */ tags?: { [propertyName: string]: string }; + /** Managed service identity (system assigned and/or user assigned identities). */ + identity?: ManagedServiceIdentity; /** Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. */ originResponseTimeoutSeconds?: number; } +/** Request body for CanMigrate operation. */ +export interface CanMigrateParameters { + /** Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. */ + classicResourceReference: ResourceReference; +} + +/** Result for canMigrate operation. */ +export interface CanMigrateResult { + /** + * Resource ID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Resource type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Flag that says if the profile can be migrated + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly canMigrate?: boolean; + /** + * Recommended sku for the migration + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly defaultSku?: CanMigrateDefaultSku; + errors?: MigrationErrorType[]; +} + +/** Error response indicates CDN service is not able to process the incoming request. The reason is provided in the error message. */ +export interface MigrationErrorType { + /** + * Error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * Resource which has the problem. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceName?: string; + /** + * Error message indicating why the operation failed. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errorMessage?: string; + /** + * Describes what needs to be done to fix the problem + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextSteps?: string; +} + +/** Request body for Migrate operation. */ +export interface MigrationParameters { + /** Sku for the migration */ + sku: Sku; + /** Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. */ + classicResourceReference: ResourceReference; + /** Name of the new profile that need to be created. */ + profileName: string; + /** Waf mapping for the migrated profile */ + migrationWebApplicationFirewallMappings?: MigrationWebApplicationFirewallMapping[]; +} + +/** Web Application Firewall Mapping */ +export interface MigrationWebApplicationFirewallMapping { + /** Migration From Waf policy */ + migratedFrom?: ResourceReference; + /** Migration to Waf policy */ + migratedTo?: ResourceReference; +} + +/** Result for migrate operation. */ +export interface MigrateResult { + /** + * Resource ID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Resource type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Arm resource id of the migrated profile + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly migratedProfileResourceId?: ResourceReference; +} + /** The URI required to login to the supplemental portal from the Azure portal. */ export interface SsoUri { /** @@ -2134,17 +2276,56 @@ export interface KeyVaultCertificateSourceParameters { deleteRule: DeleteRule; } -/** The JSON object that contains the properties of the domain to create. */ -export interface AFDDomainProperties - extends AFDDomainUpdatePropertiesParameters, - AFDStateProperties { - /** - * Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. - * NOTE: This property will not be serialized. It can only be populated by the server. +/** The resource model definition for a ARM tracked top level resource. */ +export interface TrackedResource extends Resource { + /** Resource location. */ + location: string; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; +} + +/** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags */ +export interface ProxyResource extends Resource {} + +/** Describes a managed rule set definition. */ +export interface ManagedRuleSetDefinition extends Resource { + /** The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. */ + sku?: Sku; + /** + * Provisioning state of the managed rule set. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** + * Type of the managed rule set. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ruleSetType?: string; + /** + * Version of the managed rule set type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ruleSetVersion?: string; + /** + * Rule groups of the managed rule set. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ruleGroups?: ManagedRuleGroupDefinition[]; +} + +/** The JSON object that contains the properties of the domain to create. */ +export interface AFDDomainProperties + extends AFDDomainUpdatePropertiesParameters, + AFDStateProperties { + /** + * Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly domainValidationState?: DomainValidationState; /** The host name of the domain. Must be a domain name. */ hostName: string; + /** Key-Value pair representing migration properties for domains. */ + extendedProperties?: { [propertyName: string]: string }; /** * Values the customer needs to validate domain ownership * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2216,43 +2397,6 @@ export interface SecretProperties extends AFDStateProperties { parameters?: SecretParametersUnion; } -/** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags */ -export interface ProxyResource extends Resource {} - -/** The resource model definition for a ARM tracked top level resource. */ -export interface TrackedResource extends Resource { - /** Resource location. */ - location: string; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; -} - -/** Describes a managed rule set definition. */ -export interface ManagedRuleSetDefinition extends Resource { - /** The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. */ - sku?: Sku; - /** - * Provisioning state of the managed rule set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * Type of the managed rule set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ruleSetType?: string; - /** - * Version of the managed rule set type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ruleSetVersion?: string; - /** - * Rule groups of the managed rule set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ruleGroups?: ManagedRuleGroupDefinition[]; -} - /** Defines the RemoteAddress condition for the delivery rule. */ export interface DeliveryRuleRemoteAddressCondition extends DeliveryRuleCondition { @@ -2571,6 +2715,33 @@ export interface AzureFirstPartyManagedCertificateParameters extends SecretParameters { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "AzureFirstPartyManagedCertificate"; + /** + * 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}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly secretSource?: ResourceReference; + /** + * Subject name in the certificate. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subject?: string; + /** + * Certificate expiration date. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly expirationDate?: string; + /** + * Certificate issuing authority. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly certificateAuthority?: string; + /** The list of SANs. */ + subjectAlternativeNames?: string[]; + /** + * Certificate thumbprint. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly thumbprint?: string; } /** The JSON object that contains the properties required to create an endpoint. */ @@ -2688,6 +2859,155 @@ export interface CustomerCertificate extends Certificate { /** Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. */ export interface AzureFirstPartyManagedCertificate extends Certificate {} +/** A profile is a logical grouping of endpoints that share the same settings. */ +export interface Profile extends TrackedResource { + /** The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile. */ + sku: Sku; + /** + * Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly kind?: string; + /** Managed service identity (system assigned and/or user assigned identities). */ + identity?: ManagedServiceIdentity; + /** + * Resource status of the profile. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceState?: ProfileResourceState; + /** + * Provisioning status of the profile. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProfileProvisioningState; + /** + * Key-Value pair representing additional properties for profiles. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly extendedProperties?: { [propertyName: string]: string }; + /** + * The Id of the frontdoor. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly frontDoorId?: string; + /** Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. */ + originResponseTimeoutSeconds?: number; +} + +/** Azure Front Door endpoint is the entity within a Azure Front Door profile containing configuration information such as origin, protocol, content caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format .azureedge.net. */ +export interface AFDEndpoint extends TrackedResource { + /** + * The name of the profile which holds the endpoint. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly profileName?: string; + /** Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' */ + enabledState?: EnabledState; + /** + * Provisioning status + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: AfdProvisioningState; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly deploymentStatus?: DeploymentStatus; + /** + * The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hostName?: string; + /** Indicates the endpoint name reuse scope. The default value is TenantReuse. */ + autoGeneratedDomainNameLabelScope?: AutoGeneratedDomainNameLabelScope; +} + +/** 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. */ +export interface Endpoint extends TrackedResource { + /** A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. */ + originPath?: string; + /** List of content types on which compression applies. The value should be a valid MIME type. */ + contentTypesToCompress?: 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?: string; + /** 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?: boolean; + /** Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. */ + isHttpAllowed?: boolean; + /** Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. */ + isHttpsAllowed?: boolean; + /** 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?: QueryStringCachingBehavior; + /** 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?: OptimizationType; + /** 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?: string; + /** 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/ */ + geoFilters?: GeoFilter[]; + /** A reference to the origin group. */ + defaultOriginGroup?: ResourceReference; + /** List of keys used to validate the signed URL hashes. */ + urlSigningKeys?: UrlSigningKey[]; + /** A policy that specifies the delivery rules to be used for an endpoint. */ + deliveryPolicy?: EndpointPropertiesUpdateParametersDeliveryPolicy; + /** Defines the Web Application Firewall policy for the endpoint (if applicable) */ + webApplicationFirewallPolicyLink?: EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink; + /** + * The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hostName?: string; + /** The source of the content being delivered via CDN. */ + origins?: DeepCreatedOrigin[]; + /** The origin groups comprising of origins that are used for load balancing the traffic based on availability. */ + originGroups?: DeepCreatedOriginGroup[]; + /** + * The custom domains under the endpoint. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly customDomains?: DeepCreatedCustomDomain[]; + /** + * Resource status of the endpoint. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceState?: EndpointResourceState; + /** + * Provisioning status of the endpoint. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: EndpointProvisioningState; +} + +/** Defines web application firewall policy for Azure CDN. */ +export interface CdnWebApplicationFirewallPolicy extends TrackedResource { + /** Gets a unique read-only string that changes whenever the resource is updated. */ + etag?: string; + /** The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. */ + sku: Sku; + /** Describes policySettings for policy */ + policySettings?: PolicySettings; + /** Describes rate limit rules inside the policy. */ + rateLimitRules?: RateLimitRuleList; + /** Describes custom rules inside the policy. */ + customRules?: CustomRuleList; + /** Describes managed rules inside the policy. */ + managedRules?: ManagedRuleSetList; + /** + * Describes Azure CDN endpoints associated with this Web Application Firewall policy. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly endpointLinks?: CdnEndpoint[]; + /** Key-Value pair representing additional properties for Web Application Firewall policy. */ + extendedProperties?: { [propertyName: string]: string }; + /** + * Provisioning state of the WebApplicationFirewallPolicy. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * Resource status of the policy. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceState?: PolicyResourceState; +} + /** Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. */ export interface AFDDomain extends ProxyResource { /** @@ -2715,6 +3035,8 @@ export interface AFDDomain extends ProxyResource { readonly domainValidationState?: DomainValidationState; /** The host name of the domain. Must be a domain name. */ hostName?: string; + /** Key-Value pair representing migration properties for domains. */ + extendedProperties?: { [propertyName: string]: string }; /** * Values the customer needs to validate domain ownership * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2722,7 +3044,7 @@ export interface AFDDomain extends ProxyResource { readonly validationProperties?: DomainValidationProperties; } -/** AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. */ +/** AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from Azure Front Door. */ export interface AFDOriginGroup extends ProxyResource { /** * The name of the profile which holds the origin group. @@ -2746,7 +3068,7 @@ export interface AFDOriginGroup extends ProxyResource { readonly deploymentStatus?: DeploymentStatus; } -/** 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. */ +/** Azure Front Door origin is the source of the content being delivered via Azure Front Door. 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. */ export interface AFDOrigin extends ProxyResource { /** * The name of the origin group which contains this origin. @@ -2761,7 +3083,7 @@ export interface AFDOrigin extends ProxyResource { httpPort?: number; /** The value of the HTTPS port. Must be between 1 and 65535. */ httpsPort?: number; - /** 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 */ + /** The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door 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?: string; /** 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?: number; @@ -2995,144 +3317,264 @@ export interface EdgeNode extends ProxyResource { ipAddressGroups?: IpAddressGroup[]; } -/** 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. */ -export interface AFDEndpoint extends TrackedResource { - /** - * The name of the profile which holds the endpoint. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly profileName?: string; - /** Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' */ - enabledState?: EnabledState; - /** - * Provisioning status - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: AfdProvisioningState; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly deploymentStatus?: DeploymentStatus; - /** - * The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hostName?: string; - /** Indicates the endpoint name reuse scope. The default value is TenantReuse. */ - autoGeneratedDomainNameLabelScope?: AutoGeneratedDomainNameLabelScope; +/** Defines headers for AfdProfiles_upgrade operation. */ +export interface AfdProfilesUpgradeHeaders { + location?: string; } -/** A profile is a logical grouping of endpoints that share the same settings. */ -export interface Profile extends TrackedResource { - /** The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile. */ - sku: Sku; - /** - * Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kind?: string; - /** - * Resource status of the profile. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceState?: ProfileResourceState; - /** - * Provisioning status of the profile. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProfileProvisioningState; - /** - * The Id of the frontdoor. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly frontDoorId?: string; - /** Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. */ - originResponseTimeoutSeconds?: number; +/** Defines headers for AfdCustomDomains_create operation. */ +export interface AfdCustomDomainsCreateHeaders { + location?: string; } -/** 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. */ -export interface Endpoint extends TrackedResource { - /** A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. */ - originPath?: string; - /** List of content types on which compression applies. The value should be a valid MIME type. */ - contentTypesToCompress?: 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?: string; - /** 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?: boolean; - /** Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. */ - isHttpAllowed?: boolean; - /** Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. */ - isHttpsAllowed?: boolean; - /** 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?: QueryStringCachingBehavior; - /** 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?: OptimizationType; - /** 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?: string; - /** 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/ */ - geoFilters?: GeoFilter[]; - /** A reference to the origin group. */ - defaultOriginGroup?: ResourceReference; - /** List of keys used to validate the signed URL hashes. */ - urlSigningKeys?: UrlSigningKey[]; - /** A policy that specifies the delivery rules to be used for an endpoint. */ - deliveryPolicy?: EndpointPropertiesUpdateParametersDeliveryPolicy; - /** Defines the Web Application Firewall policy for the endpoint (if applicable) */ - webApplicationFirewallPolicyLink?: EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink; - /** - * The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hostName?: string; - /** The source of the content being delivered via CDN. */ - origins?: DeepCreatedOrigin[]; - /** The origin groups comprising of origins that are used for load balancing the traffic based on availability. */ - originGroups?: DeepCreatedOriginGroup[]; - /** - * The custom domains under the endpoint. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly customDomains?: DeepCreatedCustomDomain[]; - /** - * Resource status of the endpoint. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceState?: EndpointResourceState; - /** - * Provisioning status of the endpoint. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: EndpointProvisioningState; +/** Defines headers for AfdCustomDomains_update operation. */ +export interface AfdCustomDomainsUpdateHeaders { + location?: string; } -/** Defines web application firewall policy for Azure CDN. */ -export interface CdnWebApplicationFirewallPolicy extends TrackedResource { - /** Gets a unique read-only string that changes whenever the resource is updated. */ - etag?: string; - /** The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. */ - sku: Sku; - /** Describes policySettings for policy */ - policySettings?: PolicySettings; - /** Describes rate limit rules inside the policy. */ - rateLimitRules?: RateLimitRuleList; - /** Describes custom rules inside the policy. */ - customRules?: CustomRuleList; - /** Describes managed rules inside the policy. */ - managedRules?: ManagedRuleSetList; - /** - * Describes Azure CDN endpoints associated with this Web Application Firewall policy. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly endpointLinks?: CdnEndpoint[]; - /** - * Provisioning state of the WebApplicationFirewallPolicy. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Resource status of the policy. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceState?: PolicyResourceState; +/** Defines headers for AfdCustomDomains_delete operation. */ +export interface AfdCustomDomainsDeleteHeaders { + location?: string; +} + +/** Defines headers for AfdCustomDomains_refreshValidationToken operation. */ +export interface AfdCustomDomainsRefreshValidationTokenHeaders { + location?: string; +} + +/** Defines headers for AfdEndpoints_create operation. */ +export interface AfdEndpointsCreateHeaders { + location?: string; +} + +/** Defines headers for AfdEndpoints_update operation. */ +export interface AfdEndpointsUpdateHeaders { + location?: string; +} + +/** Defines headers for AfdEndpoints_delete operation. */ +export interface AfdEndpointsDeleteHeaders { + location?: string; +} + +/** Defines headers for AfdEndpoints_purgeContent operation. */ +export interface AfdEndpointsPurgeContentHeaders { + location?: string; +} + +/** Defines headers for AfdOriginGroups_create operation. */ +export interface AfdOriginGroupsCreateHeaders { + location?: string; +} + +/** Defines headers for AfdOriginGroups_update operation. */ +export interface AfdOriginGroupsUpdateHeaders { + location?: string; +} + +/** Defines headers for AfdOriginGroups_delete operation. */ +export interface AfdOriginGroupsDeleteHeaders { + location?: string; +} + +/** Defines headers for AfdOrigins_create operation. */ +export interface AfdOriginsCreateHeaders { + location?: string; +} + +/** Defines headers for AfdOrigins_update operation. */ +export interface AfdOriginsUpdateHeaders { + location?: string; +} + +/** Defines headers for AfdOrigins_delete operation. */ +export interface AfdOriginsDeleteHeaders { + location?: string; +} + +/** Defines headers for Routes_create operation. */ +export interface RoutesCreateHeaders { + location?: string; +} + +/** Defines headers for Routes_update operation. */ +export interface RoutesUpdateHeaders { + location?: string; +} + +/** Defines headers for Routes_delete operation. */ +export interface RoutesDeleteHeaders { + location?: string; +} + +/** Defines headers for RuleSets_delete operation. */ +export interface RuleSetsDeleteHeaders { + location?: string; +} + +/** Defines headers for Rules_create operation. */ +export interface RulesCreateHeaders { + location?: string; +} + +/** Defines headers for Rules_update operation. */ +export interface RulesUpdateHeaders { + location?: string; +} + +/** Defines headers for Rules_delete operation. */ +export interface RulesDeleteHeaders { + location?: string; +} + +/** Defines headers for SecurityPolicies_create operation. */ +export interface SecurityPoliciesCreateHeaders { + location?: string; +} + +/** Defines headers for SecurityPolicies_patch operation. */ +export interface SecurityPoliciesPatchHeaders { + location?: string; +} + +/** Defines headers for SecurityPolicies_delete operation. */ +export interface SecurityPoliciesDeleteHeaders { + location?: string; +} + +/** Defines headers for Secrets_create operation. */ +export interface SecretsCreateHeaders { + location?: string; +} + +/** Defines headers for Secrets_delete operation. */ +export interface SecretsDeleteHeaders { + location?: string; +} + +/** Defines headers for Profiles_create operation. */ +export interface ProfilesCreateHeaders { + location?: string; +} + +/** Defines headers for Profiles_update operation. */ +export interface ProfilesUpdateHeaders { + location?: string; +} + +/** Defines headers for Profiles_delete operation. */ +export interface ProfilesDeleteHeaders { + location?: string; +} + +/** Defines headers for Profiles_canMigrate operation. */ +export interface ProfilesCanMigrateHeaders { + location?: string; +} + +/** Defines headers for Profiles_migrate operation. */ +export interface ProfilesMigrateHeaders { + location?: string; +} + +/** Defines headers for Profiles_migrationCommit operation. */ +export interface ProfilesMigrationCommitHeaders { + location?: string; +} + +/** Defines headers for Endpoints_create operation. */ +export interface EndpointsCreateHeaders { + location?: string; +} + +/** Defines headers for Endpoints_update operation. */ +export interface EndpointsUpdateHeaders { + location?: string; +} + +/** Defines headers for Endpoints_delete operation. */ +export interface EndpointsDeleteHeaders { + location?: string; +} + +/** Defines headers for Endpoints_start operation. */ +export interface EndpointsStartHeaders { + location?: string; +} + +/** Defines headers for Endpoints_stop operation. */ +export interface EndpointsStopHeaders { + location?: string; +} + +/** Defines headers for Endpoints_purgeContent operation. */ +export interface EndpointsPurgeContentHeaders { + location?: string; +} + +/** Defines headers for Endpoints_loadContent operation. */ +export interface EndpointsLoadContentHeaders { + location?: string; +} + +/** Defines headers for Origins_create operation. */ +export interface OriginsCreateHeaders { + location?: string; +} + +/** Defines headers for Origins_update operation. */ +export interface OriginsUpdateHeaders { + location?: string; +} + +/** Defines headers for Origins_delete operation. */ +export interface OriginsDeleteHeaders { + location?: string; +} + +/** Defines headers for OriginGroups_create operation. */ +export interface OriginGroupsCreateHeaders { + location?: string; +} + +/** Defines headers for OriginGroups_update operation. */ +export interface OriginGroupsUpdateHeaders { + location?: string; +} + +/** Defines headers for OriginGroups_delete operation. */ +export interface OriginGroupsDeleteHeaders { + location?: string; +} + +/** Defines headers for CustomDomains_create operation. */ +export interface CustomDomainsCreateHeaders { + location?: string; +} + +/** Defines headers for CustomDomains_delete operation. */ +export interface CustomDomainsDeleteHeaders { + location?: string; +} + +/** Defines headers for CustomDomains_disableCustomHttps operation. */ +export interface CustomDomainsDisableCustomHttpsHeaders { + location?: string; +} + +/** Defines headers for CustomDomains_enableCustomHttps operation. */ +export interface CustomDomainsEnableCustomHttpsHeaders { + location?: string; +} + +/** Defines headers for Policies_createOrUpdate operation. */ +export interface PoliciesCreateOrUpdateHeaders { + location?: string; +} + +/** Defines headers for Policies_update operation. */ +export interface PoliciesUpdateHeaders { + location?: string; } /** Known values of {@link ResourceType} that the service accepts. */ @@ -3175,22 +3617,235 @@ export enum KnownAutoGeneratedDomainNameLabelScope { * **ResourceGroupReuse** \ * **NoReuse** */ -export type AutoGeneratedDomainNameLabelScope = string; +export type AutoGeneratedDomainNameLabelScope = string; + +/** Known values of {@link UsageUnit} that the service accepts. */ +export enum KnownUsageUnit { + /** Count */ + Count = "Count" +} + +/** + * Defines values for UsageUnit. \ + * {@link KnownUsageUnit} can be used interchangeably with UsageUnit, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Count** + */ +export type UsageUnit = string; + +/** Known values of {@link SecretType} that the service accepts. */ +export enum KnownSecretType { + /** UrlSigningKey */ + UrlSigningKey = "UrlSigningKey", + /** CustomerCertificate */ + CustomerCertificate = "CustomerCertificate", + /** ManagedCertificate */ + ManagedCertificate = "ManagedCertificate", + /** AzureFirstPartyManagedCertificate */ + AzureFirstPartyManagedCertificate = "AzureFirstPartyManagedCertificate" +} + +/** + * Defines values for SecretType. \ + * {@link KnownSecretType} can be used interchangeably with SecretType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **UrlSigningKey** \ + * **CustomerCertificate** \ + * **ManagedCertificate** \ + * **AzureFirstPartyManagedCertificate** + */ +export type SecretType = string; + +/** Known values of {@link Status} that the service accepts. */ +export enum KnownStatus { + /** Valid */ + Valid = "Valid", + /** Invalid */ + Invalid = "Invalid", + /** AccessDenied */ + AccessDenied = "AccessDenied", + /** CertificateExpired */ + CertificateExpired = "CertificateExpired" +} + +/** + * Defines values for Status. \ + * {@link KnownStatus} can be used interchangeably with Status, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Valid** \ + * **Invalid** \ + * **AccessDenied** \ + * **CertificateExpired** + */ +export type Status = string; + +/** Known values of {@link SkuName} that the service accepts. */ +export enum KnownSkuName { + /** StandardVerizon */ + StandardVerizon = "Standard_Verizon", + /** PremiumVerizon */ + PremiumVerizon = "Premium_Verizon", + /** CustomVerizon */ + CustomVerizon = "Custom_Verizon", + /** StandardAkamai */ + StandardAkamai = "Standard_Akamai", + /** StandardChinaCdn */ + StandardChinaCdn = "Standard_ChinaCdn", + /** StandardMicrosoft */ + StandardMicrosoft = "Standard_Microsoft", + /** StandardAzureFrontDoor */ + StandardAzureFrontDoor = "Standard_AzureFrontDoor", + /** PremiumAzureFrontDoor */ + PremiumAzureFrontDoor = "Premium_AzureFrontDoor", + /** Standard955BandWidthChinaCdn */ + Standard955BandWidthChinaCdn = "Standard_955BandWidth_ChinaCdn", + /** StandardAvgBandWidthChinaCdn */ + StandardAvgBandWidthChinaCdn = "Standard_AvgBandWidth_ChinaCdn", + /** StandardPlusChinaCdn */ + StandardPlusChinaCdn = "StandardPlus_ChinaCdn", + /** StandardPlus955BandWidthChinaCdn */ + StandardPlus955BandWidthChinaCdn = "StandardPlus_955BandWidth_ChinaCdn", + /** StandardPlusAvgBandWidthChinaCdn */ + StandardPlusAvgBandWidthChinaCdn = "StandardPlus_AvgBandWidth_ChinaCdn" +} + +/** + * Defines values for SkuName. \ + * {@link KnownSkuName} can be used interchangeably with SkuName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard_Verizon** \ + * **Premium_Verizon** \ + * **Custom_Verizon** \ + * **Standard_Akamai** \ + * **Standard_ChinaCdn** \ + * **Standard_Microsoft** \ + * **Standard_AzureFrontDoor** \ + * **Premium_AzureFrontDoor** \ + * **Standard_955BandWidth_ChinaCdn** \ + * **Standard_AvgBandWidth_ChinaCdn** \ + * **StandardPlus_ChinaCdn** \ + * **StandardPlus_955BandWidth_ChinaCdn** \ + * **StandardPlus_AvgBandWidth_ChinaCdn** + */ +export type SkuName = string; + +/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ +export enum KnownManagedServiceIdentityType { + /** None */ + None = "None", + /** SystemAssigned */ + SystemAssigned = "SystemAssigned", + /** UserAssigned */ + UserAssigned = "UserAssigned", + /** SystemAssignedUserAssigned */ + SystemAssignedUserAssigned = "SystemAssigned, UserAssigned" +} + +/** + * Defines values for ManagedServiceIdentityType. \ + * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **SystemAssigned** \ + * **UserAssigned** \ + * **SystemAssigned, UserAssigned** + */ +export type ManagedServiceIdentityType = string; + +/** Known values of {@link ProfileResourceState} that the service accepts. */ +export enum KnownProfileResourceState { + /** Creating */ + Creating = "Creating", + /** Active */ + Active = "Active", + /** Deleting */ + Deleting = "Deleting", + /** Disabled */ + Disabled = "Disabled", + /** Migrating */ + Migrating = "Migrating", + /** Migrated */ + Migrated = "Migrated", + /** PendingMigrationCommit */ + PendingMigrationCommit = "PendingMigrationCommit", + /** CommittingMigration */ + CommittingMigration = "CommittingMigration", + /** AbortingMigration */ + AbortingMigration = "AbortingMigration" +} + +/** + * Defines values for ProfileResourceState. \ + * {@link KnownProfileResourceState} can be used interchangeably with ProfileResourceState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating** \ + * **Active** \ + * **Deleting** \ + * **Disabled** \ + * **Migrating** \ + * **Migrated** \ + * **PendingMigrationCommit** \ + * **CommittingMigration** \ + * **AbortingMigration** + */ +export type ProfileResourceState = string; + +/** Known values of {@link ProfileProvisioningState} that the service accepts. */ +export enum KnownProfileProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", + /** Creating */ + Creating = "Creating" +} + +/** + * Defines values for ProfileProvisioningState. \ + * {@link KnownProfileProvisioningState} can be used interchangeably with ProfileProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Updating** \ + * **Deleting** \ + * **Creating** + */ +export type ProfileProvisioningState = string; -/** Known values of {@link UsageUnit} that the service accepts. */ -export enum KnownUsageUnit { - /** Count */ - Count = "Count" +/** Known values of {@link IdentityType} that the service accepts. */ +export enum KnownIdentityType { + /** User */ + User = "user", + /** Application */ + Application = "application", + /** ManagedIdentity */ + ManagedIdentity = "managedIdentity", + /** Key */ + Key = "key" } /** - * Defines values for UsageUnit. \ - * {@link KnownUsageUnit} can be used interchangeably with UsageUnit, + * Defines values for IdentityType. \ + * {@link KnownIdentityType} can be used interchangeably with IdentityType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Count** + * **user** \ + * **application** \ + * **managedIdentity** \ + * **key** */ -export type UsageUnit = string; +export type IdentityType = string; /** Known values of {@link DomainValidationState} that the service accepts. */ export enum KnownDomainValidationState { @@ -3303,30 +3958,6 @@ export enum KnownDeploymentStatus { */ export type DeploymentStatus = string; -/** Known values of {@link IdentityType} that the service accepts. */ -export enum KnownIdentityType { - /** User */ - User = "user", - /** Application */ - Application = "application", - /** ManagedIdentity */ - ManagedIdentity = "managedIdentity", - /** Key */ - Key = "key" -} - -/** - * Defines values for IdentityType. \ - * {@link KnownIdentityType} can be used interchangeably with IdentityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **user** \ - * **application** \ - * **managedIdentity** \ - * **key** - */ -export type IdentityType = string; - /** Known values of {@link EnabledState} that the service accepts. */ export enum KnownEnabledState { /** Enabled */ @@ -3585,54 +4216,6 @@ export enum KnownSecurityPolicyType { */ export type SecurityPolicyType = string; -/** Known values of {@link SecretType} that the service accepts. */ -export enum KnownSecretType { - /** UrlSigningKey */ - UrlSigningKey = "UrlSigningKey", - /** CustomerCertificate */ - CustomerCertificate = "CustomerCertificate", - /** ManagedCertificate */ - ManagedCertificate = "ManagedCertificate", - /** AzureFirstPartyManagedCertificate */ - AzureFirstPartyManagedCertificate = "AzureFirstPartyManagedCertificate" -} - -/** - * Defines values for SecretType. \ - * {@link KnownSecretType} can be used interchangeably with SecretType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **UrlSigningKey** \ - * **CustomerCertificate** \ - * **ManagedCertificate** \ - * **AzureFirstPartyManagedCertificate** - */ -export type SecretType = string; - -/** Known values of {@link Status} that the service accepts. */ -export enum KnownStatus { - /** Valid */ - Valid = "Valid", - /** Invalid */ - Invalid = "Invalid", - /** AccessDenied */ - AccessDenied = "AccessDenied", - /** CertificateExpired */ - CertificateExpired = "CertificateExpired" -} - -/** - * Defines values for Status. \ - * {@link KnownStatus} can be used interchangeably with Status, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Valid** \ - * **Invalid** \ - * **AccessDenied** \ - * **CertificateExpired** - */ -export type Status = string; - /** Known values of {@link LogMetric} that the service accepts. */ export enum KnownLogMetric { /** ClientRequestCount */ @@ -3711,8 +4294,8 @@ export enum KnownLogMetricsGroupBy { */ export type LogMetricsGroupBy = string; -/** Known values of {@link MetricsResponseGranularity} that the service accepts. */ -export enum KnownMetricsResponseGranularity { +/** Known values of {@link MetricsGranularity} that the service accepts. */ +export enum KnownMetricsGranularity { /** PT5M */ PT5M = "PT5M", /** PT1H */ @@ -3722,18 +4305,18 @@ export enum KnownMetricsResponseGranularity { } /** - * Defines values for MetricsResponseGranularity. \ - * {@link KnownMetricsResponseGranularity} can be used interchangeably with MetricsResponseGranularity, + * Defines values for MetricsGranularity. \ + * {@link KnownMetricsGranularity} can be used interchangeably with MetricsGranularity, * this enum contains the known values that the service supports. * ### Known values supported by the service * **PT5M** \ * **PT1H** \ * **P1D** */ -export type MetricsResponseGranularity = string; +export type MetricsGranularity = string; -/** Known values of {@link MetricsResponseSeriesItemUnit} that the service accepts. */ -export enum KnownMetricsResponseSeriesItemUnit { +/** Known values of {@link MetricsSeriesUnit} that the service accepts. */ +export enum KnownMetricsSeriesUnit { /** Count */ Count = "count", /** Bytes */ @@ -3745,8 +4328,8 @@ export enum KnownMetricsResponseSeriesItemUnit { } /** - * Defines values for MetricsResponseSeriesItemUnit. \ - * {@link KnownMetricsResponseSeriesItemUnit} can be used interchangeably with MetricsResponseSeriesItemUnit, + * Defines values for MetricsSeriesUnit. \ + * {@link KnownMetricsSeriesUnit} can be used interchangeably with MetricsSeriesUnit, * this enum contains the known values that the service supports. * ### Known values supported by the service * **count** \ @@ -3754,7 +4337,7 @@ export enum KnownMetricsResponseSeriesItemUnit { * **bitsPerSecond** \ * **milliSeconds** */ -export type MetricsResponseSeriesItemUnit = string; +export type MetricsSeriesUnit = string; /** Known values of {@link LogRanking} that the service accepts. */ export enum KnownLogRanking { @@ -3912,8 +4495,8 @@ export enum KnownWafRuleType { */ export type WafRuleType = string; -/** Known values of {@link WafMetricsResponseGranularity} that the service accepts. */ -export enum KnownWafMetricsResponseGranularity { +/** Known values of {@link WafMetricsGranularity} that the service accepts. */ +export enum KnownWafMetricsGranularity { /** PT5M */ PT5M = "PT5M", /** PT1H */ @@ -3923,15 +4506,30 @@ export enum KnownWafMetricsResponseGranularity { } /** - * Defines values for WafMetricsResponseGranularity. \ - * {@link KnownWafMetricsResponseGranularity} can be used interchangeably with WafMetricsResponseGranularity, + * Defines values for WafMetricsGranularity. \ + * {@link KnownWafMetricsGranularity} can be used interchangeably with WafMetricsGranularity, * this enum contains the known values that the service supports. * ### Known values supported by the service * **PT5M** \ * **PT1H** \ * **P1D** */ -export type WafMetricsResponseGranularity = string; +export type WafMetricsGranularity = string; + +/** Known values of {@link WafMetricsSeriesUnit} that the service accepts. */ +export enum KnownWafMetricsSeriesUnit { + /** Count */ + Count = "count" +} + +/** + * Defines values for WafMetricsSeriesUnit. \ + * {@link KnownWafMetricsSeriesUnit} can be used interchangeably with WafMetricsSeriesUnit, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **count** + */ +export type WafMetricsSeriesUnit = string; /** Known values of {@link WafRankingType} that the service accepts. */ export enum KnownWafRankingType { @@ -3969,107 +4567,23 @@ export enum KnownWafRankingType { */ export type WafRankingType = string; -/** Known values of {@link SkuName} that the service accepts. */ -export enum KnownSkuName { - /** StandardVerizon */ - StandardVerizon = "Standard_Verizon", - /** PremiumVerizon */ - PremiumVerizon = "Premium_Verizon", - /** CustomVerizon */ - CustomVerizon = "Custom_Verizon", - /** StandardAkamai */ - StandardAkamai = "Standard_Akamai", - /** StandardChinaCdn */ - StandardChinaCdn = "Standard_ChinaCdn", - /** StandardMicrosoft */ - StandardMicrosoft = "Standard_Microsoft", +/** Known values of {@link CanMigrateDefaultSku} that the service accepts. */ +export enum KnownCanMigrateDefaultSku { /** StandardAzureFrontDoor */ StandardAzureFrontDoor = "Standard_AzureFrontDoor", /** PremiumAzureFrontDoor */ - PremiumAzureFrontDoor = "Premium_AzureFrontDoor", - /** Standard955BandWidthChinaCdn */ - Standard955BandWidthChinaCdn = "Standard_955BandWidth_ChinaCdn", - /** StandardAvgBandWidthChinaCdn */ - StandardAvgBandWidthChinaCdn = "Standard_AvgBandWidth_ChinaCdn", - /** StandardPlusChinaCdn */ - StandardPlusChinaCdn = "StandardPlus_ChinaCdn", - /** StandardPlus955BandWidthChinaCdn */ - StandardPlus955BandWidthChinaCdn = "StandardPlus_955BandWidth_ChinaCdn", - /** StandardPlusAvgBandWidthChinaCdn */ - StandardPlusAvgBandWidthChinaCdn = "StandardPlus_AvgBandWidth_ChinaCdn" + PremiumAzureFrontDoor = "Premium_AzureFrontDoor" } /** - * Defines values for SkuName. \ - * {@link KnownSkuName} can be used interchangeably with SkuName, + * Defines values for CanMigrateDefaultSku. \ + * {@link KnownCanMigrateDefaultSku} can be used interchangeably with CanMigrateDefaultSku, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Standard_Verizon** \ - * **Premium_Verizon** \ - * **Custom_Verizon** \ - * **Standard_Akamai** \ - * **Standard_ChinaCdn** \ - * **Standard_Microsoft** \ * **Standard_AzureFrontDoor** \ - * **Premium_AzureFrontDoor** \ - * **Standard_955BandWidth_ChinaCdn** \ - * **Standard_AvgBandWidth_ChinaCdn** \ - * **StandardPlus_ChinaCdn** \ - * **StandardPlus_955BandWidth_ChinaCdn** \ - * **StandardPlus_AvgBandWidth_ChinaCdn** - */ -export type SkuName = string; - -/** Known values of {@link ProfileResourceState} that the service accepts. */ -export enum KnownProfileResourceState { - /** Creating */ - Creating = "Creating", - /** Active */ - Active = "Active", - /** Deleting */ - Deleting = "Deleting", - /** Disabled */ - Disabled = "Disabled" -} - -/** - * Defines values for ProfileResourceState. \ - * {@link KnownProfileResourceState} can be used interchangeably with ProfileResourceState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Creating** \ - * **Active** \ - * **Deleting** \ - * **Disabled** - */ -export type ProfileResourceState = string; - -/** Known values of {@link ProfileProvisioningState} that the service accepts. */ -export enum KnownProfileProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Updating */ - Updating = "Updating", - /** Deleting */ - Deleting = "Deleting", - /** Creating */ - Creating = "Creating" -} - -/** - * Defines values for ProfileProvisioningState. \ - * {@link KnownProfileProvisioningState} can be used interchangeably with ProfileProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Updating** \ - * **Deleting** \ - * **Creating** + * **Premium_AzureFrontDoor** */ -export type ProfileProvisioningState = string; +export type CanMigrateDefaultSku = string; /** Known values of {@link OptimizationType} that the service accepts. */ export enum KnownOptimizationType { @@ -5765,6 +6279,13 @@ export interface ValidateProbeOptionalParams /** Contains response data for the validateProbe operation. */ export type ValidateProbeResponse = ValidateProbeOutput; +/** Optional parameters. */ +export interface AfdProfilesCheckEndpointNameAvailabilityOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the checkEndpointNameAvailability operation. */ +export type AfdProfilesCheckEndpointNameAvailabilityResponse = CheckEndpointNameAvailabilityOutput; + /** Optional parameters. */ export interface AfdProfilesListResourceUsageOptionalParams extends coreClient.OperationOptions {} @@ -5779,6 +6300,25 @@ export interface AfdProfilesCheckHostNameAvailabilityOptionalParams /** Contains response data for the checkHostNameAvailability operation. */ export type AfdProfilesCheckHostNameAvailabilityResponse = CheckNameAvailabilityOutput; +/** Optional parameters. */ +export interface AfdProfilesValidateSecretOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the validateSecret operation. */ +export type AfdProfilesValidateSecretResponse = ValidateSecretOutput; + +/** Optional parameters. */ +export interface AfdProfilesUpgradeOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the upgrade operation. */ +export type AfdProfilesUpgradeResponse = Profile; + /** Optional parameters. */ export interface AfdProfilesListResourceUsageNextOptionalParams extends coreClient.OperationOptions {} @@ -6304,13 +6844,6 @@ export interface SecretsListByProfileNextOptionalParams /** Contains response data for the listByProfileNext operation. */ export type SecretsListByProfileNextResponse = SecretListResult; -/** Optional parameters. */ -export interface ValidateSecretOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the secret operation. */ -export type ValidateSecretResponse = ValidateSecretOutput; - /** Optional parameters. */ export interface LogAnalyticsGetLogAnalyticsMetricsOptionalParams extends coreClient.OperationOptions { @@ -6429,6 +6962,39 @@ export interface ProfilesDeleteOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface ProfilesCanMigrateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the canMigrate operation. */ +export type ProfilesCanMigrateResponse = CanMigrateResult; + +/** Optional parameters. */ +export interface ProfilesMigrateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the migrate operation. */ +export type ProfilesMigrateResponse = MigrateResult; + +/** Optional parameters. */ +export interface ProfilesMigrationCommitOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + /** Optional parameters. */ export interface ProfilesGenerateSsoUriOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/cdn/arm-cdn/src/models/mappers.ts b/sdk/cdn/arm-cdn/src/models/mappers.ts index 9db4814da70b..6384237c0389 100644 --- a/sdk/cdn/arm-cdn/src/models/mappers.ts +++ b/sdk/cdn/arm-cdn/src/models/mappers.ts @@ -308,26 +308,27 @@ export const CheckNameAvailabilityOutput: coreClient.CompositeMapper = { } }; -export const AFDDomainListResult: coreClient.CompositeMapper = { +export const ValidateSecretInput: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AFDDomainListResult", + className: "ValidateSecretInput", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + secretType: { + serializedName: "secretType", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AFDDomain" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + secretSource: { + serializedName: "secretSource", + type: { + name: "Composite", + className: "ResourceReference" + } + }, + secretVersion: { + serializedName: "secretVersion", type: { name: "String" } @@ -336,21 +337,13 @@ export const AFDDomainListResult: coreClient.CompositeMapper = { } }; -export const DomainValidationProperties: coreClient.CompositeMapper = { +export const ResourceReference: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DomainValidationProperties", + className: "ResourceReference", modelProperties: { - validationToken: { - serializedName: "validationToken", - readOnly: true, - type: { - name: "String" - } - }, - expirationDate: { - serializedName: "expirationDate", - readOnly: true, + id: { + serializedName: "id", type: { name: "String" } @@ -359,64 +352,63 @@ export const DomainValidationProperties: coreClient.CompositeMapper = { } }; -export const AFDDomainUpdatePropertiesParameters: coreClient.CompositeMapper = { +export const ValidateSecretOutput: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AFDDomainUpdatePropertiesParameters", + className: "ValidateSecretOutput", modelProperties: { - profileName: { - serializedName: "profileName", - readOnly: true, + status: { + serializedName: "status", type: { name: "String" } }, - tlsSettings: { - serializedName: "tlsSettings", - type: { - name: "Composite", - className: "AFDDomainHttpsParameters" - } - }, - azureDnsZone: { - serializedName: "azureDnsZone", + message: { + serializedName: "message", type: { - name: "Composite", - className: "ResourceReference" + name: "String" } - }, - preValidatedCustomDomainResourceId: { - serializedName: "preValidatedCustomDomainResourceId", + } + } + } +}; + +export const ProfileUpgradeParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProfileUpgradeParameters", + modelProperties: { + wafMappingList: { + serializedName: "wafMappingList", + required: true, type: { - name: "Composite", - className: "ResourceReference" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProfileChangeSkuWafMapping" + } + } } } } } }; -export const AFDDomainHttpsParameters: coreClient.CompositeMapper = { +export const ProfileChangeSkuWafMapping: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AFDDomainHttpsParameters", + className: "ProfileChangeSkuWafMapping", modelProperties: { - certificateType: { - serializedName: "certificateType", + securityPolicyName: { + serializedName: "securityPolicyName", required: true, type: { name: "String" } }, - minimumTlsVersion: { - serializedName: "minimumTlsVersion", - type: { - name: "Enum", - allowedValues: ["TLS10", "TLS12"] - } - }, - secret: { - serializedName: "secret", + changeToWafPolicy: { + serializedName: "changeToWafPolicy", type: { name: "Composite", className: "ResourceReference" @@ -426,13 +418,13 @@ export const AFDDomainHttpsParameters: coreClient.CompositeMapper = { } }; -export const ResourceReference: coreClient.CompositeMapper = { +export const Sku: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceReference", + className: "Sku", modelProperties: { - id: { - serializedName: "id", + name: { + serializedName: "name", type: { name: "String" } @@ -441,24 +433,63 @@ export const ResourceReference: coreClient.CompositeMapper = { } }; -export const AFDStateProperties: coreClient.CompositeMapper = { +export const ManagedServiceIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AFDStateProperties", + className: "ManagedServiceIdentity", modelProperties: { - provisioningState: { - serializedName: "provisioningState", + principalId: { + serializedName: "principalId", readOnly: true, type: { - name: "String" + name: "Uuid" } }, - deploymentStatus: { - serializedName: "deploymentStatus", + tenantId: { + serializedName: "tenantId", readOnly: true, + type: { + name: "Uuid" + } + }, + type: { + serializedName: "type", + required: true, type: { name: "String" } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" } + } + } + } + } + } +}; + +export const UserAssignedIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserAssignedIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "Uuid" + } + }, + clientId: { + serializedName: "clientId", + readOnly: true, + type: { + name: "Uuid" + } } } } @@ -546,47 +577,10 @@ export const SystemData: coreClient.CompositeMapper = { } }; -export const AFDDomainUpdateParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AFDDomainUpdateParameters", - modelProperties: { - profileName: { - serializedName: "properties.profileName", - readOnly: true, - type: { - name: "String" - } - }, - tlsSettings: { - serializedName: "properties.tlsSettings", - type: { - name: "Composite", - className: "AFDDomainHttpsParameters" - } - }, - azureDnsZone: { - serializedName: "properties.azureDnsZone", - type: { - name: "Composite", - className: "ResourceReference" - } - }, - preValidatedCustomDomainResourceId: { - serializedName: "properties.preValidatedCustomDomainResourceId", - type: { - name: "Composite", - className: "ResourceReference" - } - } - } - } -}; - -export const AFDEndpointListResult: coreClient.CompositeMapper = { +export const AFDDomainListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AFDEndpointListResult", + className: "AFDDomainListResult", modelProperties: { value: { serializedName: "value", @@ -596,7 +590,7 @@ export const AFDEndpointListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "AFDEndpoint" + className: "AFDDomain" } } } @@ -611,20 +605,21 @@ export const AFDEndpointListResult: coreClient.CompositeMapper = { } }; -export const AFDEndpointPropertiesUpdateParameters: coreClient.CompositeMapper = { +export const DomainValidationProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AFDEndpointPropertiesUpdateParameters", + className: "DomainValidationProperties", modelProperties: { - profileName: { - serializedName: "profileName", + validationToken: { + serializedName: "validationToken", readOnly: true, type: { name: "String" } }, - enabledState: { - serializedName: "enabledState", + expirationDate: { + serializedName: "expirationDate", + readOnly: true, type: { name: "String" } @@ -633,60 +628,237 @@ export const AFDEndpointPropertiesUpdateParameters: coreClient.CompositeMapper = } }; -export const AFDEndpointUpdateParameters: coreClient.CompositeMapper = { +export const AFDDomainUpdatePropertiesParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AFDEndpointUpdateParameters", + className: "AFDDomainUpdatePropertiesParameters", modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, profileName: { - serializedName: "properties.profileName", + serializedName: "profileName", readOnly: true, type: { name: "String" } }, - enabledState: { - serializedName: "properties.enabledState", + tlsSettings: { + serializedName: "tlsSettings", type: { - name: "String" + name: "Composite", + className: "AFDDomainHttpsParameters" + } + }, + azureDnsZone: { + serializedName: "azureDnsZone", + type: { + name: "Composite", + className: "ResourceReference" + } + }, + preValidatedCustomDomainResourceId: { + serializedName: "preValidatedCustomDomainResourceId", + type: { + name: "Composite", + className: "ResourceReference" } } } } }; -export const AfdPurgeParameters: coreClient.CompositeMapper = { +export const AFDDomainHttpsParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AfdPurgeParameters", + className: "AFDDomainHttpsParameters", modelProperties: { - contentPaths: { - serializedName: "contentPaths", + certificateType: { + serializedName: "certificateType", required: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - domains: { - serializedName: "domains", + minimumTlsVersion: { + serializedName: "minimumTlsVersion", type: { - name: "Sequence", - element: { - type: { - name: "String" - } + name: "Enum", + allowedValues: ["TLS10", "TLS12"] + } + }, + secret: { + serializedName: "secret", + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + } +}; + +export const AFDStateProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AFDStateProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + deploymentStatus: { + serializedName: "deploymentStatus", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const AFDDomainUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AFDDomainUpdateParameters", + modelProperties: { + profileName: { + serializedName: "properties.profileName", + readOnly: true, + type: { + name: "String" + } + }, + tlsSettings: { + serializedName: "properties.tlsSettings", + type: { + name: "Composite", + className: "AFDDomainHttpsParameters" + } + }, + azureDnsZone: { + serializedName: "properties.azureDnsZone", + type: { + name: "Composite", + className: "ResourceReference" + } + }, + preValidatedCustomDomainResourceId: { + serializedName: "properties.preValidatedCustomDomainResourceId", + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + } +}; + +export const AFDEndpointListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AFDEndpointListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AFDEndpoint" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AFDEndpointPropertiesUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AFDEndpointPropertiesUpdateParameters", + modelProperties: { + profileName: { + serializedName: "profileName", + readOnly: true, + type: { + name: "String" + } + }, + enabledState: { + serializedName: "enabledState", + type: { + name: "String" + } + } + } + } +}; + +export const AFDEndpointUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AFDEndpointUpdateParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + profileName: { + serializedName: "properties.profileName", + readOnly: true, + type: { + name: "String" + } + }, + enabledState: { + serializedName: "properties.enabledState", + type: { + name: "String" + } + } + } + } +}; + +export const AfdPurgeParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AfdPurgeParameters", + modelProperties: { + contentPaths: { + serializedName: "contentPaths", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + domains: { + serializedName: "domains", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } } } } @@ -981,6 +1153,7 @@ export const AFDOriginUpdatePropertiesParameters: coreClient.CompositeMapper = { } }, httpPort: { + defaultValue: 80, constraints: { InclusiveMaximum: 65535, InclusiveMinimum: 1 @@ -991,6 +1164,7 @@ export const AFDOriginUpdatePropertiesParameters: coreClient.CompositeMapper = { } }, httpsPort: { + defaultValue: 443, constraints: { InclusiveMaximum: 65535, InclusiveMinimum: 1 @@ -1123,6 +1297,7 @@ export const AFDOriginUpdateParameters: coreClient.CompositeMapper = { } }, httpPort: { + defaultValue: 80, constraints: { InclusiveMaximum: 65535, InclusiveMinimum: 1 @@ -1133,6 +1308,7 @@ export const AFDOriginUpdateParameters: coreClient.CompositeMapper = { } }, httpsPort: { + defaultValue: 443, constraints: { InclusiveMaximum: 65535, InclusiveMinimum: 1 @@ -1270,6 +1446,7 @@ export const RouteUpdatePropertiesParameters: coreClient.CompositeMapper = { } }, supportedProtocols: { + defaultValue: ["Http", "Https"], serializedName: "supportedProtocols", type: { name: "Sequence", @@ -1305,12 +1482,14 @@ export const RouteUpdatePropertiesParameters: coreClient.CompositeMapper = { } }, linkToDefaultDomain: { + defaultValue: "Disabled", serializedName: "linkToDefaultDomain", type: { name: "String" } }, httpsRedirect: { + defaultValue: "Disabled", serializedName: "httpsRedirect", type: { name: "String" @@ -1452,6 +1631,7 @@ export const RouteUpdateParameters: coreClient.CompositeMapper = { } }, supportedProtocols: { + defaultValue: ["Http", "Https"], serializedName: "properties.supportedProtocols", type: { name: "Sequence", @@ -1487,12 +1667,14 @@ export const RouteUpdateParameters: coreClient.CompositeMapper = { } }, linkToDefaultDomain: { + defaultValue: "Disabled", serializedName: "properties.linkToDefaultDomain", type: { name: "String" } }, httpsRedirect: { + defaultValue: "Disabled", serializedName: "properties.httpsRedirect", type: { name: "String" @@ -1607,6 +1789,7 @@ export const RuleUpdatePropertiesParameters: coreClient.CompositeMapper = { } }, matchProcessingBehavior: { + defaultValue: "Continue", serializedName: "matchProcessingBehavior", type: { name: "String" @@ -1701,6 +1884,7 @@ export const RuleUpdateParameters: coreClient.CompositeMapper = { } }, matchProcessingBehavior: { + defaultValue: "Continue", serializedName: "properties.matchProcessingBehavior", type: { name: "String" @@ -1824,56 +2008,6 @@ export const SecretParameters: coreClient.CompositeMapper = { } }; -export const ValidateSecretInput: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ValidateSecretInput", - modelProperties: { - secretType: { - serializedName: "secretType", - required: true, - type: { - name: "String" - } - }, - secretSource: { - serializedName: "secretSource", - type: { - name: "Composite", - className: "ResourceReference" - } - }, - secretVersion: { - serializedName: "secretVersion", - type: { - name: "String" - } - } - } - } -}; - -export const ValidateSecretOutput: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ValidateSecretOutput", - modelProperties: { - status: { - serializedName: "status", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - } - } - } -}; - export const MetricsResponse: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2374,8 +2508,6 @@ export const WafMetricsResponseSeriesItem: coreClient.CompositeMapper = { } }, unit: { - defaultValue: "count", - isConstant: true, serializedName: "unit", type: { name: "String" @@ -2586,21 +2718,6 @@ export const ProfileListResult: coreClient.CompositeMapper = { } }; -export const Sku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Sku", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - export const ErrorResponse: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2629,6 +2746,13 @@ export const ProfileUpdateParameters: coreClient.CompositeMapper = { value: { type: { name: "String" } } } }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity" + } + }, originResponseTimeoutSeconds: { constraints: { InclusiveMinimum: 16 @@ -2642,17 +2766,214 @@ export const ProfileUpdateParameters: coreClient.CompositeMapper = { } }; -export const SsoUri: coreClient.CompositeMapper = { +export const CanMigrateParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SsoUri", + className: "CanMigrateParameters", modelProperties: { - ssoUriValue: { - serializedName: "ssoUriValue", - readOnly: true, + classicResourceReference: { + serializedName: "classicResourceReference", type: { - name: "String" - } + name: "Composite", + className: "ResourceReference" + } + } + } + } +}; + +export const CanMigrateResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CanMigrateResult", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + canMigrate: { + serializedName: "properties.canMigrate", + readOnly: true, + type: { + name: "Boolean" + } + }, + defaultSku: { + serializedName: "properties.defaultSku", + readOnly: true, + type: { + name: "String" + } + }, + errors: { + serializedName: "properties.errors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MigrationErrorType" + } + } + } + } + } + } +}; + +export const MigrationErrorType: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MigrationErrorType", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + resourceName: { + serializedName: "resourceName", + readOnly: true, + type: { + name: "String" + } + }, + errorMessage: { + serializedName: "errorMessage", + readOnly: true, + type: { + name: "String" + } + }, + nextSteps: { + serializedName: "nextSteps", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const MigrationParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MigrationParameters", + modelProperties: { + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + classicResourceReference: { + serializedName: "classicResourceReference", + type: { + name: "Composite", + className: "ResourceReference" + } + }, + profileName: { + serializedName: "profileName", + required: true, + type: { + name: "String" + } + }, + migrationWebApplicationFirewallMappings: { + serializedName: "migrationWebApplicationFirewallMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MigrationWebApplicationFirewallMapping" + } + } + } + } + } + } +}; + +export const MigrationWebApplicationFirewallMapping: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MigrationWebApplicationFirewallMapping", + modelProperties: { + migratedFrom: { + serializedName: "migratedFrom", + type: { + name: "Composite", + className: "ResourceReference" + } + }, + migratedTo: { + serializedName: "migratedTo", + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + } +}; + +export const MigrateResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MigrateResult", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + migratedProfileResourceId: { + serializedName: "properties.migratedProfileResourceId", + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + } +}; + +export const SsoUri: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SsoUri", + modelProperties: { + ssoUriValue: { + serializedName: "ssoUriValue", + readOnly: true, + type: { + name: "String" + } } } } @@ -3060,12 +3381,14 @@ export const EndpointPropertiesUpdateParameters: coreClient.CompositeMapper = { } }, isHttpAllowed: { + defaultValue: true, serializedName: "isHttpAllowed", type: { name: "Boolean" } }, isHttpsAllowed: { + defaultValue: true, serializedName: "isHttpsAllowed", type: { name: "Boolean" @@ -3389,12 +3712,14 @@ export const EndpointUpdateParameters: coreClient.CompositeMapper = { } }, isHttpAllowed: { + defaultValue: true, serializedName: "properties.isHttpAllowed", type: { name: "Boolean" } }, isHttpsAllowed: { + defaultValue: true, serializedName: "properties.isHttpsAllowed", type: { name: "Boolean" @@ -4956,6 +5281,7 @@ export const RemoteAddressMatchConditionParameters: coreClient.CompositeMapper = } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5008,6 +5334,7 @@ export const RequestMethodMatchConditionParameters: coreClient.CompositeMapper = } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5060,6 +5387,7 @@ export const QueryStringMatchConditionParameters: coreClient.CompositeMapper = { } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5118,6 +5446,7 @@ export const PostArgsMatchConditionParameters: coreClient.CompositeMapper = { } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5170,6 +5499,7 @@ export const RequestUriMatchConditionParameters: coreClient.CompositeMapper = { } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5228,6 +5558,7 @@ export const RequestHeaderMatchConditionParameters: coreClient.CompositeMapper = } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5280,6 +5611,7 @@ export const RequestBodyMatchConditionParameters: coreClient.CompositeMapper = { } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5333,6 +5665,7 @@ export const RequestSchemeMatchConditionParameters: coreClient.CompositeMapper = } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5385,6 +5718,7 @@ export const UrlPathMatchConditionParameters: coreClient.CompositeMapper = { } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5437,6 +5771,7 @@ export const UrlFileExtensionMatchConditionParameters: coreClient.CompositeMappe } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5489,6 +5824,7 @@ export const UrlFileNameMatchConditionParameters: coreClient.CompositeMapper = { } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5541,6 +5877,7 @@ export const HttpVersionMatchConditionParameters: coreClient.CompositeMapper = { } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5599,6 +5936,7 @@ export const CookiesMatchConditionParameters: coreClient.CompositeMapper = { } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5651,6 +5989,7 @@ export const IsDeviceMatchConditionParameters: coreClient.CompositeMapper = { } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5703,6 +6042,7 @@ export const SocketAddrMatchConditionParameters: coreClient.CompositeMapper = { } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5755,6 +6095,7 @@ export const ClientPortMatchConditionParameters: coreClient.CompositeMapper = { } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5807,6 +6148,7 @@ export const ServerPortMatchConditionParameters: coreClient.CompositeMapper = { } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5859,6 +6201,7 @@ export const HostNameMatchConditionParameters: coreClient.CompositeMapper = { } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -5911,6 +6254,7 @@ export const SslProtocolMatchConditionParameters: coreClient.CompositeMapper = { } }, negateCondition: { + defaultValue: false, serializedName: "negateCondition", type: { name: "Boolean" @@ -6402,70 +6746,162 @@ export const KeyVaultCertificateSourceParameters: coreClient.CompositeMapper = { } }; -export const AFDDomainProperties: coreClient.CompositeMapper = { +export const TrackedResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AFDDomainProperties", + className: "TrackedResource", modelProperties: { - ...AFDDomainUpdatePropertiesParameters.type.modelProperties, - ...AFDStateProperties.type.modelProperties, - domainValidationState: { - serializedName: "domainValidationState", - readOnly: true, - type: { - name: "String" - } - }, - hostName: { - serializedName: "hostName", + ...Resource.type.modelProperties, + location: { + serializedName: "location", required: true, type: { name: "String" } }, - validationProperties: { - serializedName: "validationProperties", + tags: { + serializedName: "tags", type: { - name: "Composite", - className: "DomainValidationProperties" + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const AFDEndpointProperties: coreClient.CompositeMapper = { +export const ProxyResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AFDEndpointProperties", + className: "ProxyResource", modelProperties: { - ...AFDEndpointPropertiesUpdateParameters.type.modelProperties, - ...AFDStateProperties.type.modelProperties, - hostName: { - serializedName: "hostName", + ...Resource.type.modelProperties + } + } +}; + +export const ManagedRuleSetDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedRuleSetDefinition", + modelProperties: { + ...Resource.type.modelProperties, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { name: "String" } }, - autoGeneratedDomainNameLabelScope: { - serializedName: "autoGeneratedDomainNameLabelScope", + ruleSetType: { + serializedName: "properties.ruleSetType", + readOnly: true, + type: { + name: "String" + } + }, + ruleSetVersion: { + serializedName: "properties.ruleSetVersion", + readOnly: true, type: { name: "String" } + }, + ruleGroups: { + serializedName: "properties.ruleGroups", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedRuleGroupDefinition" + } + } + } } } } }; -export const AFDOriginGroupProperties: coreClient.CompositeMapper = { +export const AFDDomainProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AFDOriginGroupProperties", + className: "AFDDomainProperties", modelProperties: { - ...AFDOriginGroupUpdatePropertiesParameters.type.modelProperties, - ...AFDStateProperties.type.modelProperties - } + ...AFDDomainUpdatePropertiesParameters.type.modelProperties, + ...AFDStateProperties.type.modelProperties, + domainValidationState: { + serializedName: "domainValidationState", + readOnly: true, + type: { + name: "String" + } + }, + hostName: { + serializedName: "hostName", + required: true, + type: { + name: "String" + } + }, + extendedProperties: { + serializedName: "extendedProperties", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + validationProperties: { + serializedName: "validationProperties", + type: { + name: "Composite", + className: "DomainValidationProperties" + } + } + } + } +}; + +export const AFDEndpointProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AFDEndpointProperties", + modelProperties: { + ...AFDEndpointPropertiesUpdateParameters.type.modelProperties, + ...AFDStateProperties.type.modelProperties, + hostName: { + serializedName: "hostName", + readOnly: true, + type: { + name: "String" + } + }, + autoGeneratedDomainNameLabelScope: { + serializedName: "autoGeneratedDomainNameLabelScope", + type: { + name: "String" + } + } + } + } +}; + +export const AFDOriginGroupProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AFDOriginGroupProperties", + modelProperties: { + ...AFDOriginGroupUpdatePropertiesParameters.type.modelProperties, + ...AFDStateProperties.type.modelProperties + } } }; @@ -6567,91 +7003,6 @@ export const SecretProperties: coreClient.CompositeMapper = { } }; -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties - } - } -}; - -export const TrackedResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrackedResource", - modelProperties: { - ...Resource.type.modelProperties, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const ManagedRuleSetDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedRuleSetDefinition", - modelProperties: { - ...Resource.type.modelProperties, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "Sku" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - ruleSetType: { - serializedName: "properties.ruleSetType", - readOnly: true, - type: { - name: "String" - } - }, - ruleSetVersion: { - serializedName: "properties.ruleSetVersion", - readOnly: true, - type: { - name: "String" - } - }, - ruleGroups: { - serializedName: "properties.ruleGroups", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedRuleGroupDefinition" - } - } - } - } - } - } -}; - export const DeliveryRuleRemoteAddressCondition: coreClient.CompositeMapper = { serializedName: "RemoteAddress", type: { @@ -7412,7 +7763,53 @@ export const AzureFirstPartyManagedCertificateParameters: coreClient.CompositeMa uberParent: "SecretParameters", polymorphicDiscriminator: SecretParameters.type.polymorphicDiscriminator, modelProperties: { - ...SecretParameters.type.modelProperties + ...SecretParameters.type.modelProperties, + secretSource: { + serializedName: "secretSource", + type: { + name: "Composite", + className: "ResourceReference" + } + }, + subject: { + serializedName: "subject", + readOnly: true, + type: { + name: "String" + } + }, + expirationDate: { + serializedName: "expirationDate", + readOnly: true, + type: { + name: "String" + } + }, + certificateAuthority: { + serializedName: "certificateAuthority", + readOnly: true, + type: { + name: "String" + } + }, + subjectAlternativeNames: { + serializedName: "subjectAlternativeNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + thumbprint: { + serializedName: "thumbprint", + readOnly: true, + type: { + name: "String" + } + } } } }; @@ -7688,84 +8085,81 @@ export const AzureFirstPartyManagedCertificate: coreClient.CompositeMapper = { } }; -export const AFDDomain: coreClient.CompositeMapper = { +export const Profile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AFDDomain", + className: "Profile", modelProperties: { - ...ProxyResource.type.modelProperties, - profileName: { - serializedName: "properties.profileName", - readOnly: true, - type: { - name: "String" - } - }, - tlsSettings: { - serializedName: "properties.tlsSettings", + ...TrackedResource.type.modelProperties, + sku: { + serializedName: "sku", type: { name: "Composite", - className: "AFDDomainHttpsParameters" + className: "Sku" } }, - azureDnsZone: { - serializedName: "properties.azureDnsZone", + kind: { + serializedName: "kind", + readOnly: true, type: { - name: "Composite", - className: "ResourceReference" + name: "String" } }, - preValidatedCustomDomainResourceId: { - serializedName: "properties.preValidatedCustomDomainResourceId", + identity: { + serializedName: "identity", type: { name: "Composite", - className: "ResourceReference" + className: "ManagedServiceIdentity" } }, - provisioningState: { - serializedName: "properties.provisioningState", + resourceState: { + serializedName: "properties.resourceState", readOnly: true, type: { name: "String" } }, - deploymentStatus: { - serializedName: "properties.deploymentStatus", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { name: "String" } }, - domainValidationState: { - serializedName: "properties.domainValidationState", + extendedProperties: { + serializedName: "properties.extendedProperties", readOnly: true, type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } }, - hostName: { - serializedName: "properties.hostName", + frontDoorId: { + serializedName: "properties.frontDoorId", + readOnly: true, type: { name: "String" } }, - validationProperties: { - serializedName: "properties.validationProperties", + originResponseTimeoutSeconds: { + constraints: { + InclusiveMinimum: 16 + }, + serializedName: "properties.originResponseTimeoutSeconds", type: { - name: "Composite", - className: "DomainValidationProperties" + name: "Number" } } } } }; -export const AFDOriginGroup: coreClient.CompositeMapper = { +export const AFDEndpoint: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AFDOriginGroup", + className: "AFDEndpoint", modelProperties: { - ...ProxyResource.type.modelProperties, + ...TrackedResource.type.modelProperties, profileName: { serializedName: "properties.profileName", readOnly: true, @@ -7773,47 +8167,35 @@ export const AFDOriginGroup: coreClient.CompositeMapper = { name: "String" } }, - loadBalancingSettings: { - serializedName: "properties.loadBalancingSettings", - type: { - name: "Composite", - className: "LoadBalancingSettingsParameters" - } - }, - healthProbeSettings: { - serializedName: "properties.healthProbeSettings", + enabledState: { + serializedName: "properties.enabledState", type: { - name: "Composite", - className: "HealthProbeParameters" + name: "String" } }, - trafficRestorationTimeToHealedOrNewEndpointsInMinutes: { - constraints: { - InclusiveMaximum: 50, - InclusiveMinimum: 0 - }, - serializedName: - "properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "Number" + name: "String" } }, - sessionAffinityState: { - serializedName: "properties.sessionAffinityState", + deploymentStatus: { + serializedName: "properties.deploymentStatus", + readOnly: true, type: { name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", + hostName: { + serializedName: "properties.hostName", readOnly: true, type: { name: "String" } }, - deploymentStatus: { - serializedName: "properties.deploymentStatus", - readOnly: true, + autoGeneratedDomainNameLabelScope: { + serializedName: "properties.autoGeneratedDomainNameLabelScope", type: { name: "String" } @@ -7822,50 +8204,27 @@ export const AFDOriginGroup: coreClient.CompositeMapper = { } }; -export const AFDOrigin: coreClient.CompositeMapper = { +export const Endpoint: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AFDOrigin", + className: "Endpoint", modelProperties: { - ...ProxyResource.type.modelProperties, - originGroupName: { - serializedName: "properties.originGroupName", - readOnly: true, - type: { - name: "String" - } - }, - azureOrigin: { - serializedName: "properties.azureOrigin", - type: { - name: "Composite", - className: "ResourceReference" - } - }, - hostName: { - serializedName: "properties.hostName", + ...TrackedResource.type.modelProperties, + originPath: { + serializedName: "properties.originPath", type: { name: "String" } }, - httpPort: { - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1 - }, - serializedName: "properties.httpPort", - type: { - name: "Number" - } - }, - httpsPort: { - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1 - }, - serializedName: "properties.httpsPort", + contentTypesToCompress: { + serializedName: "properties.contentTypesToCompress", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, originHostHeader: { @@ -7874,163 +8233,143 @@ export const AFDOrigin: coreClient.CompositeMapper = { name: "String" } }, - priority: { - constraints: { - InclusiveMaximum: 5, - InclusiveMinimum: 1 - }, - serializedName: "properties.priority", + isCompressionEnabled: { + serializedName: "properties.isCompressionEnabled", type: { - name: "Number" + name: "Boolean" } }, - weight: { - constraints: { - InclusiveMaximum: 1000, - InclusiveMinimum: 1 - }, - serializedName: "properties.weight", + isHttpAllowed: { + defaultValue: true, + serializedName: "properties.isHttpAllowed", type: { - name: "Number" + name: "Boolean" } }, - sharedPrivateLinkResource: { - serializedName: "properties.sharedPrivateLinkResource", + isHttpsAllowed: { + defaultValue: true, + serializedName: "properties.isHttpsAllowed", type: { - name: "Composite", - className: "SharedPrivateLinkResourceProperties" + name: "Boolean" } }, - enabledState: { - serializedName: "properties.enabledState", + queryStringCachingBehavior: { + serializedName: "properties.queryStringCachingBehavior", type: { - name: "String" + name: "Enum", + allowedValues: [ + "IgnoreQueryString", + "BypassCaching", + "UseQueryString", + "NotSet" + ] } }, - enforceCertificateNameCheck: { - defaultValue: true, - serializedName: "properties.enforceCertificateNameCheck", + optimizationType: { + serializedName: "properties.optimizationType", type: { - name: "Boolean" + name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + probePath: { + serializedName: "properties.probePath", type: { name: "String" } }, - deploymentStatus: { - serializedName: "properties.deploymentStatus", - readOnly: true, + geoFilters: { + serializedName: "properties.geoFilters", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GeoFilter" + } + } } - } - } - } -}; - -export const Route: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Route", - modelProperties: { - ...ProxyResource.type.modelProperties, - endpointName: { - serializedName: "properties.endpointName", - readOnly: true, + }, + defaultOriginGroup: { + serializedName: "properties.defaultOriginGroup", type: { - name: "String" + name: "Composite", + className: "ResourceReference" } }, - customDomains: { - serializedName: "properties.customDomains", + urlSigningKeys: { + serializedName: "properties.urlSigningKeys", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ActivatedResourceReference" + className: "UrlSigningKey" } } } }, - originGroup: { - serializedName: "properties.originGroup", + deliveryPolicy: { + serializedName: "properties.deliveryPolicy", type: { name: "Composite", - className: "ResourceReference" + className: "EndpointPropertiesUpdateParametersDeliveryPolicy" } }, - originPath: { - serializedName: "properties.originPath", + webApplicationFirewallPolicyLink: { + serializedName: "properties.webApplicationFirewallPolicyLink", + type: { + name: "Composite", + className: + "EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink" + } + }, + hostName: { + serializedName: "properties.hostName", + readOnly: true, type: { name: "String" } }, - ruleSets: { - serializedName: "properties.ruleSets", + origins: { + serializedName: "properties.origins", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ResourceReference" + className: "DeepCreatedOrigin" } } } }, - supportedProtocols: { - serializedName: "properties.supportedProtocols", + originGroups: { + serializedName: "properties.originGroups", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "DeepCreatedOriginGroup" } } } }, - patternsToMatch: { - serializedName: "properties.patternsToMatch", + customDomains: { + serializedName: "properties.customDomains", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "DeepCreatedCustomDomain" } } } }, - cacheConfiguration: { - serializedName: "properties.cacheConfiguration", - type: { - name: "Composite", - className: "AfdRouteCacheConfiguration" - } - }, - forwardingProtocol: { - serializedName: "properties.forwardingProtocol", - type: { - name: "String" - } - }, - linkToDefaultDomain: { - serializedName: "properties.linkToDefaultDomain", - type: { - name: "String" - } - }, - httpsRedirect: { - serializedName: "properties.httpsRedirect", - type: { - name: "String" - } - }, - enabledState: { - serializedName: "properties.enabledState", + resourceState: { + serializedName: "properties.resourceState", + readOnly: true, type: { name: "String" } @@ -8041,96 +8380,76 @@ export const Route: coreClient.CompositeMapper = { type: { name: "String" } - }, - deploymentStatus: { - serializedName: "properties.deploymentStatus", - readOnly: true, - type: { - name: "String" - } } } } }; -export const RuleSet: coreClient.CompositeMapper = { +export const CdnWebApplicationFirewallPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RuleSet", + className: "CdnWebApplicationFirewallPolicy", modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + ...TrackedResource.type.modelProperties, + etag: { + serializedName: "etag", type: { name: "String" } }, - deploymentStatus: { - serializedName: "properties.deploymentStatus", - readOnly: true, + sku: { + serializedName: "sku", type: { - name: "String" + name: "Composite", + className: "Sku" } }, - profileName: { - serializedName: "properties.profileName", - readOnly: true, + policySettings: { + serializedName: "properties.policySettings", type: { - name: "String" + name: "Composite", + className: "PolicySettings" } - } - } - } -}; - -export const Rule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Rule", - modelProperties: { - ...ProxyResource.type.modelProperties, - ruleSetName: { - serializedName: "properties.ruleSetName", - readOnly: true, + }, + rateLimitRules: { + serializedName: "properties.rateLimitRules", type: { - name: "String" + name: "Composite", + className: "RateLimitRuleList" } }, - order: { - serializedName: "properties.order", + customRules: { + serializedName: "properties.customRules", type: { - name: "Number" + name: "Composite", + className: "CustomRuleList" } }, - conditions: { - serializedName: "properties.conditions", + managedRules: { + serializedName: "properties.managedRules", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeliveryRuleCondition" - } - } + name: "Composite", + className: "ManagedRuleSetList" } }, - actions: { - serializedName: "properties.actions", + endpointLinks: { + serializedName: "properties.endpointLinks", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "DeliveryRuleActionAutoGenerated" + className: "CdnEndpoint" } } } }, - matchProcessingBehavior: { - serializedName: "properties.matchProcessingBehavior", + extendedProperties: { + serializedName: "properties.extendedProperties", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } }, provisioningState: { @@ -8140,8 +8459,8 @@ export const Rule: coreClient.CompositeMapper = { name: "String" } }, - deploymentStatus: { - serializedName: "properties.deploymentStatus", + resourceState: { + serializedName: "properties.resourceState", readOnly: true, type: { name: "String" @@ -8151,12 +8470,40 @@ export const Rule: coreClient.CompositeMapper = { } }; -export const SecurityPolicy: coreClient.CompositeMapper = { +export const AFDDomain: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityPolicy", + className: "AFDDomain", modelProperties: { ...ProxyResource.type.modelProperties, + profileName: { + serializedName: "properties.profileName", + readOnly: true, + type: { + name: "String" + } + }, + tlsSettings: { + serializedName: "properties.tlsSettings", + type: { + name: "Composite", + className: "AFDDomainHttpsParameters" + } + }, + azureDnsZone: { + serializedName: "properties.azureDnsZone", + type: { + name: "Composite", + className: "ResourceReference" + } + }, + preValidatedCustomDomainResourceId: { + serializedName: "properties.preValidatedCustomDomainResourceId", + type: { + name: "Composite", + className: "ResourceReference" + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -8171,68 +8518,119 @@ export const SecurityPolicy: coreClient.CompositeMapper = { name: "String" } }, - profileName: { - serializedName: "properties.profileName", + domainValidationState: { + serializedName: "properties.domainValidationState", readOnly: true, type: { name: "String" } }, - parameters: { - serializedName: "properties.parameters", + hostName: { + serializedName: "properties.hostName", + type: { + name: "String" + } + }, + extendedProperties: { + serializedName: "properties.extendedProperties", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + validationProperties: { + serializedName: "properties.validationProperties", type: { name: "Composite", - className: "SecurityPolicyPropertiesParameters" + className: "DomainValidationProperties" } } } } }; -export const Secret: coreClient.CompositeMapper = { +export const AFDOriginGroup: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Secret", + className: "AFDOriginGroup", modelProperties: { ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", + profileName: { + serializedName: "properties.profileName", readOnly: true, type: { name: "String" } }, - deploymentStatus: { - serializedName: "properties.deploymentStatus", - readOnly: true, + loadBalancingSettings: { + serializedName: "properties.loadBalancingSettings", + type: { + name: "Composite", + className: "LoadBalancingSettingsParameters" + } + }, + healthProbeSettings: { + serializedName: "properties.healthProbeSettings", + type: { + name: "Composite", + className: "HealthProbeParameters" + } + }, + trafficRestorationTimeToHealedOrNewEndpointsInMinutes: { + constraints: { + InclusiveMaximum: 50, + InclusiveMinimum: 0 + }, + serializedName: + "properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + type: { + name: "Number" + } + }, + sessionAffinityState: { + serializedName: "properties.sessionAffinityState", type: { name: "String" } }, - profileName: { - serializedName: "properties.profileName", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { name: "String" } }, - parameters: { - serializedName: "properties.parameters", + deploymentStatus: { + serializedName: "properties.deploymentStatus", + readOnly: true, type: { - name: "Composite", - className: "SecretParameters" + name: "String" } } } } }; -export const Origin: coreClient.CompositeMapper = { +export const AFDOrigin: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Origin", + className: "AFDOrigin", modelProperties: { ...ProxyResource.type.modelProperties, + originGroupName: { + serializedName: "properties.originGroupName", + readOnly: true, + type: { + name: "String" + } + }, + azureOrigin: { + serializedName: "properties.azureOrigin", + type: { + name: "Composite", + className: "ResourceReference" + } + }, hostName: { serializedName: "properties.hostName", type: { @@ -8240,6 +8638,7 @@ export const Origin: coreClient.CompositeMapper = { } }, httpPort: { + defaultValue: 80, constraints: { InclusiveMaximum: 65535, InclusiveMinimum: 1 @@ -8250,6 +8649,7 @@ export const Origin: coreClient.CompositeMapper = { } }, httpsPort: { + defaultValue: 443, constraints: { InclusiveMaximum: 65535, InclusiveMinimum: 1 @@ -8285,41 +8685,24 @@ export const Origin: coreClient.CompositeMapper = { name: "Number" } }, - enabled: { - serializedName: "properties.enabled", - type: { - name: "Boolean" - } - }, - privateLinkAlias: { - serializedName: "properties.privateLinkAlias", - type: { - name: "String" - } - }, - privateLinkResourceId: { - serializedName: "properties.privateLinkResourceId", - type: { - name: "String" - } - }, - privateLinkLocation: { - serializedName: "properties.privateLinkLocation", + sharedPrivateLinkResource: { + serializedName: "properties.sharedPrivateLinkResource", type: { - name: "String" + name: "Composite", + className: "SharedPrivateLinkResourceProperties" } }, - privateLinkApprovalMessage: { - serializedName: "properties.privateLinkApprovalMessage", + enabledState: { + serializedName: "properties.enabledState", type: { name: "String" } }, - resourceState: { - serializedName: "properties.resourceState", - readOnly: true, + enforceCertificateNameCheck: { + defaultValue: true, + serializedName: "properties.enforceCertificateNameCheck", type: { - name: "String" + name: "Boolean" } }, provisioningState: { @@ -8329,8 +8712,8 @@ export const Origin: coreClient.CompositeMapper = { name: "String" } }, - privateEndpointStatus: { - serializedName: "properties.privateEndpointStatus", + deploymentStatus: { + serializedName: "properties.deploymentStatus", readOnly: true, type: { name: "String" @@ -8340,21 +8723,46 @@ export const Origin: coreClient.CompositeMapper = { } }; -export const OriginGroup: coreClient.CompositeMapper = { +export const Route: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OriginGroup", + className: "Route", modelProperties: { ...ProxyResource.type.modelProperties, - healthProbeSettings: { - serializedName: "properties.healthProbeSettings", + endpointName: { + serializedName: "properties.endpointName", + readOnly: true, + type: { + name: "String" + } + }, + customDomains: { + serializedName: "properties.customDomains", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ActivatedResourceReference" + } + } + } + }, + originGroup: { + serializedName: "properties.originGroup", type: { name: "Composite", - className: "HealthProbeParameters" + className: "ResourceReference" } }, - origins: { - serializedName: "properties.origins", + originPath: { + serializedName: "properties.originPath", + type: { + name: "String" + } + }, + ruleSets: { + serializedName: "properties.ruleSets", type: { name: "Sequence", element: { @@ -8365,90 +8773,102 @@ export const OriginGroup: coreClient.CompositeMapper = { } } }, - trafficRestorationTimeToHealedOrNewEndpointsInMinutes: { - constraints: { - InclusiveMaximum: 50, - InclusiveMinimum: 0 - }, - serializedName: - "properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + supportedProtocols: { + defaultValue: ["Http", "Https"], + serializedName: "properties.supportedProtocols", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - responseBasedOriginErrorDetectionSettings: { - serializedName: "properties.responseBasedOriginErrorDetectionSettings", + patternsToMatch: { + serializedName: "properties.patternsToMatch", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + cacheConfiguration: { + serializedName: "properties.cacheConfiguration", type: { name: "Composite", - className: "ResponseBasedOriginErrorDetectionParameters" + className: "AfdRouteCacheConfiguration" } }, - resourceState: { - serializedName: "properties.resourceState", - readOnly: true, + forwardingProtocol: { + serializedName: "properties.forwardingProtocol", type: { name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + linkToDefaultDomain: { + defaultValue: "Disabled", + serializedName: "properties.linkToDefaultDomain", type: { name: "String" } - } - } - } -}; - -export const CustomDomain: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CustomDomain", - modelProperties: { - ...ProxyResource.type.modelProperties, - hostName: { - serializedName: "properties.hostName", + }, + httpsRedirect: { + defaultValue: "Disabled", + serializedName: "properties.httpsRedirect", type: { name: "String" } }, - resourceState: { - serializedName: "properties.resourceState", - readOnly: true, + enabledState: { + serializedName: "properties.enabledState", type: { name: "String" } }, - customHttpsProvisioningState: { - serializedName: "properties.customHttpsProvisioningState", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { name: "String" } }, - customHttpsProvisioningSubstate: { - serializedName: "properties.customHttpsProvisioningSubstate", + deploymentStatus: { + serializedName: "properties.deploymentStatus", readOnly: true, type: { name: "String" } - }, - customHttpsParameters: { - serializedName: "properties.customHttpsParameters", + } + } + } +}; + +export const RuleSet: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RuleSet", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "Composite", - className: "CustomDomainHttpsParameters" + name: "String" } }, - validationData: { - serializedName: "properties.validationData", + deploymentStatus: { + serializedName: "properties.deploymentStatus", + readOnly: true, type: { name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", + profileName: { + serializedName: "properties.profileName", readOnly: true, type: { name: "String" @@ -8458,43 +8878,52 @@ export const CustomDomain: coreClient.CompositeMapper = { } }; -export const EdgeNode: coreClient.CompositeMapper = { +export const Rule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EdgeNode", + className: "Rule", modelProperties: { ...ProxyResource.type.modelProperties, - ipAddressGroups: { - serializedName: "properties.ipAddressGroups", + ruleSetName: { + serializedName: "properties.ruleSetName", + readOnly: true, + type: { + name: "String" + } + }, + order: { + serializedName: "properties.order", + type: { + name: "Number" + } + }, + conditions: { + serializedName: "properties.conditions", type: { name: "Sequence", element: { type: { name: "Composite", - className: "IpAddressGroup" + className: "DeliveryRuleCondition" } } } - } - } - } -}; - -export const AFDEndpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AFDEndpoint", - modelProperties: { - ...TrackedResource.type.modelProperties, - profileName: { - serializedName: "properties.profileName", - readOnly: true, + }, + actions: { + serializedName: "properties.actions", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeliveryRuleActionAutoGenerated" + } + } } }, - enabledState: { - serializedName: "properties.enabledState", + matchProcessingBehavior: { + defaultValue: "Continue", + serializedName: "properties.matchProcessingBehavior", type: { name: "String" } @@ -8512,201 +8941,212 @@ export const AFDEndpoint: coreClient.CompositeMapper = { type: { name: "String" } - }, - hostName: { - serializedName: "properties.hostName", - readOnly: true, - type: { - name: "String" - } - }, - autoGeneratedDomainNameLabelScope: { - serializedName: "properties.autoGeneratedDomainNameLabelScope", - type: { - name: "String" - } } } } }; -export const Profile: coreClient.CompositeMapper = { +export const SecurityPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Profile", + className: "SecurityPolicy", modelProperties: { - ...TrackedResource.type.modelProperties, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "Sku" - } - }, - kind: { - serializedName: "kind", - readOnly: true, - type: { - name: "String" - } - }, - resourceState: { - serializedName: "properties.resourceState", + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", + deploymentStatus: { + serializedName: "properties.deploymentStatus", readOnly: true, type: { name: "String" } }, - frontDoorId: { - serializedName: "properties.frontDoorId", + profileName: { + serializedName: "properties.profileName", readOnly: true, type: { name: "String" } }, - originResponseTimeoutSeconds: { - constraints: { - InclusiveMinimum: 16 - }, - serializedName: "properties.originResponseTimeoutSeconds", + parameters: { + serializedName: "properties.parameters", type: { - name: "Number" + name: "Composite", + className: "SecurityPolicyPropertiesParameters" } } } } }; -export const Endpoint: coreClient.CompositeMapper = { +export const Secret: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Endpoint", + className: "Secret", modelProperties: { - ...TrackedResource.type.modelProperties, - originPath: { - serializedName: "properties.originPath", + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } }, - contentTypesToCompress: { - serializedName: "properties.contentTypesToCompress", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + deploymentStatus: { + serializedName: "properties.deploymentStatus", + readOnly: true, + type: { + name: "String" } }, - originHostHeader: { - serializedName: "properties.originHostHeader", + profileName: { + serializedName: "properties.profileName", + readOnly: true, type: { name: "String" } }, - isCompressionEnabled: { - serializedName: "properties.isCompressionEnabled", + parameters: { + serializedName: "properties.parameters", type: { - name: "Boolean" + name: "Composite", + className: "SecretParameters" } - }, - isHttpAllowed: { - serializedName: "properties.isHttpAllowed", + } + } + } +}; + +export const Origin: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Origin", + modelProperties: { + ...ProxyResource.type.modelProperties, + hostName: { + serializedName: "properties.hostName", type: { - name: "Boolean" + name: "String" } }, - isHttpsAllowed: { - serializedName: "properties.isHttpsAllowed", + httpPort: { + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + serializedName: "properties.httpPort", type: { - name: "Boolean" + name: "Number" } }, - queryStringCachingBehavior: { - serializedName: "properties.queryStringCachingBehavior", + httpsPort: { + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + serializedName: "properties.httpsPort", type: { - name: "Enum", - allowedValues: [ - "IgnoreQueryString", - "BypassCaching", - "UseQueryString", - "NotSet" - ] + name: "Number" } }, - optimizationType: { - serializedName: "properties.optimizationType", + originHostHeader: { + serializedName: "properties.originHostHeader", type: { name: "String" } }, - probePath: { - serializedName: "properties.probePath", + priority: { + constraints: { + InclusiveMaximum: 5, + InclusiveMinimum: 1 + }, + serializedName: "properties.priority", + type: { + name: "Number" + } + }, + weight: { + constraints: { + InclusiveMaximum: 1000, + InclusiveMinimum: 1 + }, + serializedName: "properties.weight", + type: { + name: "Number" + } + }, + enabled: { + serializedName: "properties.enabled", + type: { + name: "Boolean" + } + }, + privateLinkAlias: { + serializedName: "properties.privateLinkAlias", type: { name: "String" } }, - geoFilters: { - serializedName: "properties.geoFilters", + privateLinkResourceId: { + serializedName: "properties.privateLinkResourceId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GeoFilter" - } - } + name: "String" } }, - defaultOriginGroup: { - serializedName: "properties.defaultOriginGroup", + privateLinkLocation: { + serializedName: "properties.privateLinkLocation", type: { - name: "Composite", - className: "ResourceReference" + name: "String" } }, - urlSigningKeys: { - serializedName: "properties.urlSigningKeys", + privateLinkApprovalMessage: { + serializedName: "properties.privateLinkApprovalMessage", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UrlSigningKey" - } - } + name: "String" } }, - deliveryPolicy: { - serializedName: "properties.deliveryPolicy", + resourceState: { + serializedName: "properties.resourceState", + readOnly: true, type: { - name: "Composite", - className: "EndpointPropertiesUpdateParametersDeliveryPolicy" + name: "String" } }, - webApplicationFirewallPolicyLink: { - serializedName: "properties.webApplicationFirewallPolicyLink", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "Composite", - className: - "EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink" + name: "String" } }, - hostName: { - serializedName: "properties.hostName", + privateEndpointStatus: { + serializedName: "properties.privateEndpointStatus", readOnly: true, type: { name: "String" } + } + } + } +}; + +export const OriginGroup: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OriginGroup", + modelProperties: { + ...ProxyResource.type.modelProperties, + healthProbeSettings: { + serializedName: "properties.healthProbeSettings", + type: { + name: "Composite", + className: "HealthProbeParameters" + } }, origins: { serializedName: "properties.origins", @@ -8715,34 +9155,27 @@ export const Endpoint: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "DeepCreatedOrigin" + className: "ResourceReference" } } } }, - originGroups: { - serializedName: "properties.originGroups", + trafficRestorationTimeToHealedOrNewEndpointsInMinutes: { + constraints: { + InclusiveMaximum: 50, + InclusiveMinimum: 0 + }, + serializedName: + "properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeepCreatedOriginGroup" - } - } + name: "Number" } }, - customDomains: { - serializedName: "properties.customDomains", - readOnly: true, + responseBasedOriginErrorDetectionSettings: { + serializedName: "properties.responseBasedOriginErrorDetectionSettings", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeepCreatedCustomDomain" - } - } + name: "Composite", + className: "ResponseBasedOriginErrorDetectionParameters" } }, resourceState: { @@ -8763,76 +9196,857 @@ export const Endpoint: coreClient.CompositeMapper = { } }; -export const CdnWebApplicationFirewallPolicy: coreClient.CompositeMapper = { +export const CustomDomain: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CdnWebApplicationFirewallPolicy", + className: "CustomDomain", modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", + ...ProxyResource.type.modelProperties, + hostName: { + serializedName: "properties.hostName", type: { name: "String" } }, - sku: { - serializedName: "sku", + resourceState: { + serializedName: "properties.resourceState", + readOnly: true, type: { - name: "Composite", - className: "Sku" + name: "String" } }, - policySettings: { - serializedName: "properties.policySettings", + customHttpsProvisioningState: { + serializedName: "properties.customHttpsProvisioningState", + readOnly: true, type: { - name: "Composite", - className: "PolicySettings" + name: "String" } }, - rateLimitRules: { - serializedName: "properties.rateLimitRules", + customHttpsProvisioningSubstate: { + serializedName: "properties.customHttpsProvisioningSubstate", + readOnly: true, type: { - name: "Composite", - className: "RateLimitRuleList" + name: "String" } }, - customRules: { - serializedName: "properties.customRules", + customHttpsParameters: { + serializedName: "properties.customHttpsParameters", type: { name: "Composite", - className: "CustomRuleList" + className: "CustomDomainHttpsParameters" } }, - managedRules: { - serializedName: "properties.managedRules", + validationData: { + serializedName: "properties.validationData", type: { - name: "Composite", - className: "ManagedRuleSetList" + name: "String" } }, - endpointLinks: { - serializedName: "properties.endpointLinks", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { - name: "Sequence", - element: { + name: "String" + } + } + } + } +}; + +export const EdgeNode: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EdgeNode", + modelProperties: { + ...ProxyResource.type.modelProperties, + ipAddressGroups: { + serializedName: "properties.ipAddressGroups", + type: { + name: "Sequence", + element: { type: { name: "Composite", - className: "CdnEndpoint" + className: "IpAddressGroup" } } } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + } + } + } +}; + +export const AfdProfilesUpgradeHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AfdProfilesUpgradeHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } - }, - resourceState: { - serializedName: "properties.resourceState", - readOnly: true, + } + } + } +}; + +export const AfdCustomDomainsCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AfdCustomDomainsCreateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AfdCustomDomainsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AfdCustomDomainsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AfdCustomDomainsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AfdCustomDomainsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AfdCustomDomainsRefreshValidationTokenHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AfdCustomDomainsRefreshValidationTokenHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AfdEndpointsCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AfdEndpointsCreateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AfdEndpointsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AfdEndpointsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AfdEndpointsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AfdEndpointsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AfdEndpointsPurgeContentHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AfdEndpointsPurgeContentHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AfdOriginGroupsCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AfdOriginGroupsCreateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AfdOriginGroupsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AfdOriginGroupsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AfdOriginGroupsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AfdOriginGroupsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AfdOriginsCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AfdOriginsCreateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AfdOriginsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AfdOriginsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AfdOriginsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AfdOriginsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const RoutesCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RoutesCreateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const RoutesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RoutesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const RoutesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RoutesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const RuleSetsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RuleSetsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const RulesCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RulesCreateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const RulesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RulesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const RulesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RulesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const SecurityPoliciesCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecurityPoliciesCreateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const SecurityPoliciesPatchHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecurityPoliciesPatchHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const SecurityPoliciesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecurityPoliciesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const SecretsCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecretsCreateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const SecretsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecretsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ProfilesCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProfilesCreateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ProfilesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProfilesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ProfilesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProfilesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ProfilesCanMigrateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProfilesCanMigrateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ProfilesMigrateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProfilesMigrateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ProfilesMigrationCommitHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProfilesMigrationCommitHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const EndpointsCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointsCreateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const EndpointsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const EndpointsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const EndpointsStartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointsStartHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const EndpointsStopHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointsStopHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const EndpointsPurgeContentHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointsPurgeContentHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const EndpointsLoadContentHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointsLoadContentHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const OriginsCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OriginsCreateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const OriginsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OriginsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const OriginsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OriginsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const OriginGroupsCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OriginGroupsCreateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const OriginGroupsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OriginGroupsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const OriginGroupsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OriginGroupsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const CustomDomainsCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomDomainsCreateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const CustomDomainsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomDomainsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const CustomDomainsDisableCustomHttpsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomDomainsDisableCustomHttpsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const CustomDomainsEnableCustomHttpsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomDomainsEnableCustomHttpsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const PoliciesCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PoliciesCreateOrUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const PoliciesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PoliciesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } diff --git a/sdk/cdn/arm-cdn/src/models/parameters.ts b/sdk/cdn/arm-cdn/src/models/parameters.ts index b7436c9175b6..85a8fe19ee59 100644 --- a/sdk/cdn/arm-cdn/src/models/parameters.ts +++ b/sdk/cdn/arm-cdn/src/models/parameters.ts @@ -16,6 +16,8 @@ import { CheckNameAvailabilityInput as CheckNameAvailabilityInputMapper, ValidateProbeInput as ValidateProbeInputMapper, CheckHostNameAvailabilityInput as CheckHostNameAvailabilityInputMapper, + ValidateSecretInput as ValidateSecretInputMapper, + ProfileUpgradeParameters as ProfileUpgradeParametersMapper, AFDDomain as AFDDomainMapper, AFDDomainUpdateParameters as AFDDomainUpdateParametersMapper, AFDEndpoint as AFDEndpointMapper, @@ -33,9 +35,10 @@ import { SecurityPolicy as SecurityPolicyMapper, SecurityPolicyUpdateParameters as SecurityPolicyUpdateParametersMapper, Secret as SecretMapper, - ValidateSecretInput as ValidateSecretInputMapper, Profile as ProfileMapper, ProfileUpdateParameters as ProfileUpdateParametersMapper, + CanMigrateParameters as CanMigrateParametersMapper, + MigrationParameters as MigrationParametersMapper, Endpoint as EndpointMapper, EndpointUpdateParameters as EndpointUpdateParametersMapper, PurgeParameters as PurgeParametersMapper, @@ -121,7 +124,7 @@ export const resourceGroupName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-06-01", + defaultValue: "2023-05-01", isConstant: true, serializedName: "api-version", type: { @@ -141,6 +144,22 @@ export const validateProbeInput: OperationParameter = { }; export const profileName: OperationURLParameter = { + parameterPath: "profileName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"), + MaxLength: 260, + MinLength: 1 + }, + serializedName: "profileName", + required: true, + type: { + name: "String" + } + } +}; + +export const profileName1: OperationURLParameter = { parameterPath: "profileName", mapper: { serializedName: "profileName", @@ -156,6 +175,16 @@ export const checkHostNameAvailabilityInput: OperationParameter = { mapper: CheckHostNameAvailabilityInputMapper }; +export const validateSecretInput: OperationParameter = { + parameterPath: "validateSecretInput", + mapper: ValidateSecretInputMapper +}; + +export const profileUpgradeParameters: OperationParameter = { + parameterPath: "profileUpgradeParameters", + mapper: ProfileUpgradeParametersMapper +}; + export const nextLink: OperationURLParameter = { parameterPath: "nextLink", mapper: { @@ -352,11 +381,6 @@ export const secret: OperationParameter = { mapper: SecretMapper }; -export const validateSecretInput: OperationParameter = { - parameterPath: "validateSecretInput", - mapper: ValidateSecretInputMapper -}; - export const metrics: OperationQueryParameter = { parameterPath: "metrics", mapper: { @@ -653,6 +677,16 @@ export const profileUpdateParameters: OperationParameter = { mapper: ProfileUpdateParametersMapper }; +export const canMigrateParameters: OperationParameter = { + parameterPath: "canMigrateParameters", + mapper: CanMigrateParametersMapper +}; + +export const migrationParameters: OperationParameter = { + parameterPath: "migrationParameters", + mapper: MigrationParametersMapper +}; + export const endpoint1: OperationParameter = { parameterPath: "endpoint", mapper: EndpointMapper diff --git a/sdk/cdn/arm-cdn/src/operations/afdCustomDomains.ts b/sdk/cdn/arm-cdn/src/operations/afdCustomDomains.ts index 1f15e8d01588..230fd5ddabed 100644 --- a/sdk/cdn/arm-cdn/src/operations/afdCustomDomains.ts +++ b/sdk/cdn/arm-cdn/src/operations/afdCustomDomains.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClient } from "../cdnManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { AFDDomain, AfdCustomDomainsListByProfileNextOptionalParams, @@ -48,8 +52,8 @@ export class AfdCustomDomainsImpl implements AfdCustomDomains { /** * Lists existing AzureFrontDoor domains. * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile or CDN - * profile which is unique within the resource group. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which + * is unique within the resource group. * @param options The options parameters. */ public listByProfile( @@ -133,8 +137,8 @@ export class AfdCustomDomainsImpl implements AfdCustomDomains { /** * Lists existing AzureFrontDoor domains. * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile or CDN - * profile which is unique within the resource group. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which + * is unique within the resource group. * @param options The options parameters. */ private _listByProfile( @@ -185,8 +189,8 @@ export class AfdCustomDomainsImpl implements AfdCustomDomains { customDomain: AFDDomain, options?: AfdCustomDomainsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AfdCustomDomainsCreateResponse > > { @@ -196,7 +200,7 @@ export class AfdCustomDomainsImpl implements AfdCustomDomains { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -229,21 +233,24 @@ export class AfdCustomDomainsImpl implements AfdCustomDomains { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, customDomainName, customDomain, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + AfdCustomDomainsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -291,8 +298,8 @@ export class AfdCustomDomainsImpl implements AfdCustomDomains { customDomainUpdateProperties: AFDDomainUpdateParameters, options?: AfdCustomDomainsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AfdCustomDomainsUpdateResponse > > { @@ -302,7 +309,7 @@ export class AfdCustomDomainsImpl implements AfdCustomDomains { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -335,21 +342,24 @@ export class AfdCustomDomainsImpl implements AfdCustomDomains { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, customDomainName, customDomainUpdateProperties, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + AfdCustomDomainsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -395,14 +405,14 @@ export class AfdCustomDomainsImpl implements AfdCustomDomains { profileName: string, customDomainName: string, options?: AfdCustomDomainsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -435,15 +445,15 @@ export class AfdCustomDomainsImpl implements AfdCustomDomains { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, customDomainName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, customDomainName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -486,14 +496,14 @@ export class AfdCustomDomainsImpl implements AfdCustomDomains { profileName: string, customDomainName: string, options?: AfdCustomDomainsRefreshValidationTokenOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -526,15 +536,15 @@ export class AfdCustomDomainsImpl implements AfdCustomDomains { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, customDomainName, options }, - refreshValidationTokenOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, customDomainName, options }, + spec: refreshValidationTokenOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -566,8 +576,8 @@ export class AfdCustomDomainsImpl implements AfdCustomDomains { /** * ListByProfileNext * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile or CDN - * profile which is unique within the resource group. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which + * is unique within the resource group. * @param nextLink The nextLink from the previous successful call to the ListByProfile method. * @param options The options parameters. */ @@ -603,7 +613,7 @@ const listByProfileOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -625,7 +635,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.customDomainName ], headerParameters: [Parameters.accept], @@ -658,7 +668,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.customDomainName ], headerParameters: [Parameters.contentType, Parameters.accept], @@ -692,7 +702,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.customDomainName ], headerParameters: [Parameters.contentType, Parameters.accept], @@ -717,7 +727,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.customDomainName ], headerParameters: [Parameters.accept], @@ -741,7 +751,7 @@ const refreshValidationTokenOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.customDomainName ], headerParameters: [Parameters.accept], @@ -758,12 +768,11 @@ const listByProfileNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AfdErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/cdn/arm-cdn/src/operations/afdEndpoints.ts b/sdk/cdn/arm-cdn/src/operations/afdEndpoints.ts index 61732f32ddee..be945ea6808d 100644 --- a/sdk/cdn/arm-cdn/src/operations/afdEndpoints.ts +++ b/sdk/cdn/arm-cdn/src/operations/afdEndpoints.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClient } from "../cdnManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { AFDEndpoint, AfdEndpointsListByProfileNextOptionalParams, @@ -140,7 +144,7 @@ export class AfdEndpointsImpl implements AfdEndpoints { } /** - * Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which * is unique within the resource group. @@ -289,8 +293,8 @@ export class AfdEndpointsImpl implements AfdEndpoints { endpoint: AFDEndpoint, options?: AfdEndpointsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AfdEndpointsCreateResponse > > { @@ -300,7 +304,7 @@ export class AfdEndpointsImpl implements AfdEndpoints { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -333,15 +337,18 @@ export class AfdEndpointsImpl implements AfdEndpoints { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, endpointName, endpoint, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, endpoint, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + AfdEndpointsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -393,8 +400,8 @@ export class AfdEndpointsImpl implements AfdEndpoints { endpointUpdateProperties: AFDEndpointUpdateParameters, options?: AfdEndpointsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AfdEndpointsUpdateResponse > > { @@ -404,7 +411,7 @@ export class AfdEndpointsImpl implements AfdEndpoints { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -437,21 +444,24 @@ export class AfdEndpointsImpl implements AfdEndpoints { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, endpointUpdateProperties, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + AfdEndpointsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -500,14 +510,14 @@ export class AfdEndpointsImpl implements AfdEndpoints { profileName: string, endpointName: string, options?: AfdEndpointsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -540,15 +550,15 @@ export class AfdEndpointsImpl implements AfdEndpoints { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, endpointName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -595,14 +605,14 @@ export class AfdEndpointsImpl implements AfdEndpoints { endpointName: string, contents: AfdPurgeParameters, options?: AfdEndpointsPurgeContentOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -635,15 +645,15 @@ export class AfdEndpointsImpl implements AfdEndpoints { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, endpointName, contents, options }, - purgeContentOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, contents, options }, + spec: purgeContentOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -678,7 +688,7 @@ export class AfdEndpointsImpl implements AfdEndpoints { } /** - * Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which * is unique within the resource group. @@ -698,8 +708,8 @@ export class AfdEndpointsImpl implements AfdEndpoints { } /** - * Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api - * isn't work for apex domain. + * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in + * DNS. * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which * is unique within the resource group. @@ -788,7 +798,7 @@ const listByProfileOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -810,7 +820,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.accept], @@ -843,7 +853,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.contentType, Parameters.accept], @@ -877,7 +887,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.contentType, Parameters.accept], @@ -902,7 +912,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.accept], @@ -927,7 +937,7 @@ const purgeContentOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.contentType, Parameters.accept], @@ -951,7 +961,7 @@ const listResourceUsageOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.accept], @@ -975,7 +985,7 @@ const validateCustomDomainOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.contentType, Parameters.accept], @@ -993,12 +1003,11 @@ const listByProfileNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AfdErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink ], headerParameters: [Parameters.accept], @@ -1015,12 +1024,11 @@ const listResourceUsageNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AfdErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink, Parameters.endpointName ], diff --git a/sdk/cdn/arm-cdn/src/operations/afdOriginGroups.ts b/sdk/cdn/arm-cdn/src/operations/afdOriginGroups.ts index 8cdc63ceb723..d8383c3ed3a7 100644 --- a/sdk/cdn/arm-cdn/src/operations/afdOriginGroups.ts +++ b/sdk/cdn/arm-cdn/src/operations/afdOriginGroups.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClient } from "../cdnManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { AFDOriginGroup, AfdOriginGroupsListByProfileNextOptionalParams, @@ -135,8 +139,7 @@ export class AfdOriginGroupsImpl implements AfdOriginGroups { } /** - * Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN - * profile. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which * is unique within the resource group. @@ -283,8 +286,8 @@ export class AfdOriginGroupsImpl implements AfdOriginGroups { originGroup: AFDOriginGroup, options?: AfdOriginGroupsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AfdOriginGroupsCreateResponse > > { @@ -294,7 +297,7 @@ export class AfdOriginGroupsImpl implements AfdOriginGroups { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -327,15 +330,24 @@ export class AfdOriginGroupsImpl implements AfdOriginGroups { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, originGroupName, originGroup, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + profileName, + originGroupName, + originGroup, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + AfdOriginGroupsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -383,8 +395,8 @@ export class AfdOriginGroupsImpl implements AfdOriginGroups { originGroupUpdateProperties: AFDOriginGroupUpdateParameters, options?: AfdOriginGroupsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AfdOriginGroupsUpdateResponse > > { @@ -394,7 +406,7 @@ export class AfdOriginGroupsImpl implements AfdOriginGroups { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -427,21 +439,24 @@ export class AfdOriginGroupsImpl implements AfdOriginGroups { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, originGroupName, originGroupUpdateProperties, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + AfdOriginGroupsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -486,14 +501,14 @@ export class AfdOriginGroupsImpl implements AfdOriginGroups { profileName: string, originGroupName: string, options?: AfdOriginGroupsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -526,15 +541,15 @@ export class AfdOriginGroupsImpl implements AfdOriginGroups { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, originGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, originGroupName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -564,8 +579,7 @@ export class AfdOriginGroupsImpl implements AfdOriginGroups { } /** - * Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN - * profile. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which * is unique within the resource group. @@ -646,7 +660,7 @@ const listByProfileOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -668,7 +682,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.originGroupName ], headerParameters: [Parameters.accept], @@ -701,7 +715,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.originGroupName ], headerParameters: [Parameters.contentType, Parameters.accept], @@ -735,7 +749,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.originGroupName ], headerParameters: [Parameters.contentType, Parameters.accept], @@ -760,7 +774,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.originGroupName ], headerParameters: [Parameters.accept], @@ -783,7 +797,7 @@ const listResourceUsageOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.originGroupName ], headerParameters: [Parameters.accept], @@ -800,12 +814,11 @@ const listByProfileNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AfdErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink ], headerParameters: [Parameters.accept], @@ -822,12 +835,11 @@ const listResourceUsageNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AfdErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink, Parameters.originGroupName ], diff --git a/sdk/cdn/arm-cdn/src/operations/afdOrigins.ts b/sdk/cdn/arm-cdn/src/operations/afdOrigins.ts index a3f11ad7ab8f..d3496543c869 100644 --- a/sdk/cdn/arm-cdn/src/operations/afdOrigins.ts +++ b/sdk/cdn/arm-cdn/src/operations/afdOrigins.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClient } from "../cdnManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { AFDOrigin, AfdOriginsListByOriginGroupNextOptionalParams, @@ -198,8 +202,8 @@ export class AfdOriginsImpl implements AfdOrigins { origin: AFDOrigin, options?: AfdOriginsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AfdOriginsCreateResponse > > { @@ -209,7 +213,7 @@ export class AfdOriginsImpl implements AfdOrigins { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -242,9 +246,9 @@ export class AfdOriginsImpl implements AfdOrigins { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, originGroupName, @@ -252,12 +256,15 @@ export class AfdOriginsImpl implements AfdOrigins { origin, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + AfdOriginsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -310,8 +317,8 @@ export class AfdOriginsImpl implements AfdOrigins { originUpdateProperties: AFDOriginUpdateParameters, options?: AfdOriginsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AfdOriginsUpdateResponse > > { @@ -321,7 +328,7 @@ export class AfdOriginsImpl implements AfdOrigins { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -354,9 +361,9 @@ export class AfdOriginsImpl implements AfdOrigins { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, originGroupName, @@ -364,12 +371,15 @@ export class AfdOriginsImpl implements AfdOrigins { originUpdateProperties, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + AfdOriginsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -419,14 +429,14 @@ export class AfdOriginsImpl implements AfdOrigins { originGroupName: string, originName: string, options?: AfdOriginsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -459,15 +469,21 @@ export class AfdOriginsImpl implements AfdOrigins { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, originGroupName, originName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + profileName, + originGroupName, + originName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -541,7 +557,7 @@ const listByOriginGroupOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.originGroupName ], headerParameters: [Parameters.accept], @@ -564,7 +580,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.originGroupName, Parameters.originName ], @@ -598,7 +614,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.originGroupName, Parameters.originName ], @@ -633,7 +649,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.originGroupName, Parameters.originName ], @@ -659,7 +675,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.originGroupName, Parameters.originName ], @@ -677,12 +693,11 @@ const listByOriginGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AfdErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink, Parameters.originGroupName ], diff --git a/sdk/cdn/arm-cdn/src/operations/afdProfiles.ts b/sdk/cdn/arm-cdn/src/operations/afdProfiles.ts index 57c5fed4fa50..3ed383ccbc16 100644 --- a/sdk/cdn/arm-cdn/src/operations/afdProfiles.ts +++ b/sdk/cdn/arm-cdn/src/operations/afdProfiles.ts @@ -13,14 +13,29 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClient } from "../cdnManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Usage, AfdProfilesListResourceUsageNextOptionalParams, AfdProfilesListResourceUsageOptionalParams, AfdProfilesListResourceUsageResponse, + CheckEndpointNameAvailabilityInput, + AfdProfilesCheckEndpointNameAvailabilityOptionalParams, + AfdProfilesCheckEndpointNameAvailabilityResponse, CheckHostNameAvailabilityInput, AfdProfilesCheckHostNameAvailabilityOptionalParams, AfdProfilesCheckHostNameAvailabilityResponse, + ValidateSecretInput, + AfdProfilesValidateSecretOptionalParams, + AfdProfilesValidateSecretResponse, + ProfileUpgradeParameters, + AfdProfilesUpgradeOptionalParams, + AfdProfilesUpgradeResponse, AfdProfilesListResourceUsageNextResponse } from "../models"; @@ -38,10 +53,10 @@ export class AfdProfilesImpl implements AfdProfiles { } /** - * Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile - * which is unique within the resource group. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which + * is unique within the resource group. * @param options The options parameters. */ public listResourceUsage( @@ -123,10 +138,35 @@ export class AfdProfilesImpl implements AfdProfiles { } /** - * Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. + * Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique + * within the resource group. + * @param checkEndpointNameAvailabilityInput Input to check. + * @param options The options parameters. + */ + checkEndpointNameAvailability( + resourceGroupName: string, + profileName: string, + checkEndpointNameAvailabilityInput: CheckEndpointNameAvailabilityInput, + options?: AfdProfilesCheckEndpointNameAvailabilityOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + profileName, + checkEndpointNameAvailabilityInput, + options + }, + checkEndpointNameAvailabilityOperationSpec + ); + } + + /** + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile - * which is unique within the resource group. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which + * is unique within the resource group. * @param options The options parameters. */ private _listResourceUsage( @@ -141,10 +181,11 @@ export class AfdProfilesImpl implements AfdProfiles { } /** - * Check the name availability of a host name. + * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in + * DNS. * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile - * which is unique within the resource group. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which + * is unique within the resource group. * @param checkHostNameAvailabilityInput Custom domain to be validated. * @param options The options parameters. */ @@ -165,11 +206,134 @@ export class AfdProfilesImpl implements AfdProfiles { ); } + /** + * Validate a Secret in the profile. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique + * within the resource group. + * @param validateSecretInput The Secret source. + * @param options The options parameters. + */ + validateSecret( + resourceGroupName: string, + profileName: string, + validateSecretInput: ValidateSecretInput, + options?: AfdProfilesValidateSecretOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, profileName, validateSecretInput, options }, + validateSecretOperationSpec + ); + } + + /** + * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique + * within the resource group. + * @param profileUpgradeParameters Profile upgrade input parameter. + * @param options The options parameters. + */ + async beginUpgrade( + resourceGroupName: string, + profileName: string, + profileUpgradeParameters: ProfileUpgradeParameters, + options?: AfdProfilesUpgradeOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + AfdProfilesUpgradeResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + profileName, + profileUpgradeParameters, + options + }, + spec: upgradeOperationSpec + }); + const poller = await createHttpPoller< + AfdProfilesUpgradeResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique + * within the resource group. + * @param profileUpgradeParameters Profile upgrade input parameter. + * @param options The options parameters. + */ + async beginUpgradeAndWait( + resourceGroupName: string, + profileName: string, + profileUpgradeParameters: ProfileUpgradeParameters, + options?: AfdProfilesUpgradeOptionalParams + ): Promise { + const poller = await this.beginUpgrade( + resourceGroupName, + profileName, + profileUpgradeParameters, + options + ); + return poller.pollUntilDone(); + } + /** * ListResourceUsageNext * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile - * which is unique within the resource group. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which + * is unique within the resource group. * @param nextLink The nextLink from the previous successful call to the ListResourceUsage method. * @param options The options parameters. */ @@ -188,6 +352,30 @@ export class AfdProfilesImpl implements AfdProfiles { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const checkEndpointNameAvailabilityOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkEndpointNameAvailability", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CheckEndpointNameAvailabilityOutput + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + requestBody: Parameters.checkEndpointNameAvailabilityInput, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.profileName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; const listResourceUsageOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/usages", @@ -205,7 +393,7 @@ const listResourceUsageOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -224,6 +412,63 @@ const checkHostNameAvailabilityOperationSpec: coreClient.OperationSpec = { }, requestBody: Parameters.checkHostNameAvailabilityInput, queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.profileName1 + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const validateSecretOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/validateSecret", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ValidateSecretOutput + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + requestBody: Parameters.validateSecretInput, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.profileName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const upgradeOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/upgrade", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Profile + }, + 201: { + bodyMapper: Mappers.Profile + }, + 202: { + bodyMapper: Mappers.Profile + }, + 204: { + bodyMapper: Mappers.Profile + }, + default: { + bodyMapper: Mappers.AfdErrorResponse + } + }, + requestBody: Parameters.profileUpgradeParameters, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -245,12 +490,11 @@ const listResourceUsageNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AfdErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/cdn/arm-cdn/src/operations/customDomains.ts b/sdk/cdn/arm-cdn/src/operations/customDomains.ts index 984b398e3dc5..c6680011c0b8 100644 --- a/sdk/cdn/arm-cdn/src/operations/customDomains.ts +++ b/sdk/cdn/arm-cdn/src/operations/customDomains.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClient } from "../cdnManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { CustomDomain, CustomDomainsListByEndpointNextOptionalParams, @@ -30,9 +34,7 @@ import { CustomDomainsDisableCustomHttpsResponse, CustomDomainsEnableCustomHttpsOptionalParams, CustomDomainsEnableCustomHttpsResponse, - CustomDomainsListByEndpointNextResponse, - Profile, - CdnManagedHttpsParameters + CustomDomainsListByEndpointNextResponse } from "../models"; /// @@ -204,8 +206,8 @@ export class CustomDomainsImpl implements CustomDomains { customDomainProperties: CustomDomainParameters, options?: CustomDomainsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CustomDomainsCreateResponse > > { @@ -215,7 +217,7 @@ export class CustomDomainsImpl implements CustomDomains { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -248,9 +250,9 @@ export class CustomDomainsImpl implements CustomDomains { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, @@ -258,10 +260,13 @@ export class CustomDomainsImpl implements CustomDomains { customDomainProperties, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + CustomDomainsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -310,14 +315,14 @@ export class CustomDomainsImpl implements CustomDomains { endpointName: string, customDomainName: string, options?: CustomDomainsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -350,19 +355,19 @@ export class CustomDomainsImpl implements CustomDomains { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, customDomainName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -409,8 +414,8 @@ export class CustomDomainsImpl implements CustomDomains { customDomainName: string, options?: CustomDomainsDisableCustomHttpsOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CustomDomainsDisableCustomHttpsResponse > > { @@ -420,7 +425,7 @@ export class CustomDomainsImpl implements CustomDomains { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -453,19 +458,22 @@ export class CustomDomainsImpl implements CustomDomains { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, customDomainName, options }, - disableCustomHttpsOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: disableCustomHttpsOperationSpec + }); + const poller = await createHttpPoller< + CustomDomainsDisableCustomHttpsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -512,8 +520,8 @@ export class CustomDomainsImpl implements CustomDomains { customDomainName: string, options?: CustomDomainsEnableCustomHttpsOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CustomDomainsEnableCustomHttpsResponse > > { @@ -523,7 +531,7 @@ export class CustomDomainsImpl implements CustomDomains { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -556,28 +564,22 @@ export class CustomDomainsImpl implements CustomDomains { }; }; - // #region Added default values to add backwards compatibility - let newOptions: CustomDomainsEnableCustomHttpsOptionalParams = options ? options : {}; - if (!newOptions.customDomainHttpsParameters) { - const profile = await this.client.profiles.get(resourceGroupName, profileName); - newOptions.customDomainHttpsParameters = getDefaultCustomDomainHttpsParameters(profile); - } - options = newOptions; - // #endregion - - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, customDomainName, options }, - enableCustomHttpsOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: enableCustomHttpsOperationSpec + }); + const poller = await createHttpPoller< + CustomDomainsEnableCustomHttpsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -650,7 +652,7 @@ const listByEndpointOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.accept], @@ -673,7 +675,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.customDomainName, Parameters.endpointName ], @@ -707,7 +709,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.customDomainName, Parameters.endpointName ], @@ -733,7 +735,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.customDomainName, Parameters.endpointName ], @@ -766,7 +768,7 @@ const disableCustomHttpsOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.customDomainName, Parameters.endpointName ], @@ -800,7 +802,7 @@ const enableCustomHttpsOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.customDomainName, Parameters.endpointName ], @@ -819,58 +821,14 @@ const listByEndpointNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink, Parameters.endpointName ], headerParameters: [Parameters.accept], serializer }; - -// #region Added default values to add backwards compatibility -class SkuNames { - public static get standard_microsoft() { return "Standard_Microsoft"; } - public static get standard_verizon() { return "Standard_Verizon"; } - public static get standard_akamai() { return "Standard_Akamai"; } -} - -function getDefaultCustomDomainHttpsParameters(profile: Profile): CdnManagedHttpsParameters | undefined { - switch (profile.sku.name) { - case SkuNames.standard_microsoft: - return { - certificateSource: "Cdn", - certificateSourceParameters: { - certificateType: "Dedicated", - typeName: "CdnCertificateSourceParameters" - }, - protocolType: "ServerNameIndication" - } - case SkuNames.standard_akamai: - return { - certificateSource: "Cdn", - certificateSourceParameters: { - certificateType: "Shared", - typeName: "CdnCertificateSourceParameters" - }, - protocolType: "ServerNameIndication" - } - case SkuNames.standard_verizon: - return { - certificateSource: "Cdn", - certificateSourceParameters: { - certificateType: "Shared", - typeName: "CdnCertificateSourceParameters" - }, - protocolType: "IPBased" - } - default: - return undefined; - } -} - -// #endregion diff --git a/sdk/cdn/arm-cdn/src/operations/edgeNodes.ts b/sdk/cdn/arm-cdn/src/operations/edgeNodes.ts index 80c638d57e91..5dcb4d4a5a29 100644 --- a/sdk/cdn/arm-cdn/src/operations/edgeNodes.ts +++ b/sdk/cdn/arm-cdn/src/operations/edgeNodes.ts @@ -143,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/cdn/arm-cdn/src/operations/endpoints.ts b/sdk/cdn/arm-cdn/src/operations/endpoints.ts index c6d4ea406c60..8ade9461d9a4 100644 --- a/sdk/cdn/arm-cdn/src/operations/endpoints.ts +++ b/sdk/cdn/arm-cdn/src/operations/endpoints.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClient } from "../cdnManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Endpoint, EndpointsListByProfileNextOptionalParams, @@ -290,8 +294,8 @@ export class EndpointsImpl implements Endpoints { endpoint: Endpoint, options?: EndpointsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, EndpointsCreateResponse > > { @@ -301,7 +305,7 @@ export class EndpointsImpl implements Endpoints { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -334,13 +338,16 @@ export class EndpointsImpl implements Endpoints { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, endpointName, endpoint, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, endpoint, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + EndpointsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -391,8 +398,8 @@ export class EndpointsImpl implements Endpoints { endpointUpdateProperties: EndpointUpdateParameters, options?: EndpointsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, EndpointsUpdateResponse > > { @@ -402,7 +409,7 @@ export class EndpointsImpl implements Endpoints { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -435,19 +442,22 @@ export class EndpointsImpl implements Endpoints { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, endpointUpdateProperties, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + EndpointsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -495,14 +505,14 @@ export class EndpointsImpl implements Endpoints { profileName: string, endpointName: string, options?: EndpointsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -535,13 +545,13 @@ export class EndpointsImpl implements Endpoints { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, endpointName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -584,8 +594,8 @@ export class EndpointsImpl implements Endpoints { endpointName: string, options?: EndpointsStartOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, EndpointsStartResponse > > { @@ -595,7 +605,7 @@ export class EndpointsImpl implements Endpoints { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -628,13 +638,16 @@ export class EndpointsImpl implements Endpoints { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, endpointName, options }, - startOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, options }, + spec: startOperationSpec + }); + const poller = await createHttpPoller< + EndpointsStartResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -676,7 +689,10 @@ export class EndpointsImpl implements Endpoints { endpointName: string, options?: EndpointsStopOptionalParams ): Promise< - PollerLike, EndpointsStopResponse> + SimplePollerLike< + OperationState, + EndpointsStopResponse + > > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -684,7 +700,7 @@ export class EndpointsImpl implements Endpoints { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -717,13 +733,16 @@ export class EndpointsImpl implements Endpoints { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, endpointName, options }, - stopOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, options }, + spec: stopOperationSpec + }); + const poller = await createHttpPoller< + EndpointsStopResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -768,14 +787,14 @@ export class EndpointsImpl implements Endpoints { endpointName: string, contentFilePaths: PurgeParameters, options?: EndpointsPurgeContentOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -808,19 +827,19 @@ export class EndpointsImpl implements Endpoints { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, contentFilePaths, options }, - purgeContentOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: purgeContentOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -869,14 +888,14 @@ export class EndpointsImpl implements Endpoints { endpointName: string, contentFilePaths: LoadParameters, options?: EndpointsLoadContentOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -909,19 +928,19 @@ export class EndpointsImpl implements Endpoints { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, contentFilePaths, options }, - loadContentOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: loadContentOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1060,7 +1079,7 @@ const listByProfileOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -1082,7 +1101,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.accept], @@ -1115,7 +1134,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.contentType, Parameters.accept], @@ -1149,7 +1168,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.contentType, Parameters.accept], @@ -1174,7 +1193,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.accept], @@ -1206,7 +1225,7 @@ const startOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.accept], @@ -1238,7 +1257,7 @@ const stopOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.accept], @@ -1263,7 +1282,7 @@ const purgeContentOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.contentType, Parameters.accept], @@ -1289,7 +1308,7 @@ const loadContentOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.contentType, Parameters.accept], @@ -1314,7 +1333,7 @@ const validateCustomDomainOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.contentType, Parameters.accept], @@ -1338,7 +1357,7 @@ const listResourceUsageOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.accept], @@ -1355,12 +1374,11 @@ const listByProfileNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink ], headerParameters: [Parameters.accept], @@ -1377,12 +1395,11 @@ const listResourceUsageNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink, Parameters.endpointName ], diff --git a/sdk/cdn/arm-cdn/src/operations/index.ts b/sdk/cdn/arm-cdn/src/operations/index.ts index d334972cddd7..9f55e9bfc3bf 100644 --- a/sdk/cdn/arm-cdn/src/operations/index.ts +++ b/sdk/cdn/arm-cdn/src/operations/index.ts @@ -16,7 +16,6 @@ export * from "./ruleSets"; export * from "./rules"; export * from "./securityPolicies"; export * from "./secrets"; -export * from "./validate"; export * from "./logAnalytics"; export * from "./profiles"; export * from "./endpoints"; diff --git a/sdk/cdn/arm-cdn/src/operations/logAnalytics.ts b/sdk/cdn/arm-cdn/src/operations/logAnalytics.ts index bc75bc721b5e..c3c098044d5a 100644 --- a/sdk/cdn/arm-cdn/src/operations/logAnalytics.ts +++ b/sdk/cdn/arm-cdn/src/operations/logAnalytics.ts @@ -260,7 +260,7 @@ const getLogAnalyticsMetricsOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -290,7 +290,7 @@ const getLogAnalyticsRankingsOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -312,7 +312,7 @@ const getLogAnalyticsLocationsOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -334,7 +334,7 @@ const getLogAnalyticsResourcesOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -365,7 +365,7 @@ const getWafLogAnalyticsMetricsOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -396,7 +396,7 @@ const getWafLogAnalyticsRankingsOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/cdn/arm-cdn/src/operations/managedRuleSets.ts b/sdk/cdn/arm-cdn/src/operations/managedRuleSets.ts index 7710ab9c0d01..8b8cda2151d9 100644 --- a/sdk/cdn/arm-cdn/src/operations/managedRuleSets.ts +++ b/sdk/cdn/arm-cdn/src/operations/managedRuleSets.ts @@ -144,7 +144,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/cdn/arm-cdn/src/operations/operations.ts b/sdk/cdn/arm-cdn/src/operations/operations.ts index 687e663fd325..b3e93f6c455b 100644 --- a/sdk/cdn/arm-cdn/src/operations/operations.ts +++ b/sdk/cdn/arm-cdn/src/operations/operations.ts @@ -143,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/cdn/arm-cdn/src/operations/originGroups.ts b/sdk/cdn/arm-cdn/src/operations/originGroups.ts index 1d1ae190752c..84234f1f225d 100644 --- a/sdk/cdn/arm-cdn/src/operations/originGroups.ts +++ b/sdk/cdn/arm-cdn/src/operations/originGroups.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClient } from "../cdnManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { OriginGroup, OriginGroupsListByEndpointNextOptionalParams, @@ -200,8 +204,8 @@ export class OriginGroupsImpl implements OriginGroups { originGroup: OriginGroup, options?: OriginGroupsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, OriginGroupsCreateResponse > > { @@ -211,7 +215,7 @@ export class OriginGroupsImpl implements OriginGroups { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -244,9 +248,9 @@ export class OriginGroupsImpl implements OriginGroups { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, @@ -254,10 +258,13 @@ export class OriginGroupsImpl implements OriginGroups { originGroup, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + OriginGroupsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -309,8 +316,8 @@ export class OriginGroupsImpl implements OriginGroups { originGroupUpdateProperties: OriginGroupUpdateParameters, options?: OriginGroupsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, OriginGroupsUpdateResponse > > { @@ -320,7 +327,7 @@ export class OriginGroupsImpl implements OriginGroups { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -353,9 +360,9 @@ export class OriginGroupsImpl implements OriginGroups { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, @@ -363,10 +370,13 @@ export class OriginGroupsImpl implements OriginGroups { originGroupUpdateProperties, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + OriginGroupsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -415,14 +425,14 @@ export class OriginGroupsImpl implements OriginGroups { endpointName: string, originGroupName: string, options?: OriginGroupsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -455,19 +465,19 @@ export class OriginGroupsImpl implements OriginGroups { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, originGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -540,7 +550,7 @@ const listByEndpointOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.accept], @@ -563,7 +573,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName, Parameters.originGroupName ], @@ -597,7 +607,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName, Parameters.originGroupName ], @@ -632,7 +642,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName, Parameters.originGroupName ], @@ -658,7 +668,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName, Parameters.originGroupName ], @@ -676,12 +686,11 @@ const listByEndpointNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink, Parameters.endpointName ], diff --git a/sdk/cdn/arm-cdn/src/operations/origins.ts b/sdk/cdn/arm-cdn/src/operations/origins.ts index d575d7550c05..28e4d27a1054 100644 --- a/sdk/cdn/arm-cdn/src/operations/origins.ts +++ b/sdk/cdn/arm-cdn/src/operations/origins.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClient } from "../cdnManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Origin, OriginsListByEndpointNextOptionalParams, @@ -194,7 +198,10 @@ export class OriginsImpl implements Origins { origin: Origin, options?: OriginsCreateOptionalParams ): Promise< - PollerLike, OriginsCreateResponse> + SimplePollerLike< + OperationState, + OriginsCreateResponse + > > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -202,7 +209,7 @@ export class OriginsImpl implements Origins { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -235,9 +242,9 @@ export class OriginsImpl implements Origins { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, @@ -245,10 +252,13 @@ export class OriginsImpl implements Origins { origin, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + OriginsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -300,7 +310,10 @@ export class OriginsImpl implements Origins { originUpdateProperties: OriginUpdateParameters, options?: OriginsUpdateOptionalParams ): Promise< - PollerLike, OriginsUpdateResponse> + SimplePollerLike< + OperationState, + OriginsUpdateResponse + > > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -308,7 +321,7 @@ export class OriginsImpl implements Origins { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -341,9 +354,9 @@ export class OriginsImpl implements Origins { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, @@ -351,10 +364,13 @@ export class OriginsImpl implements Origins { originUpdateProperties, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + OriginsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -403,14 +419,14 @@ export class OriginsImpl implements Origins { endpointName: string, originName: string, options?: OriginsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -443,13 +459,19 @@ export class OriginsImpl implements Origins { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, endpointName, originName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + profileName, + endpointName, + originName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -522,7 +544,7 @@ const listByEndpointOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.accept], @@ -545,7 +567,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName, Parameters.originName ], @@ -579,7 +601,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName, Parameters.originName ], @@ -614,7 +636,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName, Parameters.originName ], @@ -640,7 +662,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName, Parameters.originName ], @@ -658,12 +680,11 @@ const listByEndpointNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink, Parameters.endpointName ], diff --git a/sdk/cdn/arm-cdn/src/operations/policies.ts b/sdk/cdn/arm-cdn/src/operations/policies.ts index af77b032a52d..0ef068d3642d 100644 --- a/sdk/cdn/arm-cdn/src/operations/policies.ts +++ b/sdk/cdn/arm-cdn/src/operations/policies.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClient } from "../cdnManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { CdnWebApplicationFirewallPolicy, PoliciesListNextOptionalParams, @@ -151,8 +155,8 @@ export class PoliciesImpl implements Policies { cdnWebApplicationFirewallPolicy: CdnWebApplicationFirewallPolicy, options?: PoliciesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PoliciesCreateOrUpdateResponse > > { @@ -162,7 +166,7 @@ export class PoliciesImpl implements Policies { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -195,18 +199,21 @@ export class PoliciesImpl implements Policies { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, policyName, cdnWebApplicationFirewallPolicy, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PoliciesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -250,8 +257,8 @@ export class PoliciesImpl implements Policies { cdnWebApplicationFirewallPolicyPatchParameters: CdnWebApplicationFirewallPolicyPatchParameters, options?: PoliciesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PoliciesUpdateResponse > > { @@ -261,7 +268,7 @@ export class PoliciesImpl implements Policies { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -294,18 +301,21 @@ export class PoliciesImpl implements Policies { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, policyName, cdnWebApplicationFirewallPolicyPatchParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + PoliciesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -514,7 +524,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/cdn/arm-cdn/src/operations/profiles.ts b/sdk/cdn/arm-cdn/src/operations/profiles.ts index 09ab69e0e02c..d8b4253b957f 100644 --- a/sdk/cdn/arm-cdn/src/operations/profiles.ts +++ b/sdk/cdn/arm-cdn/src/operations/profiles.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClient } from "../cdnManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Profile, ProfilesListNextOptionalParams, @@ -35,6 +39,13 @@ import { ProfilesUpdateOptionalParams, ProfilesUpdateResponse, ProfilesDeleteOptionalParams, + CanMigrateParameters, + ProfilesCanMigrateOptionalParams, + ProfilesCanMigrateResponse, + MigrationParameters, + ProfilesMigrateOptionalParams, + ProfilesMigrateResponse, + ProfilesMigrationCommitOptionalParams, ProfilesGenerateSsoUriOptionalParams, ProfilesGenerateSsoUriResponse, ProfilesListSupportedOptimizationTypesOptionalParams, @@ -329,8 +340,8 @@ export class ProfilesImpl implements Profiles { profile: Profile, options?: ProfilesCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ProfilesCreateResponse > > { @@ -340,7 +351,7 @@ export class ProfilesImpl implements Profiles { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -373,13 +384,16 @@ export class ProfilesImpl implements Profiles { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, profile, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, profile, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ProfilesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -425,8 +439,8 @@ export class ProfilesImpl implements Profiles { profileUpdateParameters: ProfileUpdateParameters, options?: ProfilesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ProfilesUpdateResponse > > { @@ -436,7 +450,7 @@ export class ProfilesImpl implements Profiles { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -469,13 +483,21 @@ export class ProfilesImpl implements Profiles { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, profileUpdateParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + profileName, + profileUpdateParameters, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ProfilesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -519,14 +541,14 @@ export class ProfilesImpl implements Profiles { resourceGroupName: string, profileName: string, options?: ProfilesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -559,13 +581,13 @@ export class ProfilesImpl implements Profiles { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -594,6 +616,275 @@ export class ProfilesImpl implements Profiles { return poller.pollUntilDone(); } + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be + * migrated. + * @param options The options parameters. + */ + async beginCanMigrate( + resourceGroupName: string, + canMigrateParameters: CanMigrateParameters, + options?: ProfilesCanMigrateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProfilesCanMigrateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, canMigrateParameters, options }, + spec: canMigrateOperationSpec + }); + const poller = await createHttpPoller< + ProfilesCanMigrateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be + * migrated. + * @param options The options parameters. + */ + async beginCanMigrateAndWait( + resourceGroupName: string, + canMigrateParameters: CanMigrateParameters, + options?: ProfilesCanMigrateOptionalParams + ): Promise { + const poller = await this.beginCanMigrate( + resourceGroupName, + canMigrateParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be + * committed after this. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param migrationParameters Properties needed to migrate the profile. + * @param options The options parameters. + */ + async beginMigrate( + resourceGroupName: string, + migrationParameters: MigrationParameters, + options?: ProfilesMigrateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProfilesMigrateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, migrationParameters, options }, + spec: migrateOperationSpec + }); + const poller = await createHttpPoller< + ProfilesMigrateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be + * committed after this. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param migrationParameters Properties needed to migrate the profile. + * @param options The options parameters. + */ + async beginMigrateAndWait( + resourceGroupName: string, + migrationParameters: MigrationParameters, + options?: ProfilesMigrateOptionalParams + ): Promise { + const poller = await this.beginMigrate( + resourceGroupName, + migrationParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param options The options parameters. + */ + async beginMigrationCommit( + resourceGroupName: string, + profileName: string, + options?: ProfilesMigrationCommitOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, options }, + spec: migrationCommitOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param options The options parameters. + */ + async beginMigrationCommitAndWait( + resourceGroupName: string, + profileName: string, + options?: ProfilesMigrationCommitOptionalParams + ): Promise { + const poller = await this.beginMigrationCommit( + resourceGroupName, + profileName, + options + ); + return poller.pollUntilDone(); + } + /** * 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 @@ -761,7 +1052,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -793,7 +1084,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", @@ -826,7 +1117,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", @@ -850,7 +1141,94 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const canMigrateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/canMigrate", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CanMigrateResult + }, + 201: { + bodyMapper: Mappers.CanMigrateResult + }, + 202: { + bodyMapper: Mappers.CanMigrateResult + }, + 204: { + bodyMapper: Mappers.CanMigrateResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.canMigrateParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const migrateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/migrate", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.MigrateResult + }, + 201: { + bodyMapper: Mappers.MigrateResult + }, + 202: { + bodyMapper: Mappers.MigrateResult + }, + 204: { + bodyMapper: Mappers.MigrateResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.migrationParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const migrationCommitOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrationCommit", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -872,7 +1250,7 @@ const generateSsoUriOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -894,7 +1272,7 @@ const listSupportedOptimizationTypesOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -916,7 +1294,7 @@ const listResourceUsageOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -932,7 +1310,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -952,7 +1329,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -973,12 +1349,11 @@ const listResourceUsageNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/cdn/arm-cdn/src/operations/resourceUsageOperations.ts b/sdk/cdn/arm-cdn/src/operations/resourceUsageOperations.ts index d4b8c2f308d3..568f05ef6a7e 100644 --- a/sdk/cdn/arm-cdn/src/operations/resourceUsageOperations.ts +++ b/sdk/cdn/arm-cdn/src/operations/resourceUsageOperations.ts @@ -144,7 +144,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/cdn/arm-cdn/src/operations/routes.ts b/sdk/cdn/arm-cdn/src/operations/routes.ts index d8da605b2762..baa4ba95f24f 100644 --- a/sdk/cdn/arm-cdn/src/operations/routes.ts +++ b/sdk/cdn/arm-cdn/src/operations/routes.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClient } from "../cdnManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Route, RoutesListByEndpointNextOptionalParams, @@ -200,7 +204,7 @@ export class RoutesImpl implements Routes { route: Route, options?: RoutesCreateOptionalParams ): Promise< - PollerLike, RoutesCreateResponse> + SimplePollerLike, RoutesCreateResponse> > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -208,7 +212,7 @@ export class RoutesImpl implements Routes { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -241,9 +245,9 @@ export class RoutesImpl implements Routes { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, @@ -251,12 +255,15 @@ export class RoutesImpl implements Routes { route, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + RoutesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -311,7 +318,7 @@ export class RoutesImpl implements Routes { routeUpdateProperties: RouteUpdateParameters, options?: RoutesUpdateOptionalParams ): Promise< - PollerLike, RoutesUpdateResponse> + SimplePollerLike, RoutesUpdateResponse> > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -319,7 +326,7 @@ export class RoutesImpl implements Routes { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -352,9 +359,9 @@ export class RoutesImpl implements Routes { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, endpointName, @@ -362,12 +369,15 @@ export class RoutesImpl implements Routes { routeUpdateProperties, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + RoutesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -419,14 +429,14 @@ export class RoutesImpl implements Routes { endpointName: string, routeName: string, options?: RoutesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -459,15 +469,21 @@ export class RoutesImpl implements Routes { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, endpointName, routeName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + profileName, + endpointName, + routeName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -542,7 +558,7 @@ const listByEndpointOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName ], headerParameters: [Parameters.accept], @@ -565,7 +581,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName, Parameters.routeName ], @@ -599,7 +615,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName, Parameters.routeName ], @@ -634,7 +650,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName, Parameters.routeName ], @@ -660,7 +676,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.endpointName, Parameters.routeName ], @@ -678,12 +694,11 @@ const listByEndpointNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AfdErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink, Parameters.endpointName ], diff --git a/sdk/cdn/arm-cdn/src/operations/ruleSets.ts b/sdk/cdn/arm-cdn/src/operations/ruleSets.ts index 30bcc91ed278..fc7c2103f0eb 100644 --- a/sdk/cdn/arm-cdn/src/operations/ruleSets.ts +++ b/sdk/cdn/arm-cdn/src/operations/ruleSets.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClient } from "../cdnManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { RuleSet, RuleSetsListByProfileNextOptionalParams, @@ -132,7 +136,7 @@ export class RuleSetsImpl implements RuleSets { } /** - * Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which * is unique within the resource group. @@ -298,14 +302,14 @@ export class RuleSetsImpl implements RuleSets { profileName: string, ruleSetName: string, options?: RuleSetsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -338,15 +342,15 @@ export class RuleSetsImpl implements RuleSets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, ruleSetName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, ruleSetName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -377,7 +381,7 @@ export class RuleSetsImpl implements RuleSets { } /** - * Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which * is unique within the resource group. @@ -458,7 +462,7 @@ const listByProfileOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -480,7 +484,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.ruleSetName ], headerParameters: [Parameters.accept], @@ -506,7 +510,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.ruleSetName ], headerParameters: [Parameters.accept], @@ -530,7 +534,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.ruleSetName ], headerParameters: [Parameters.accept], @@ -553,7 +557,7 @@ const listResourceUsageOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.ruleSetName ], headerParameters: [Parameters.accept], @@ -570,12 +574,11 @@ const listByProfileNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AfdErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink ], headerParameters: [Parameters.accept], @@ -592,12 +595,11 @@ const listResourceUsageNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AfdErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink, Parameters.ruleSetName ], diff --git a/sdk/cdn/arm-cdn/src/operations/rules.ts b/sdk/cdn/arm-cdn/src/operations/rules.ts index cb7b84b3f1fa..8b01b952a951 100644 --- a/sdk/cdn/arm-cdn/src/operations/rules.ts +++ b/sdk/cdn/arm-cdn/src/operations/rules.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClient } from "../cdnManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Rule, RulesListByRuleSetNextOptionalParams, @@ -198,7 +202,7 @@ export class RulesImpl implements Rules { rule: Rule, options?: RulesCreateOptionalParams ): Promise< - PollerLike, RulesCreateResponse> + SimplePollerLike, RulesCreateResponse> > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -206,7 +210,7 @@ export class RulesImpl implements Rules { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -239,15 +243,25 @@ export class RulesImpl implements Rules { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, ruleSetName, ruleName, rule, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + profileName, + ruleSetName, + ruleName, + rule, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + RulesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -300,7 +314,7 @@ export class RulesImpl implements Rules { ruleUpdateProperties: RuleUpdateParameters, options?: RulesUpdateOptionalParams ): Promise< - PollerLike, RulesUpdateResponse> + SimplePollerLike, RulesUpdateResponse> > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -308,7 +322,7 @@ export class RulesImpl implements Rules { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -341,9 +355,9 @@ export class RulesImpl implements Rules { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, ruleSetName, @@ -351,12 +365,15 @@ export class RulesImpl implements Rules { ruleUpdateProperties, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + RulesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -406,14 +423,14 @@ export class RulesImpl implements Rules { ruleSetName: string, ruleName: string, options?: RulesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -446,15 +463,15 @@ export class RulesImpl implements Rules { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, ruleSetName, ruleName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, ruleSetName, ruleName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -528,7 +545,7 @@ const listByRuleSetOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.ruleSetName ], headerParameters: [Parameters.accept], @@ -551,7 +568,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.ruleSetName, Parameters.ruleName ], @@ -585,7 +602,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.ruleSetName, Parameters.ruleName ], @@ -620,7 +637,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.ruleSetName, Parameters.ruleName ], @@ -646,7 +663,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.ruleSetName, Parameters.ruleName ], @@ -664,12 +681,11 @@ const listByRuleSetNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AfdErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink, Parameters.ruleSetName ], diff --git a/sdk/cdn/arm-cdn/src/operations/secrets.ts b/sdk/cdn/arm-cdn/src/operations/secrets.ts index 0f639e24e3cc..f2d92eeaa8d4 100644 --- a/sdk/cdn/arm-cdn/src/operations/secrets.ts +++ b/sdk/cdn/arm-cdn/src/operations/secrets.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClient } from "../cdnManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Secret, SecretsListByProfileNextOptionalParams, @@ -180,7 +184,10 @@ export class SecretsImpl implements Secrets { secret: Secret, options?: SecretsCreateOptionalParams ): Promise< - PollerLike, SecretsCreateResponse> + SimplePollerLike< + OperationState, + SecretsCreateResponse + > > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -188,7 +195,7 @@ export class SecretsImpl implements Secrets { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -221,15 +228,18 @@ export class SecretsImpl implements Secrets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, secretName, secret, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, secretName, secret, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + SecretsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -274,14 +284,14 @@ export class SecretsImpl implements Secrets { profileName: string, secretName: string, options?: SecretsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -314,15 +324,15 @@ export class SecretsImpl implements Secrets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, secretName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, secretName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -391,7 +401,7 @@ const listByProfileOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -413,7 +423,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.secretName ], headerParameters: [Parameters.accept], @@ -446,7 +456,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.secretName ], headerParameters: [Parameters.contentType, Parameters.accept], @@ -471,7 +481,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.secretName ], headerParameters: [Parameters.accept], @@ -488,12 +498,11 @@ const listByProfileNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AfdErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/cdn/arm-cdn/src/operations/securityPolicies.ts b/sdk/cdn/arm-cdn/src/operations/securityPolicies.ts index 9db22a6b2816..3474a3cff389 100644 --- a/sdk/cdn/arm-cdn/src/operations/securityPolicies.ts +++ b/sdk/cdn/arm-cdn/src/operations/securityPolicies.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { CdnManagementClient } from "../cdnManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { SecurityPolicy, SecurityPoliciesListByProfileNextOptionalParams, @@ -183,8 +187,8 @@ export class SecurityPoliciesImpl implements SecurityPolicies { securityPolicy: SecurityPolicy, options?: SecurityPoliciesCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SecurityPoliciesCreateResponse > > { @@ -194,7 +198,7 @@ export class SecurityPoliciesImpl implements SecurityPolicies { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -227,21 +231,24 @@ export class SecurityPoliciesImpl implements SecurityPolicies { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, securityPolicyName, securityPolicy, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + SecurityPoliciesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -289,8 +296,8 @@ export class SecurityPoliciesImpl implements SecurityPolicies { securityPolicyUpdateProperties: SecurityPolicyUpdateParameters, options?: SecurityPoliciesPatchOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SecurityPoliciesPatchResponse > > { @@ -300,7 +307,7 @@ export class SecurityPoliciesImpl implements SecurityPolicies { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -333,21 +340,24 @@ export class SecurityPoliciesImpl implements SecurityPolicies { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, securityPolicyName, securityPolicyUpdateProperties, options }, - patchOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: patchOperationSpec + }); + const poller = await createHttpPoller< + SecurityPoliciesPatchResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -392,14 +402,14 @@ export class SecurityPoliciesImpl implements SecurityPolicies { profileName: string, securityPolicyName: string, options?: SecurityPoliciesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -432,15 +442,15 @@ export class SecurityPoliciesImpl implements SecurityPolicies { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, profileName, securityPolicyName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, profileName, securityPolicyName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -509,7 +519,7 @@ const listByProfileOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName + Parameters.profileName1 ], headerParameters: [Parameters.accept], serializer @@ -531,7 +541,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.securityPolicyName ], headerParameters: [Parameters.accept], @@ -564,7 +574,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.securityPolicyName ], headerParameters: [Parameters.contentType, Parameters.accept], @@ -598,7 +608,7 @@ const patchOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.securityPolicyName ], headerParameters: [Parameters.contentType, Parameters.accept], @@ -623,7 +633,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.securityPolicyName ], headerParameters: [Parameters.accept], @@ -640,12 +650,11 @@ const listByProfileNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AfdErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.profileName, + Parameters.profileName1, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/cdn/arm-cdn/src/operations/validate.ts b/sdk/cdn/arm-cdn/src/operations/validate.ts deleted file mode 100644 index ca501b2ea0d3..000000000000 --- a/sdk/cdn/arm-cdn/src/operations/validate.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { Validate } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CdnManagementClient } from "../cdnManagementClient"; -import { - ValidateSecretInput, - ValidateSecretOptionalParams, - ValidateSecretResponse -} from "../models"; - -/** Class containing Validate operations. */ -export class ValidateImpl implements Validate { - private readonly client: CdnManagementClient; - - /** - * Initialize a new instance of the class Validate class. - * @param client Reference to the service client - */ - constructor(client: CdnManagementClient) { - this.client = client; - } - - /** - * Validate a Secret in the profile. - * @param validateSecretInput The Secret source. - * @param options The options parameters. - */ - secret( - validateSecretInput: ValidateSecretInput, - options?: ValidateSecretOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { validateSecretInput, options }, - secretOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const secretOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateSecret", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ValidateSecretOutput - }, - default: { - bodyMapper: Mappers.AfdErrorResponse - } - }, - requestBody: Parameters.validateSecretInput, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer -}; diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdCustomDomains.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdCustomDomains.ts index a429045a24da..00421808c8bb 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdCustomDomains.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdCustomDomains.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { AFDDomain, AfdCustomDomainsListByProfileOptionalParams, @@ -28,8 +28,8 @@ export interface AfdCustomDomains { /** * Lists existing AzureFrontDoor domains. * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile or CDN - * profile which is unique within the resource group. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which + * is unique within the resource group. * @param options The options parameters. */ listByProfile( @@ -68,8 +68,8 @@ export interface AfdCustomDomains { customDomain: AFDDomain, options?: AfdCustomDomainsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AfdCustomDomainsCreateResponse > >; @@ -105,8 +105,8 @@ export interface AfdCustomDomains { customDomainUpdateProperties: AFDDomainUpdateParameters, options?: AfdCustomDomainsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AfdCustomDomainsUpdateResponse > >; @@ -140,7 +140,7 @@ export interface AfdCustomDomains { profileName: string, customDomainName: string, options?: AfdCustomDomainsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified * subscription, resource group and profile. @@ -169,7 +169,7 @@ export interface AfdCustomDomains { profileName: string, customDomainName: string, options?: AfdCustomDomainsRefreshValidationTokenOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Updates the domain validation token. * @param resourceGroupName Name of the Resource group within the Azure subscription. diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdEndpoints.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdEndpoints.ts index 216aa9febad4..80506b3ce80e 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdEndpoints.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdEndpoints.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { AFDEndpoint, AfdEndpointsListByProfileOptionalParams, @@ -44,7 +44,7 @@ export interface AfdEndpoints { options?: AfdEndpointsListByProfileOptionalParams ): PagedAsyncIterableIterator; /** - * Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which * is unique within the resource group. @@ -89,8 +89,8 @@ export interface AfdEndpoints { endpoint: AFDEndpoint, options?: AfdEndpointsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AfdEndpointsCreateResponse > >; @@ -130,8 +130,8 @@ export interface AfdEndpoints { endpointUpdateProperties: AFDEndpointUpdateParameters, options?: AfdEndpointsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AfdEndpointsUpdateResponse > >; @@ -168,7 +168,7 @@ export interface AfdEndpoints { profileName: string, endpointName: string, options?: AfdEndpointsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified * subscription, resource group and profile. @@ -201,7 +201,7 @@ export interface AfdEndpoints { endpointName: string, contents: AfdPurgeParameters, options?: AfdEndpointsPurgeContentOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Removes a content from AzureFrontDoor. * @param resourceGroupName Name of the Resource group within the Azure subscription. @@ -221,8 +221,8 @@ export interface AfdEndpoints { options?: AfdEndpointsPurgeContentOptionalParams ): Promise; /** - * Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api - * isn't work for apex domain. + * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in + * DNS. * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which * is unique within the resource group. diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdOriginGroups.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdOriginGroups.ts index b682942fe135..753376e0c4fe 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdOriginGroups.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdOriginGroups.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { AFDOriginGroup, AfdOriginGroupsListByProfileOptionalParams, @@ -39,8 +39,7 @@ export interface AfdOriginGroups { options?: AfdOriginGroupsListByProfileOptionalParams ): PagedAsyncIterableIterator; /** - * Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN - * profile. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which * is unique within the resource group. @@ -83,8 +82,8 @@ export interface AfdOriginGroups { originGroup: AFDOriginGroup, options?: AfdOriginGroupsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AfdOriginGroupsCreateResponse > >; @@ -120,8 +119,8 @@ export interface AfdOriginGroups { originGroupUpdateProperties: AFDOriginGroupUpdateParameters, options?: AfdOriginGroupsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AfdOriginGroupsUpdateResponse > >; @@ -154,7 +153,7 @@ export interface AfdOriginGroups { profileName: string, originGroupName: string, options?: AfdOriginGroupsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an existing origin group within a profile. * @param resourceGroupName Name of the Resource group within the Azure subscription. diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdOrigins.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdOrigins.ts index dc350da8d20a..6e8aa7e3274e 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdOrigins.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdOrigins.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { AFDOrigin, AfdOriginsListByOriginGroupOptionalParams, @@ -72,8 +72,8 @@ export interface AfdOrigins { origin: AFDOrigin, options?: AfdOriginsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AfdOriginsCreateResponse > >; @@ -113,8 +113,8 @@ export interface AfdOrigins { originUpdateProperties: AFDOriginUpdateParameters, options?: AfdOriginsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AfdOriginsUpdateResponse > >; @@ -151,7 +151,7 @@ export interface AfdOrigins { originGroupName: string, originName: string, options?: AfdOriginsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an existing origin within an origin group. * @param resourceGroupName Name of the Resource group within the Azure subscription. diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdProfiles.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdProfiles.ts index 6178f5c7b8d8..6628407507d4 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdProfiles.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdProfiles.ts @@ -7,22 +7,32 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Usage, AfdProfilesListResourceUsageOptionalParams, + CheckEndpointNameAvailabilityInput, + AfdProfilesCheckEndpointNameAvailabilityOptionalParams, + AfdProfilesCheckEndpointNameAvailabilityResponse, CheckHostNameAvailabilityInput, AfdProfilesCheckHostNameAvailabilityOptionalParams, - AfdProfilesCheckHostNameAvailabilityResponse + AfdProfilesCheckHostNameAvailabilityResponse, + ValidateSecretInput, + AfdProfilesValidateSecretOptionalParams, + AfdProfilesValidateSecretResponse, + ProfileUpgradeParameters, + AfdProfilesUpgradeOptionalParams, + AfdProfilesUpgradeResponse } from "../models"; /// /** Interface representing a AfdProfiles. */ export interface AfdProfiles { /** - * Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile - * which is unique within the resource group. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which + * is unique within the resource group. * @param options The options parameters. */ listResourceUsage( @@ -31,10 +41,25 @@ export interface AfdProfiles { options?: AfdProfilesListResourceUsageOptionalParams ): PagedAsyncIterableIterator; /** - * Check the name availability of a host name. + * Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile - * which is unique within the resource group. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique + * within the resource group. + * @param checkEndpointNameAvailabilityInput Input to check. + * @param options The options parameters. + */ + checkEndpointNameAvailability( + resourceGroupName: string, + profileName: string, + checkEndpointNameAvailabilityInput: CheckEndpointNameAvailabilityInput, + options?: AfdProfilesCheckEndpointNameAvailabilityOptionalParams + ): Promise; + /** + * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in + * DNS. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which + * is unique within the resource group. * @param checkHostNameAvailabilityInput Custom domain to be validated. * @param options The options parameters. */ @@ -44,4 +69,51 @@ export interface AfdProfiles { checkHostNameAvailabilityInput: CheckHostNameAvailabilityInput, options?: AfdProfilesCheckHostNameAvailabilityOptionalParams ): Promise; + /** + * Validate a Secret in the profile. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique + * within the resource group. + * @param validateSecretInput The Secret source. + * @param options The options parameters. + */ + validateSecret( + resourceGroupName: string, + profileName: string, + validateSecretInput: ValidateSecretInput, + options?: AfdProfilesValidateSecretOptionalParams + ): Promise; + /** + * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique + * within the resource group. + * @param profileUpgradeParameters Profile upgrade input parameter. + * @param options The options parameters. + */ + beginUpgrade( + resourceGroupName: string, + profileName: string, + profileUpgradeParameters: ProfileUpgradeParameters, + options?: AfdProfilesUpgradeOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + AfdProfilesUpgradeResponse + > + >; + /** + * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique + * within the resource group. + * @param profileUpgradeParameters Profile upgrade input parameter. + * @param options The options parameters. + */ + beginUpgradeAndWait( + resourceGroupName: string, + profileName: string, + profileUpgradeParameters: ProfileUpgradeParameters, + options?: AfdProfilesUpgradeOptionalParams + ): Promise; } diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/customDomains.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/customDomains.ts index 35c1811fd64f..d19e19decf2f 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/customDomains.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/customDomains.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { CustomDomain, CustomDomainsListByEndpointOptionalParams, @@ -71,8 +71,8 @@ export interface CustomDomains { customDomainProperties: CustomDomainParameters, options?: CustomDomainsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CustomDomainsCreateResponse > >; @@ -107,7 +107,7 @@ export interface CustomDomains { endpointName: string, customDomainName: string, options?: CustomDomainsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an existing custom domain within an endpoint. * @param resourceGroupName Name of the Resource group within the Azure subscription. @@ -138,8 +138,8 @@ export interface CustomDomains { customDomainName: string, options?: CustomDomainsDisableCustomHttpsOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CustomDomainsDisableCustomHttpsResponse > >; @@ -173,8 +173,8 @@ export interface CustomDomains { customDomainName: string, options?: CustomDomainsEnableCustomHttpsOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CustomDomainsEnableCustomHttpsResponse > >; diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/endpoints.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/endpoints.ts index 323992235380..fc9cfd07b6be 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/endpoints.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/endpoints.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Endpoint, EndpointsListByProfileOptionalParams, @@ -91,8 +91,8 @@ export interface Endpoints { endpoint: Endpoint, options?: EndpointsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, EndpointsCreateResponse > >; @@ -130,8 +130,8 @@ export interface Endpoints { endpointUpdateProperties: EndpointUpdateParameters, options?: EndpointsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, EndpointsUpdateResponse > >; @@ -166,7 +166,7 @@ export interface Endpoints { profileName: string, endpointName: string, options?: EndpointsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, * resource group and profile. @@ -194,8 +194,8 @@ export interface Endpoints { endpointName: string, options?: EndpointsStartOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, EndpointsStartResponse > >; @@ -225,7 +225,10 @@ export interface Endpoints { endpointName: string, options?: EndpointsStopOptionalParams ): Promise< - PollerLike, EndpointsStopResponse> + SimplePollerLike< + OperationState, + EndpointsStopResponse + > >; /** * Stops an existing running CDN endpoint. @@ -256,7 +259,7 @@ export interface Endpoints { endpointName: string, contentFilePaths: PurgeParameters, options?: EndpointsPurgeContentOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Removes a content from CDN. * @param resourceGroupName Name of the Resource group within the Azure subscription. @@ -289,7 +292,7 @@ export interface Endpoints { endpointName: string, contentFilePaths: LoadParameters, options?: EndpointsLoadContentOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Pre-loads a content to CDN. Available for Verizon Profiles. * @param resourceGroupName Name of the Resource group within the Azure subscription. diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/index.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/index.ts index d334972cddd7..9f55e9bfc3bf 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/index.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/index.ts @@ -16,7 +16,6 @@ export * from "./ruleSets"; export * from "./rules"; export * from "./securityPolicies"; export * from "./secrets"; -export * from "./validate"; export * from "./logAnalytics"; export * from "./profiles"; export * from "./endpoints"; diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/originGroups.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/originGroups.ts index e8ca03d8ec91..6fa1b4861bfd 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/originGroups.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/originGroups.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { OriginGroup, OriginGroupsListByEndpointOptionalParams, @@ -69,8 +69,8 @@ export interface OriginGroups { originGroup: OriginGroup, options?: OriginGroupsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, OriginGroupsCreateResponse > >; @@ -108,8 +108,8 @@ export interface OriginGroups { originGroupUpdateProperties: OriginGroupUpdateParameters, options?: OriginGroupsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, OriginGroupsUpdateResponse > >; @@ -144,7 +144,7 @@ export interface OriginGroups { endpointName: string, originGroupName: string, options?: OriginGroupsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an existing origin group within an endpoint. * @param resourceGroupName Name of the Resource group within the Azure subscription. diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/origins.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/origins.ts index f5cee01c94ab..da29d131671d 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/origins.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/origins.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Origin, OriginsListByEndpointOptionalParams, @@ -69,7 +69,10 @@ export interface Origins { origin: Origin, options?: OriginsCreateOptionalParams ): Promise< - PollerLike, OriginsCreateResponse> + SimplePollerLike< + OperationState, + OriginsCreateResponse + > >; /** * Creates a new origin within the specified endpoint. @@ -105,7 +108,10 @@ export interface Origins { originUpdateProperties: OriginUpdateParameters, options?: OriginsUpdateOptionalParams ): Promise< - PollerLike, OriginsUpdateResponse> + SimplePollerLike< + OperationState, + OriginsUpdateResponse + > >; /** * Updates an existing origin within an endpoint. @@ -138,7 +144,7 @@ export interface Origins { endpointName: string, originName: string, options?: OriginsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an existing origin within an endpoint. * @param resourceGroupName Name of the Resource group within the Azure subscription. diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/policies.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/policies.ts index 2610bdfb6c26..dbad9f4bebec 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/policies.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/policies.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { CdnWebApplicationFirewallPolicy, PoliciesListOptionalParams, @@ -57,8 +57,8 @@ export interface Policies { cdnWebApplicationFirewallPolicy: CdnWebApplicationFirewallPolicy, options?: PoliciesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PoliciesCreateOrUpdateResponse > >; @@ -90,8 +90,8 @@ export interface Policies { cdnWebApplicationFirewallPolicyPatchParameters: CdnWebApplicationFirewallPolicyPatchParameters, options?: PoliciesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PoliciesUpdateResponse > >; diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/profiles.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/profiles.ts index 2d98c56b5f75..9dbf41f96034 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/profiles.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/profiles.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Profile, ProfilesListOptionalParams, @@ -22,6 +22,13 @@ import { ProfilesUpdateOptionalParams, ProfilesUpdateResponse, ProfilesDeleteOptionalParams, + CanMigrateParameters, + ProfilesCanMigrateOptionalParams, + ProfilesCanMigrateResponse, + MigrationParameters, + ProfilesMigrateOptionalParams, + ProfilesMigrateResponse, + ProfilesMigrationCommitOptionalParams, ProfilesGenerateSsoUriOptionalParams, ProfilesGenerateSsoUriResponse, ProfilesListSupportedOptimizationTypesOptionalParams, @@ -90,8 +97,8 @@ export interface Profiles { profile: Profile, options?: ProfilesCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ProfilesCreateResponse > >; @@ -125,8 +132,8 @@ export interface Profiles { profileUpdateParameters: ProfileUpdateParameters, options?: ProfilesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ProfilesUpdateResponse > >; @@ -158,7 +165,7 @@ export interface Profiles { resourceGroupName: string, profileName: string, options?: ProfilesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * 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 @@ -173,6 +180,86 @@ export interface Profiles { profileName: string, options?: ProfilesDeleteOptionalParams ): Promise; + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be + * migrated. + * @param options The options parameters. + */ + beginCanMigrate( + resourceGroupName: string, + canMigrateParameters: CanMigrateParameters, + options?: ProfilesCanMigrateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProfilesCanMigrateResponse + > + >; + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be + * migrated. + * @param options The options parameters. + */ + beginCanMigrateAndWait( + resourceGroupName: string, + canMigrateParameters: CanMigrateParameters, + options?: ProfilesCanMigrateOptionalParams + ): Promise; + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be + * committed after this. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param migrationParameters Properties needed to migrate the profile. + * @param options The options parameters. + */ + beginMigrate( + resourceGroupName: string, + migrationParameters: MigrationParameters, + options?: ProfilesMigrateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProfilesMigrateResponse + > + >; + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be + * committed after this. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param migrationParameters Properties needed to migrate the profile. + * @param options The options parameters. + */ + beginMigrateAndWait( + resourceGroupName: string, + migrationParameters: MigrationParameters, + options?: ProfilesMigrateOptionalParams + ): Promise; + /** + * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param options The options parameters. + */ + beginMigrationCommit( + resourceGroupName: string, + profileName: string, + options?: ProfilesMigrationCommitOptionalParams + ): Promise, void>>; + /** + * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param profileName Name of the CDN profile which is unique within the resource group. + * @param options The options parameters. + */ + beginMigrationCommitAndWait( + resourceGroupName: string, + profileName: string, + options?: ProfilesMigrationCommitOptionalParams + ): Promise; /** * 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 diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/routes.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/routes.ts index 2fcf1f3df8e5..6d4ffe460c95 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/routes.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/routes.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Route, RoutesListByEndpointOptionalParams, @@ -74,7 +74,7 @@ export interface Routes { route: Route, options?: RoutesCreateOptionalParams ): Promise< - PollerLike, RoutesCreateResponse> + SimplePollerLike, RoutesCreateResponse> >; /** * Creates a new route with the specified route name under the specified subscription, resource group, @@ -114,7 +114,7 @@ export interface Routes { routeUpdateProperties: RouteUpdateParameters, options?: RoutesUpdateOptionalParams ): Promise< - PollerLike, RoutesUpdateResponse> + SimplePollerLike, RoutesUpdateResponse> >; /** * Updates an existing route with the specified route name under the specified subscription, resource @@ -151,7 +151,7 @@ export interface Routes { endpointName: string, routeName: string, options?: RoutesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an existing route with the specified route name under the specified subscription, resource * group, profile, and AzureFrontDoor endpoint. diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/ruleSets.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/ruleSets.ts index 02a7a0c27de0..3da45e0e462b 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/ruleSets.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/ruleSets.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { RuleSet, RuleSetsListByProfileOptionalParams, @@ -36,7 +36,7 @@ export interface RuleSets { options?: RuleSetsListByProfileOptionalParams ): PagedAsyncIterableIterator; /** - * Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which * is unique within the resource group. @@ -92,7 +92,7 @@ export interface RuleSets { profileName: string, ruleSetName: string, options?: RuleSetsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified * subscription, resource group and profile. diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/rules.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/rules.ts index 56895a2c6a59..8afbfc02e4ac 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/rules.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/rules.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Rule, RulesListByRuleSetOptionalParams, @@ -72,7 +72,7 @@ export interface Rules { rule: Rule, options?: RulesCreateOptionalParams ): Promise< - PollerLike, RulesCreateResponse> + SimplePollerLike, RulesCreateResponse> >; /** * Creates a new delivery rule within the specified rule set. @@ -110,7 +110,7 @@ export interface Rules { ruleUpdateProperties: RuleUpdateParameters, options?: RulesUpdateOptionalParams ): Promise< - PollerLike, RulesUpdateResponse> + SimplePollerLike, RulesUpdateResponse> >; /** * Updates an existing delivery rule within a rule set. @@ -145,7 +145,7 @@ export interface Rules { ruleSetName: string, ruleName: string, options?: RulesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an existing delivery rule within a rule set. * @param resourceGroupName Name of the Resource group within the Azure subscription. diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/secrets.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/secrets.ts index 2553bec552f0..d226eb84d298 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/secrets.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/secrets.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Secret, SecretsListByProfileOptionalParams, @@ -63,7 +63,10 @@ export interface Secrets { secret: Secret, options?: SecretsCreateOptionalParams ): Promise< - PollerLike, SecretsCreateResponse> + SimplePollerLike< + OperationState, + SecretsCreateResponse + > >; /** * Creates a new Secret within the specified profile. @@ -94,7 +97,7 @@ export interface Secrets { profileName: string, secretName: string, options?: SecretsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an existing Secret within profile. * @param resourceGroupName Name of the Resource group within the Azure subscription. diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/securityPolicies.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/securityPolicies.ts index fa683ce825fd..8fed139a0623 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/securityPolicies.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/securityPolicies.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { SecurityPolicy, SecurityPoliciesListByProfileOptionalParams, @@ -66,8 +66,8 @@ export interface SecurityPolicies { securityPolicy: SecurityPolicy, options?: SecurityPoliciesCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SecurityPoliciesCreateResponse > >; @@ -103,8 +103,8 @@ export interface SecurityPolicies { securityPolicyUpdateProperties: SecurityPolicyUpdateParameters, options?: SecurityPoliciesPatchOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SecurityPoliciesPatchResponse > >; @@ -137,7 +137,7 @@ export interface SecurityPolicies { profileName: string, securityPolicyName: string, options?: SecurityPoliciesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an existing security policy within profile. * @param resourceGroupName Name of the Resource group within the Azure subscription. diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/validate.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/validate.ts deleted file mode 100644 index cb667d89a097..000000000000 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/validate.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - ValidateSecretInput, - ValidateSecretOptionalParams, - ValidateSecretResponse -} from "../models"; - -/** Interface representing a Validate. */ -export interface Validate { - /** - * Validate a Secret in the profile. - * @param validateSecretInput The Secret source. - * @param options The options parameters. - */ - secret( - validateSecretInput: ValidateSecretInput, - options?: ValidateSecretOptionalParams - ): Promise; -} diff --git a/sdk/cdn/arm-cdn/src/pagingHelper.ts b/sdk/cdn/arm-cdn/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/cdn/arm-cdn/src/pagingHelper.ts +++ b/sdk/cdn/arm-cdn/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { diff --git a/sdk/cdn/arm-cdn/test/sampleTest.ts b/sdk/cdn/arm-cdn/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/cdn/arm-cdn/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/cdn/arm-cdn/tsconfig.json b/sdk/cdn/arm-cdn/tsconfig.json index d80de3340da5..3e6ae96443f3 100644 --- a/sdk/cdn/arm-cdn/tsconfig.json +++ b/sdk/cdn/arm-cdn/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-cdn": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules" diff --git a/sdk/monitor/monitor-opentelemetry/CHANGELOG.md b/sdk/monitor/monitor-opentelemetry/CHANGELOG.md index b92631a173d5..1ad1a7034953 100644 --- a/sdk/monitor/monitor-opentelemetry/CHANGELOG.md +++ b/sdk/monitor/monitor-opentelemetry/CHANGELOG.md @@ -1,14 +1,22 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0 (2023-09-20) ### Features Added -### Breaking Changes +- Add support for Azure Functions programming model v4. ### Bugs Fixed +- Avoid dependency telemetry for ingestion endpoint calls. +- Add custom AI Sampler to maintain data reliability in Standard Metrics. +- Fix issues with SDK version not propagating correctly. ### Other Changes +- Update to latest OpenTelemetry dependencies. +- Rename azureMonitorExporterConfig. +- Remove singleton in handlers. +- Adding Functional Tests. + ## 1.0.0-beta.3 (2023-08-30) diff --git a/sdk/monitor/monitor-opentelemetry/package.json b/sdk/monitor/monitor-opentelemetry/package.json index de584f3d17fe..1d6b989d5a8a 100644 --- a/sdk/monitor/monitor-opentelemetry/package.json +++ b/sdk/monitor/monitor-opentelemetry/package.json @@ -2,7 +2,7 @@ "name": "@azure/monitor-opentelemetry", "author": "Microsoft Corporation", "sdk-type": "client", - "version": "1.0.0-beta.4", + "version": "1.0.0", "description": "Azure Monitor OpenTelemetry (Node.js)", "main": "dist/index.js", "module": "dist-esm/src/index.js", diff --git a/sdk/monitor/monitor-opentelemetry/src/types.ts b/sdk/monitor/monitor-opentelemetry/src/types.ts index 8833e2a0356c..7605939d1d72 100644 --- a/sdk/monitor/monitor-opentelemetry/src/types.ts +++ b/sdk/monitor/monitor-opentelemetry/src/types.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export const AZURE_MONITOR_OPENTELEMETRY_VERSION = "1.0.0-beta.4"; +export const AZURE_MONITOR_OPENTELEMETRY_VERSION = "1.0.0"; export const AZURE_MONITOR_STATSBEAT_FEATURES = "AZURE_MONITOR_STATSBEAT_FEATURES"; export enum StatsbeatFeature {