diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 7be2dc81f987..da2840eba832 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1044,7 +1044,7 @@ packages: resolution: {integrity: sha512-Q71Buur3RMcg6lCnisLL8Im562DBw+ybzgm+YQj/FbAaI8ZNu/zl/5z1fE4k3Q9LSIzYrz6HLRzlhdSBXpydlQ==} engines: {node: '>=8.0.0'} dependencies: - '@azure/core-http': 1.2.3 + '@azure/core-http': 1.2.6 '@azure/core-tracing': 1.0.0-preview.9 '@azure/logger': 1.0.3 '@azure/msal-node': 1.0.0-beta.6_debug@4.3.4 @@ -2304,7 +2304,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/chai-as-promised/7.1.5: @@ -2326,7 +2326,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/cookie/0.4.1: @@ -2361,7 +2361,7 @@ packages: /@types/express-serve-static-core/4.17.31: resolution: {integrity: sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 dev: false @@ -2378,20 +2378,20 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/glob/7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/inquirer/8.2.4: @@ -2403,7 +2403,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/json-schema/7.0.11: @@ -2417,13 +2417,13 @@ packages: /@types/jsonwebtoken/8.5.9: resolution: {integrity: sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/jws/3.2.4: resolution: {integrity: sha512-aqtH4dPw1wUjFZaeMD1ak/pf8iXlu/odFe+trJrvw0g1sTh93i+SCykg0Ek8C6B7rVK3oBORbfZAsKO7P10etg==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/md5/2.3.2: @@ -2463,13 +2463,13 @@ packages: /@types/mock-fs/4.13.1: resolution: {integrity: sha512-m6nFAJ3lBSnqbvDZioawRvpLXSaPyn52Srf7OfzjubYbYX8MTUdIgDxQl0wEapm4m/pNYSd9TXocpQ0TvZFlYA==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/mock-require/2.0.1: resolution: {integrity: sha512-O7U5DVGboY/Crueb5/huUCIRjKtRVRaLmRDbZJBlDQgJn966z3aiFDN+6AtYviu2ExwMkl34LjT/IiC0OPtKuQ==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/ms/0.7.31: @@ -2487,7 +2487,7 @@ packages: /@types/node-fetch/2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 form-data: 3.0.1 dev: false @@ -2538,7 +2538,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/semaphore/1.1.1: @@ -2549,7 +2549,7 @@ packages: resolution: {integrity: sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==} dependencies: '@types/mime': 3.0.1 - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/sinon/10.0.13: @@ -2571,13 +2571,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/tough-cookie/4.0.2: @@ -2591,13 +2591,13 @@ packages: /@types/tunnel/0.0.1: resolution: {integrity: sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/underscore/1.11.4: @@ -2615,19 +2615,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/ws/8.5.3: resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false /@types/yargs-parser/21.0.0: @@ -2644,7 +2644,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 12.20.55 + '@types/node': 18.8.0 dev: false optional: true @@ -3732,7 +3732,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug/3.2.7: @@ -3953,7 +3953,7 @@ packages: dependencies: semver: 7.3.7 shelljs: 0.8.5 - typescript: 4.6.4 + typescript: 4.8.4 dev: false /ecdsa-sig-formatter/1.0.11: @@ -4004,7 +4004,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.12 - '@types/node': 12.20.55 + '@types/node': 18.8.0 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -5019,7 +5019,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: false @@ -10775,17 +10775,19 @@ packages: dev: false file:projects/arm-cdn.tgz: - resolution: {integrity: sha512-F3H7Zl/SExczoMqSQxxrVljhQDGlDfdAajS0GnoQ25rn6h3655ssBFWS9kns8FiefPimqlIox8ptdTrAB8K7WA==, tarball: file:projects/arm-cdn.tgz} + resolution: {integrity: sha512-J3E8pPBRacsaygJR4rrkbfTEOb1/wRSC+jgx+ivhXZOTyGRnv2QFtM8m5OXrntofQzV+i3d2V2kHVLjO8dR1dg==, tarball: file:projects/arm-cdn.tgz} name: '@rush-temp/arm-cdn' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@azure/identity': 2.1.0 - '@microsoft/api-extractor': 7.32.0 + '@microsoft/api-extractor': 7.18.11 '@rollup/plugin-commonjs': 21.1.0_rollup@2.79.1 '@rollup/plugin-json': 4.1.0_rollup@2.79.1 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 + '@types/chai': 4.3.3 + chai: 4.3.6 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 @@ -10797,7 +10799,6 @@ packages: uglify-js: 3.17.2 transitivePeerDependencies: - '@types/node' - - encoding - supports-color dev: false diff --git a/sdk/cdn/arm-cdn/CHANGELOG.md b/sdk/cdn/arm-cdn/CHANGELOG.md index cf8f97ce1a93..ee2347f78c11 100644 --- a/sdk/cdn/arm-cdn/CHANGELOG.md +++ b/sdk/cdn/arm-cdn/CHANGELOG.md @@ -1,11 +1,130 @@ # Release History + +## 8.0.0-beta.1 (2022-10-03) + +**Features** -## 7.0.2 (2022-09-30) - -**Bugs Fixed** + - Added operation CustomDomains.beginDisableCustomHttps + - Added operation CustomDomains.beginDisableCustomHttpsAndWait + - Added operation CustomDomains.beginEnableCustomHttps + - Added operation CustomDomains.beginEnableCustomHttpsAndWait + - Added operation Profiles.beginMigrate + - Added operation Profiles.beginMigrateAndWait + - Added operation Profiles.beginMigrationCommit + - Added operation Profiles.beginMigrationCommitAndWait + - Added operation Profiles.canMigrate + - Added Interface AFDDomain + - Added Interface AFDDomainProperties + - Added Interface AFDEndpoint + - Added Interface AFDEndpointProperties + - Added Interface AFDOrigin + - Added Interface AFDOriginGroup + - Added Interface AFDOriginGroupProperties + - Added Interface AFDOriginProperties + - Added Interface AzureFirstPartyManagedCertificate + - Added Interface AzureFirstPartyManagedCertificateParameters + - Added Interface CanMigrateParameters + - Added Interface CanMigrateResult + - Added Interface CdnManagedHttpsParameters + - Added Interface CdnWebApplicationFirewallPolicy + - Added Interface CustomDomain + - Added Interface CustomerCertificate + - Added Interface CustomerCertificateParameters + - Added Interface DeepCreatedCustomDomain + - Added Interface DeliveryRuleCacheExpirationAction + - Added Interface DeliveryRuleCacheKeyQueryStringAction + - Added Interface DeliveryRuleClientPortCondition + - Added Interface DeliveryRuleCookiesCondition + - Added Interface DeliveryRuleHostNameCondition + - Added Interface DeliveryRuleHttpVersionCondition + - Added Interface DeliveryRuleIsDeviceCondition + - Added Interface DeliveryRulePostArgsCondition + - Added Interface DeliveryRuleQueryStringCondition + - Added Interface DeliveryRuleRemoteAddressCondition + - Added Interface DeliveryRuleRequestBodyCondition + - Added Interface DeliveryRuleRequestHeaderAction + - Added Interface DeliveryRuleRequestHeaderCondition + - Added Interface DeliveryRuleRequestMethodCondition + - Added Interface DeliveryRuleRequestSchemeCondition + - Added Interface DeliveryRuleRequestUriCondition + - Added Interface DeliveryRuleResponseHeaderAction + - Added Interface DeliveryRuleRouteConfigurationOverrideAction + - Added Interface DeliveryRuleServerPortCondition + - Added Interface DeliveryRuleSocketAddrCondition + - Added Interface DeliveryRuleSslProtocolCondition + - Added Interface DeliveryRuleUrlFileExtensionCondition + - Added Interface DeliveryRuleUrlFileNameCondition + - Added Interface DeliveryRuleUrlPathCondition + - Added Interface EdgeNode + - Added Interface Endpoint + - Added Interface EndpointProperties + - Added Interface ManagedCertificate + - Added Interface ManagedCertificateParameters + - Added Interface ManagedRuleSetDefinition + - Added Interface MigrateResult + - Added Interface MigrationErrorType + - Added Interface MigrationParameters + - Added Interface MigrationWebApplicationFirewallMapping + - Added Interface Origin + - Added Interface OriginGroup + - Added Interface OriginGroupOverrideAction + - Added Interface OriginGroupProperties + - Added Interface OriginProperties + - Added Interface Profile + - Added Interface ProfilesCanMigrateOptionalParams + - Added Interface ProfilesMigrateHeaders + - Added Interface ProfilesMigrateOptionalParams + - Added Interface ProfilesMigrationCommitHeaders + - Added Interface ProfilesMigrationCommitOptionalParams + - Added Interface ProxyResource + - Added Interface RateLimitRule + - Added Interface Route + - Added Interface RouteProperties + - Added Interface Rule + - Added Interface RuleProperties + - Added Interface RuleSet + - Added Interface RuleSetProperties + - Added Interface Secret + - Added Interface SecretProperties + - Added Interface SecurityPolicy + - Added Interface SecurityPolicyProperties + - Added Interface SecurityPolicyWebApplicationFirewallParameters + - Added Interface TrackedResource + - Added Interface UrlRedirectAction + - Added Interface UrlRewriteAction + - Added Interface UrlSigningAction + - Added Interface UrlSigningKeyParameters + - Added Interface UserManagedHttpsParameters + - Added Type Alias CanMigrateDefaultSku + - Added Type Alias EndpointProvisioningState + - Added Type Alias OriginGroupProvisioningState + - Added Type Alias OriginProvisioningState + - Added Type Alias ProfileProvisioningState + - Added Type Alias ProfilesCanMigrateResponse + - Added Type Alias ProfilesMigrateResponse + - Added Type Alias ProfilesMigrationCommitResponse + - Added Type Alias ResourceUsageUnit + - Interface CustomDomainsDisableCustomHttpsOptionalParams has a new optional parameter resumeFrom + - Interface CustomDomainsDisableCustomHttpsOptionalParams has a new optional parameter updateIntervalInMs + - Interface CustomDomainsEnableCustomHttpsOptionalParams has a new optional parameter resumeFrom + - Interface CustomDomainsEnableCustomHttpsOptionalParams has a new optional parameter updateIntervalInMs + - Added Enum KnownCanMigrateDefaultSku + - Added Enum KnownEndpointProvisioningState + - Added Enum KnownOriginGroupProvisioningState + - Added Enum KnownOriginProvisioningState + - Added Enum KnownProfileProvisioningState + - Added Enum KnownResourceUsageUnit + - 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 - - fix better user experience of credential scopes in government cloud +**Breaking Changes** + - Removed operation CustomDomains.disableCustomHttps + - Removed operation CustomDomains.enableCustomHttps + ## 7.0.1 (2022-04-21) **Features** diff --git a/sdk/cdn/arm-cdn/README.md b/sdk/cdn/arm-cdn/README.md index d7704833f8c4..cc9d6c8a7401 100644 --- a/sdk/cdn/arm-cdn/README.md +++ b/sdk/cdn/arm-cdn/README.md @@ -6,14 +6,14 @@ Cdn Management Client [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cdn/arm-cdn) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-cdn) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-cdn) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-cdn?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started ### Currently supported environments -- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) +- [LTS versions of Node.js](https://nodejs.org/about/releases/) - Latest versions of Safari, Chrome, Edge and Firefox. See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. diff --git a/sdk/cdn/arm-cdn/_meta.json b/sdk/cdn/arm-cdn/_meta.json index 041fb3efa0b7..7a0a60240d05 100644 --- a/sdk/cdn/arm-cdn/_meta.json +++ b/sdk/cdn/arm-cdn/_meta.json @@ -1,8 +1,8 @@ { - "commit": "82fdf284eea880a8e027c354911a814999a77178", + "commit": "f1f5d7a77e92a67234fda9bfa1810a3b3c84e6f0", "readme": "specification/cdn/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\cdn\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-beta.17 --generate-sample=true", + "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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/cdn/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.2.0", - "use": "@autorest/typescript@6.0.0-beta.17" + "release_tool": "@azure-tools/js-sdk-release-tools@2.4.3", + "use": "@autorest/typescript@6.0.0-rc.1" } \ No newline at end of file diff --git a/sdk/cdn/arm-cdn/package.json b/sdk/cdn/arm-cdn/package.json index 8ce0eae65fa9..e6b95d62b355 100644 --- a/sdk/cdn/arm-cdn/package.json +++ b/sdk/cdn/arm-cdn/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for CdnManagementClient.", - "version": "7.0.2", + "version": "8.0.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -11,9 +11,9 @@ "@azure/core-lro": "^2.2.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.0.0", + "@azure/core-client": "^1.5.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.1.0", + "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" }, "keywords": [ @@ -28,7 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-cdn.d.ts", "devDependencies": { - "@microsoft/api-extractor": "^7.31.1", + "@microsoft/api-extractor": "7.18.11", "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-multi-entry": "^4.1.0", @@ -40,9 +40,13 @@ "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2" + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cdn/arm-cdn", "repository": { @@ -93,9 +97,8 @@ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", - "integration-test:browser": "echo skipped", - "docs": "echo skipped" + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped" }, "sideEffects": false, "//metadata": { @@ -106,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-cdn?view=azure-node-preview" - } -} + "autoPublish": true +} \ 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 641e9dfe1e14..720a4b9964fe 100644 --- a/sdk/cdn/arm-cdn/review/arm-cdn.api.md +++ b/sdk/cdn/arm-cdn/review/arm-cdn.api.md @@ -88,17 +88,20 @@ export interface AfdCustomDomainsUpdateOptionalParams extends coreClient.Operati export type AfdCustomDomainsUpdateResponse = AFDDomain; // @public -export type AFDDomain = ProxyResource & { - readonly profileName?: string; - tlsSettings?: AFDDomainHttpsParameters; +export interface AFDDomain extends ProxyResource { azureDnsZone?: ResourceReference; - preValidatedCustomDomainResourceId?: ResourceReference; - readonly provisioningState?: AfdProvisioningState; readonly deploymentStatus?: DeploymentStatus; readonly domainValidationState?: DomainValidationState; + extendedProperties?: { + [propertyName: string]: string; + }; hostName?: string; + preValidatedCustomDomainResourceId?: ResourceReference; + readonly profileName?: string; + readonly provisioningState?: AfdProvisioningState; + tlsSettings?: AFDDomainHttpsParameters; readonly validationProperties?: DomainValidationProperties; -}; +} // @public export interface AFDDomainHttpsParameters { @@ -114,11 +117,14 @@ export interface AFDDomainListResult { } // @public -export type AFDDomainProperties = AFDDomainUpdatePropertiesParameters & AFDStateProperties & { +export interface AFDDomainProperties extends AFDDomainUpdatePropertiesParameters, AFDStateProperties { readonly domainValidationState?: DomainValidationState; + extendedProperties?: { + [propertyName: string]: string; + }; hostName: string; readonly validationProperties?: DomainValidationProperties; -}; +} // @public export interface AFDDomainUpdateParameters { @@ -137,14 +143,14 @@ export interface AFDDomainUpdatePropertiesParameters { } // @public -export type AFDEndpoint = TrackedResource & { - readonly profileName?: string; - enabledState?: EnabledState; - readonly provisioningState?: AfdProvisioningState; +export interface AFDEndpoint extends TrackedResource { + autoGeneratedDomainNameLabelScope?: AutoGeneratedDomainNameLabelScope; readonly deploymentStatus?: DeploymentStatus; + enabledState?: EnabledState; readonly hostName?: string; - autoGeneratedDomainNameLabelScope?: AutoGeneratedDomainNameLabelScope; -}; + readonly profileName?: string; + readonly provisioningState?: AfdProvisioningState; +} // @public export interface AFDEndpointListResult { @@ -153,10 +159,10 @@ export interface AFDEndpointListResult { } // @public -export type AFDEndpointProperties = AFDEndpointPropertiesUpdateParameters & AFDStateProperties & { - readonly hostName?: string; +export interface AFDEndpointProperties extends AFDEndpointPropertiesUpdateParameters, AFDStateProperties { autoGeneratedDomainNameLabelScope?: AutoGeneratedDomainNameLabelScope; -}; + readonly hostName?: string; +} // @public export interface AFDEndpointPropertiesUpdateParameters { @@ -273,32 +279,32 @@ export interface AfdErrorResponse { export type AfdMinimumTlsVersion = "TLS10" | "TLS12"; // @public -export type AFDOrigin = ProxyResource & { - readonly originGroupName?: string; +export interface AFDOrigin extends ProxyResource { azureOrigin?: ResourceReference; + readonly deploymentStatus?: DeploymentStatus; + enabledState?: EnabledState; + enforceCertificateNameCheck?: boolean; hostName?: string; httpPort?: number; httpsPort?: number; + readonly originGroupName?: string; originHostHeader?: string; priority?: number; - weight?: number; - sharedPrivateLinkResource?: SharedPrivateLinkResourceProperties; - enabledState?: EnabledState; - enforceCertificateNameCheck?: boolean; readonly provisioningState?: AfdProvisioningState; - readonly deploymentStatus?: DeploymentStatus; -}; + sharedPrivateLinkResource?: SharedPrivateLinkResourceProperties; + weight?: number; +} // @public -export type AFDOriginGroup = ProxyResource & { - readonly profileName?: string; - loadBalancingSettings?: LoadBalancingSettingsParameters; +export interface AFDOriginGroup extends ProxyResource { + readonly deploymentStatus?: DeploymentStatus; healthProbeSettings?: HealthProbeParameters; - trafficRestorationTimeToHealedOrNewEndpointsInMinutes?: number; - sessionAffinityState?: EnabledState; + loadBalancingSettings?: LoadBalancingSettingsParameters; + readonly profileName?: string; readonly provisioningState?: AfdProvisioningState; - readonly deploymentStatus?: DeploymentStatus; -}; + sessionAffinityState?: EnabledState; + trafficRestorationTimeToHealedOrNewEndpointsInMinutes?: number; +} // @public export interface AFDOriginGroupListResult { @@ -307,7 +313,8 @@ export interface AFDOriginGroupListResult { } // @public -export type AFDOriginGroupProperties = AFDOriginGroupUpdatePropertiesParameters & AFDStateProperties & {}; +export interface AFDOriginGroupProperties extends AFDOriginGroupUpdatePropertiesParameters, AFDStateProperties { +} // @public export interface AfdOriginGroups { @@ -406,7 +413,8 @@ export interface AFDOriginListResult { } // @public -export type AFDOriginProperties = AFDOriginUpdatePropertiesParameters & AFDStateProperties & {}; +export interface AFDOriginProperties extends AFDOriginUpdatePropertiesParameters, AFDStateProperties { +} // @public export interface AfdOrigins { @@ -555,12 +563,13 @@ export { Algorithm_2 as Algorithm } export type AutoGeneratedDomainNameLabelScope = string; // @public -export type AzureFirstPartyManagedCertificate = Certificate & {}; +export interface AzureFirstPartyManagedCertificate extends Certificate { +} // @public -export type AzureFirstPartyManagedCertificateParameters = SecretParameters & { +export interface AzureFirstPartyManagedCertificateParameters extends SecretParameters { type: "AzureFirstPartyManagedCertificate"; -}; +} // @public export type CacheBehavior = string; @@ -594,6 +603,22 @@ 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[]; +} + // @public export interface CdnCertificateSourceParameters { certificateType: CertificateType; @@ -607,10 +632,10 @@ export interface CdnEndpoint { } // @public -export type CdnManagedHttpsParameters = CustomDomainHttpsParameters & { +export interface CdnManagedHttpsParameters extends CustomDomainHttpsParameters { certificateSource: "Cdn"; certificateSourceParameters: CdnCertificateSourceParameters; -}; +} // @public (undocumented) export class CdnManagementClient extends coreClient.ServiceClient { @@ -679,17 +704,20 @@ export interface CdnManagementClientOptionalParams extends coreClient.ServiceCli } // @public -export type CdnWebApplicationFirewallPolicy = TrackedResource & { - etag?: string; - sku: Sku; - policySettings?: PolicySettings; - rateLimitRules?: RateLimitRuleList; +export interface CdnWebApplicationFirewallPolicy extends TrackedResource { customRules?: CustomRuleList; - managedRules?: ManagedRuleSetList; readonly endpointLinks?: CdnEndpoint[]; + etag?: string; + extendedProperties?: { + [propertyName: string]: string; + }; + managedRules?: ManagedRuleSetList; + policySettings?: PolicySettings; readonly provisioningState?: ProvisioningState; + rateLimitRules?: RateLimitRuleList; readonly resourceState?: PolicyResourceState; -}; + sku: Sku; +} // @public export interface CdnWebApplicationFirewallPolicyList { @@ -859,15 +887,15 @@ export interface CookiesMatchConditionParameters { export type CookiesOperator = string; // @public -export type CustomDomain = ProxyResource & { - hostName?: string; - readonly resourceState?: CustomDomainResourceState; +export interface CustomDomain extends ProxyResource { + customHttpsParameters?: CustomDomainHttpsParametersUnion; readonly customHttpsProvisioningState?: CustomHttpsProvisioningState; readonly customHttpsProvisioningSubstate?: CustomHttpsProvisioningSubstate; - customHttpsParameters?: CustomDomainHttpsParametersUnion; + hostName?: string; + readonly provisioningState?: CustomHttpsProvisioningState; + readonly resourceState?: CustomDomainResourceState; validationData?: string; - readonly provisioningState?: string; -}; +} // @public export interface CustomDomainHttpsParameters { @@ -899,8 +927,10 @@ export interface CustomDomains { 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>>; beginDeleteAndWait(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: CustomDomainsDeleteOptionalParams): Promise; - disableCustomHttps(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: CustomDomainsDisableCustomHttpsOptionalParams): Promise; - enableCustomHttps(resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: CustomDomainsEnableCustomHttpsOptionalParams): Promise; + 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>>; + 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; } @@ -922,6 +952,8 @@ export interface CustomDomainsDeleteOptionalParams extends coreClient.OperationO // @public export interface CustomDomainsDisableCustomHttpsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public @@ -930,6 +962,8 @@ export type CustomDomainsDisableCustomHttpsResponse = CustomDomain; // @public export interface CustomDomainsEnableCustomHttpsOptionalParams extends coreClient.OperationOptions { customDomainHttpsParameters?: CustomDomainHttpsParametersUnion; + resumeFrom?: string; + updateIntervalInMs?: number; } // @public @@ -957,27 +991,27 @@ export interface CustomDomainsListByEndpointOptionalParams extends coreClient.Op export type CustomDomainsListByEndpointResponse = CustomDomainListResult; // @public -export type CustomerCertificate = Certificate & { +export interface CustomerCertificate extends Certificate { + readonly certificateAuthority?: string; secretSource?: ResourceReference; secretVersion?: string; - readonly certificateAuthority?: string; - useLatestVersion?: boolean; subjectAlternativeNames?: string[]; readonly thumbprint?: string; -}; + useLatestVersion?: boolean; +} // @public -export type CustomerCertificateParameters = SecretParameters & { - type: "CustomerCertificate"; +export interface CustomerCertificateParameters extends SecretParameters { + readonly certificateAuthority?: string; + readonly expirationDate?: string; secretSource: ResourceReference; secretVersion?: string; - useLatestVersion?: boolean; readonly subject?: string; - readonly expirationDate?: string; - readonly certificateAuthority?: string; subjectAlternativeNames?: string[]; readonly thumbprint?: string; -}; + type: "CustomerCertificate"; + useLatestVersion?: boolean; +} // @public export type CustomHttpsProvisioningState = string; @@ -1002,6 +1036,13 @@ export interface CustomRuleList { rules?: CustomRule[]; } +// @public +export interface DeepCreatedCustomDomain { + hostName?: string; + name: string; + validationData?: string; +} + // @public export interface DeepCreatedOrigin { enabled?: boolean; @@ -1051,22 +1092,22 @@ export interface DeliveryRuleActionAutoGenerated { export type DeliveryRuleActionAutoGeneratedUnion = DeliveryRuleActionAutoGenerated | UrlRedirectAction | UrlSigningAction | OriginGroupOverrideAction | UrlRewriteAction | DeliveryRuleRequestHeaderAction | DeliveryRuleResponseHeaderAction | DeliveryRuleCacheExpirationAction | DeliveryRuleCacheKeyQueryStringAction | DeliveryRuleRouteConfigurationOverrideAction; // @public -export type DeliveryRuleCacheExpirationAction = DeliveryRuleActionAutoGenerated & { +export interface DeliveryRuleCacheExpirationAction extends DeliveryRuleActionAutoGenerated { name: "CacheExpiration"; parameters: CacheExpirationActionParameters; -}; +} // @public -export type DeliveryRuleCacheKeyQueryStringAction = DeliveryRuleActionAutoGenerated & { +export interface DeliveryRuleCacheKeyQueryStringAction extends DeliveryRuleActionAutoGenerated { name: "CacheKeyQueryString"; parameters: CacheKeyQueryStringActionParameters; -}; +} // @public -export type DeliveryRuleClientPortCondition = DeliveryRuleCondition & { +export interface DeliveryRuleClientPortCondition extends DeliveryRuleCondition { name: "ClientPort"; parameters: ClientPortMatchConditionParameters; -}; +} // @public export interface DeliveryRuleCondition { @@ -1077,130 +1118,130 @@ export interface DeliveryRuleCondition { export type DeliveryRuleConditionUnion = DeliveryRuleCondition | DeliveryRuleRemoteAddressCondition | DeliveryRuleRequestMethodCondition | DeliveryRuleQueryStringCondition | DeliveryRulePostArgsCondition | DeliveryRuleRequestUriCondition | DeliveryRuleRequestHeaderCondition | DeliveryRuleRequestBodyCondition | DeliveryRuleRequestSchemeCondition | DeliveryRuleUrlPathCondition | DeliveryRuleUrlFileExtensionCondition | DeliveryRuleUrlFileNameCondition | DeliveryRuleHttpVersionCondition | DeliveryRuleCookiesCondition | DeliveryRuleIsDeviceCondition | DeliveryRuleSocketAddrCondition | DeliveryRuleClientPortCondition | DeliveryRuleServerPortCondition | DeliveryRuleHostNameCondition | DeliveryRuleSslProtocolCondition; // @public -export type DeliveryRuleCookiesCondition = DeliveryRuleCondition & { +export interface DeliveryRuleCookiesCondition extends DeliveryRuleCondition { name: "Cookies"; parameters: CookiesMatchConditionParameters; -}; +} // @public -export type DeliveryRuleHostNameCondition = DeliveryRuleCondition & { +export interface DeliveryRuleHostNameCondition extends DeliveryRuleCondition { name: "HostName"; parameters: HostNameMatchConditionParameters; -}; +} // @public -export type DeliveryRuleHttpVersionCondition = DeliveryRuleCondition & { +export interface DeliveryRuleHttpVersionCondition extends DeliveryRuleCondition { name: "HttpVersion"; parameters: HttpVersionMatchConditionParameters; -}; +} // @public -export type DeliveryRuleIsDeviceCondition = DeliveryRuleCondition & { +export interface DeliveryRuleIsDeviceCondition extends DeliveryRuleCondition { name: "IsDevice"; parameters: IsDeviceMatchConditionParameters; -}; +} // @public -export type DeliveryRulePostArgsCondition = DeliveryRuleCondition & { +export interface DeliveryRulePostArgsCondition extends DeliveryRuleCondition { name: "PostArgs"; parameters: PostArgsMatchConditionParameters; -}; +} // @public -export type DeliveryRuleQueryStringCondition = DeliveryRuleCondition & { +export interface DeliveryRuleQueryStringCondition extends DeliveryRuleCondition { name: "QueryString"; parameters: QueryStringMatchConditionParameters; -}; +} // @public -export type DeliveryRuleRemoteAddressCondition = DeliveryRuleCondition & { +export interface DeliveryRuleRemoteAddressCondition extends DeliveryRuleCondition { name: "RemoteAddress"; parameters: RemoteAddressMatchConditionParameters; -}; +} // @public -export type DeliveryRuleRequestBodyCondition = DeliveryRuleCondition & { +export interface DeliveryRuleRequestBodyCondition extends DeliveryRuleCondition { name: "RequestBody"; parameters: RequestBodyMatchConditionParameters; -}; +} // @public -export type DeliveryRuleRequestHeaderAction = DeliveryRuleActionAutoGenerated & { +export interface DeliveryRuleRequestHeaderAction extends DeliveryRuleActionAutoGenerated { name: "ModifyRequestHeader"; parameters: HeaderActionParameters; -}; +} // @public -export type DeliveryRuleRequestHeaderCondition = DeliveryRuleCondition & { +export interface DeliveryRuleRequestHeaderCondition extends DeliveryRuleCondition { name: "RequestHeader"; parameters: RequestHeaderMatchConditionParameters; -}; +} // @public -export type DeliveryRuleRequestMethodCondition = DeliveryRuleCondition & { +export interface DeliveryRuleRequestMethodCondition extends DeliveryRuleCondition { name: "RequestMethod"; parameters: RequestMethodMatchConditionParameters; -}; +} // @public -export type DeliveryRuleRequestSchemeCondition = DeliveryRuleCondition & { +export interface DeliveryRuleRequestSchemeCondition extends DeliveryRuleCondition { name: "RequestScheme"; parameters: RequestSchemeMatchConditionParameters; -}; +} // @public -export type DeliveryRuleRequestUriCondition = DeliveryRuleCondition & { +export interface DeliveryRuleRequestUriCondition extends DeliveryRuleCondition { name: "RequestUri"; parameters: RequestUriMatchConditionParameters; -}; +} // @public -export type DeliveryRuleResponseHeaderAction = DeliveryRuleActionAutoGenerated & { +export interface DeliveryRuleResponseHeaderAction extends DeliveryRuleActionAutoGenerated { name: "ModifyResponseHeader"; parameters: HeaderActionParameters; -}; +} // @public -export type DeliveryRuleRouteConfigurationOverrideAction = DeliveryRuleActionAutoGenerated & { +export interface DeliveryRuleRouteConfigurationOverrideAction extends DeliveryRuleActionAutoGenerated { name: "RouteConfigurationOverride"; parameters: RouteConfigurationOverrideActionParameters; -}; +} // @public -export type DeliveryRuleServerPortCondition = DeliveryRuleCondition & { +export interface DeliveryRuleServerPortCondition extends DeliveryRuleCondition { name: "ServerPort"; parameters: ServerPortMatchConditionParameters; -}; +} // @public -export type DeliveryRuleSocketAddrCondition = DeliveryRuleCondition & { +export interface DeliveryRuleSocketAddrCondition extends DeliveryRuleCondition { name: "SocketAddr"; parameters: SocketAddrMatchConditionParameters; -}; +} // @public -export type DeliveryRuleSslProtocolCondition = DeliveryRuleCondition & { +export interface DeliveryRuleSslProtocolCondition extends DeliveryRuleCondition { name: "SslProtocol"; parameters: SslProtocolMatchConditionParameters; -}; +} // @public -export type DeliveryRuleUrlFileExtensionCondition = DeliveryRuleCondition & { +export interface DeliveryRuleUrlFileExtensionCondition extends DeliveryRuleCondition { name: "UrlFileExtension"; parameters: UrlFileExtensionMatchConditionParameters; -}; +} // @public -export type DeliveryRuleUrlFileNameCondition = DeliveryRuleCondition & { +export interface DeliveryRuleUrlFileNameCondition extends DeliveryRuleCondition { name: "UrlFileName"; parameters: UrlFileNameMatchConditionParameters; -}; +} // @public -export type DeliveryRuleUrlPathCondition = DeliveryRuleCondition & { +export interface DeliveryRuleUrlPathCondition extends DeliveryRuleCondition { name: "UrlPath"; parameters: UrlPathMatchConditionParameters; -}; +} // @public export type DeploymentStatus = string; @@ -1225,9 +1266,9 @@ export interface DomainValidationProperties { export type DomainValidationState = string; // @public -export type EdgeNode = ProxyResource & { +export interface EdgeNode extends ProxyResource { ipAddressGroups?: IpAddressGroup[]; -}; +} // @public export interface EdgenodeResult { @@ -1258,28 +1299,28 @@ export type EdgeNodesListResponse = EdgenodeResult; export type EnabledState = string; // @public -export type Endpoint = TrackedResource & { - originPath?: string; +export interface Endpoint extends TrackedResource { contentTypesToCompress?: string[]; - originHostHeader?: string; + readonly customDomains?: DeepCreatedCustomDomain[]; + defaultOriginGroup?: ResourceReference; + deliveryPolicy?: EndpointPropertiesUpdateParametersDeliveryPolicy; + geoFilters?: GeoFilter[]; + readonly hostName?: string; isCompressionEnabled?: boolean; isHttpAllowed?: boolean; isHttpsAllowed?: boolean; - queryStringCachingBehavior?: QueryStringCachingBehavior; optimizationType?: OptimizationType; + originGroups?: DeepCreatedOriginGroup[]; + originHostHeader?: string; + originPath?: string; + origins?: DeepCreatedOrigin[]; probePath?: string; - geoFilters?: GeoFilter[]; - defaultOriginGroup?: ResourceReference; + readonly provisioningState?: EndpointProvisioningState; + queryStringCachingBehavior?: QueryStringCachingBehavior; + readonly resourceState?: EndpointResourceState; urlSigningKeys?: UrlSigningKey[]; - deliveryPolicy?: EndpointPropertiesUpdateParametersDeliveryPolicy; webApplicationFirewallPolicyLink?: EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink; - readonly hostName?: string; - origins?: DeepCreatedOrigin[]; - originGroups?: DeepCreatedOriginGroup[]; - readonly customDomains?: CustomDomain[]; - readonly resourceState?: EndpointResourceState; - readonly provisioningState?: string; -}; +} // @public export interface EndpointListResult { @@ -1288,14 +1329,14 @@ export interface EndpointListResult { } // @public -export type EndpointProperties = EndpointPropertiesUpdateParameters & { +export interface EndpointProperties extends EndpointPropertiesUpdateParameters { + readonly customDomains?: DeepCreatedCustomDomain[]; readonly hostName?: string; - origins: DeepCreatedOrigin[]; originGroups?: DeepCreatedOriginGroup[]; - readonly customDomains?: CustomDomain[]; + origins: DeepCreatedOrigin[]; + readonly provisioningState?: EndpointProvisioningState; readonly resourceState?: EndpointResourceState; - readonly provisioningState?: string; -}; +} // @public export interface EndpointPropertiesUpdateParameters { @@ -1326,6 +1367,9 @@ export interface EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyL id?: string; } +// @public +export type EndpointProvisioningState = string; + // @public export type EndpointResourceState = string; @@ -1611,1259 +1655,870 @@ export interface KeyVaultSigningKeyParameters { // @public export enum KnownActionType { - // (undocumented) Allow = "Allow", - // (undocumented) Block = "Block", - // (undocumented) Log = "Log", - // (undocumented) Redirect = "Redirect" } // @public export enum KnownAfdCertificateType { - // (undocumented) AzureFirstPartyManagedCertificate = "AzureFirstPartyManagedCertificate", - // (undocumented) CustomerCertificate = "CustomerCertificate", - // (undocumented) ManagedCertificate = "ManagedCertificate" } // @public export enum KnownAFDEndpointProtocols { - // (undocumented) Http = "Http", - // (undocumented) Https = "Https" } // @public export enum KnownAfdProvisioningState { - // (undocumented) Creating = "Creating", - // (undocumented) Deleting = "Deleting", - // (undocumented) Failed = "Failed", - // (undocumented) Succeeded = "Succeeded", - // (undocumented) Updating = "Updating" } // @public export enum KnownAfdQueryStringCachingBehavior { - // (undocumented) IgnoreQueryString = "IgnoreQueryString", - // (undocumented) IgnoreSpecifiedQueryStrings = "IgnoreSpecifiedQueryStrings", - // (undocumented) IncludeSpecifiedQueryStrings = "IncludeSpecifiedQueryStrings", - // (undocumented) UseQueryString = "UseQueryString" } // @public export enum KnownAlgorithm { - // (undocumented) SHA256 = "SHA256" } // @public export enum KnownAutoGeneratedDomainNameLabelScope { - // (undocumented) NoReuse = "NoReuse", - // (undocumented) ResourceGroupReuse = "ResourceGroupReuse", - // (undocumented) SubscriptionReuse = "SubscriptionReuse", - // (undocumented) TenantReuse = "TenantReuse" } // @public export enum KnownCacheBehavior { - // (undocumented) BypassCache = "BypassCache", - // (undocumented) Override = "Override", - // (undocumented) SetIfMissing = "SetIfMissing" } // @public export enum KnownCacheType { - // (undocumented) All = "All" } +// @public +export enum KnownCanMigrateDefaultSku { + PremiumAzureFrontDoor = "Premium_AzureFrontDoor", + StandardAzureFrontDoor = "Standard_AzureFrontDoor" +} + // @public export enum KnownCertificateSource { - // (undocumented) AzureKeyVault = "AzureKeyVault", - // (undocumented) Cdn = "Cdn" } // @public export enum KnownCertificateType { - // (undocumented) Dedicated = "Dedicated", - // (undocumented) Shared = "Shared" } // @public export enum KnownClientPortOperator { - // (undocumented) Any = "Any", - // (undocumented) BeginsWith = "BeginsWith", - // (undocumented) Contains = "Contains", - // (undocumented) EndsWith = "EndsWith", - // (undocumented) Equal = "Equal", - // (undocumented) GreaterThan = "GreaterThan", - // (undocumented) GreaterThanOrEqual = "GreaterThanOrEqual", - // (undocumented) LessThan = "LessThan", - // (undocumented) LessThanOrEqual = "LessThanOrEqual", - // (undocumented) RegEx = "RegEx" } // @public export enum KnownCookiesOperator { - // (undocumented) Any = "Any", - // (undocumented) BeginsWith = "BeginsWith", - // (undocumented) Contains = "Contains", - // (undocumented) EndsWith = "EndsWith", - // (undocumented) Equal = "Equal", - // (undocumented) GreaterThan = "GreaterThan", - // (undocumented) GreaterThanOrEqual = "GreaterThanOrEqual", - // (undocumented) LessThan = "LessThan", - // (undocumented) LessThanOrEqual = "LessThanOrEqual", - // (undocumented) RegEx = "RegEx" } // @public export enum KnownCustomDomainResourceState { - // (undocumented) Active = "Active", - // (undocumented) Creating = "Creating", - // (undocumented) Deleting = "Deleting" } // @public export enum KnownCustomHttpsProvisioningState { - // (undocumented) Disabled = "Disabled", - // (undocumented) Disabling = "Disabling", - // (undocumented) Enabled = "Enabled", - // (undocumented) Enabling = "Enabling", - // (undocumented) Failed = "Failed" } // @public export enum KnownCustomHttpsProvisioningSubstate { - // (undocumented) CertificateDeleted = "CertificateDeleted", - // (undocumented) CertificateDeployed = "CertificateDeployed", - // (undocumented) DeletingCertificate = "DeletingCertificate", - // (undocumented) DeployingCertificate = "DeployingCertificate", - // (undocumented) DomainControlValidationRequestApproved = "DomainControlValidationRequestApproved", - // (undocumented) DomainControlValidationRequestRejected = "DomainControlValidationRequestRejected", - // (undocumented) DomainControlValidationRequestTimedOut = "DomainControlValidationRequestTimedOut", - // (undocumented) IssuingCertificate = "IssuingCertificate", - // (undocumented) PendingDomainControlValidationREquestApproval = "PendingDomainControlValidationREquestApproval", - // (undocumented) SubmittingDomainControlValidationRequest = "SubmittingDomainControlValidationRequest" } // @public export enum KnownCustomRuleEnabledState { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } // @public export enum KnownDeleteRule { - // (undocumented) NoAction = "NoAction" } // @public export enum KnownDeliveryRuleAction { - // (undocumented) CacheExpiration = "CacheExpiration", - // (undocumented) CacheKeyQueryString = "CacheKeyQueryString", - // (undocumented) ModifyRequestHeader = "ModifyRequestHeader", - // (undocumented) ModifyResponseHeader = "ModifyResponseHeader", - // (undocumented) OriginGroupOverride = "OriginGroupOverride", - // (undocumented) RouteConfigurationOverride = "RouteConfigurationOverride", - // (undocumented) UrlRedirect = "UrlRedirect", - // (undocumented) UrlRewrite = "UrlRewrite", - // (undocumented) UrlSigning = "UrlSigning" } // @public export enum KnownDeploymentStatus { - // (undocumented) Failed = "Failed", - // (undocumented) InProgress = "InProgress", - // (undocumented) NotStarted = "NotStarted", - // (undocumented) Succeeded = "Succeeded" } // @public export enum KnownDestinationProtocol { - // (undocumented) Http = "Http", - // (undocumented) Https = "Https", - // (undocumented) MatchRequest = "MatchRequest" } // @public export enum KnownDomainValidationState { - // (undocumented) Approved = "Approved", - // (undocumented) InternalError = "InternalError", - // (undocumented) Pending = "Pending", - // (undocumented) PendingRevalidation = "PendingRevalidation", - // (undocumented) RefreshingValidationToken = "RefreshingValidationToken", - // (undocumented) Rejected = "Rejected", - // (undocumented) Submitting = "Submitting", - // (undocumented) TimedOut = "TimedOut", - // (undocumented) Unknown = "Unknown" } // @public export enum KnownEnabledState { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } +// @public +export enum KnownEndpointProvisioningState { + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + // @public export enum KnownEndpointResourceState { - // (undocumented) Creating = "Creating", - // (undocumented) Deleting = "Deleting", - // (undocumented) Running = "Running", - // (undocumented) Starting = "Starting", - // (undocumented) Stopped = "Stopped", - // (undocumented) Stopping = "Stopping" } // @public export enum KnownForwardingProtocol { - // (undocumented) HttpOnly = "HttpOnly", - // (undocumented) HttpsOnly = "HttpsOnly", - // (undocumented) MatchRequest = "MatchRequest" } // @public export enum KnownHeaderAction { - // (undocumented) Append = "Append", - // (undocumented) Delete = "Delete", - // (undocumented) Overwrite = "Overwrite" } // @public export enum KnownHostNameOperator { - // (undocumented) Any = "Any", - // (undocumented) BeginsWith = "BeginsWith", - // (undocumented) Contains = "Contains", - // (undocumented) EndsWith = "EndsWith", - // (undocumented) Equal = "Equal", - // (undocumented) GreaterThan = "GreaterThan", - // (undocumented) GreaterThanOrEqual = "GreaterThanOrEqual", - // (undocumented) LessThan = "LessThan", - // (undocumented) LessThanOrEqual = "LessThanOrEqual", - // (undocumented) RegEx = "RegEx" } // @public export enum KnownHttpsRedirect { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } // @public export enum KnownHttpVersionOperator { - // (undocumented) Equal = "Equal" } // @public export enum KnownIdentityType { - // (undocumented) Application = "application", - // (undocumented) Key = "key", - // (undocumented) ManagedIdentity = "managedIdentity", - // (undocumented) User = "user" } // @public export enum KnownIsDeviceMatchConditionParametersMatchValuesItem { - // (undocumented) Desktop = "Desktop", - // (undocumented) Mobile = "Mobile" } // @public export enum KnownIsDeviceOperator { - // (undocumented) Equal = "Equal" } // @public export enum KnownLinkToDefaultDomain { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } // @public export enum KnownLogMetric { - // (undocumented) ClientRequestBandwidth = "clientRequestBandwidth", - // (undocumented) ClientRequestCount = "clientRequestCount", - // (undocumented) ClientRequestTraffic = "clientRequestTraffic", - // (undocumented) OriginRequestBandwidth = "originRequestBandwidth", - // (undocumented) OriginRequestTraffic = "originRequestTraffic", - // (undocumented) TotalLatency = "totalLatency" } // @public export enum KnownLogMetricsGranularity { - // (undocumented) P1D = "P1D", - // (undocumented) PT1H = "PT1H", - // (undocumented) PT5M = "PT5M" } // @public export enum KnownLogMetricsGroupBy { - // (undocumented) CacheStatus = "cacheStatus", - // (undocumented) CountryOrRegion = "countryOrRegion", - // (undocumented) CustomDomain = "customDomain", - // (undocumented) HttpStatusCode = "httpStatusCode", - // (undocumented) Protocol = "protocol" } // @public export enum KnownLogRanking { - // (undocumented) Browser = "browser", - // (undocumented) CountryOrRegion = "countryOrRegion", - // (undocumented) Referrer = "referrer", - // (undocumented) Url = "url", - // (undocumented) UserAgent = "userAgent" } // @public export enum KnownLogRankingMetric { - // (undocumented) ClientRequestCount = "clientRequestCount", - // (undocumented) ClientRequestTraffic = "clientRequestTraffic", - // (undocumented) ErrorCount = "errorCount", - // (undocumented) HitCount = "hitCount", - // (undocumented) MissCount = "missCount", - // (undocumented) UserErrorCount = "userErrorCount" } // @public export enum KnownManagedRuleEnabledState { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } // @public export enum KnownMatchProcessingBehavior { - // (undocumented) Continue = "Continue", - // (undocumented) Stop = "Stop" } // @public export enum KnownMatchVariable { - // (undocumented) ClientPort = "ClientPort", - // (undocumented) Cookies = "Cookies", - // (undocumented) HostName = "HostName", - // (undocumented) HttpVersion = "HttpVersion", - // (undocumented) IsDevice = "IsDevice", - // (undocumented) PostArgs = "PostArgs", - // (undocumented) QueryString = "QueryString", - // (undocumented) RemoteAddress = "RemoteAddress", - // (undocumented) RequestBody = "RequestBody", - // (undocumented) RequestHeader = "RequestHeader", - // (undocumented) RequestMethod = "RequestMethod", - // (undocumented) RequestScheme = "RequestScheme", - // (undocumented) RequestUri = "RequestUri", - // (undocumented) ServerPort = "ServerPort", - // (undocumented) SocketAddr = "SocketAddr", - // (undocumented) SslProtocol = "SslProtocol", - // (undocumented) UrlFileExtension = "UrlFileExtension", - // (undocumented) UrlFileName = "UrlFileName", - // (undocumented) UrlPath = "UrlPath" } // @public export enum KnownMetricsResponseGranularity { - // (undocumented) P1D = "P1D", - // (undocumented) PT1H = "PT1H", - // (undocumented) PT5M = "PT5M" } // @public export enum KnownMetricsResponseSeriesItemUnit { - // (undocumented) BitsPerSecond = "bitsPerSecond", - // (undocumented) Bytes = "bytes", - // (undocumented) Count = "count", - // (undocumented) MilliSeconds = "milliSeconds" } // @public export enum KnownOperator { - // (undocumented) Any = "Any", - // (undocumented) BeginsWith = "BeginsWith", - // (undocumented) Contains = "Contains", - // (undocumented) EndsWith = "EndsWith", - // (undocumented) Equal = "Equal", - // (undocumented) GeoMatch = "GeoMatch", - // (undocumented) GreaterThan = "GreaterThan", - // (undocumented) GreaterThanOrEqual = "GreaterThanOrEqual", - // (undocumented) IPMatch = "IPMatch", - // (undocumented) LessThan = "LessThan", - // (undocumented) LessThanOrEqual = "LessThanOrEqual", - // (undocumented) RegEx = "RegEx" } // @public export enum KnownOptimizationType { - // (undocumented) DynamicSiteAcceleration = "DynamicSiteAcceleration", - // (undocumented) GeneralMediaStreaming = "GeneralMediaStreaming", - // (undocumented) GeneralWebDelivery = "GeneralWebDelivery", - // (undocumented) LargeFileDownload = "LargeFileDownload", - // (undocumented) VideoOnDemandMediaStreaming = "VideoOnDemandMediaStreaming" } +// @public +export enum KnownOriginGroupProvisioningState { + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + // @public export enum KnownOriginGroupResourceState { - // (undocumented) Active = "Active", - // (undocumented) Creating = "Creating", - // (undocumented) Deleting = "Deleting" } +// @public +export enum KnownOriginProvisioningState { + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + // @public export enum KnownOriginResourceState { - // (undocumented) Active = "Active", - // (undocumented) Creating = "Creating", - // (undocumented) Deleting = "Deleting" } // @public export enum KnownParamIndicator { - // (undocumented) Expires = "Expires", - // (undocumented) KeyId = "KeyId", - // (undocumented) Signature = "Signature" } // @public export enum KnownPolicyEnabledState { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } // @public export enum KnownPolicyMode { - // (undocumented) Detection = "Detection", - // (undocumented) Prevention = "Prevention" } // @public export enum KnownPolicyResourceState { - // (undocumented) Creating = "Creating", - // (undocumented) Deleting = "Deleting", - // (undocumented) Disabled = "Disabled", - // (undocumented) Disabling = "Disabling", - // (undocumented) Enabled = "Enabled", - // (undocumented) Enabling = "Enabling" } // @public export enum KnownPolicySettingsDefaultCustomBlockResponseStatusCode { - // (undocumented) FourHundredFive = 405, - // (undocumented) FourHundredSix = 406, - // (undocumented) FourHundredThree = 403, - // (undocumented) FourHundredTwentyNine = 429, - // (undocumented) TwoHundred = 200 } // @public export enum KnownPostArgsOperator { - // (undocumented) Any = "Any", - // (undocumented) BeginsWith = "BeginsWith", - // (undocumented) Contains = "Contains", - // (undocumented) EndsWith = "EndsWith", - // (undocumented) Equal = "Equal", - // (undocumented) GreaterThan = "GreaterThan", - // (undocumented) GreaterThanOrEqual = "GreaterThanOrEqual", - // (undocumented) LessThan = "LessThan", - // (undocumented) LessThanOrEqual = "LessThanOrEqual", - // (undocumented) RegEx = "RegEx" } // @public export enum KnownPrivateEndpointStatus { - // (undocumented) Approved = "Approved", - // (undocumented) Disconnected = "Disconnected", - // (undocumented) Pending = "Pending", - // (undocumented) Rejected = "Rejected", - // (undocumented) Timeout = "Timeout" } +// @public +export enum KnownProfileProvisioningState { + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + // @public export enum KnownProfileResourceState { - // (undocumented) + AbortingMigration = "AbortingMigration", Active = "Active", - // (undocumented) + CommittingMigration = "CommittingMigration", Creating = "Creating", - // (undocumented) Deleting = "Deleting", - // (undocumented) - Disabled = "Disabled" + Disabled = "Disabled", + Migrated = "Migrated", + Migrating = "Migrating", + PendingMigrationCommit = "PendingMigrationCommit" } // @public export enum KnownProtocolType { - // (undocumented) IPBased = "IPBased", - // (undocumented) ServerNameIndication = "ServerNameIndication" } // @public export enum KnownProvisioningState { - // (undocumented) Creating = "Creating", - // (undocumented) Failed = "Failed", - // (undocumented) Succeeded = "Succeeded" } // @public export enum KnownQueryStringBehavior { - // (undocumented) Exclude = "Exclude", - // (undocumented) ExcludeAll = "ExcludeAll", - // (undocumented) Include = "Include", - // (undocumented) IncludeAll = "IncludeAll" } // @public export enum KnownQueryStringOperator { - // (undocumented) Any = "Any", - // (undocumented) BeginsWith = "BeginsWith", - // (undocumented) Contains = "Contains", - // (undocumented) EndsWith = "EndsWith", - // (undocumented) Equal = "Equal", - // (undocumented) GreaterThan = "GreaterThan", - // (undocumented) GreaterThanOrEqual = "GreaterThanOrEqual", - // (undocumented) LessThan = "LessThan", - // (undocumented) LessThanOrEqual = "LessThanOrEqual", - // (undocumented) RegEx = "RegEx" } // @public export enum KnownRedirectType { - // (undocumented) Found = "Found", - // (undocumented) Moved = "Moved", - // (undocumented) PermanentRedirect = "PermanentRedirect", - // (undocumented) TemporaryRedirect = "TemporaryRedirect" } // @public export enum KnownRemoteAddressOperator { - // (undocumented) Any = "Any", - // (undocumented) GeoMatch = "GeoMatch", - // (undocumented) IPMatch = "IPMatch" } // @public export enum KnownRequestBodyOperator { - // (undocumented) Any = "Any", - // (undocumented) BeginsWith = "BeginsWith", - // (undocumented) Contains = "Contains", - // (undocumented) EndsWith = "EndsWith", - // (undocumented) Equal = "Equal", - // (undocumented) GreaterThan = "GreaterThan", - // (undocumented) GreaterThanOrEqual = "GreaterThanOrEqual", - // (undocumented) LessThan = "LessThan", - // (undocumented) LessThanOrEqual = "LessThanOrEqual", - // (undocumented) RegEx = "RegEx" } // @public export enum KnownRequestHeaderOperator { - // (undocumented) Any = "Any", - // (undocumented) BeginsWith = "BeginsWith", - // (undocumented) Contains = "Contains", - // (undocumented) EndsWith = "EndsWith", - // (undocumented) Equal = "Equal", - // (undocumented) GreaterThan = "GreaterThan", - // (undocumented) GreaterThanOrEqual = "GreaterThanOrEqual", - // (undocumented) LessThan = "LessThan", - // (undocumented) LessThanOrEqual = "LessThanOrEqual", - // (undocumented) RegEx = "RegEx" } // @public export enum KnownRequestMethodMatchConditionParametersMatchValuesItem { - // (undocumented) Delete = "DELETE", - // (undocumented) GET = "GET", - // (undocumented) Head = "HEAD", - // (undocumented) Options = "OPTIONS", - // (undocumented) Post = "POST", - // (undocumented) PUT = "PUT", - // (undocumented) Trace = "TRACE" } // @public export enum KnownRequestMethodOperator { - // (undocumented) Equal = "Equal" } // @public export enum KnownRequestSchemeMatchConditionParametersMatchValuesItem { - // (undocumented) Http = "HTTP", - // (undocumented) Https = "HTTPS" } // @public export enum KnownRequestUriOperator { - // (undocumented) Any = "Any", - // (undocumented) BeginsWith = "BeginsWith", - // (undocumented) Contains = "Contains", - // (undocumented) EndsWith = "EndsWith", - // (undocumented) Equal = "Equal", - // (undocumented) GreaterThan = "GreaterThan", - // (undocumented) GreaterThanOrEqual = "GreaterThanOrEqual", - // (undocumented) LessThan = "LessThan", - // (undocumented) LessThanOrEqual = "LessThanOrEqual", - // (undocumented) RegEx = "RegEx" } // @public export enum KnownResourceType { - // (undocumented) MicrosoftCdnProfilesAfdEndpoints = "Microsoft.Cdn/Profiles/AfdEndpoints", - // (undocumented) MicrosoftCdnProfilesEndpoints = "Microsoft.Cdn/Profiles/Endpoints" } +// @public +export enum KnownResourceUsageUnit { + Count = "count" +} + // @public export enum KnownRuleCacheBehavior { - // (undocumented) HonorOrigin = "HonorOrigin", - // (undocumented) OverrideAlways = "OverrideAlways", - // (undocumented) OverrideIfOriginMissing = "OverrideIfOriginMissing" } // @public export enum KnownRuleIsCompressionEnabled { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } // @public export enum KnownRuleQueryStringCachingBehavior { - // (undocumented) IgnoreQueryString = "IgnoreQueryString", - // (undocumented) IgnoreSpecifiedQueryStrings = "IgnoreSpecifiedQueryStrings", - // (undocumented) IncludeSpecifiedQueryStrings = "IncludeSpecifiedQueryStrings", - // (undocumented) UseQueryString = "UseQueryString" } // @public export enum KnownSecretType { - // (undocumented) AzureFirstPartyManagedCertificate = "AzureFirstPartyManagedCertificate", - // (undocumented) CustomerCertificate = "CustomerCertificate", - // (undocumented) ManagedCertificate = "ManagedCertificate", - // (undocumented) UrlSigningKey = "UrlSigningKey" } // @public export enum KnownSecurityPolicyType { - // (undocumented) WebApplicationFirewall = "WebApplicationFirewall" } // @public export enum KnownServerPortOperator { - // (undocumented) Any = "Any", - // (undocumented) BeginsWith = "BeginsWith", - // (undocumented) Contains = "Contains", - // (undocumented) EndsWith = "EndsWith", - // (undocumented) Equal = "Equal", - // (undocumented) GreaterThan = "GreaterThan", - // (undocumented) GreaterThanOrEqual = "GreaterThanOrEqual", - // (undocumented) LessThan = "LessThan", - // (undocumented) LessThanOrEqual = "LessThanOrEqual", - // (undocumented) RegEx = "RegEx" } // @public export enum KnownSkuName { - // (undocumented) CustomVerizon = "Custom_Verizon", - // (undocumented) PremiumAzureFrontDoor = "Premium_AzureFrontDoor", - // (undocumented) PremiumVerizon = "Premium_Verizon", - // (undocumented) Standard955BandWidthChinaCdn = "Standard_955BandWidth_ChinaCdn", - // (undocumented) StandardAkamai = "Standard_Akamai", - // (undocumented) StandardAvgBandWidthChinaCdn = "Standard_AvgBandWidth_ChinaCdn", - // (undocumented) StandardAzureFrontDoor = "Standard_AzureFrontDoor", - // (undocumented) StandardChinaCdn = "Standard_ChinaCdn", - // (undocumented) StandardMicrosoft = "Standard_Microsoft", - // (undocumented) StandardPlus955BandWidthChinaCdn = "StandardPlus_955BandWidth_ChinaCdn", - // (undocumented) StandardPlusAvgBandWidthChinaCdn = "StandardPlus_AvgBandWidth_ChinaCdn", - // (undocumented) StandardPlusChinaCdn = "StandardPlus_ChinaCdn", - // (undocumented) StandardVerizon = "Standard_Verizon" } // @public export enum KnownSocketAddrOperator { - // (undocumented) Any = "Any", - // (undocumented) IPMatch = "IPMatch" } // @public export enum KnownSslProtocol { - // (undocumented) TLSv1 = "TLSv1", - // (undocumented) TLSv11 = "TLSv1.1", - // (undocumented) TLSv12 = "TLSv1.2" } // @public export enum KnownSslProtocolOperator { - // (undocumented) Equal = "Equal" } // @public export enum KnownStatus { - // (undocumented) AccessDenied = "AccessDenied", - // (undocumented) CertificateExpired = "CertificateExpired", - // (undocumented) Invalid = "Invalid", - // (undocumented) Valid = "Valid" } // @public export enum KnownTransform { - // (undocumented) Lowercase = "Lowercase", - // (undocumented) RemoveNulls = "RemoveNulls", - // (undocumented) Trim = "Trim", - // (undocumented) Uppercase = "Uppercase", - // (undocumented) UrlDecode = "UrlDecode", - // (undocumented) UrlEncode = "UrlEncode" } // @public export enum KnownTransformType { - // (undocumented) Lowercase = "Lowercase", - // (undocumented) RemoveNulls = "RemoveNulls", - // (undocumented) Trim = "Trim", - // (undocumented) Uppercase = "Uppercase", - // (undocumented) UrlDecode = "UrlDecode", - // (undocumented) UrlEncode = "UrlEncode" } // @public export enum KnownUpdateRule { - // (undocumented) NoAction = "NoAction" } // @public export enum KnownUrlFileExtensionOperator { - // (undocumented) Any = "Any", - // (undocumented) BeginsWith = "BeginsWith", - // (undocumented) Contains = "Contains", - // (undocumented) EndsWith = "EndsWith", - // (undocumented) Equal = "Equal", - // (undocumented) GreaterThan = "GreaterThan", - // (undocumented) GreaterThanOrEqual = "GreaterThanOrEqual", - // (undocumented) LessThan = "LessThan", - // (undocumented) LessThanOrEqual = "LessThanOrEqual", - // (undocumented) RegEx = "RegEx" } // @public export enum KnownUrlFileNameOperator { - // (undocumented) Any = "Any", - // (undocumented) BeginsWith = "BeginsWith", - // (undocumented) Contains = "Contains", - // (undocumented) EndsWith = "EndsWith", - // (undocumented) Equal = "Equal", - // (undocumented) GreaterThan = "GreaterThan", - // (undocumented) GreaterThanOrEqual = "GreaterThanOrEqual", - // (undocumented) LessThan = "LessThan", - // (undocumented) LessThanOrEqual = "LessThanOrEqual", - // (undocumented) RegEx = "RegEx" } // @public export enum KnownUrlPathOperator { - // (undocumented) Any = "Any", - // (undocumented) BeginsWith = "BeginsWith", - // (undocumented) Contains = "Contains", - // (undocumented) EndsWith = "EndsWith", - // (undocumented) Equal = "Equal", - // (undocumented) GreaterThan = "GreaterThan", - // (undocumented) GreaterThanOrEqual = "GreaterThanOrEqual", - // (undocumented) LessThan = "LessThan", - // (undocumented) LessThanOrEqual = "LessThanOrEqual", - // (undocumented) RegEx = "RegEx", - // (undocumented) Wildcard = "Wildcard" } // @public export enum KnownUsageUnit { - // (undocumented) Count = "Count" } // @public export enum KnownWafAction { - // (undocumented) Allow = "allow", - // (undocumented) Block = "block", - // (undocumented) Log = "log", - // (undocumented) Redirect = "redirect" } // @public export enum KnownWafGranularity { - // (undocumented) P1D = "P1D", - // (undocumented) PT1H = "PT1H", - // (undocumented) PT5M = "PT5M" } // @public export enum KnownWafMatchVariable { - // (undocumented) Cookies = "Cookies", - // (undocumented) PostArgs = "PostArgs", - // (undocumented) QueryString = "QueryString", - // (undocumented) RemoteAddr = "RemoteAddr", - // (undocumented) RequestBody = "RequestBody", - // (undocumented) RequestHeader = "RequestHeader", - // (undocumented) RequestMethod = "RequestMethod", - // (undocumented) RequestUri = "RequestUri", - // (undocumented) SocketAddr = "SocketAddr" } // @public export enum KnownWafMetric { - // (undocumented) ClientRequestCount = "clientRequestCount" } // @public export enum KnownWafMetricsResponseGranularity { - // (undocumented) P1D = "P1D", - // (undocumented) PT1H = "PT1H", - // (undocumented) PT5M = "PT5M" } // @public export enum KnownWafRankingGroupBy { - // (undocumented) CustomDomain = "customDomain", - // (undocumented) HttpStatusCode = "httpStatusCode" } // @public export enum KnownWafRankingType { - // (undocumented) Action = "action", - // (undocumented) ClientIp = "clientIp", - // (undocumented) CountryOrRegion = "countryOrRegion", - // (undocumented) RuleGroup = "ruleGroup", - // (undocumented) RuleId = "ruleId", - // (undocumented) RuleType = "ruleType", - // (undocumented) Url = "url", - // (undocumented) UserAgent = "userAgent" } // @public export enum KnownWafRuleType { - // (undocumented) Bot = "bot", - // (undocumented) Custom = "custom", - // (undocumented) Managed = "managed" } @@ -2967,14 +2622,15 @@ export interface LogSpecification { } // @public -export type ManagedCertificate = Certificate & {}; +export interface ManagedCertificate extends Certificate { +} // @public -export type ManagedCertificateParameters = SecretParameters & { - type: "ManagedCertificate"; - readonly subject?: string; +export interface ManagedCertificateParameters extends SecretParameters { readonly expirationDate?: string; -}; + readonly subject?: string; + type: "ManagedCertificate"; +} // @public export interface ManagedRuleDefinition { @@ -3014,13 +2670,13 @@ export interface ManagedRuleSet { } // @public -export type ManagedRuleSetDefinition = Resource & { - sku?: Sku; +export interface ManagedRuleSetDefinition extends Resource { readonly provisioningState?: string; + readonly ruleGroups?: ManagedRuleGroupDefinition[]; readonly ruleSetType?: string; readonly ruleSetVersion?: string; - readonly ruleGroups?: ManagedRuleGroupDefinition[]; -}; + sku?: Sku; +} // @public export interface ManagedRuleSetDefinitionList { @@ -3129,6 +2785,35 @@ export interface MetricsResponseSeriesPropertiesItemsItem { value?: string; } +// @public +export interface MigrateResult { + // (undocumented) + errors?: MigrationErrorType[]; + readonly migratedProfileResourceId?: ResourceReference; +} + +// @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"; @@ -3181,32 +2866,32 @@ export type Operator = string; export type OptimizationType = string; // @public -export type Origin = ProxyResource & { +export interface Origin extends ProxyResource { + enabled?: boolean; hostName?: string; httpPort?: number; httpsPort?: number; originHostHeader?: string; priority?: number; - weight?: number; - enabled?: boolean; + readonly privateEndpointStatus?: PrivateEndpointStatus; privateLinkAlias?: string; - privateLinkResourceId?: string; - privateLinkLocation?: string; privateLinkApprovalMessage?: string; + privateLinkLocation?: string; + privateLinkResourceId?: string; + readonly provisioningState?: OriginProvisioningState; readonly resourceState?: OriginResourceState; - readonly provisioningState?: string; - readonly privateEndpointStatus?: PrivateEndpointStatus; -}; + weight?: number; +} // @public -export type OriginGroup = ProxyResource & { +export interface OriginGroup extends ProxyResource { healthProbeSettings?: HealthProbeParameters; origins?: ResourceReference[]; - trafficRestorationTimeToHealedOrNewEndpointsInMinutes?: number; - responseBasedOriginErrorDetectionSettings?: ResponseBasedOriginErrorDetectionParameters; + readonly provisioningState?: OriginGroupProvisioningState; readonly resourceState?: OriginGroupResourceState; - readonly provisioningState?: string; -}; + responseBasedOriginErrorDetectionSettings?: ResponseBasedOriginErrorDetectionParameters; + trafficRestorationTimeToHealedOrNewEndpointsInMinutes?: number; +} // @public export interface OriginGroupListResult { @@ -3221,10 +2906,10 @@ export interface OriginGroupOverride { } // @public -export type OriginGroupOverrideAction = DeliveryRuleActionAutoGenerated & { +export interface OriginGroupOverrideAction extends DeliveryRuleActionAutoGenerated { name: "OriginGroupOverride"; parameters: OriginGroupOverrideActionParameters; -}; +} // @public export interface OriginGroupOverrideActionParameters { @@ -3234,10 +2919,13 @@ export interface OriginGroupOverrideActionParameters { } // @public -export type OriginGroupProperties = OriginGroupUpdatePropertiesParameters & { +export interface OriginGroupProperties extends OriginGroupUpdatePropertiesParameters { + readonly provisioningState?: OriginGroupProvisioningState; readonly resourceState?: OriginGroupResourceState; - readonly provisioningState?: string; -}; +} + +// @public +export type OriginGroupProvisioningState = string; // @public export type OriginGroupResourceState = string; @@ -3322,11 +3010,14 @@ export interface OriginListResult { } // @public -export type OriginProperties = OriginUpdatePropertiesParameters & { - readonly resourceState?: OriginResourceState; - readonly provisioningState?: string; +export interface OriginProperties extends OriginUpdatePropertiesParameters { readonly privateEndpointStatus?: PrivateEndpointStatus; -}; + readonly provisioningState?: OriginProvisioningState; + readonly resourceState?: OriginResourceState; +} + +// @public +export type OriginProvisioningState = string; // @public export type OriginResourceState = string; @@ -3517,14 +3208,17 @@ export type PrivateEndpointStatus = string; export type ProbeProtocol = "NotSet" | "Http" | "Https"; // @public -export type Profile = TrackedResource & { - sku: Sku; - readonly kind?: string; - readonly resourceState?: ProfileResourceState; - readonly provisioningState?: string; +export interface Profile extends TrackedResource { + extendedProperties?: { + [propertyName: string]: string; + }; readonly frontDoorId?: string; + readonly kind?: string; originResponseTimeoutSeconds?: number; -}; + readonly provisioningState?: ProfileProvisioningState; + readonly resourceState?: ProfileResourceState; + sku: Sku; +} // @public export interface ProfileListResult { @@ -3532,6 +3226,9 @@ export interface ProfileListResult { readonly value?: Profile[]; } +// @public +export type ProfileProvisioningState = string; + // @public export type ProfileResourceState = string; @@ -3541,8 +3238,13 @@ export interface Profiles { beginCreateAndWait(resourceGroupName: string, profileName: string, profile: Profile, options?: ProfilesCreateOptionalParams): Promise; beginDelete(resourceGroupName: string, profileName: string, options?: ProfilesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, profileName: string, options?: ProfilesDeleteOptionalParams): Promise; + 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, ProfilesMigrationCommitResponse>>; + 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; + canMigrate(resourceGroupName: string, canMigrateParameters: CanMigrateParameters, options?: ProfilesCanMigrateOptionalParams): Promise; generateSsoUri(resourceGroupName: string, profileName: string, options?: ProfilesGenerateSsoUriOptionalParams): Promise; get(resourceGroupName: string, profileName: string, options?: ProfilesGetOptionalParams): Promise; list(options?: ProfilesListOptionalParams): PagedAsyncIterableIterator; @@ -3551,6 +3253,13 @@ export interface Profiles { listSupportedOptimizationTypes(resourceGroupName: string, profileName: string, options?: ProfilesListSupportedOptimizationTypesOptionalParams): Promise; } +// @public +export interface ProfilesCanMigrateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProfilesCanMigrateResponse = CanMigrateResult; + // @public export interface ProfilesCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3629,6 +3338,36 @@ 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 type ProfilesMigrationCommitResponse = ProfilesMigrationCommitHeaders; + // @public export interface ProfilesUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3653,7 +3392,8 @@ export type ProtocolType = string; export type ProvisioningState = string; // @public -export type ProxyResource = Resource & {}; +export interface ProxyResource extends Resource { +} // @public export interface PurgeParameters { @@ -3716,10 +3456,10 @@ export interface RankingsResponseTablesPropertiesItemsMetricsItem { } // @public -export type RateLimitRule = CustomRule & { - rateLimitThreshold: number; +export interface RateLimitRule extends CustomRule { rateLimitDurationInMinutes: number; -}; + rateLimitThreshold: number; +} // @public export interface RateLimitRuleList { @@ -3876,7 +3616,7 @@ export interface ResourceUsage { readonly currentValue?: number; readonly limit?: number; readonly resourceType?: string; - readonly unit?: string; + readonly unit?: ResourceUsageUnit; } // @public @@ -3904,6 +3644,9 @@ export interface ResourceUsageOperations { list(options?: ResourceUsageListOptionalParams): PagedAsyncIterableIterator; } +// @public +export type ResourceUsageUnit = string; + // @public export type ResponseBasedDetectedErrorTypes = "None" | "TcpErrorsOnly" | "TcpAndHttpErrors"; @@ -3915,22 +3658,22 @@ export interface ResponseBasedOriginErrorDetectionParameters { } // @public -export type Route = ProxyResource & { - readonly endpointName?: string; +export interface Route extends ProxyResource { + cacheConfiguration?: AfdRouteCacheConfiguration; customDomains?: ActivatedResourceReference[]; + readonly deploymentStatus?: DeploymentStatus; + enabledState?: EnabledState; + readonly endpointName?: string; + forwardingProtocol?: ForwardingProtocol; + httpsRedirect?: HttpsRedirect; + linkToDefaultDomain?: LinkToDefaultDomain; originGroup?: ResourceReference; originPath?: string; - ruleSets?: ResourceReference[]; - supportedProtocols?: AFDEndpointProtocols[]; patternsToMatch?: string[]; - cacheConfiguration?: AfdRouteCacheConfiguration; - forwardingProtocol?: ForwardingProtocol; - linkToDefaultDomain?: LinkToDefaultDomain; - httpsRedirect?: HttpsRedirect; - enabledState?: EnabledState; readonly provisioningState?: AfdProvisioningState; - readonly deploymentStatus?: DeploymentStatus; -}; + ruleSets?: ResourceReference[]; + supportedProtocols?: AFDEndpointProtocols[]; +} // @public export interface RouteConfigurationOverrideActionParameters { @@ -3947,7 +3690,8 @@ export interface RouteListResult { } // @public -export type RouteProperties = RouteUpdatePropertiesParameters & AFDStateProperties & {}; +export interface RouteProperties extends RouteUpdatePropertiesParameters, AFDStateProperties { +} // @public export interface Routes { @@ -4039,15 +3783,15 @@ export interface RouteUpdatePropertiesParameters { } // @public -export type Rule = ProxyResource & { - readonly ruleSetName?: string; - order?: number; - conditions?: DeliveryRuleConditionUnion[]; +export interface Rule extends ProxyResource { actions?: DeliveryRuleActionAutoGeneratedUnion[]; + conditions?: DeliveryRuleConditionUnion[]; + readonly deploymentStatus?: DeploymentStatus; matchProcessingBehavior?: MatchProcessingBehavior; + order?: number; readonly provisioningState?: AfdProvisioningState; - readonly deploymentStatus?: DeploymentStatus; -}; + readonly ruleSetName?: string; +} // @public export type RuleCacheBehavior = string; @@ -4062,7 +3806,8 @@ export interface RuleListResult { } // @public -export type RuleProperties = RuleUpdatePropertiesParameters & AFDStateProperties & {}; +export interface RuleProperties extends RuleUpdatePropertiesParameters, AFDStateProperties { +} // @public export type RuleQueryStringCachingBehavior = string; @@ -4095,11 +3840,11 @@ export interface RulesDeleteOptionalParams extends coreClient.OperationOptions { } // @public -export type RuleSet = ProxyResource & { - readonly provisioningState?: AfdProvisioningState; +export interface RuleSet extends ProxyResource { readonly deploymentStatus?: DeploymentStatus; readonly profileName?: string; -}; + readonly provisioningState?: AfdProvisioningState; +} // @public export interface RuleSetListResult { @@ -4108,9 +3853,9 @@ export interface RuleSetListResult { } // @public -export type RuleSetProperties = AFDStateProperties & { +export interface RuleSetProperties extends AFDStateProperties { readonly profileName?: string; -}; +} // @public export interface RuleSets { @@ -4219,12 +3964,12 @@ export interface RuleUpdatePropertiesParameters { } // @public -export type Secret = ProxyResource & { - readonly provisioningState?: AfdProvisioningState; +export interface Secret extends ProxyResource { readonly deploymentStatus?: DeploymentStatus; - readonly profileName?: string; parameters?: SecretParametersUnion; -}; + readonly profileName?: string; + readonly provisioningState?: AfdProvisioningState; +} // @public export interface SecretListResult { @@ -4241,10 +3986,10 @@ export interface SecretParameters { export type SecretParametersUnion = SecretParameters | UrlSigningKeyParameters | ManagedCertificateParameters | CustomerCertificateParameters | AzureFirstPartyManagedCertificateParameters; // @public -export type SecretProperties = AFDStateProperties & { - readonly profileName?: string; +export interface SecretProperties extends AFDStateProperties { parameters?: SecretParametersUnion; -}; + readonly profileName?: string; +} // @public export interface Secrets { @@ -4353,12 +4098,12 @@ export interface SecurityPoliciesPatchOptionalParams extends coreClient.Operatio export type SecurityPoliciesPatchResponse = SecurityPolicy; // @public -export type SecurityPolicy = ProxyResource & { - readonly provisioningState?: AfdProvisioningState; +export interface SecurityPolicy extends ProxyResource { readonly deploymentStatus?: DeploymentStatus; - readonly profileName?: string; parameters?: SecurityPolicyPropertiesParametersUnion; -}; + readonly profileName?: string; + readonly provisioningState?: AfdProvisioningState; +} // @public export interface SecurityPolicyListResult { @@ -4367,10 +4112,10 @@ export interface SecurityPolicyListResult { } // @public -export type SecurityPolicyProperties = AFDStateProperties & { - readonly profileName?: string; +export interface SecurityPolicyProperties extends AFDStateProperties { parameters?: SecurityPolicyPropertiesParametersUnion; -}; + readonly profileName?: string; +} // @public export interface SecurityPolicyPropertiesParameters { @@ -4395,11 +4140,11 @@ export interface SecurityPolicyWebApplicationFirewallAssociation { } // @public -export type SecurityPolicyWebApplicationFirewallParameters = SecurityPolicyPropertiesParameters & { +export interface SecurityPolicyWebApplicationFirewallParameters extends SecurityPolicyPropertiesParameters { + associations?: SecurityPolicyWebApplicationFirewallAssociation[]; type: "WebApplicationFirewall"; wafPolicy?: ResourceReference; - associations?: SecurityPolicyWebApplicationFirewallAssociation[]; -}; +} // @public export interface ServerPortMatchConditionParameters { @@ -4493,12 +4238,12 @@ export interface SystemData { } // @public -export type TrackedResource = Resource & { +export interface TrackedResource extends Resource { location: string; tags?: { [propertyName: string]: string; }; -}; +} // @public export type Transform = string; @@ -4549,10 +4294,10 @@ export interface UrlPathMatchConditionParameters { export type UrlPathOperator = string; // @public -export type UrlRedirectAction = DeliveryRuleActionAutoGenerated & { +export interface UrlRedirectAction extends DeliveryRuleActionAutoGenerated { name: "UrlRedirect"; parameters: UrlRedirectActionParameters; -}; +} // @public export interface UrlRedirectActionParameters { @@ -4567,10 +4312,10 @@ export interface UrlRedirectActionParameters { } // @public -export type UrlRewriteAction = DeliveryRuleActionAutoGenerated & { +export interface UrlRewriteAction extends DeliveryRuleActionAutoGenerated { name: "UrlRewrite"; parameters: UrlRewriteActionParameters; -}; +} // @public export interface UrlRewriteActionParameters { @@ -4582,10 +4327,10 @@ export interface UrlRewriteActionParameters { } // @public -export type UrlSigningAction = DeliveryRuleActionAutoGenerated & { +export interface UrlSigningAction extends DeliveryRuleActionAutoGenerated { name: "UrlSigning"; parameters: UrlSigningActionParameters; -}; +} // @public export interface UrlSigningActionParameters { @@ -4602,12 +4347,12 @@ export interface UrlSigningKey { } // @public -export type UrlSigningKeyParameters = SecretParameters & { - type: "UrlSigningKey"; +export interface UrlSigningKeyParameters extends SecretParameters { keyId: string; secretSource: ResourceReference; secretVersion?: string; -}; + type: "UrlSigningKey"; +} // @public export interface UrlSigningParamIdentifier { @@ -4640,10 +4385,10 @@ export interface UsagesListResult { export type UsageUnit = string; // @public -export type UserManagedHttpsParameters = CustomDomainHttpsParameters & { +export interface UserManagedHttpsParameters extends CustomDomainHttpsParameters { certificateSource: "AzureKeyVault"; certificateSourceParameters: KeyVaultCertificateSourceParameters; -}; +} // @public export interface Validate { diff --git a/sdk/cdn/arm-cdn/src/cdnManagementClient.ts b/sdk/cdn/arm-cdn/src/cdnManagementClient.ts index db4adbcc2ae2..bba070889166 100644 --- a/sdk/cdn/arm-cdn/src/cdnManagementClient.ts +++ b/sdk/cdn/arm-cdn/src/cdnManagementClient.ts @@ -7,6 +7,12 @@ */ import * as coreClient from "@azure/core-client"; +import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { AfdProfilesImpl, @@ -105,12 +111,15 @@ export class CdnManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-cdn/7.0.2`; + const packageDetails = `azsdk-js-arm-cdn/8.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; + if (!options.credentialScopes) { + options.credentialScopes = ["https://management.azure.com/.default"]; + } const optionsWithDefaults = { ...defaults, ...options, @@ -121,12 +130,35 @@ export class CdnManagementClient extends coreClient.ServiceClient { options.endpoint ?? options.baseUri ?? "https://management.azure.com" }; super(optionsWithDefaults); + + if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + (pipelinePolicy) => + pipelinePolicy.name === + coreRestPipeline.bearerTokenAuthenticationPolicyName + ); + if (!bearerTokenAuthenticationPolicyFound) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + scopes: `${optionsWithDefaults.baseUri}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); + } + } // Parameter assignments this.subscriptionId = subscriptionId; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-06-01"; + this.apiVersion = options.apiVersion || "2022-11-01-preview"; this.afdProfiles = new AfdProfilesImpl(this); this.afdCustomDomains = new AfdCustomDomainsImpl(this); this.afdEndpoints = new AfdEndpointsImpl(this); @@ -149,6 +181,35 @@ export class CdnManagementClient extends coreClient.ServiceClient { this.edgeNodes = new EdgeNodesImpl(this); this.policies = new PoliciesImpl(this); this.managedRuleSets = new ManagedRuleSetsImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return "api-version=" + apiVersion; + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); } /** diff --git a/sdk/cdn/arm-cdn/src/models/index.ts b/sdk/cdn/arm-cdn/src/models/index.ts index 697542b9b162..f231081e9892 100644 --- a/sdk/cdn/arm-cdn/src/models/index.ts +++ b/sdk/cdn/arm-cdn/src/models/index.ts @@ -975,6 +975,81 @@ export interface ProfileUpdateParameters { 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 { + /** + * 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 { + /** + * 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; + errors?: MigrationErrorType[]; +} + /** The URI required to login to the supplemental portal from the Azure portal. */ export interface SsoUri { /** @@ -1012,10 +1087,10 @@ export interface ResourceUsage { */ readonly resourceType?: string; /** - * Unit of the usage. e.g. Count. + * Unit of the usage. e.g. count. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly unit?: string; + readonly unit?: ResourceUsageUnit; /** * Actual value of usage on the specified resource type. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1104,14 +1179,14 @@ export interface HttpErrorRangeParameters { end?: number; } -/** The JSON object that contains the properties to secure a custom domain. */ -export interface CustomDomainHttpsParameters { - /** Polymorphic discriminator, which specifies the different types this object can be */ - certificateSource: "Cdn" | "AzureKeyVault"; - /** Defines the TLS extension protocol that is used for secure delivery. */ - protocolType: ProtocolType; - /** TLS protocol version that will be used for Https */ - minimumTlsVersion?: MinimumTlsVersion; +/** Custom domains created on the CDN endpoint. */ +export interface DeepCreatedCustomDomain { + /** Custom domain name. */ + name: string; + /** The host name of the custom domain. Must be a domain name. */ + hostName?: string; + /** Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. */ + validationData?: string; } /** The JSON object containing endpoint update parameters. */ @@ -1360,6 +1435,16 @@ export interface CustomDomainListResult { nextLink?: string; } +/** The JSON object that contains the properties to secure a custom domain. */ +export interface CustomDomainHttpsParameters { + /** Polymorphic discriminator, which specifies the different types this object can be */ + certificateSource: "Cdn" | "AzureKeyVault"; + /** Defines the TLS extension protocol that is used for secure delivery. */ + protocolType: ProtocolType; + /** TLS protocol version that will be used for Https */ + minimumTlsVersion?: MinimumTlsVersion; +} + /** The customDomain JSON object required for custom domain creation or update. */ export interface CustomDomainParameters { /** The host name of the custom domain. Must be a domain name. */ @@ -1631,7 +1716,7 @@ export interface ManagedRuleSet { export interface ManagedRuleGroupOverride { /** Describes the managed rule group within the rule set to override */ ruleGroupName: string; - /** List of rules that will be disabled. If none specified, all rules in the group will be disabled. */ + /** List of rules that will be enabled. If none specified, all rules in the group will be disabled. */ rules?: ManagedRuleOverride[]; } @@ -2125,61 +2210,69 @@ export interface KeyVaultCertificateSourceParameters { } /** The JSON object that contains the properties of the domain to create. */ -export type AFDDomainProperties = 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; - /** - * Values the customer needs to validate domain ownership - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly validationProperties?: DomainValidationProperties; - }; +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. + */ + readonly validationProperties?: DomainValidationProperties; +} /** The JSON object that contains the properties required to create an endpoint. */ -export type AFDEndpointProperties = AFDEndpointPropertiesUpdateParameters & - AFDStateProperties & { - /** - * 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; - }; +export interface AFDEndpointProperties + extends AFDEndpointPropertiesUpdateParameters, + AFDStateProperties { + /** + * 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; +} /** The JSON object that contains the properties of the origin group. */ -export type AFDOriginGroupProperties = AFDOriginGroupUpdatePropertiesParameters & - AFDStateProperties & {}; +export interface AFDOriginGroupProperties + extends AFDOriginGroupUpdatePropertiesParameters, + AFDStateProperties {} /** The JSON object that contains the properties of the origin. */ -export type AFDOriginProperties = AFDOriginUpdatePropertiesParameters & - AFDStateProperties & {}; +export interface AFDOriginProperties + extends AFDOriginUpdatePropertiesParameters, + AFDStateProperties {} /** The JSON object that contains the properties of the Routes to create. */ -export type RouteProperties = RouteUpdatePropertiesParameters & - AFDStateProperties & {}; +export interface RouteProperties + extends RouteUpdatePropertiesParameters, + AFDStateProperties {} /** The JSON object that contains the properties of the Rule Set to create. */ -export type RuleSetProperties = AFDStateProperties & { +export interface RuleSetProperties extends AFDStateProperties { /** * The name of the profile which holds the rule set. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly profileName?: string; -}; +} /** The JSON object that contains the properties of the Rules to create. */ -export type RuleProperties = RuleUpdatePropertiesParameters & - AFDStateProperties & {}; +export interface RuleProperties + extends RuleUpdatePropertiesParameters, + AFDStateProperties {} /** The json object that contains properties required to create a security policy */ -export type SecurityPolicyProperties = AFDStateProperties & { +export interface SecurityPolicyProperties extends AFDStateProperties { /** * The name of the profile which holds the security policy. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2187,10 +2280,10 @@ export type SecurityPolicyProperties = AFDStateProperties & { readonly profileName?: string; /** object which contains security policy parameters */ parameters?: SecurityPolicyPropertiesParametersUnion; -}; +} /** The JSON object that contains the properties of the Secret to create. */ -export type SecretProperties = AFDStateProperties & { +export interface SecretProperties extends AFDStateProperties { /** * The name of the profile which holds the secret. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2198,21 +2291,21 @@ export type SecretProperties = AFDStateProperties & { readonly profileName?: string; /** object which contains secret parameters */ parameters?: SecretParametersUnion; -}; +} /** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags */ -export type ProxyResource = Resource & {}; +export interface ProxyResource extends Resource {} /** The resource model definition for a ARM tracked top level resource. */ -export type TrackedResource = Resource & { +export interface TrackedResource extends Resource { /** Resource location. */ location: string; /** Resource tags. */ tags?: { [propertyName: string]: string }; -}; +} /** Describes a managed rule set definition. */ -export type ManagedRuleSetDefinition = Resource & { +export interface ManagedRuleSetDefinition extends Resource { /** The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. */ sku?: Sku; /** @@ -2235,244 +2328,261 @@ export type ManagedRuleSetDefinition = Resource & { * 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 type DeliveryRuleRemoteAddressCondition = DeliveryRuleCondition & { +export interface DeliveryRuleRemoteAddressCondition + extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "RemoteAddress"; /** Defines the parameters for the condition. */ parameters: RemoteAddressMatchConditionParameters; -}; +} /** Defines the RequestMethod condition for the delivery rule. */ -export type DeliveryRuleRequestMethodCondition = DeliveryRuleCondition & { +export interface DeliveryRuleRequestMethodCondition + extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "RequestMethod"; /** Defines the parameters for the condition. */ parameters: RequestMethodMatchConditionParameters; -}; +} /** Defines the QueryString condition for the delivery rule. */ -export type DeliveryRuleQueryStringCondition = DeliveryRuleCondition & { +export interface DeliveryRuleQueryStringCondition + extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "QueryString"; /** Defines the parameters for the condition. */ parameters: QueryStringMatchConditionParameters; -}; +} /** Defines the PostArgs condition for the delivery rule. */ -export type DeliveryRulePostArgsCondition = DeliveryRuleCondition & { +export interface DeliveryRulePostArgsCondition extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "PostArgs"; /** Defines the parameters for the condition. */ parameters: PostArgsMatchConditionParameters; -}; +} /** Defines the RequestUri condition for the delivery rule. */ -export type DeliveryRuleRequestUriCondition = DeliveryRuleCondition & { +export interface DeliveryRuleRequestUriCondition extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "RequestUri"; /** Defines the parameters for the condition. */ parameters: RequestUriMatchConditionParameters; -}; +} /** Defines the RequestHeader condition for the delivery rule. */ -export type DeliveryRuleRequestHeaderCondition = DeliveryRuleCondition & { +export interface DeliveryRuleRequestHeaderCondition + extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "RequestHeader"; /** Defines the parameters for the condition. */ parameters: RequestHeaderMatchConditionParameters; -}; +} /** Defines the RequestBody condition for the delivery rule. */ -export type DeliveryRuleRequestBodyCondition = DeliveryRuleCondition & { +export interface DeliveryRuleRequestBodyCondition + extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "RequestBody"; /** Defines the parameters for the condition. */ parameters: RequestBodyMatchConditionParameters; -}; +} /** Defines the RequestScheme condition for the delivery rule. */ -export type DeliveryRuleRequestSchemeCondition = DeliveryRuleCondition & { +export interface DeliveryRuleRequestSchemeCondition + extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "RequestScheme"; /** Defines the parameters for the condition. */ parameters: RequestSchemeMatchConditionParameters; -}; +} /** Defines the UrlPath condition for the delivery rule. */ -export type DeliveryRuleUrlPathCondition = DeliveryRuleCondition & { +export interface DeliveryRuleUrlPathCondition extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "UrlPath"; /** Defines the parameters for the condition. */ parameters: UrlPathMatchConditionParameters; -}; +} /** Defines the UrlFileExtension condition for the delivery rule. */ -export type DeliveryRuleUrlFileExtensionCondition = DeliveryRuleCondition & { +export interface DeliveryRuleUrlFileExtensionCondition + extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "UrlFileExtension"; /** Defines the parameters for the condition. */ parameters: UrlFileExtensionMatchConditionParameters; -}; +} /** Defines the UrlFileName condition for the delivery rule. */ -export type DeliveryRuleUrlFileNameCondition = DeliveryRuleCondition & { +export interface DeliveryRuleUrlFileNameCondition + extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "UrlFileName"; /** Defines the parameters for the condition. */ parameters: UrlFileNameMatchConditionParameters; -}; +} /** Defines the HttpVersion condition for the delivery rule. */ -export type DeliveryRuleHttpVersionCondition = DeliveryRuleCondition & { +export interface DeliveryRuleHttpVersionCondition + extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "HttpVersion"; /** Defines the parameters for the condition. */ parameters: HttpVersionMatchConditionParameters; -}; +} /** Defines the Cookies condition for the delivery rule. */ -export type DeliveryRuleCookiesCondition = DeliveryRuleCondition & { +export interface DeliveryRuleCookiesCondition extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "Cookies"; /** Defines the parameters for the condition. */ parameters: CookiesMatchConditionParameters; -}; +} /** Defines the IsDevice condition for the delivery rule. */ -export type DeliveryRuleIsDeviceCondition = DeliveryRuleCondition & { +export interface DeliveryRuleIsDeviceCondition extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "IsDevice"; /** Defines the parameters for the condition. */ parameters: IsDeviceMatchConditionParameters; -}; +} /** Defines the SocketAddress condition for the delivery rule. */ -export type DeliveryRuleSocketAddrCondition = DeliveryRuleCondition & { +export interface DeliveryRuleSocketAddrCondition extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "SocketAddr"; /** Defines the parameters for the condition. */ parameters: SocketAddrMatchConditionParameters; -}; +} /** Defines the ClientPort condition for the delivery rule. */ -export type DeliveryRuleClientPortCondition = DeliveryRuleCondition & { +export interface DeliveryRuleClientPortCondition extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "ClientPort"; /** Defines the parameters for the condition. */ parameters: ClientPortMatchConditionParameters; -}; +} /** Defines the ServerPort condition for the delivery rule. */ -export type DeliveryRuleServerPortCondition = DeliveryRuleCondition & { +export interface DeliveryRuleServerPortCondition extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "ServerPort"; /** Defines the parameters for the condition. */ parameters: ServerPortMatchConditionParameters; -}; +} /** Defines the HostName condition for the delivery rule. */ -export type DeliveryRuleHostNameCondition = DeliveryRuleCondition & { +export interface DeliveryRuleHostNameCondition extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "HostName"; /** Defines the parameters for the condition. */ parameters: HostNameMatchConditionParameters; -}; +} /** Defines the SslProtocol condition for the delivery rule. */ -export type DeliveryRuleSslProtocolCondition = DeliveryRuleCondition & { +export interface DeliveryRuleSslProtocolCondition + extends DeliveryRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "SslProtocol"; /** Defines the parameters for the condition. */ parameters: SslProtocolMatchConditionParameters; -}; +} /** Defines the url redirect action for the delivery rule. */ -export type UrlRedirectAction = DeliveryRuleActionAutoGenerated & { +export interface UrlRedirectAction extends DeliveryRuleActionAutoGenerated { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "UrlRedirect"; /** Defines the parameters for the action. */ parameters: UrlRedirectActionParameters; -}; +} /** Defines the url signing action for the delivery rule. */ -export type UrlSigningAction = DeliveryRuleActionAutoGenerated & { +export interface UrlSigningAction extends DeliveryRuleActionAutoGenerated { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "UrlSigning"; /** Defines the parameters for the action. */ parameters: UrlSigningActionParameters; -}; +} /** Defines the origin group override action for the delivery rule. */ -export type OriginGroupOverrideAction = DeliveryRuleActionAutoGenerated & { +export interface OriginGroupOverrideAction + extends DeliveryRuleActionAutoGenerated { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "OriginGroupOverride"; /** Defines the parameters for the action. */ parameters: OriginGroupOverrideActionParameters; -}; +} /** Defines the url rewrite action for the delivery rule. */ -export type UrlRewriteAction = DeliveryRuleActionAutoGenerated & { +export interface UrlRewriteAction extends DeliveryRuleActionAutoGenerated { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "UrlRewrite"; /** Defines the parameters for the action. */ parameters: UrlRewriteActionParameters; -}; +} /** Defines the request header action for the delivery rule. */ -export type DeliveryRuleRequestHeaderAction = DeliveryRuleActionAutoGenerated & { +export interface DeliveryRuleRequestHeaderAction + extends DeliveryRuleActionAutoGenerated { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "ModifyRequestHeader"; /** Defines the parameters for the action. */ parameters: HeaderActionParameters; -}; +} /** Defines the response header action for the delivery rule. */ -export type DeliveryRuleResponseHeaderAction = DeliveryRuleActionAutoGenerated & { +export interface DeliveryRuleResponseHeaderAction + extends DeliveryRuleActionAutoGenerated { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "ModifyResponseHeader"; /** Defines the parameters for the action. */ parameters: HeaderActionParameters; -}; +} /** Defines the cache expiration action for the delivery rule. */ -export type DeliveryRuleCacheExpirationAction = DeliveryRuleActionAutoGenerated & { +export interface DeliveryRuleCacheExpirationAction + extends DeliveryRuleActionAutoGenerated { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "CacheExpiration"; /** Defines the parameters for the action. */ parameters: CacheExpirationActionParameters; -}; +} /** Defines the cache-key query string action for the delivery rule. */ -export type DeliveryRuleCacheKeyQueryStringAction = DeliveryRuleActionAutoGenerated & { +export interface DeliveryRuleCacheKeyQueryStringAction + extends DeliveryRuleActionAutoGenerated { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "CacheKeyQueryString"; /** Defines the parameters for the action. */ parameters: CacheKeyQueryStringActionParameters; -}; +} /** Defines the route configuration override action for the delivery rule. Only applicable to Frontdoor Standard/Premium Profiles. */ -export type DeliveryRuleRouteConfigurationOverrideAction = DeliveryRuleActionAutoGenerated & { +export interface DeliveryRuleRouteConfigurationOverrideAction + extends DeliveryRuleActionAutoGenerated { /** Polymorphic discriminator, which specifies the different types this object can be */ name: "RouteConfigurationOverride"; /** Defines the parameters for the action. */ parameters: RouteConfigurationOverrideActionParameters; -}; +} /** The json object containing security policy waf parameters */ -export type SecurityPolicyWebApplicationFirewallParameters = SecurityPolicyPropertiesParameters & { +export interface SecurityPolicyWebApplicationFirewallParameters + extends SecurityPolicyPropertiesParameters { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "WebApplicationFirewall"; /** Resource ID. */ wafPolicy?: ResourceReference; /** Waf associations */ associations?: SecurityPolicyWebApplicationFirewallAssociation[]; -}; +} /** Url signing key parameters */ -export type UrlSigningKeyParameters = SecretParameters & { +export interface UrlSigningKeyParameters extends SecretParameters { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "UrlSigningKey"; /** Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. */ @@ -2481,10 +2591,10 @@ export type UrlSigningKeyParameters = SecretParameters & { secretSource: ResourceReference; /** Version of the secret to be used */ secretVersion?: string; -}; +} /** Managed Certificate used for https */ -export type ManagedCertificateParameters = SecretParameters & { +export interface ManagedCertificateParameters extends SecretParameters { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "ManagedCertificate"; /** @@ -2497,10 +2607,10 @@ export type ManagedCertificateParameters = SecretParameters & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly expirationDate?: string; -}; +} /** Customer Certificate used for https */ -export type CustomerCertificateParameters = SecretParameters & { +export interface CustomerCertificateParameters extends SecretParameters { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "CustomerCertificate"; /** 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}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ */ @@ -2531,32 +2641,17 @@ export type CustomerCertificateParameters = SecretParameters & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly thumbprint?: string; -}; +} /** Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. */ -export type AzureFirstPartyManagedCertificateParameters = SecretParameters & { +export interface AzureFirstPartyManagedCertificateParameters + extends SecretParameters { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "AzureFirstPartyManagedCertificate"; -}; - -/** Defines the certificate source parameters using CDN managed certificate for enabling SSL. */ -export type CdnManagedHttpsParameters = CustomDomainHttpsParameters & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - certificateSource: "Cdn"; - /** Defines the certificate source parameters using CDN managed certificate for enabling SSL. */ - certificateSourceParameters: CdnCertificateSourceParameters; -}; - -/** Defines the certificate source parameters using user's keyvault certificate for enabling SSL. */ -export type UserManagedHttpsParameters = CustomDomainHttpsParameters & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - certificateSource: "AzureKeyVault"; - /** Defines the certificate source parameters using user's keyvault certificate for enabling SSL. */ - certificateSourceParameters: KeyVaultCertificateSourceParameters; -}; +} /** The JSON object that contains the properties required to create an endpoint. */ -export type EndpointProperties = EndpointPropertiesUpdateParameters & { +export interface EndpointProperties extends EndpointPropertiesUpdateParameters { /** * 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. @@ -2570,7 +2665,7 @@ export type EndpointProperties = EndpointPropertiesUpdateParameters & { * The custom domains under the endpoint. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly customDomains?: CustomDomain[]; + readonly customDomains?: DeepCreatedCustomDomain[]; /** * Resource status of the endpoint. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2580,11 +2675,11 @@ export type EndpointProperties = EndpointPropertiesUpdateParameters & { * Provisioning status of the endpoint. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; -}; + readonly provisioningState?: EndpointProvisioningState; +} /** The JSON object that contains the properties of the origin. */ -export type OriginProperties = OriginUpdatePropertiesParameters & { +export interface OriginProperties extends OriginUpdatePropertiesParameters { /** * Resource status of the origin. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2594,16 +2689,17 @@ export type OriginProperties = OriginUpdatePropertiesParameters & { * Provisioning status of the origin. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: OriginProvisioningState; /** * The approval status for the connection to the Private Link * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly privateEndpointStatus?: PrivateEndpointStatus; -}; +} /** The JSON object that contains the properties of the origin group. */ -export type OriginGroupProperties = OriginGroupUpdatePropertiesParameters & { +export interface OriginGroupProperties + extends OriginGroupUpdatePropertiesParameters { /** * Resource status of the origin group. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2613,22 +2709,39 @@ export type OriginGroupProperties = OriginGroupUpdatePropertiesParameters & { * Provisioning status of the origin group. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; -}; + readonly provisioningState?: OriginGroupProvisioningState; +} + +/** Defines the certificate source parameters using CDN managed certificate for enabling SSL. */ +export interface CdnManagedHttpsParameters extends CustomDomainHttpsParameters { + /** Polymorphic discriminator, which specifies the different types this object can be */ + certificateSource: "Cdn"; + /** Defines the certificate source parameters using CDN managed certificate for enabling SSL. */ + certificateSourceParameters: CdnCertificateSourceParameters; +} + +/** Defines the certificate source parameters using user's keyvault certificate for enabling SSL. */ +export interface UserManagedHttpsParameters + extends CustomDomainHttpsParameters { + /** Polymorphic discriminator, which specifies the different types this object can be */ + certificateSource: "AzureKeyVault"; + /** Defines the certificate source parameters using user's keyvault certificate for enabling SSL. */ + certificateSourceParameters: KeyVaultCertificateSourceParameters; +} /** Defines a rate limiting rule that can be included in a waf policy */ -export type RateLimitRule = CustomRule & { +export interface RateLimitRule extends CustomRule { /** Defines rate limit threshold. */ rateLimitThreshold: number; /** Defines rate limit duration. Default is 1 minute. */ rateLimitDurationInMinutes: number; -}; +} /** Managed Certificate used for https */ -export type ManagedCertificate = Certificate & {}; +export interface ManagedCertificate extends Certificate {} /** Customer Certificate used for https */ -export type CustomerCertificate = Certificate & { +export interface CustomerCertificate extends Certificate { /** 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}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ */ secretSource?: ResourceReference; /** Certificate version. */ @@ -2647,13 +2760,13 @@ export type CustomerCertificate = Certificate & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly thumbprint?: string; -}; +} /** Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. */ -export type AzureFirstPartyManagedCertificate = Certificate & {}; +export interface AzureFirstPartyManagedCertificate extends Certificate {} /** Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. */ -export type AFDDomain = ProxyResource & { +export interface AFDDomain extends ProxyResource { /** * The name of the profile which holds the domain. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2679,15 +2792,17 @@ export type AFDDomain = 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. */ readonly validationProperties?: DomainValidationProperties; -}; +} /** AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. */ -export type AFDOriginGroup = ProxyResource & { +export interface AFDOriginGroup extends ProxyResource { /** * The name of the profile which holds the origin group. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2708,10 +2823,10 @@ export type AFDOriginGroup = ProxyResource & { readonly provisioningState?: AfdProvisioningState; /** NOTE: This property will not be serialized. It can only be populated by the server. */ 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. */ -export type AFDOrigin = ProxyResource & { +export interface AFDOrigin extends ProxyResource { /** * The name of the origin group which contains this origin. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2744,10 +2859,10 @@ export type AFDOrigin = ProxyResource & { readonly provisioningState?: AfdProvisioningState; /** NOTE: This property will not be serialized. It can only be populated by the server. */ readonly deploymentStatus?: DeploymentStatus; -}; +} /** Friendly Routes name mapping to the any Routes or secret related information. */ -export type Route = ProxyResource & { +export interface Route extends ProxyResource { /** * The name of the endpoint which holds the route. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2782,10 +2897,10 @@ export type Route = ProxyResource & { readonly provisioningState?: AfdProvisioningState; /** NOTE: This property will not be serialized. It can only be populated by the server. */ readonly deploymentStatus?: DeploymentStatus; -}; +} /** Friendly RuleSet name mapping to the any RuleSet or secret related information. */ -export type RuleSet = ProxyResource & { +export interface RuleSet extends ProxyResource { /** * Provisioning status * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2798,10 +2913,10 @@ export type RuleSet = ProxyResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly profileName?: string; -}; +} /** Friendly Rules name mapping to the any Rules or secret related information. */ -export type Rule = ProxyResource & { +export interface Rule extends ProxyResource { /** * The name of the rule set containing the rule. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2822,10 +2937,10 @@ export type Rule = ProxyResource & { readonly provisioningState?: AfdProvisioningState; /** NOTE: This property will not be serialized. It can only be populated by the server. */ readonly deploymentStatus?: DeploymentStatus; -}; +} /** SecurityPolicy association for AzureFrontDoor profile */ -export type SecurityPolicy = ProxyResource & { +export interface SecurityPolicy extends ProxyResource { /** * Provisioning status * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2840,10 +2955,10 @@ export type SecurityPolicy = ProxyResource & { readonly profileName?: string; /** object which contains security policy parameters */ parameters?: SecurityPolicyPropertiesParametersUnion; -}; +} /** Friendly Secret name mapping to the any Secret or secret related information. */ -export type Secret = ProxyResource & { +export interface Secret extends ProxyResource { /** * Provisioning status * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2858,40 +2973,10 @@ export type Secret = ProxyResource & { readonly profileName?: string; /** object which contains secret parameters */ parameters?: SecretParametersUnion; -}; - -/** Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. */ -export type CustomDomain = ProxyResource & { - /** The host name of the custom domain. Must be a domain name. */ - hostName?: string; - /** - * Resource status of the custom domain. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceState?: CustomDomainResourceState; - /** - * Provisioning status of Custom Https of the custom domain. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly customHttpsProvisioningState?: CustomHttpsProvisioningState; - /** - * Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly customHttpsProvisioningSubstate?: CustomHttpsProvisioningSubstate; - /** Certificate parameters for securing custom HTTPS */ - customHttpsParameters?: CustomDomainHttpsParametersUnion; - /** Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. */ - validationData?: string; - /** - * Provisioning status of the custom domain. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; -}; +} /** 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. */ -export type Origin = ProxyResource & { +export interface Origin extends ProxyResource { /** The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. */ hostName?: string; /** The value of the HTTP port. Must be between 1 and 65535. */ @@ -2923,16 +3008,16 @@ export type Origin = ProxyResource & { * Provisioning status of the origin. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: OriginProvisioningState; /** * The approval status for the connection to the Private Link * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly privateEndpointStatus?: PrivateEndpointStatus; -}; +} /** Origin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. */ -export type OriginGroup = ProxyResource & { +export interface OriginGroup extends ProxyResource { /** Health probe settings to the origin that is used to determine the health of the origin. */ healthProbeSettings?: HealthProbeParameters; /** The source of the content being delivered via CDN within given origin group. */ @@ -2950,17 +3035,47 @@ export type OriginGroup = ProxyResource & { * Provisioning status of the origin group. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; -}; + readonly provisioningState?: OriginGroupProvisioningState; +} + +/** Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. */ +export interface CustomDomain extends ProxyResource { + /** The host name of the custom domain. Must be a domain name. */ + hostName?: string; + /** + * Resource status of the custom domain. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceState?: CustomDomainResourceState; + /** + * Provisioning status of the custom domain. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly customHttpsProvisioningState?: CustomHttpsProvisioningState; + /** + * Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly customHttpsProvisioningSubstate?: CustomHttpsProvisioningSubstate; + /** Certificate parameters for securing custom HTTPS */ + customHttpsParameters?: CustomDomainHttpsParametersUnion; + /** Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. */ + validationData?: string; + /** + * Provisioning status of Custom Https of the custom domain. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: CustomHttpsProvisioningState; +} /** Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. */ -export type EdgeNode = ProxyResource & { +export interface EdgeNode extends ProxyResource { /** List of ip address groups. */ 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 type AFDEndpoint = TrackedResource & { +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. @@ -2982,10 +3097,10 @@ export type AFDEndpoint = TrackedResource & { readonly hostName?: string; /** Indicates the endpoint name reuse scope. The default value is TenantReuse. */ autoGeneratedDomainNameLabelScope?: AutoGeneratedDomainNameLabelScope; -}; +} /** A profile is a logical grouping of endpoints that share the same settings. */ -export type Profile = TrackedResource & { +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; /** @@ -3002,7 +3117,9 @@ export type Profile = TrackedResource & { * Provisioning status of the profile. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProfileProvisioningState; + /** Key-Value pair representing additional properties for profiles. */ + extendedProperties?: { [propertyName: string]: string }; /** * The Id of the frontdoor. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -3010,10 +3127,10 @@ export type Profile = TrackedResource & { readonly frontDoorId?: string; /** Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. */ originResponseTimeoutSeconds?: number; -}; +} /** 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 type Endpoint = TrackedResource & { +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. */ @@ -3055,7 +3172,7 @@ export type Endpoint = TrackedResource & { * The custom domains under the endpoint. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly customDomains?: CustomDomain[]; + readonly customDomains?: DeepCreatedCustomDomain[]; /** * Resource status of the endpoint. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -3065,11 +3182,11 @@ export type Endpoint = TrackedResource & { * Provisioning status of the endpoint. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; -}; + readonly provisioningState?: EndpointProvisioningState; +} /** Defines web application firewall policy for Azure CDN. */ -export type CdnWebApplicationFirewallPolicy = TrackedResource & { +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. */ @@ -3087,6 +3204,8 @@ export type CdnWebApplicationFirewallPolicy = TrackedResource & { * 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. @@ -3097,11 +3216,23 @@ export type CdnWebApplicationFirewallPolicy = TrackedResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly resourceState?: PolicyResourceState; -}; +} + +/** Defines headers for Profiles_migrate operation. */ +export interface ProfilesMigrateHeaders { + location?: string; +} + +/** Defines headers for Profiles_migrationCommit operation. */ +export interface ProfilesMigrationCommitHeaders { + location?: string; +} /** Known values of {@link ResourceType} that the service accepts. */ export enum KnownResourceType { + /** MicrosoftCdnProfilesEndpoints */ MicrosoftCdnProfilesEndpoints = "Microsoft.Cdn/Profiles/Endpoints", + /** MicrosoftCdnProfilesAfdEndpoints */ MicrosoftCdnProfilesAfdEndpoints = "Microsoft.Cdn/Profiles/AfdEndpoints" } @@ -3117,9 +3248,13 @@ export type ResourceType = string; /** Known values of {@link AutoGeneratedDomainNameLabelScope} that the service accepts. */ export enum KnownAutoGeneratedDomainNameLabelScope { + /** TenantReuse */ TenantReuse = "TenantReuse", + /** SubscriptionReuse */ SubscriptionReuse = "SubscriptionReuse", + /** ResourceGroupReuse */ ResourceGroupReuse = "ResourceGroupReuse", + /** NoReuse */ NoReuse = "NoReuse" } @@ -3137,6 +3272,7 @@ export type AutoGeneratedDomainNameLabelScope = string; /** Known values of {@link UsageUnit} that the service accepts. */ export enum KnownUsageUnit { + /** Count */ Count = "Count" } @@ -3151,14 +3287,23 @@ export type UsageUnit = string; /** Known values of {@link DomainValidationState} that the service accepts. */ export enum KnownDomainValidationState { + /** Unknown */ Unknown = "Unknown", + /** Submitting */ Submitting = "Submitting", + /** Pending */ Pending = "Pending", + /** Rejected */ Rejected = "Rejected", + /** TimedOut */ TimedOut = "TimedOut", + /** PendingRevalidation */ PendingRevalidation = "PendingRevalidation", + /** Approved */ Approved = "Approved", + /** RefreshingValidationToken */ RefreshingValidationToken = "RefreshingValidationToken", + /** InternalError */ InternalError = "InternalError" } @@ -3181,8 +3326,11 @@ export type DomainValidationState = string; /** Known values of {@link AfdCertificateType} that the service accepts. */ export enum KnownAfdCertificateType { + /** CustomerCertificate */ CustomerCertificate = "CustomerCertificate", + /** ManagedCertificate */ ManagedCertificate = "ManagedCertificate", + /** AzureFirstPartyManagedCertificate */ AzureFirstPartyManagedCertificate = "AzureFirstPartyManagedCertificate" } @@ -3199,10 +3347,15 @@ export type AfdCertificateType = string; /** Known values of {@link AfdProvisioningState} that the service accepts. */ export enum KnownAfdProvisioningState { + /** Succeeded */ Succeeded = "Succeeded", + /** Failed */ Failed = "Failed", + /** Updating */ Updating = "Updating", + /** Deleting */ Deleting = "Deleting", + /** Creating */ Creating = "Creating" } @@ -3221,9 +3374,13 @@ export type AfdProvisioningState = string; /** Known values of {@link DeploymentStatus} that the service accepts. */ export enum KnownDeploymentStatus { + /** NotStarted */ NotStarted = "NotStarted", + /** InProgress */ InProgress = "InProgress", + /** Succeeded */ Succeeded = "Succeeded", + /** Failed */ Failed = "Failed" } @@ -3241,9 +3398,13 @@ 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" } @@ -3261,7 +3422,9 @@ export type IdentityType = string; /** Known values of {@link EnabledState} that the service accepts. */ export enum KnownEnabledState { + /** Enabled */ Enabled = "Enabled", + /** Disabled */ Disabled = "Disabled" } @@ -3277,7 +3440,9 @@ export type EnabledState = string; /** Known values of {@link AFDEndpointProtocols} that the service accepts. */ export enum KnownAFDEndpointProtocols { + /** Http */ Http = "Http", + /** Https */ Https = "Https" } @@ -3293,9 +3458,13 @@ export type AFDEndpointProtocols = string; /** Known values of {@link AfdQueryStringCachingBehavior} that the service accepts. */ export enum KnownAfdQueryStringCachingBehavior { + /** IgnoreQueryString */ IgnoreQueryString = "IgnoreQueryString", + /** UseQueryString */ UseQueryString = "UseQueryString", + /** IgnoreSpecifiedQueryStrings */ IgnoreSpecifiedQueryStrings = "IgnoreSpecifiedQueryStrings", + /** IncludeSpecifiedQueryStrings */ IncludeSpecifiedQueryStrings = "IncludeSpecifiedQueryStrings" } @@ -3313,8 +3482,11 @@ export type AfdQueryStringCachingBehavior = string; /** Known values of {@link ForwardingProtocol} that the service accepts. */ export enum KnownForwardingProtocol { + /** HttpOnly */ HttpOnly = "HttpOnly", + /** HttpsOnly */ HttpsOnly = "HttpsOnly", + /** MatchRequest */ MatchRequest = "MatchRequest" } @@ -3331,7 +3503,9 @@ export type ForwardingProtocol = string; /** Known values of {@link LinkToDefaultDomain} that the service accepts. */ export enum KnownLinkToDefaultDomain { + /** Enabled */ Enabled = "Enabled", + /** Disabled */ Disabled = "Disabled" } @@ -3347,7 +3521,9 @@ export type LinkToDefaultDomain = string; /** Known values of {@link HttpsRedirect} that the service accepts. */ export enum KnownHttpsRedirect { + /** Enabled */ Enabled = "Enabled", + /** Disabled */ Disabled = "Disabled" } @@ -3363,24 +3539,43 @@ export type HttpsRedirect = string; /** Known values of {@link MatchVariable} that the service accepts. */ export enum KnownMatchVariable { + /** RemoteAddress */ RemoteAddress = "RemoteAddress", + /** RequestMethod */ RequestMethod = "RequestMethod", + /** QueryString */ QueryString = "QueryString", + /** PostArgs */ PostArgs = "PostArgs", + /** RequestUri */ RequestUri = "RequestUri", + /** RequestHeader */ RequestHeader = "RequestHeader", + /** RequestBody */ RequestBody = "RequestBody", + /** RequestScheme */ RequestScheme = "RequestScheme", + /** UrlPath */ UrlPath = "UrlPath", + /** UrlFileExtension */ UrlFileExtension = "UrlFileExtension", + /** UrlFileName */ UrlFileName = "UrlFileName", + /** HttpVersion */ HttpVersion = "HttpVersion", + /** Cookies */ Cookies = "Cookies", + /** IsDevice */ IsDevice = "IsDevice", + /** SocketAddr */ SocketAddr = "SocketAddr", + /** ClientPort */ ClientPort = "ClientPort", + /** ServerPort */ ServerPort = "ServerPort", + /** HostName */ HostName = "HostName", + /** SslProtocol */ SslProtocol = "SslProtocol" } @@ -3413,14 +3608,23 @@ export type MatchVariable = string; /** Known values of {@link DeliveryRuleAction} that the service accepts. */ export enum KnownDeliveryRuleAction { + /** CacheExpiration */ CacheExpiration = "CacheExpiration", + /** CacheKeyQueryString */ CacheKeyQueryString = "CacheKeyQueryString", + /** ModifyRequestHeader */ ModifyRequestHeader = "ModifyRequestHeader", + /** ModifyResponseHeader */ ModifyResponseHeader = "ModifyResponseHeader", + /** UrlRedirect */ UrlRedirect = "UrlRedirect", + /** UrlRewrite */ UrlRewrite = "UrlRewrite", + /** UrlSigning */ UrlSigning = "UrlSigning", + /** OriginGroupOverride */ OriginGroupOverride = "OriginGroupOverride", + /** RouteConfigurationOverride */ RouteConfigurationOverride = "RouteConfigurationOverride" } @@ -3443,7 +3647,9 @@ export type DeliveryRuleAction = string; /** Known values of {@link MatchProcessingBehavior} that the service accepts. */ export enum KnownMatchProcessingBehavior { + /** Continue */ Continue = "Continue", + /** Stop */ Stop = "Stop" } @@ -3459,6 +3665,7 @@ export type MatchProcessingBehavior = string; /** Known values of {@link SecurityPolicyType} that the service accepts. */ export enum KnownSecurityPolicyType { + /** WebApplicationFirewall */ WebApplicationFirewall = "WebApplicationFirewall" } @@ -3473,9 +3680,13 @@ 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" } @@ -3493,9 +3704,13 @@ 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" } @@ -3513,11 +3728,17 @@ export type Status = string; /** Known values of {@link LogMetric} that the service accepts. */ export enum KnownLogMetric { + /** ClientRequestCount */ ClientRequestCount = "clientRequestCount", + /** ClientRequestTraffic */ ClientRequestTraffic = "clientRequestTraffic", + /** ClientRequestBandwidth */ ClientRequestBandwidth = "clientRequestBandwidth", + /** OriginRequestTraffic */ OriginRequestTraffic = "originRequestTraffic", + /** OriginRequestBandwidth */ OriginRequestBandwidth = "originRequestBandwidth", + /** TotalLatency */ TotalLatency = "totalLatency" } @@ -3537,8 +3758,11 @@ export type LogMetric = string; /** Known values of {@link LogMetricsGranularity} that the service accepts. */ export enum KnownLogMetricsGranularity { + /** PT5M */ PT5M = "PT5M", + /** PT1H */ PT1H = "PT1H", + /** P1D */ P1D = "P1D" } @@ -3555,10 +3779,15 @@ export type LogMetricsGranularity = string; /** Known values of {@link LogMetricsGroupBy} that the service accepts. */ export enum KnownLogMetricsGroupBy { + /** HttpStatusCode */ HttpStatusCode = "httpStatusCode", + /** Protocol */ Protocol = "protocol", + /** CacheStatus */ CacheStatus = "cacheStatus", + /** CountryOrRegion */ CountryOrRegion = "countryOrRegion", + /** CustomDomain */ CustomDomain = "customDomain" } @@ -3577,8 +3806,11 @@ export type LogMetricsGroupBy = string; /** Known values of {@link MetricsResponseGranularity} that the service accepts. */ export enum KnownMetricsResponseGranularity { + /** PT5M */ PT5M = "PT5M", + /** PT1H */ PT1H = "PT1H", + /** P1D */ P1D = "P1D" } @@ -3595,9 +3827,13 @@ export type MetricsResponseGranularity = string; /** Known values of {@link MetricsResponseSeriesItemUnit} that the service accepts. */ export enum KnownMetricsResponseSeriesItemUnit { + /** Count */ Count = "count", + /** Bytes */ Bytes = "bytes", + /** BitsPerSecond */ BitsPerSecond = "bitsPerSecond", + /** MilliSeconds */ MilliSeconds = "milliSeconds" } @@ -3615,10 +3851,15 @@ export type MetricsResponseSeriesItemUnit = string; /** Known values of {@link LogRanking} that the service accepts. */ export enum KnownLogRanking { + /** Url */ Url = "url", + /** Referrer */ Referrer = "referrer", + /** Browser */ Browser = "browser", + /** UserAgent */ UserAgent = "userAgent", + /** CountryOrRegion */ CountryOrRegion = "countryOrRegion" } @@ -3637,11 +3878,17 @@ export type LogRanking = string; /** Known values of {@link LogRankingMetric} that the service accepts. */ export enum KnownLogRankingMetric { + /** ClientRequestCount */ ClientRequestCount = "clientRequestCount", + /** ClientRequestTraffic */ ClientRequestTraffic = "clientRequestTraffic", + /** HitCount */ HitCount = "hitCount", + /** MissCount */ MissCount = "missCount", + /** UserErrorCount */ UserErrorCount = "userErrorCount", + /** ErrorCount */ ErrorCount = "errorCount" } @@ -3661,6 +3908,7 @@ export type LogRankingMetric = string; /** Known values of {@link WafMetric} that the service accepts. */ export enum KnownWafMetric { + /** ClientRequestCount */ ClientRequestCount = "clientRequestCount" } @@ -3675,8 +3923,11 @@ export type WafMetric = string; /** Known values of {@link WafGranularity} that the service accepts. */ export enum KnownWafGranularity { + /** PT5M */ PT5M = "PT5M", + /** PT1H */ PT1H = "PT1H", + /** P1D */ P1D = "P1D" } @@ -3693,9 +3944,13 @@ export type WafGranularity = string; /** Known values of {@link WafAction} that the service accepts. */ export enum KnownWafAction { + /** Allow */ Allow = "allow", + /** Block */ Block = "block", + /** Log */ Log = "log", + /** Redirect */ Redirect = "redirect" } @@ -3713,7 +3968,9 @@ export type WafAction = string; /** Known values of {@link WafRankingGroupBy} that the service accepts. */ export enum KnownWafRankingGroupBy { + /** HttpStatusCode */ HttpStatusCode = "httpStatusCode", + /** CustomDomain */ CustomDomain = "customDomain" } @@ -3729,8 +3986,11 @@ export type WafRankingGroupBy = string; /** Known values of {@link WafRuleType} that the service accepts. */ export enum KnownWafRuleType { + /** Managed */ Managed = "managed", + /** Custom */ Custom = "custom", + /** Bot */ Bot = "bot" } @@ -3747,8 +4007,11 @@ export type WafRuleType = string; /** Known values of {@link WafMetricsResponseGranularity} that the service accepts. */ export enum KnownWafMetricsResponseGranularity { + /** PT5M */ PT5M = "PT5M", + /** PT1H */ PT1H = "PT1H", + /** P1D */ P1D = "P1D" } @@ -3765,13 +4028,21 @@ export type WafMetricsResponseGranularity = string; /** Known values of {@link WafRankingType} that the service accepts. */ export enum KnownWafRankingType { + /** Action */ Action = "action", + /** RuleGroup */ RuleGroup = "ruleGroup", + /** RuleId */ RuleId = "ruleId", + /** UserAgent */ UserAgent = "userAgent", + /** ClientIp */ ClientIp = "clientIp", + /** Url */ Url = "url", + /** CountryOrRegion */ CountryOrRegion = "countryOrRegion", + /** RuleType */ RuleType = "ruleType" } @@ -3793,18 +4064,31 @@ 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", + /** 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" } @@ -3831,10 +4115,24 @@ 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 */ + Disabled = "Disabled", + /** Migrating */ + Migrating = "Migrating", + /** Migrated */ + Migrated = "Migrated", + /** PendingMigrationCommit */ + PendingMigrationCommit = "PendingMigrationCommit", + /** CommittingMigration */ + CommittingMigration = "CommittingMigration", + /** AbortingMigration */ + AbortingMigration = "AbortingMigration" } /** @@ -3845,16 +4143,71 @@ export enum KnownProfileResourceState { * **Creating** \ * **Active** \ * **Deleting** \ - * **Disabled** + * **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 CanMigrateDefaultSku} that the service accepts. */ +export enum KnownCanMigrateDefaultSku { + /** StandardAzureFrontDoor */ + StandardAzureFrontDoor = "Standard_AzureFrontDoor", + /** PremiumAzureFrontDoor */ + PremiumAzureFrontDoor = "Premium_AzureFrontDoor" +} + +/** + * 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_AzureFrontDoor** \ + * **Premium_AzureFrontDoor** + */ +export type CanMigrateDefaultSku = string; + /** Known values of {@link OptimizationType} that the service accepts. */ export enum KnownOptimizationType { + /** GeneralWebDelivery */ GeneralWebDelivery = "GeneralWebDelivery", + /** GeneralMediaStreaming */ GeneralMediaStreaming = "GeneralMediaStreaming", + /** VideoOnDemandMediaStreaming */ VideoOnDemandMediaStreaming = "VideoOnDemandMediaStreaming", + /** LargeFileDownload */ LargeFileDownload = "LargeFileDownload", + /** DynamicSiteAcceleration */ DynamicSiteAcceleration = "DynamicSiteAcceleration" } @@ -3871,12 +4224,32 @@ export enum KnownOptimizationType { */ export type OptimizationType = string; +/** Known values of {@link ResourceUsageUnit} that the service accepts. */ +export enum KnownResourceUsageUnit { + /** Count */ + Count = "count" +} + +/** + * Defines values for ResourceUsageUnit. \ + * {@link KnownResourceUsageUnit} can be used interchangeably with ResourceUsageUnit, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **count** + */ +export type ResourceUsageUnit = string; + /** Known values of {@link PrivateEndpointStatus} that the service accepts. */ export enum KnownPrivateEndpointStatus { + /** Pending */ Pending = "Pending", + /** Approved */ Approved = "Approved", + /** Rejected */ Rejected = "Rejected", + /** Disconnected */ Disconnected = "Disconnected", + /** Timeout */ Timeout = "Timeout" } @@ -3893,10 +4266,166 @@ export enum KnownPrivateEndpointStatus { */ export type PrivateEndpointStatus = string; +/** Known values of {@link EndpointResourceState} that the service accepts. */ +export enum KnownEndpointResourceState { + /** Creating */ + Creating = "Creating", + /** Deleting */ + Deleting = "Deleting", + /** Running */ + Running = "Running", + /** Starting */ + Starting = "Starting", + /** Stopped */ + Stopped = "Stopped", + /** Stopping */ + Stopping = "Stopping" +} + +/** + * Defines values for EndpointResourceState. \ + * {@link KnownEndpointResourceState} can be used interchangeably with EndpointResourceState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating** \ + * **Deleting** \ + * **Running** \ + * **Starting** \ + * **Stopped** \ + * **Stopping** + */ +export type EndpointResourceState = string; + +/** Known values of {@link EndpointProvisioningState} that the service accepts. */ +export enum KnownEndpointProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", + /** Creating */ + Creating = "Creating" +} + +/** + * Defines values for EndpointProvisioningState. \ + * {@link KnownEndpointProvisioningState} can be used interchangeably with EndpointProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Updating** \ + * **Deleting** \ + * **Creating** + */ +export type EndpointProvisioningState = string; + +/** Known values of {@link OriginResourceState} that the service accepts. */ +export enum KnownOriginResourceState { + /** Creating */ + Creating = "Creating", + /** Active */ + Active = "Active", + /** Deleting */ + Deleting = "Deleting" +} + +/** + * Defines values for OriginResourceState. \ + * {@link KnownOriginResourceState} can be used interchangeably with OriginResourceState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating** \ + * **Active** \ + * **Deleting** + */ +export type OriginResourceState = string; + +/** Known values of {@link OriginProvisioningState} that the service accepts. */ +export enum KnownOriginProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", + /** Creating */ + Creating = "Creating" +} + +/** + * Defines values for OriginProvisioningState. \ + * {@link KnownOriginProvisioningState} can be used interchangeably with OriginProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Updating** \ + * **Deleting** \ + * **Creating** + */ +export type OriginProvisioningState = string; + +/** Known values of {@link OriginGroupResourceState} that the service accepts. */ +export enum KnownOriginGroupResourceState { + /** Creating */ + Creating = "Creating", + /** Active */ + Active = "Active", + /** Deleting */ + Deleting = "Deleting" +} + +/** + * Defines values for OriginGroupResourceState. \ + * {@link KnownOriginGroupResourceState} can be used interchangeably with OriginGroupResourceState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating** \ + * **Active** \ + * **Deleting** + */ +export type OriginGroupResourceState = string; + +/** Known values of {@link OriginGroupProvisioningState} that the service accepts. */ +export enum KnownOriginGroupProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", + /** Creating */ + Creating = "Creating" +} + +/** + * Defines values for OriginGroupProvisioningState. \ + * {@link KnownOriginGroupProvisioningState} can be used interchangeably with OriginGroupProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Updating** \ + * **Deleting** \ + * **Creating** + */ +export type OriginGroupProvisioningState = string; + /** Known values of {@link CustomDomainResourceState} that the service accepts. */ export enum KnownCustomDomainResourceState { + /** Creating */ Creating = "Creating", + /** Active */ Active = "Active", + /** Deleting */ Deleting = "Deleting" } @@ -3913,10 +4442,15 @@ export type CustomDomainResourceState = string; /** Known values of {@link CustomHttpsProvisioningState} that the service accepts. */ export enum KnownCustomHttpsProvisioningState { + /** Enabling */ Enabling = "Enabling", + /** Enabled */ Enabled = "Enabled", + /** Disabling */ Disabling = "Disabling", + /** Disabled */ Disabled = "Disabled", + /** Failed */ Failed = "Failed" } @@ -3935,15 +4469,25 @@ export type CustomHttpsProvisioningState = string; /** Known values of {@link CustomHttpsProvisioningSubstate} that the service accepts. */ export enum KnownCustomHttpsProvisioningSubstate { + /** SubmittingDomainControlValidationRequest */ SubmittingDomainControlValidationRequest = "SubmittingDomainControlValidationRequest", + /** PendingDomainControlValidationREquestApproval */ PendingDomainControlValidationREquestApproval = "PendingDomainControlValidationREquestApproval", + /** DomainControlValidationRequestApproved */ DomainControlValidationRequestApproved = "DomainControlValidationRequestApproved", + /** DomainControlValidationRequestRejected */ DomainControlValidationRequestRejected = "DomainControlValidationRequestRejected", + /** DomainControlValidationRequestTimedOut */ DomainControlValidationRequestTimedOut = "DomainControlValidationRequestTimedOut", + /** IssuingCertificate */ IssuingCertificate = "IssuingCertificate", + /** DeployingCertificate */ DeployingCertificate = "DeployingCertificate", + /** CertificateDeployed */ CertificateDeployed = "CertificateDeployed", + /** DeletingCertificate */ DeletingCertificate = "DeletingCertificate", + /** CertificateDeleted */ CertificateDeleted = "CertificateDeleted" } @@ -3967,7 +4511,9 @@ export type CustomHttpsProvisioningSubstate = string; /** Known values of {@link CertificateSource} that the service accepts. */ export enum KnownCertificateSource { + /** AzureKeyVault */ AzureKeyVault = "AzureKeyVault", + /** Cdn */ Cdn = "Cdn" } @@ -3983,7 +4529,9 @@ export type CertificateSource = string; /** Known values of {@link ProtocolType} that the service accepts. */ export enum KnownProtocolType { + /** ServerNameIndication */ ServerNameIndication = "ServerNameIndication", + /** IPBased */ IPBased = "IPBased" } @@ -3997,69 +4545,11 @@ export enum KnownProtocolType { */ export type ProtocolType = string; -/** Known values of {@link EndpointResourceState} that the service accepts. */ -export enum KnownEndpointResourceState { - Creating = "Creating", - Deleting = "Deleting", - Running = "Running", - Starting = "Starting", - Stopped = "Stopped", - Stopping = "Stopping" -} - -/** - * Defines values for EndpointResourceState. \ - * {@link KnownEndpointResourceState} can be used interchangeably with EndpointResourceState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Creating** \ - * **Deleting** \ - * **Running** \ - * **Starting** \ - * **Stopped** \ - * **Stopping** - */ -export type EndpointResourceState = string; - -/** Known values of {@link OriginResourceState} that the service accepts. */ -export enum KnownOriginResourceState { - Creating = "Creating", - Active = "Active", - Deleting = "Deleting" -} - -/** - * Defines values for OriginResourceState. \ - * {@link KnownOriginResourceState} can be used interchangeably with OriginResourceState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Creating** \ - * **Active** \ - * **Deleting** - */ -export type OriginResourceState = string; - -/** Known values of {@link OriginGroupResourceState} that the service accepts. */ -export enum KnownOriginGroupResourceState { - Creating = "Creating", - Active = "Active", - Deleting = "Deleting" -} - -/** - * Defines values for OriginGroupResourceState. \ - * {@link KnownOriginGroupResourceState} can be used interchangeably with OriginGroupResourceState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Creating** \ - * **Active** \ - * **Deleting** - */ -export type OriginGroupResourceState = string; - /** Known values of {@link PolicyEnabledState} that the service accepts. */ export enum KnownPolicyEnabledState { + /** Disabled */ Disabled = "Disabled", + /** Enabled */ Enabled = "Enabled" } @@ -4075,7 +4565,9 @@ export type PolicyEnabledState = string; /** Known values of {@link PolicyMode} that the service accepts. */ export enum KnownPolicyMode { + /** Prevention */ Prevention = "Prevention", + /** Detection */ Detection = "Detection" } @@ -4091,10 +4583,15 @@ export type PolicyMode = string; /** Known values of {@link PolicySettingsDefaultCustomBlockResponseStatusCode} that the service accepts. */ export enum KnownPolicySettingsDefaultCustomBlockResponseStatusCode { + /** TwoHundred */ TwoHundred = 200, + /** FourHundredThree */ FourHundredThree = 403, + /** FourHundredFive */ FourHundredFive = 405, + /** FourHundredSix */ FourHundredSix = 406, + /** FourHundredTwentyNine */ FourHundredTwentyNine = 429 } @@ -4113,7 +4610,9 @@ export type PolicySettingsDefaultCustomBlockResponseStatusCode = number; /** Known values of {@link CustomRuleEnabledState} that the service accepts. */ export enum KnownCustomRuleEnabledState { + /** Disabled */ Disabled = "Disabled", + /** Enabled */ Enabled = "Enabled" } @@ -4129,14 +4628,23 @@ export type CustomRuleEnabledState = string; /** Known values of {@link WafMatchVariable} that the service accepts. */ export enum KnownWafMatchVariable { + /** RemoteAddr */ RemoteAddr = "RemoteAddr", + /** SocketAddr */ SocketAddr = "SocketAddr", + /** RequestMethod */ RequestMethod = "RequestMethod", + /** RequestHeader */ RequestHeader = "RequestHeader", + /** RequestUri */ RequestUri = "RequestUri", + /** QueryString */ QueryString = "QueryString", + /** RequestBody */ RequestBody = "RequestBody", + /** Cookies */ Cookies = "Cookies", + /** PostArgs */ PostArgs = "PostArgs" } @@ -4159,17 +4667,29 @@ export type WafMatchVariable = string; /** Known values of {@link Operator} that the service accepts. */ export enum KnownOperator { + /** Any */ Any = "Any", + /** IPMatch */ IPMatch = "IPMatch", + /** GeoMatch */ GeoMatch = "GeoMatch", + /** Equal */ Equal = "Equal", + /** Contains */ Contains = "Contains", + /** LessThan */ LessThan = "LessThan", + /** GreaterThan */ GreaterThan = "GreaterThan", + /** LessThanOrEqual */ LessThanOrEqual = "LessThanOrEqual", + /** GreaterThanOrEqual */ GreaterThanOrEqual = "GreaterThanOrEqual", + /** BeginsWith */ BeginsWith = "BeginsWith", + /** EndsWith */ EndsWith = "EndsWith", + /** RegEx */ RegEx = "RegEx" } @@ -4195,11 +4715,17 @@ export type Operator = string; /** Known values of {@link TransformType} that the service accepts. */ export enum KnownTransformType { + /** Lowercase */ Lowercase = "Lowercase", + /** Uppercase */ Uppercase = "Uppercase", + /** Trim */ Trim = "Trim", + /** UrlDecode */ UrlDecode = "UrlDecode", + /** UrlEncode */ UrlEncode = "UrlEncode", + /** RemoveNulls */ RemoveNulls = "RemoveNulls" } @@ -4219,9 +4745,13 @@ export type TransformType = string; /** Known values of {@link ActionType} that the service accepts. */ export enum KnownActionType { + /** Allow */ Allow = "Allow", + /** Block */ Block = "Block", + /** Log */ Log = "Log", + /** Redirect */ Redirect = "Redirect" } @@ -4239,7 +4769,9 @@ export type ActionType = string; /** Known values of {@link ManagedRuleEnabledState} that the service accepts. */ export enum KnownManagedRuleEnabledState { + /** Disabled */ Disabled = "Disabled", + /** Enabled */ Enabled = "Enabled" } @@ -4255,8 +4787,11 @@ export type ManagedRuleEnabledState = string; /** Known values of {@link ProvisioningState} that the service accepts. */ export enum KnownProvisioningState { + /** Creating */ Creating = "Creating", + /** Succeeded */ Succeeded = "Succeeded", + /** Failed */ Failed = "Failed" } @@ -4273,11 +4808,17 @@ export type ProvisioningState = string; /** Known values of {@link PolicyResourceState} that the service accepts. */ export enum KnownPolicyResourceState { + /** Creating */ Creating = "Creating", + /** Enabling */ Enabling = "Enabling", + /** Enabled */ Enabled = "Enabled", + /** Disabling */ Disabling = "Disabling", + /** Disabled */ Disabled = "Disabled", + /** Deleting */ Deleting = "Deleting" } @@ -4297,8 +4838,11 @@ export type PolicyResourceState = string; /** Known values of {@link RemoteAddressOperator} that the service accepts. */ export enum KnownRemoteAddressOperator { + /** Any */ Any = "Any", + /** IPMatch */ IPMatch = "IPMatch", + /** GeoMatch */ GeoMatch = "GeoMatch" } @@ -4315,11 +4859,17 @@ export type RemoteAddressOperator = string; /** Known values of {@link Transform} that the service accepts. */ export enum KnownTransform { + /** Lowercase */ Lowercase = "Lowercase", + /** Uppercase */ Uppercase = "Uppercase", + /** Trim */ Trim = "Trim", + /** UrlDecode */ UrlDecode = "UrlDecode", + /** UrlEncode */ UrlEncode = "UrlEncode", + /** RemoveNulls */ RemoveNulls = "RemoveNulls" } @@ -4339,6 +4889,7 @@ export type Transform = string; /** Known values of {@link RequestMethodOperator} that the service accepts. */ export enum KnownRequestMethodOperator { + /** Equal */ Equal = "Equal" } @@ -4353,12 +4904,19 @@ export type RequestMethodOperator = string; /** Known values of {@link RequestMethodMatchConditionParametersMatchValuesItem} that the service accepts. */ export enum KnownRequestMethodMatchConditionParametersMatchValuesItem { + /** GET */ GET = "GET", + /** Head */ Head = "HEAD", + /** Post */ Post = "POST", + /** PUT */ PUT = "PUT", + /** Delete */ Delete = "DELETE", + /** Options */ Options = "OPTIONS", + /** Trace */ Trace = "TRACE" } @@ -4379,15 +4937,25 @@ export type RequestMethodMatchConditionParametersMatchValuesItem = string; /** Known values of {@link QueryStringOperator} that the service accepts. */ export enum KnownQueryStringOperator { + /** Any */ Any = "Any", + /** Equal */ Equal = "Equal", + /** Contains */ Contains = "Contains", + /** BeginsWith */ BeginsWith = "BeginsWith", + /** EndsWith */ EndsWith = "EndsWith", + /** LessThan */ LessThan = "LessThan", + /** LessThanOrEqual */ LessThanOrEqual = "LessThanOrEqual", + /** GreaterThan */ GreaterThan = "GreaterThan", + /** GreaterThanOrEqual */ GreaterThanOrEqual = "GreaterThanOrEqual", + /** RegEx */ RegEx = "RegEx" } @@ -4411,15 +4979,25 @@ export type QueryStringOperator = string; /** Known values of {@link PostArgsOperator} that the service accepts. */ export enum KnownPostArgsOperator { + /** Any */ Any = "Any", + /** Equal */ Equal = "Equal", + /** Contains */ Contains = "Contains", + /** BeginsWith */ BeginsWith = "BeginsWith", + /** EndsWith */ EndsWith = "EndsWith", + /** LessThan */ LessThan = "LessThan", + /** LessThanOrEqual */ LessThanOrEqual = "LessThanOrEqual", + /** GreaterThan */ GreaterThan = "GreaterThan", + /** GreaterThanOrEqual */ GreaterThanOrEqual = "GreaterThanOrEqual", + /** RegEx */ RegEx = "RegEx" } @@ -4443,15 +5021,25 @@ export type PostArgsOperator = string; /** Known values of {@link RequestUriOperator} that the service accepts. */ export enum KnownRequestUriOperator { + /** Any */ Any = "Any", + /** Equal */ Equal = "Equal", + /** Contains */ Contains = "Contains", + /** BeginsWith */ BeginsWith = "BeginsWith", + /** EndsWith */ EndsWith = "EndsWith", + /** LessThan */ LessThan = "LessThan", + /** LessThanOrEqual */ LessThanOrEqual = "LessThanOrEqual", + /** GreaterThan */ GreaterThan = "GreaterThan", + /** GreaterThanOrEqual */ GreaterThanOrEqual = "GreaterThanOrEqual", + /** RegEx */ RegEx = "RegEx" } @@ -4475,15 +5063,25 @@ export type RequestUriOperator = string; /** Known values of {@link RequestHeaderOperator} that the service accepts. */ export enum KnownRequestHeaderOperator { + /** Any */ Any = "Any", + /** Equal */ Equal = "Equal", + /** Contains */ Contains = "Contains", + /** BeginsWith */ BeginsWith = "BeginsWith", + /** EndsWith */ EndsWith = "EndsWith", + /** LessThan */ LessThan = "LessThan", + /** LessThanOrEqual */ LessThanOrEqual = "LessThanOrEqual", + /** GreaterThan */ GreaterThan = "GreaterThan", + /** GreaterThanOrEqual */ GreaterThanOrEqual = "GreaterThanOrEqual", + /** RegEx */ RegEx = "RegEx" } @@ -4507,15 +5105,25 @@ export type RequestHeaderOperator = string; /** Known values of {@link RequestBodyOperator} that the service accepts. */ export enum KnownRequestBodyOperator { + /** Any */ Any = "Any", + /** Equal */ Equal = "Equal", + /** Contains */ Contains = "Contains", + /** BeginsWith */ BeginsWith = "BeginsWith", + /** EndsWith */ EndsWith = "EndsWith", + /** LessThan */ LessThan = "LessThan", + /** LessThanOrEqual */ LessThanOrEqual = "LessThanOrEqual", + /** GreaterThan */ GreaterThan = "GreaterThan", + /** GreaterThanOrEqual */ GreaterThanOrEqual = "GreaterThanOrEqual", + /** RegEx */ RegEx = "RegEx" } @@ -4539,7 +5147,9 @@ export type RequestBodyOperator = string; /** Known values of {@link RequestSchemeMatchConditionParametersMatchValuesItem} that the service accepts. */ export enum KnownRequestSchemeMatchConditionParametersMatchValuesItem { + /** Http */ Http = "HTTP", + /** Https */ Https = "HTTPS" } @@ -4555,16 +5165,27 @@ export type RequestSchemeMatchConditionParametersMatchValuesItem = string; /** Known values of {@link UrlPathOperator} that the service accepts. */ export enum KnownUrlPathOperator { + /** Any */ Any = "Any", + /** Equal */ Equal = "Equal", + /** Contains */ Contains = "Contains", + /** BeginsWith */ BeginsWith = "BeginsWith", + /** EndsWith */ EndsWith = "EndsWith", + /** LessThan */ LessThan = "LessThan", + /** LessThanOrEqual */ LessThanOrEqual = "LessThanOrEqual", + /** GreaterThan */ GreaterThan = "GreaterThan", + /** GreaterThanOrEqual */ GreaterThanOrEqual = "GreaterThanOrEqual", + /** Wildcard */ Wildcard = "Wildcard", + /** RegEx */ RegEx = "RegEx" } @@ -4589,15 +5210,25 @@ export type UrlPathOperator = string; /** Known values of {@link UrlFileExtensionOperator} that the service accepts. */ export enum KnownUrlFileExtensionOperator { + /** Any */ Any = "Any", + /** Equal */ Equal = "Equal", + /** Contains */ Contains = "Contains", + /** BeginsWith */ BeginsWith = "BeginsWith", + /** EndsWith */ EndsWith = "EndsWith", + /** LessThan */ LessThan = "LessThan", + /** LessThanOrEqual */ LessThanOrEqual = "LessThanOrEqual", + /** GreaterThan */ GreaterThan = "GreaterThan", + /** GreaterThanOrEqual */ GreaterThanOrEqual = "GreaterThanOrEqual", + /** RegEx */ RegEx = "RegEx" } @@ -4621,15 +5252,25 @@ export type UrlFileExtensionOperator = string; /** Known values of {@link UrlFileNameOperator} that the service accepts. */ export enum KnownUrlFileNameOperator { + /** Any */ Any = "Any", + /** Equal */ Equal = "Equal", + /** Contains */ Contains = "Contains", + /** BeginsWith */ BeginsWith = "BeginsWith", + /** EndsWith */ EndsWith = "EndsWith", + /** LessThan */ LessThan = "LessThan", + /** LessThanOrEqual */ LessThanOrEqual = "LessThanOrEqual", + /** GreaterThan */ GreaterThan = "GreaterThan", + /** GreaterThanOrEqual */ GreaterThanOrEqual = "GreaterThanOrEqual", + /** RegEx */ RegEx = "RegEx" } @@ -4653,6 +5294,7 @@ export type UrlFileNameOperator = string; /** Known values of {@link HttpVersionOperator} that the service accepts. */ export enum KnownHttpVersionOperator { + /** Equal */ Equal = "Equal" } @@ -4667,15 +5309,25 @@ export type HttpVersionOperator = string; /** Known values of {@link CookiesOperator} that the service accepts. */ export enum KnownCookiesOperator { + /** Any */ Any = "Any", + /** Equal */ Equal = "Equal", + /** Contains */ Contains = "Contains", + /** BeginsWith */ BeginsWith = "BeginsWith", + /** EndsWith */ EndsWith = "EndsWith", + /** LessThan */ LessThan = "LessThan", + /** LessThanOrEqual */ LessThanOrEqual = "LessThanOrEqual", + /** GreaterThan */ GreaterThan = "GreaterThan", + /** GreaterThanOrEqual */ GreaterThanOrEqual = "GreaterThanOrEqual", + /** RegEx */ RegEx = "RegEx" } @@ -4699,6 +5351,7 @@ export type CookiesOperator = string; /** Known values of {@link IsDeviceOperator} that the service accepts. */ export enum KnownIsDeviceOperator { + /** Equal */ Equal = "Equal" } @@ -4713,7 +5366,9 @@ export type IsDeviceOperator = string; /** Known values of {@link IsDeviceMatchConditionParametersMatchValuesItem} that the service accepts. */ export enum KnownIsDeviceMatchConditionParametersMatchValuesItem { + /** Mobile */ Mobile = "Mobile", + /** Desktop */ Desktop = "Desktop" } @@ -4729,7 +5384,9 @@ export type IsDeviceMatchConditionParametersMatchValuesItem = string; /** Known values of {@link SocketAddrOperator} that the service accepts. */ export enum KnownSocketAddrOperator { + /** Any */ Any = "Any", + /** IPMatch */ IPMatch = "IPMatch" } @@ -4745,15 +5402,25 @@ export type SocketAddrOperator = string; /** Known values of {@link ClientPortOperator} that the service accepts. */ export enum KnownClientPortOperator { + /** Any */ Any = "Any", + /** Equal */ Equal = "Equal", + /** Contains */ Contains = "Contains", + /** BeginsWith */ BeginsWith = "BeginsWith", + /** EndsWith */ EndsWith = "EndsWith", + /** LessThan */ LessThan = "LessThan", + /** LessThanOrEqual */ LessThanOrEqual = "LessThanOrEqual", + /** GreaterThan */ GreaterThan = "GreaterThan", + /** GreaterThanOrEqual */ GreaterThanOrEqual = "GreaterThanOrEqual", + /** RegEx */ RegEx = "RegEx" } @@ -4777,15 +5444,25 @@ export type ClientPortOperator = string; /** Known values of {@link ServerPortOperator} that the service accepts. */ export enum KnownServerPortOperator { + /** Any */ Any = "Any", + /** Equal */ Equal = "Equal", + /** Contains */ Contains = "Contains", + /** BeginsWith */ BeginsWith = "BeginsWith", + /** EndsWith */ EndsWith = "EndsWith", + /** LessThan */ LessThan = "LessThan", + /** LessThanOrEqual */ LessThanOrEqual = "LessThanOrEqual", + /** GreaterThan */ GreaterThan = "GreaterThan", + /** GreaterThanOrEqual */ GreaterThanOrEqual = "GreaterThanOrEqual", + /** RegEx */ RegEx = "RegEx" } @@ -4809,15 +5486,25 @@ export type ServerPortOperator = string; /** Known values of {@link HostNameOperator} that the service accepts. */ export enum KnownHostNameOperator { + /** Any */ Any = "Any", + /** Equal */ Equal = "Equal", + /** Contains */ Contains = "Contains", + /** BeginsWith */ BeginsWith = "BeginsWith", + /** EndsWith */ EndsWith = "EndsWith", + /** LessThan */ LessThan = "LessThan", + /** LessThanOrEqual */ LessThanOrEqual = "LessThanOrEqual", + /** GreaterThan */ GreaterThan = "GreaterThan", + /** GreaterThanOrEqual */ GreaterThanOrEqual = "GreaterThanOrEqual", + /** RegEx */ RegEx = "RegEx" } @@ -4841,6 +5528,7 @@ export type HostNameOperator = string; /** Known values of {@link SslProtocolOperator} that the service accepts. */ export enum KnownSslProtocolOperator { + /** Equal */ Equal = "Equal" } @@ -4855,8 +5543,11 @@ export type SslProtocolOperator = string; /** Known values of {@link SslProtocol} that the service accepts. */ export enum KnownSslProtocol { + /** TLSv1 */ TLSv1 = "TLSv1", + /** TLSv11 */ TLSv11 = "TLSv1.1", + /** TLSv12 */ TLSv12 = "TLSv1.2" } @@ -4873,9 +5564,13 @@ export type SslProtocol = string; /** Known values of {@link RedirectType} that the service accepts. */ export enum KnownRedirectType { + /** Moved */ Moved = "Moved", + /** Found */ Found = "Found", + /** TemporaryRedirect */ TemporaryRedirect = "TemporaryRedirect", + /** PermanentRedirect */ PermanentRedirect = "PermanentRedirect" } @@ -4893,8 +5588,11 @@ export type RedirectType = string; /** Known values of {@link DestinationProtocol} that the service accepts. */ export enum KnownDestinationProtocol { + /** MatchRequest */ MatchRequest = "MatchRequest", + /** Http */ Http = "Http", + /** Https */ Https = "Https" } @@ -4911,6 +5609,7 @@ export type DestinationProtocol = string; /** Known values of {@link Algorithm} that the service accepts. */ export enum KnownAlgorithm { + /** SHA256 */ SHA256 = "SHA256" } @@ -4925,8 +5624,11 @@ export type Algorithm = string; /** Known values of {@link ParamIndicator} that the service accepts. */ export enum KnownParamIndicator { + /** Expires */ Expires = "Expires", + /** KeyId */ KeyId = "KeyId", + /** Signature */ Signature = "Signature" } @@ -4943,8 +5645,11 @@ export type ParamIndicator = string; /** Known values of {@link HeaderAction} that the service accepts. */ export enum KnownHeaderAction { + /** Append */ Append = "Append", + /** Overwrite */ Overwrite = "Overwrite", + /** Delete */ Delete = "Delete" } @@ -4961,8 +5666,11 @@ export type HeaderAction = string; /** Known values of {@link CacheBehavior} that the service accepts. */ export enum KnownCacheBehavior { + /** BypassCache */ BypassCache = "BypassCache", + /** Override */ Override = "Override", + /** SetIfMissing */ SetIfMissing = "SetIfMissing" } @@ -4979,6 +5687,7 @@ export type CacheBehavior = string; /** Known values of {@link CacheType} that the service accepts. */ export enum KnownCacheType { + /** All */ All = "All" } @@ -4993,9 +5702,13 @@ export type CacheType = string; /** Known values of {@link QueryStringBehavior} that the service accepts. */ export enum KnownQueryStringBehavior { + /** Include */ Include = "Include", + /** IncludeAll */ IncludeAll = "IncludeAll", + /** Exclude */ Exclude = "Exclude", + /** ExcludeAll */ ExcludeAll = "ExcludeAll" } @@ -5013,9 +5726,13 @@ export type QueryStringBehavior = string; /** Known values of {@link RuleQueryStringCachingBehavior} that the service accepts. */ export enum KnownRuleQueryStringCachingBehavior { + /** IgnoreQueryString */ IgnoreQueryString = "IgnoreQueryString", + /** UseQueryString */ UseQueryString = "UseQueryString", + /** IgnoreSpecifiedQueryStrings */ IgnoreSpecifiedQueryStrings = "IgnoreSpecifiedQueryStrings", + /** IncludeSpecifiedQueryStrings */ IncludeSpecifiedQueryStrings = "IncludeSpecifiedQueryStrings" } @@ -5033,7 +5750,9 @@ export type RuleQueryStringCachingBehavior = string; /** Known values of {@link RuleIsCompressionEnabled} that the service accepts. */ export enum KnownRuleIsCompressionEnabled { + /** Enabled */ Enabled = "Enabled", + /** Disabled */ Disabled = "Disabled" } @@ -5049,8 +5768,11 @@ export type RuleIsCompressionEnabled = string; /** Known values of {@link RuleCacheBehavior} that the service accepts. */ export enum KnownRuleCacheBehavior { + /** HonorOrigin */ HonorOrigin = "HonorOrigin", + /** OverrideAlways */ OverrideAlways = "OverrideAlways", + /** OverrideIfOriginMissing */ OverrideIfOriginMissing = "OverrideIfOriginMissing" } @@ -5067,7 +5789,9 @@ export type RuleCacheBehavior = string; /** Known values of {@link CertificateType} that the service accepts. */ export enum KnownCertificateType { + /** Shared */ Shared = "Shared", + /** Dedicated */ Dedicated = "Dedicated" } @@ -5083,6 +5807,7 @@ export type CertificateType = string; /** Known values of {@link UpdateRule} that the service accepts. */ export enum KnownUpdateRule { + /** NoAction */ NoAction = "NoAction" } @@ -5097,6 +5822,7 @@ export type UpdateRule = string; /** Known values of {@link DeleteRule} that the service accepts. */ export enum KnownDeleteRule { + /** NoAction */ NoAction = "NoAction" } @@ -5126,8 +5852,6 @@ export type ResponseBasedDetectedErrorTypes = | "None" | "TcpErrorsOnly" | "TcpAndHttpErrors"; -/** Defines values for MinimumTlsVersion. */ -export type MinimumTlsVersion = "None" | "TLS10" | "TLS12"; /** Defines values for QueryStringCachingBehavior. */ export type QueryStringCachingBehavior = | "IgnoreQueryString" @@ -5136,6 +5860,8 @@ export type QueryStringCachingBehavior = | "NotSet"; /** Defines values for GeoFilterActions. */ export type GeoFilterActions = "Block" | "Allow"; +/** Defines values for MinimumTlsVersion. */ +export type MinimumTlsVersion = "None" | "TLS10" | "TLS12"; /** Optional parameters. */ export interface CheckEndpointNameAvailabilityOptionalParams @@ -5829,6 +6555,37 @@ export interface ProfilesDeleteOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface ProfilesCanMigrateOptionalParams + extends coreClient.OperationOptions {} + +/** 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; +} + +/** Contains response data for the migrationCommit operation. */ +export type ProfilesMigrationCommitResponse = ProfilesMigrationCommitHeaders; + /** Optional parameters. */ export interface ProfilesGenerateSsoUriOptionalParams extends coreClient.OperationOptions {} @@ -6132,7 +6889,12 @@ export interface CustomDomainsDeleteOptionalParams /** Optional parameters. */ export interface CustomDomainsDisableCustomHttpsOptionalParams - extends coreClient.OperationOptions {} + 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 disableCustomHttps operation. */ export type CustomDomainsDisableCustomHttpsResponse = CustomDomain; @@ -6142,6 +6904,10 @@ export interface CustomDomainsEnableCustomHttpsOptionalParams extends coreClient.OperationOptions { /** The configuration specifying how to enable HTTPS for the custom domain - using CDN managed certificate or user's own certificate. If not specified, enabling ssl uses CDN managed certificate by default. */ customDomainHttpsParameters?: CustomDomainHttpsParametersUnion; + /** 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 enableCustomHttps operation. */ diff --git a/sdk/cdn/arm-cdn/src/models/mappers.ts b/sdk/cdn/arm-cdn/src/models/mappers.ts index 21fa23dc17fe..fbdab5dcd792 100644 --- a/sdk/cdn/arm-cdn/src/models/mappers.ts +++ b/sdk/cdn/arm-cdn/src/models/mappers.ts @@ -2642,6 +2642,187 @@ export const ProfileUpdateParameters: coreClient.CompositeMapper = { } }; +export const CanMigrateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CanMigrateParameters", + modelProperties: { + classicResourceReference: { + serializedName: "classicResourceReference", + type: { + name: "Composite", + className: "ResourceReference" + } + } + } + } +}; + +export const CanMigrateResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CanMigrateResult", + modelProperties: { + canMigrate: { + serializedName: "canMigrate", + readOnly: true, + type: { + name: "Boolean" + } + }, + defaultSku: { + serializedName: "defaultSku", + readOnly: true, + type: { + name: "String" + } + }, + errors: { + serializedName: "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: { + migratedProfileResourceId: { + serializedName: "migratedProfileResourceId", + type: { + name: "Composite", + className: "ResourceReference" + } + }, + errors: { + serializedName: "errors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MigrationErrorType" + } + } + } + } + } + } +}; + export const SsoUri: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2997,35 +3178,28 @@ export const HttpErrorRangeParameters: coreClient.CompositeMapper = { } }; -export const CustomDomainHttpsParameters: coreClient.CompositeMapper = { +export const DeepCreatedCustomDomain: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomDomainHttpsParameters", - uberParent: "CustomDomainHttpsParameters", - polymorphicDiscriminator: { - serializedName: "certificateSource", - clientName: "certificateSource" - }, + className: "DeepCreatedCustomDomain", modelProperties: { - certificateSource: { - serializedName: "certificateSource", + name: { + serializedName: "name", required: true, type: { name: "String" } }, - protocolType: { - serializedName: "protocolType", - required: true, + hostName: { + serializedName: "properties.hostName", type: { name: "String" } }, - minimumTlsVersion: { - serializedName: "minimumTlsVersion", + validationData: { + serializedName: "properties.validationData", type: { - name: "Enum", - allowedValues: ["None", "TLS10", "TLS12"] + name: "String" } } } @@ -3880,6 +4054,41 @@ export const CustomDomainListResult: coreClient.CompositeMapper = { } }; +export const CustomDomainHttpsParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomDomainHttpsParameters", + uberParent: "CustomDomainHttpsParameters", + polymorphicDiscriminator: { + serializedName: "certificateSource", + clientName: "certificateSource" + }, + modelProperties: { + certificateSource: { + serializedName: "certificateSource", + required: true, + type: { + name: "String" + } + }, + protocolType: { + serializedName: "protocolType", + required: true, + type: { + name: "String" + } + }, + minimumTlsVersion: { + serializedName: "minimumTlsVersion", + type: { + name: "Enum", + allowedValues: ["None", "TLS10", "TLS12"] + } + } + } + } +}; + export const CustomDomainParameters: coreClient.CompositeMapper = { type: { name: "Composite", @@ -6395,6 +6604,13 @@ export const AFDDomainProperties: coreClient.CompositeMapper = { name: "String" } }, + extendedProperties: { + serializedName: "extendedProperties", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, validationProperties: { serializedName: "validationProperties", type: { @@ -7389,48 +7605,6 @@ export const AzureFirstPartyManagedCertificateParameters: coreClient.CompositeMa } }; -export const CdnManagedHttpsParameters: coreClient.CompositeMapper = { - serializedName: "Cdn", - type: { - name: "Composite", - className: "CdnManagedHttpsParameters", - uberParent: "CustomDomainHttpsParameters", - polymorphicDiscriminator: - CustomDomainHttpsParameters.type.polymorphicDiscriminator, - modelProperties: { - ...CustomDomainHttpsParameters.type.modelProperties, - certificateSourceParameters: { - serializedName: "certificateSourceParameters", - type: { - name: "Composite", - className: "CdnCertificateSourceParameters" - } - } - } - } -}; - -export const UserManagedHttpsParameters: coreClient.CompositeMapper = { - serializedName: "AzureKeyVault", - type: { - name: "Composite", - className: "UserManagedHttpsParameters", - uberParent: "CustomDomainHttpsParameters", - polymorphicDiscriminator: - CustomDomainHttpsParameters.type.polymorphicDiscriminator, - modelProperties: { - ...CustomDomainHttpsParameters.type.modelProperties, - certificateSourceParameters: { - serializedName: "certificateSourceParameters", - type: { - name: "Composite", - className: "KeyVaultCertificateSourceParameters" - } - } - } - } -}; - export const EndpointProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -7477,7 +7651,7 @@ export const EndpointProperties: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "CustomDomain" + className: "DeepCreatedCustomDomain" } } } @@ -7555,6 +7729,48 @@ export const OriginGroupProperties: coreClient.CompositeMapper = { } }; +export const CdnManagedHttpsParameters: coreClient.CompositeMapper = { + serializedName: "Cdn", + type: { + name: "Composite", + className: "CdnManagedHttpsParameters", + uberParent: "CustomDomainHttpsParameters", + polymorphicDiscriminator: + CustomDomainHttpsParameters.type.polymorphicDiscriminator, + modelProperties: { + ...CustomDomainHttpsParameters.type.modelProperties, + certificateSourceParameters: { + serializedName: "certificateSourceParameters", + type: { + name: "Composite", + className: "CdnCertificateSourceParameters" + } + } + } + } +}; + +export const UserManagedHttpsParameters: coreClient.CompositeMapper = { + serializedName: "AzureKeyVault", + type: { + name: "Composite", + className: "UserManagedHttpsParameters", + uberParent: "CustomDomainHttpsParameters", + polymorphicDiscriminator: + CustomDomainHttpsParameters.type.polymorphicDiscriminator, + modelProperties: { + ...CustomDomainHttpsParameters.type.modelProperties, + certificateSourceParameters: { + serializedName: "certificateSourceParameters", + type: { + name: "Composite", + className: "KeyVaultCertificateSourceParameters" + } + } + } + } +}; + export const RateLimitRule: coreClient.CompositeMapper = { type: { name: "Composite", @@ -7721,6 +7937,13 @@ export const AFDDomain: coreClient.CompositeMapper = { name: "String" } }, + extendedProperties: { + serializedName: "properties.extendedProperties", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, validationProperties: { serializedName: "properties.validationProperties", type: { @@ -8199,63 +8422,6 @@ export const Secret: coreClient.CompositeMapper = { } }; -export const CustomDomain: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CustomDomain", - modelProperties: { - ...ProxyResource.type.modelProperties, - hostName: { - serializedName: "properties.hostName", - type: { - name: "String" - } - }, - resourceState: { - serializedName: "properties.resourceState", - readOnly: true, - type: { - name: "String" - } - }, - customHttpsProvisioningState: { - serializedName: "properties.customHttpsProvisioningState", - readOnly: true, - type: { - name: "String" - } - }, - customHttpsProvisioningSubstate: { - serializedName: "properties.customHttpsProvisioningSubstate", - readOnly: true, - type: { - name: "String" - } - }, - customHttpsParameters: { - serializedName: "properties.customHttpsParameters", - type: { - name: "Composite", - className: "CustomDomainHttpsParameters" - } - }, - validationData: { - serializedName: "properties.validationData", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - export const Origin: coreClient.CompositeMapper = { type: { name: "Composite", @@ -8430,6 +8596,63 @@ export const OriginGroup: coreClient.CompositeMapper = { } }; +export const CustomDomain: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomDomain", + modelProperties: { + ...ProxyResource.type.modelProperties, + hostName: { + serializedName: "properties.hostName", + type: { + name: "String" + } + }, + resourceState: { + serializedName: "properties.resourceState", + readOnly: true, + type: { + name: "String" + } + }, + customHttpsProvisioningState: { + serializedName: "properties.customHttpsProvisioningState", + readOnly: true, + type: { + name: "String" + } + }, + customHttpsProvisioningSubstate: { + serializedName: "properties.customHttpsProvisioningSubstate", + readOnly: true, + type: { + name: "String" + } + }, + customHttpsParameters: { + serializedName: "properties.customHttpsParameters", + type: { + name: "Composite", + className: "CustomDomainHttpsParameters" + } + }, + validationData: { + serializedName: "properties.validationData", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const EdgeNode: coreClient.CompositeMapper = { type: { name: "Composite", @@ -8536,6 +8759,13 @@ export const Profile: coreClient.CompositeMapper = { name: "String" } }, + extendedProperties: { + serializedName: "properties.extendedProperties", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, frontDoorId: { serializedName: "properties.frontDoorId", readOnly: true, @@ -8712,7 +8942,7 @@ export const Endpoint: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "CustomDomain" + className: "DeepCreatedCustomDomain" } } } @@ -8795,6 +9025,13 @@ export const CdnWebApplicationFirewallPolicy: coreClient.CompositeMapper = { } } }, + extendedProperties: { + serializedName: "properties.extendedProperties", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -8813,6 +9050,36 @@ export const CdnWebApplicationFirewallPolicy: coreClient.CompositeMapper = { } }; +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 let discriminators = { DeliveryRuleCondition: DeliveryRuleCondition, DeliveryRuleActionAutoGenerated: DeliveryRuleActionAutoGenerated, diff --git a/sdk/cdn/arm-cdn/src/models/parameters.ts b/sdk/cdn/arm-cdn/src/models/parameters.ts index b7436c9175b6..b44d4a2b7d3d 100644 --- a/sdk/cdn/arm-cdn/src/models/parameters.ts +++ b/sdk/cdn/arm-cdn/src/models/parameters.ts @@ -36,6 +36,8 @@ import { 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 +123,7 @@ export const resourceGroupName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-06-01", + defaultValue: "2022-11-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -653,6 +655,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/customDomains.ts b/sdk/cdn/arm-cdn/src/operations/customDomains.ts index a237f122c4d6..7287c839fb8a 100644 --- a/sdk/cdn/arm-cdn/src/operations/customDomains.ts +++ b/sdk/cdn/arm-cdn/src/operations/customDomains.ts @@ -10,7 +10,6 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { CustomDomains } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; -import * as Models from "../models"; import * as Parameters from "../models/parameters"; import { CdnManagementClient } from "../cdnManagementClient"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; @@ -32,8 +31,6 @@ import { CustomDomainsEnableCustomHttpsResponse, CustomDomainsListByEndpointNextResponse } from "../models"; -import { ProfilesImpl } from "./profiles"; -import { type } from "os"; /// /** Class containing CustomDomains operations. */ @@ -389,14 +386,59 @@ export class CustomDomainsImpl implements CustomDomains { * @param customDomainName Name of the custom domain within an endpoint. * @param options The options parameters. */ - disableCustomHttps( + async beginDisableCustomHttps( resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: CustomDomainsDisableCustomHttpsOptionalParams - ): Promise { - return this.client.sendOperationRequest( + ): Promise< + PollerLike< + PollOperationState, + CustomDomainsDisableCustomHttpsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, { resourceGroupName, profileName, @@ -406,6 +448,37 @@ export class CustomDomainsImpl implements CustomDomains { }, disableCustomHttpsOperationSpec ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Disable https delivery of the custom domain. + * @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 endpointName Name of the endpoint under the profile which is unique globally. + * @param customDomainName Name of the custom domain within an endpoint. + * @param options The options parameters. + */ + async beginDisableCustomHttpsAndWait( + resourceGroupName: string, + profileName: string, + endpointName: string, + customDomainName: string, + options?: CustomDomainsDisableCustomHttpsOptionalParams + ): Promise { + const poller = await this.beginDisableCustomHttps( + resourceGroupName, + profileName, + endpointName, + customDomainName, + options + ); + return poller.pollUntilDone(); } /** @@ -416,44 +489,99 @@ export class CustomDomainsImpl implements CustomDomains { * @param customDomainName Name of the custom domain within an endpoint. * @param options The options parameters. */ - enableCustomHttps( + async beginEnableCustomHttps( resourceGroupName: string, profileName: string, endpointName: string, customDomainName: string, options?: CustomDomainsEnableCustomHttpsOptionalParams - ): Promise { - // #region Added default values to add backwards compatibility - let newOptions: Models.CustomDomainsEnableCustomHttpsOptionalParams = {}; - newOptions = options as Models.CustomDomainsEnableCustomHttpsOptionalParams; - - if (!newOptions) { - newOptions = {}; - } - - let optionsPreparationPromise = Promise.resolve(options); + ): Promise< + PollerLike< + PollOperationState, + CustomDomainsEnableCustomHttpsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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() + } + }; + }; - if (!newOptions.customDomainHttpsParameters) { - let profiles = new ProfilesImpl(this.client); - optionsPreparationPromise = profiles.get(resourceGroupName, profileName).then(profile => { - newOptions.customDomainHttpsParameters = getDefaultCustomDomainHttpsParameters(profile); - return newOptions; - }) - } + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + profileName, + endpointName, + customDomainName, + options + }, + enableCustomHttpsOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } - return optionsPreparationPromise.then(options => - this.client.sendOperationRequest( - { - resourceGroupName, - profileName, - endpointName, - customDomainName, - options - }, - enableCustomHttpsOperationSpec - ) + /** + * Enable https delivery of the custom domain. + * @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 endpointName Name of the endpoint under the profile which is unique globally. + * @param customDomainName Name of the custom domain within an endpoint. + * @param options The options parameters. + */ + async beginEnableCustomHttpsAndWait( + resourceGroupName: string, + profileName: string, + endpointName: string, + customDomainName: string, + options?: CustomDomainsEnableCustomHttpsOptionalParams + ): Promise { + const poller = await this.beginEnableCustomHttps( + resourceGroupName, + profileName, + endpointName, + customDomainName, + options ); - // #endregion + return poller.pollUntilDone(); } /** @@ -477,50 +605,6 @@ export class CustomDomainsImpl implements CustomDomains { ); } } - -// #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: Models.Profile): Models.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 - // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -636,10 +720,18 @@ const disableCustomHttpsOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps", httpMethod: "POST", responses: { - 200: {}, + 200: { + bodyMapper: Mappers.CustomDomain + }, + 201: { + bodyMapper: Mappers.CustomDomain + }, 202: { bodyMapper: Mappers.CustomDomain }, + 204: { + bodyMapper: Mappers.CustomDomain + }, default: { bodyMapper: Mappers.ErrorResponse } @@ -661,10 +753,18 @@ const enableCustomHttpsOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps", httpMethod: "POST", responses: { - 200: {}, + 200: { + bodyMapper: Mappers.CustomDomain + }, + 201: { + bodyMapper: Mappers.CustomDomain + }, 202: { bodyMapper: Mappers.CustomDomain }, + 204: { + bodyMapper: Mappers.CustomDomain + }, default: { bodyMapper: Mappers.ErrorResponse } diff --git a/sdk/cdn/arm-cdn/src/operations/profiles.ts b/sdk/cdn/arm-cdn/src/operations/profiles.ts index 0591b170ac38..d81a319a8c8b 100644 --- a/sdk/cdn/arm-cdn/src/operations/profiles.ts +++ b/sdk/cdn/arm-cdn/src/operations/profiles.ts @@ -33,6 +33,14 @@ import { ProfilesUpdateOptionalParams, ProfilesUpdateResponse, ProfilesDeleteOptionalParams, + CanMigrateParameters, + ProfilesCanMigrateOptionalParams, + ProfilesCanMigrateResponse, + MigrationParameters, + ProfilesMigrateOptionalParams, + ProfilesMigrateResponse, + ProfilesMigrationCommitOptionalParams, + ProfilesMigrationCommitResponse, ProfilesGenerateSsoUriOptionalParams, ProfilesGenerateSsoUriResponse, ProfilesListSupportedOptimizationTypesOptionalParams, @@ -552,6 +560,202 @@ 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. + */ + canMigrate( + resourceGroupName: string, + canMigrateParameters: CanMigrateParameters, + options?: ProfilesCanMigrateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, canMigrateParameters, options }, + canMigrateOperationSpec + ); + } + + /** + * 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< + PollerLike< + PollOperationState, + ProfilesMigrateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { resourceGroupName, migrationParameters, options }, + migrateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + 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< + PollerLike< + PollOperationState, + ProfilesMigrationCommitResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { resourceGroupName, profileName, options }, + migrationCommitOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "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 @@ -813,6 +1017,92 @@ const deleteOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const canMigrateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/canMigrate", + httpMethod: "POST", + responses: { + 200: { + 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: { + headersMapper: Mappers.ProfilesMigrationCommitHeaders + }, + 201: { + headersMapper: Mappers.ProfilesMigrationCommitHeaders + }, + 202: { + headersMapper: Mappers.ProfilesMigrationCommitHeaders + }, + 204: { + headersMapper: Mappers.ProfilesMigrationCommitHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.profileName + ], + headerParameters: [Parameters.accept], + serializer +}; const generateSsoUriOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri", diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/customDomains.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/customDomains.ts index cf0939fdfda8..35c1811fd64f 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/customDomains.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/customDomains.ts @@ -131,7 +131,27 @@ export interface CustomDomains { * @param customDomainName Name of the custom domain within an endpoint. * @param options The options parameters. */ - disableCustomHttps( + beginDisableCustomHttps( + resourceGroupName: string, + profileName: string, + endpointName: string, + customDomainName: string, + options?: CustomDomainsDisableCustomHttpsOptionalParams + ): Promise< + PollerLike< + PollOperationState, + CustomDomainsDisableCustomHttpsResponse + > + >; + /** + * Disable https delivery of the custom domain. + * @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 endpointName Name of the endpoint under the profile which is unique globally. + * @param customDomainName Name of the custom domain within an endpoint. + * @param options The options parameters. + */ + beginDisableCustomHttpsAndWait( resourceGroupName: string, profileName: string, endpointName: string, @@ -146,7 +166,27 @@ export interface CustomDomains { * @param customDomainName Name of the custom domain within an endpoint. * @param options The options parameters. */ - enableCustomHttps( + beginEnableCustomHttps( + resourceGroupName: string, + profileName: string, + endpointName: string, + customDomainName: string, + options?: CustomDomainsEnableCustomHttpsOptionalParams + ): Promise< + PollerLike< + PollOperationState, + CustomDomainsEnableCustomHttpsResponse + > + >; + /** + * Enable https delivery of the custom domain. + * @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 endpointName Name of the endpoint under the profile which is unique globally. + * @param customDomainName Name of the custom domain within an endpoint. + * @param options The options parameters. + */ + beginEnableCustomHttpsAndWait( resourceGroupName: string, profileName: string, endpointName: string, diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/profiles.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/profiles.ts index 2d98c56b5f75..486468842aec 100644 --- a/sdk/cdn/arm-cdn/src/operationsInterfaces/profiles.ts +++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/profiles.ts @@ -22,6 +22,14 @@ import { ProfilesUpdateOptionalParams, ProfilesUpdateResponse, ProfilesDeleteOptionalParams, + CanMigrateParameters, + ProfilesCanMigrateOptionalParams, + ProfilesCanMigrateResponse, + MigrationParameters, + ProfilesMigrateOptionalParams, + ProfilesMigrateResponse, + ProfilesMigrationCommitOptionalParams, + ProfilesMigrationCommitResponse, ProfilesGenerateSsoUriOptionalParams, ProfilesGenerateSsoUriResponse, ProfilesListSupportedOptimizationTypesOptionalParams, @@ -173,6 +181,74 @@ 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. + */ + canMigrate( + 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< + PollerLike< + PollOperationState, + 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< + PollerLike< + PollOperationState, + ProfilesMigrationCommitResponse + > + >; + /** + * 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/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"