diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index aa80d9ee2315..6b4f9048eded 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2631,7 +2631,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/chai-as-promised/7.1.5: @@ -2653,7 +2653,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/cookie/0.4.1: @@ -2663,7 +2663,7 @@ packages: /@types/cors/2.8.13: resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/debug/4.1.8: @@ -2675,7 +2675,7 @@ packages: /@types/decompress/4.2.4: resolution: {integrity: sha512-/C8kTMRTNiNuWGl5nEyKbPiMv6HA+0RbEXzFhFBEzASM6+oa4tJro9b8nj7eRlOFfuLdzUU+DS/GPDlvvzMOhA==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/eslint/8.4.10: @@ -2696,7 +2696,7 @@ packages: /@types/express-serve-static-core/4.17.35: resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 '@types/send': 0.17.1 @@ -2714,13 +2714,13 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/inquirer/8.2.6: @@ -2733,7 +2733,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/json-schema/7.0.12: @@ -2747,13 +2747,13 @@ packages: /@types/jsonwebtoken/9.0.2: resolution: {integrity: sha512-drE6uz7QBKq1fYqqoFKTDRdFCPHd5TCub75BM+D+cMx7NU9hUz7SESLfC2fSCXVFMO5Yj8sOWHuGqPgjc+fz0Q==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/jws/3.2.5: resolution: {integrity: sha512-xGTxZH34xOryaTN8CMsvhh9lfNqFuHiMoRvsLYWQdBJHqiECyfInXVl2eK8Jz2emxZWMIn5RBlmr3oDVPeWujw==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/linkify-it/3.0.2: @@ -2812,20 +2812,20 @@ packages: /@types/mysql/2.15.19: resolution: {integrity: sha512-wSRg2QZv14CWcZXkgdvHbbV2ACufNy5EgI8mBBxnJIptchv7DBy/h53VMa2jDhyo0C9MO4iowE6z9vF8Ja1DkQ==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/node-fetch/2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 form-data: 3.0.1 dev: false /@types/node-fetch/2.6.4: resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 form-data: 3.0.1 dev: false @@ -2858,7 +2858,7 @@ packages: /@types/pg/8.6.1: resolution: {integrity: sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 pg-protocol: 1.6.0 pg-types: 2.2.0 dev: false @@ -2886,7 +2886,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/semaphore/1.1.1: @@ -2905,14 +2905,14 @@ packages: resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} dependencies: '@types/mime': 1.3.2 - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/serve-static/1.15.1: resolution: {integrity: sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==} dependencies: '@types/mime': 3.0.1 - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/shimmer/1.0.2: @@ -2938,13 +2938,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/tough-cookie/4.0.2: @@ -2958,7 +2958,7 @@ packages: /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/underscore/1.11.5: @@ -2976,19 +2976,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/ws/8.5.5: resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/yargs-parser/21.0.0: @@ -3005,7 +3005,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false optional: true @@ -4247,7 +4247,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: @@ -4425,7 +4425,7 @@ packages: cosmiconfig: 7.1.0 debug: 4.3.4 deps-regex: 0.1.4 - ignore: 5.1.9 + ignore: 5.2.4 is-core-module: 2.12.1 js-yaml: 3.14.1 json5: 2.2.3 @@ -4457,7 +4457,7 @@ packages: '@pnpm/crypto.base32-hash': 1.0.1 '@pnpm/types': 8.9.0 encode-registry: 3.0.0 - semver: 7.3.8 + semver: 7.5.2 dev: false /deps-regex/0.1.4: @@ -4566,7 +4566,7 @@ packages: dependencies: semver: 7.5.2 shelljs: 0.8.5 - typescript: 5.2.0-dev.20230620 + typescript: 5.2.0-dev.20230622 dev: false /duplexer3/0.1.5: @@ -4628,7 +4628,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.13 - '@types/node': 14.18.51 + '@types/node': 16.18.36 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -5611,7 +5611,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 @@ -6020,7 +6020,7 @@ packages: cli-cursor: 3.1.0 cli-width: 3.0.0 external-editor: 3.1.0 - figures: 3.0.0 + figures: 3.2.0 lodash: 4.17.21 mute-stream: 0.0.8 run-async: 2.4.1 @@ -7775,7 +7775,7 @@ packages: pkg-dir: 5.0.0 preferred-pm: 3.0.3 rc-config-loader: 4.1.3 - semver: 7.3.8 + semver: 7.5.2 semver-diff: 3.1.1 strip-ansi: 6.0.1 text-table: 0.2.0 @@ -8482,7 +8482,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 14.18.51 + '@types/node': 16.18.36 long: 5.2.3 dev: false @@ -10021,8 +10021,8 @@ packages: hasBin: true dev: false - /typescript/5.2.0-dev.20230620: - resolution: {integrity: sha512-b+xpXf2CUaS00FbWW5+Kz2oYW27rHb6axYghK9+yR4QInoFy0PBdtkEU7zqm/uGXuULB5EfxbtNGlW9+2vsbSg==} + /typescript/5.2.0-dev.20230622: + resolution: {integrity: sha512-rVTuiLuyezBKAEAvkvDRvO/tA+nk5DXwnWk3vpKXzDtuv7JJ22iBPkehusg9m5AQ6To+ZJ7+mFJ+mNE6yPr9zQ==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -14125,7 +14125,7 @@ packages: dev: false file:projects/arm-kusto.tgz: - resolution: {integrity: sha512-NHVaCXsY2x5l7bCKnOEK4NyBw76kF6EZc+CPJxLjY+AgNOWH7halakaeLBWW2JJCuSiSoeRIbRTx0XiQuaswuw==, tarball: file:projects/arm-kusto.tgz} + resolution: {integrity: sha512-RLc2S3usgJcdwaN8oGv75TjwNCX53XPG6PE/UA+XjYuCLWqGWPFuKMmwkfugR/BmfOTJMpFWSd2npNtI5Ht+bA==, tarball: file:projects/arm-kusto.tgz} name: '@rush-temp/arm-kusto' version: 0.0.0 dependencies: @@ -14139,8 +14139,8 @@ packages: '@types/node': 14.18.51 chai: 4.3.7 cross-env: 7.0.3 - dotenv: 8.6.0 - mkdirp: 1.0.4 + dotenv: 16.3.1 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 diff --git a/sdk/kusto/arm-kusto/CHANGELOG.md b/sdk/kusto/arm-kusto/CHANGELOG.md index 13761cd3b716..8d1be557962e 100644 --- a/sdk/kusto/arm-kusto/CHANGELOG.md +++ b/sdk/kusto/arm-kusto/CHANGELOG.md @@ -1,15 +1,67 @@ # Release History + +## 8.0.0 (2023-06-22) + +**Features** -## 7.3.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group DatabaseOperations + - Added operation Clusters.beginMigrate + - Added operation Clusters.beginMigrateAndWait + - Added Interface AttachedDatabaseConfigurationsCreateOrUpdateHeaders + - Added Interface AttachedDatabaseConfigurationsDeleteHeaders + - Added Interface ClusterMigrateRequest + - Added Interface ClusterPrincipalAssignmentsDeleteHeaders + - Added Interface ClustersAddLanguageExtensionsHeaders + - Added Interface ClustersDeleteHeaders + - Added Interface ClustersDetachFollowerDatabasesHeaders + - Added Interface ClustersDiagnoseVirtualNetworkHeaders + - Added Interface ClustersMigrateHeaders + - Added Interface ClustersMigrateOptionalParams + - Added Interface ClustersRemoveLanguageExtensionsHeaders + - Added Interface ClustersStartHeaders + - Added Interface ClustersStopHeaders + - Added Interface DatabaseInviteFollowerOptionalParams + - Added Interface DatabaseInviteFollowerRequest + - Added Interface DatabaseInviteFollowerResult + - Added Interface DatabasePrincipalAssignmentsDeleteHeaders + - Added Interface DatabasesCreateOrUpdateHeaders + - Added Interface DatabasesDeleteHeaders + - Added Interface DatabasesListByClusterNextOptionalParams + - Added Interface DataConnectionsCreateOrUpdateHeaders + - Added Interface DataConnectionsDataConnectionValidationHeaders + - Added Interface DataConnectionsDeleteHeaders + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorResponse + - Added Interface ManagedPrivateEndpointsCreateOrUpdateHeaders + - Added Interface ManagedPrivateEndpointsDeleteHeaders + - Added Interface MigrationClusterProperties + - Added Interface OperationsResultsLocationGetHeaders + - Added Interface PrivateEndpointConnectionsDeleteHeaders + - Added Interface ScriptsCreateOrUpdateHeaders + - Added Interface ScriptsDeleteHeaders + - Added Interface SuspensionDetails + - Added Type Alias DatabaseInviteFollowerResponse + - Added Type Alias DatabasesListByClusterNextResponse + - Added Type Alias MigrationClusterRole + - Added Type Alias OperationsResultsLocationGetResponse + - Interface Cluster has a new optional parameter migrationCluster + - Interface ClusterUpdate has a new optional parameter migrationCluster + - Interface DatabaseListResult has a new optional parameter nextLink + - Interface DatabasesListByClusterOptionalParams has a new optional parameter skiptoken + - Interface DatabasesListByClusterOptionalParams has a new optional parameter top + - Interface ReadOnlyFollowingDatabase has a new optional parameter suspensionDetails + - Interface ReadWriteDatabase has a new optional parameter keyVaultProperties + - Interface ReadWriteDatabase has a new optional parameter suspensionDetails + - Added Enum KnownMigrationClusterRole + - Enum KnownState has a new value Migrated + +**Breaking Changes** + + - Enum KnownLanguageExtensionImageName no longer has value Python3912 + - Enum KnownLanguageExtensionImageName no longer has value Python3912IncludeDeepLearning + + ## 7.3.0 (2023-02-07) **Features** diff --git a/sdk/kusto/arm-kusto/_meta.json b/sdk/kusto/arm-kusto/_meta.json index 2eef58f6e38f..53842993d94f 100644 --- a/sdk/kusto/arm-kusto/_meta.json +++ b/sdk/kusto/arm-kusto/_meta.json @@ -1,8 +1,8 @@ { - "commit": "41645a4769694a7d63a2514b45146ec369eeb273", + "commit": "b6b81994e26d3521459dea3e6e1bf181556509c8", "readme": "specification/azure-kusto/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\azure-kusto\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.7 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --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/azure-kusto/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.1", - "use": "@autorest/typescript@6.0.0-rc.7" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.1", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/kusto/arm-kusto/package.json b/sdk/kusto/arm-kusto/package.json index 34fa4e2e6dc7..a846c990e732 100644 --- a/sdk/kusto/arm-kusto/package.json +++ b/sdk/kusto/arm-kusto/package.json @@ -3,15 +3,15 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for KustoManagementClient.", - "version": "7.3.1", + "version": "8.0.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.3", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -33,13 +33,13 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~5.0.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", - "dotenv": "^8.2.0", + "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/kusto/arm-kusto", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-kusto?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/kusto/arm-kusto" +} \ No newline at end of file diff --git a/sdk/kusto/arm-kusto/review/arm-kusto.api.md b/sdk/kusto/arm-kusto/review/arm-kusto.api.md index 91218027e03d..935ae3385ff1 100644 --- a/sdk/kusto/arm-kusto/review/arm-kusto.api.md +++ b/sdk/kusto/arm-kusto/review/arm-kusto.api.md @@ -6,9 +6,9 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export interface AcceptedAudiences { @@ -35,9 +35,9 @@ export interface AttachedDatabaseConfigurationListResult { // @public export interface AttachedDatabaseConfigurations { - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, attachedDatabaseConfigurationName: string, parameters: AttachedDatabaseConfiguration, options?: AttachedDatabaseConfigurationsCreateOrUpdateOptionalParams): Promise, AttachedDatabaseConfigurationsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, clusterName: string, attachedDatabaseConfigurationName: string, parameters: AttachedDatabaseConfiguration, options?: AttachedDatabaseConfigurationsCreateOrUpdateOptionalParams): Promise, AttachedDatabaseConfigurationsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, attachedDatabaseConfigurationName: string, parameters: AttachedDatabaseConfiguration, options?: AttachedDatabaseConfigurationsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, attachedDatabaseConfigurationName: string, options?: AttachedDatabaseConfigurationsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, clusterName: string, attachedDatabaseConfigurationName: string, options?: AttachedDatabaseConfigurationsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, clusterName: string, attachedDatabaseConfigurationName: string, options?: AttachedDatabaseConfigurationsDeleteOptionalParams): Promise; checkNameAvailability(resourceGroupName: string, clusterName: string, resourceName: AttachedDatabaseConfigurationsCheckNameRequest, options?: AttachedDatabaseConfigurationsCheckNameAvailabilityOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, attachedDatabaseConfigurationName: string, options?: AttachedDatabaseConfigurationsGetOptionalParams): Promise; @@ -57,6 +57,11 @@ export interface AttachedDatabaseConfigurationsCheckNameRequest { type: "Microsoft.Kusto/clusters/attachedDatabaseConfigurations"; } +// @public +export interface AttachedDatabaseConfigurationsCreateOrUpdateHeaders { + azureAsyncOperation?: string; +} + // @public export interface AttachedDatabaseConfigurationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -66,6 +71,11 @@ export interface AttachedDatabaseConfigurationsCreateOrUpdateOptionalParams exte // @public export type AttachedDatabaseConfigurationsCreateOrUpdateResponse = AttachedDatabaseConfiguration; +// @public +export interface AttachedDatabaseConfigurationsDeleteHeaders { + azureAsyncOperation?: string; +} + // @public export interface AttachedDatabaseConfigurationsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -137,19 +147,6 @@ export interface CheckNameResult { reason?: Reason; } -// @public -export interface CloudError { - error?: CloudErrorBody; -} - -// @public -export interface CloudErrorBody { - code?: string; - details?: CloudErrorBody[]; - message?: string; - target?: string; -} - // @public export interface Cluster extends TrackedResource { acceptedAudiences?: AcceptedAudiences[]; @@ -166,6 +163,7 @@ export interface Cluster extends TrackedResource { identity?: Identity; keyVaultProperties?: KeyVaultProperties; languageExtensions?: LanguageExtensionsList; + readonly migrationCluster?: MigrationClusterProperties; optimizedAutoscale?: OptimizedAutoscale; readonly privateEndpointConnections?: PrivateEndpointConnection[]; readonly provisioningState?: ProvisioningState; @@ -194,6 +192,11 @@ export interface ClusterListResult { value?: Cluster[]; } +// @public +export interface ClusterMigrateRequest { + clusterResourceId: string; +} + // @public export type ClusterNetworkAccessFlag = string; @@ -222,9 +225,9 @@ export interface ClusterPrincipalAssignmentListResult { // @public export interface ClusterPrincipalAssignments { - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, principalAssignmentName: string, parameters: ClusterPrincipalAssignment, options?: ClusterPrincipalAssignmentsCreateOrUpdateOptionalParams): Promise, ClusterPrincipalAssignmentsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, clusterName: string, principalAssignmentName: string, parameters: ClusterPrincipalAssignment, options?: ClusterPrincipalAssignmentsCreateOrUpdateOptionalParams): Promise, ClusterPrincipalAssignmentsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, principalAssignmentName: string, parameters: ClusterPrincipalAssignment, options?: ClusterPrincipalAssignmentsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, principalAssignmentName: string, options?: ClusterPrincipalAssignmentsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, clusterName: string, principalAssignmentName: string, options?: ClusterPrincipalAssignmentsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, clusterName: string, principalAssignmentName: string, options?: ClusterPrincipalAssignmentsDeleteOptionalParams): Promise; checkNameAvailability(resourceGroupName: string, clusterName: string, principalAssignmentName: ClusterPrincipalAssignmentCheckNameRequest, options?: ClusterPrincipalAssignmentsCheckNameAvailabilityOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, principalAssignmentName: string, options?: ClusterPrincipalAssignmentsGetOptionalParams): Promise; @@ -247,6 +250,11 @@ export interface ClusterPrincipalAssignmentsCreateOrUpdateOptionalParams extends // @public export type ClusterPrincipalAssignmentsCreateOrUpdateResponse = ClusterPrincipalAssignment; +// @public +export interface ClusterPrincipalAssignmentsDeleteHeaders { + azureAsyncOperation?: string; +} + // @public export interface ClusterPrincipalAssignmentsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -272,23 +280,25 @@ export type ClusterPrincipalRole = string; // @public export interface Clusters { - beginAddLanguageExtensions(resourceGroupName: string, clusterName: string, languageExtensionsToAdd: LanguageExtensionsList, options?: ClustersAddLanguageExtensionsOptionalParams): Promise, void>>; + beginAddLanguageExtensions(resourceGroupName: string, clusterName: string, languageExtensionsToAdd: LanguageExtensionsList, options?: ClustersAddLanguageExtensionsOptionalParams): Promise, void>>; beginAddLanguageExtensionsAndWait(resourceGroupName: string, clusterName: string, languageExtensionsToAdd: LanguageExtensionsList, options?: ClustersAddLanguageExtensionsOptionalParams): Promise; - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, parameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams): Promise, ClustersCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, clusterName: string, parameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams): Promise, ClustersCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, parameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise; - beginDetachFollowerDatabases(resourceGroupName: string, clusterName: string, followerDatabaseToRemove: FollowerDatabaseDefinition, options?: ClustersDetachFollowerDatabasesOptionalParams): Promise, void>>; + beginDetachFollowerDatabases(resourceGroupName: string, clusterName: string, followerDatabaseToRemove: FollowerDatabaseDefinition, options?: ClustersDetachFollowerDatabasesOptionalParams): Promise, void>>; beginDetachFollowerDatabasesAndWait(resourceGroupName: string, clusterName: string, followerDatabaseToRemove: FollowerDatabaseDefinition, options?: ClustersDetachFollowerDatabasesOptionalParams): Promise; - beginDiagnoseVirtualNetwork(resourceGroupName: string, clusterName: string, options?: ClustersDiagnoseVirtualNetworkOptionalParams): Promise, ClustersDiagnoseVirtualNetworkResponse>>; + beginDiagnoseVirtualNetwork(resourceGroupName: string, clusterName: string, options?: ClustersDiagnoseVirtualNetworkOptionalParams): Promise, ClustersDiagnoseVirtualNetworkResponse>>; beginDiagnoseVirtualNetworkAndWait(resourceGroupName: string, clusterName: string, options?: ClustersDiagnoseVirtualNetworkOptionalParams): Promise; - beginRemoveLanguageExtensions(resourceGroupName: string, clusterName: string, languageExtensionsToRemove: LanguageExtensionsList, options?: ClustersRemoveLanguageExtensionsOptionalParams): Promise, void>>; + beginMigrate(resourceGroupName: string, clusterName: string, clusterMigrateRequest: ClusterMigrateRequest, options?: ClustersMigrateOptionalParams): Promise, void>>; + beginMigrateAndWait(resourceGroupName: string, clusterName: string, clusterMigrateRequest: ClusterMigrateRequest, options?: ClustersMigrateOptionalParams): Promise; + beginRemoveLanguageExtensions(resourceGroupName: string, clusterName: string, languageExtensionsToRemove: LanguageExtensionsList, options?: ClustersRemoveLanguageExtensionsOptionalParams): Promise, void>>; beginRemoveLanguageExtensionsAndWait(resourceGroupName: string, clusterName: string, languageExtensionsToRemove: LanguageExtensionsList, options?: ClustersRemoveLanguageExtensionsOptionalParams): Promise; - beginStart(resourceGroupName: string, clusterName: string, options?: ClustersStartOptionalParams): Promise, void>>; + beginStart(resourceGroupName: string, clusterName: string, options?: ClustersStartOptionalParams): Promise, void>>; beginStartAndWait(resourceGroupName: string, clusterName: string, options?: ClustersStartOptionalParams): Promise; - beginStop(resourceGroupName: string, clusterName: string, options?: ClustersStopOptionalParams): Promise, void>>; + beginStop(resourceGroupName: string, clusterName: string, options?: ClustersStopOptionalParams): Promise, void>>; beginStopAndWait(resourceGroupName: string, clusterName: string, options?: ClustersStopOptionalParams): Promise; - beginUpdate(resourceGroupName: string, clusterName: string, parameters: ClusterUpdate, options?: ClustersUpdateOptionalParams): Promise, ClustersUpdateResponse>>; + beginUpdate(resourceGroupName: string, clusterName: string, parameters: ClusterUpdate, options?: ClustersUpdateOptionalParams): Promise, ClustersUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, clusterName: string, parameters: ClusterUpdate, options?: ClustersUpdateOptionalParams): Promise; checkNameAvailability(location: string, clusterName: ClusterCheckNameRequest, options?: ClustersCheckNameAvailabilityOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, options?: ClustersGetOptionalParams): Promise; @@ -301,6 +311,11 @@ export interface Clusters { listSkusByResource(resourceGroupName: string, clusterName: string, options?: ClustersListSkusByResourceOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface ClustersAddLanguageExtensionsHeaders { + azureAsyncOperation?: string; +} + // @public export interface ClustersAddLanguageExtensionsOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -325,18 +340,33 @@ export interface ClustersCreateOrUpdateOptionalParams extends coreClient.Operati // @public export type ClustersCreateOrUpdateResponse = Cluster; +// @public +export interface ClustersDeleteHeaders { + azureAsyncOperation?: string; +} + // @public export interface ClustersDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export interface ClustersDetachFollowerDatabasesHeaders { + azureAsyncOperation?: string; +} + // @public export interface ClustersDetachFollowerDatabasesOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export interface ClustersDiagnoseVirtualNetworkHeaders { + azureAsyncOperation?: string; +} + // @public export interface ClustersDiagnoseVirtualNetworkOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -409,18 +439,44 @@ export interface ClustersListSkusOptionalParams extends coreClient.OperationOpti // @public export type ClustersListSkusResponse = SkuDescriptionList; +// @public +export interface ClustersMigrateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface ClustersMigrateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ClustersRemoveLanguageExtensionsHeaders { + azureAsyncOperation?: string; +} + // @public export interface ClustersRemoveLanguageExtensionsOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export interface ClustersStartHeaders { + azureAsyncOperation?: string; +} + // @public export interface ClustersStartOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export interface ClustersStopHeaders { + azureAsyncOperation?: string; +} + // @public export interface ClustersStopOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -458,6 +514,7 @@ export interface ClusterUpdate extends Resource { keyVaultProperties?: KeyVaultProperties; languageExtensions?: LanguageExtensionsList; location?: string; + readonly migrationCluster?: MigrationClusterProperties; optimizedAutoscale?: OptimizedAutoscale; readonly privateEndpointConnections?: PrivateEndpointConnection[]; readonly provisioningState?: ProvisioningState; @@ -508,11 +565,35 @@ export interface Database extends ProxyResource { location?: string; } +// @public +export interface DatabaseInviteFollowerOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface DatabaseInviteFollowerRequest { + inviteeEmail: string; + tableLevelSharingProperties?: TableLevelSharingProperties; +} + +// @public +export type DatabaseInviteFollowerResponse = DatabaseInviteFollowerResult; + +// @public +export interface DatabaseInviteFollowerResult { + generatedInvitation?: string; +} + // @public export interface DatabaseListResult { + nextLink?: string; value?: DatabaseUnion[]; } +// @public +export interface DatabaseOperations { + inviteFollower(resourceGroupName: string, clusterName: string, databaseName: string, parameters: DatabaseInviteFollowerRequest, options?: DatabaseInviteFollowerOptionalParams): Promise; +} + // @public export interface DatabasePrincipal { appId?: string; @@ -549,9 +630,9 @@ export interface DatabasePrincipalAssignmentListResult { // @public export interface DatabasePrincipalAssignments { - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, databaseName: string, principalAssignmentName: string, parameters: DatabasePrincipalAssignment, options?: DatabasePrincipalAssignmentsCreateOrUpdateOptionalParams): Promise, DatabasePrincipalAssignmentsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, clusterName: string, databaseName: string, principalAssignmentName: string, parameters: DatabasePrincipalAssignment, options?: DatabasePrincipalAssignmentsCreateOrUpdateOptionalParams): Promise, DatabasePrincipalAssignmentsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, databaseName: string, principalAssignmentName: string, parameters: DatabasePrincipalAssignment, options?: DatabasePrincipalAssignmentsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, databaseName: string, principalAssignmentName: string, options?: DatabasePrincipalAssignmentsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, clusterName: string, databaseName: string, principalAssignmentName: string, options?: DatabasePrincipalAssignmentsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, clusterName: string, databaseName: string, principalAssignmentName: string, options?: DatabasePrincipalAssignmentsDeleteOptionalParams): Promise; checkNameAvailability(resourceGroupName: string, clusterName: string, databaseName: string, principalAssignmentName: DatabasePrincipalAssignmentCheckNameRequest, options?: DatabasePrincipalAssignmentsCheckNameAvailabilityOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, databaseName: string, principalAssignmentName: string, options?: DatabasePrincipalAssignmentsGetOptionalParams): Promise; @@ -574,6 +655,11 @@ export interface DatabasePrincipalAssignmentsCreateOrUpdateOptionalParams extend // @public export type DatabasePrincipalAssignmentsCreateOrUpdateResponse = DatabasePrincipalAssignment; +// @public +export interface DatabasePrincipalAssignmentsDeleteHeaders { + azureAsyncOperation?: string; +} + // @public export interface DatabasePrincipalAssignmentsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -616,11 +702,11 @@ export type DatabaseRouting = string; // @public export interface Databases { addPrincipals(resourceGroupName: string, clusterName: string, databaseName: string, databasePrincipalsToAdd: DatabasePrincipalListRequest, options?: DatabasesAddPrincipalsOptionalParams): Promise; - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, databaseName: string, parameters: DatabaseUnion, options?: DatabasesCreateOrUpdateOptionalParams): Promise, DatabasesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, clusterName: string, databaseName: string, parameters: DatabaseUnion, options?: DatabasesCreateOrUpdateOptionalParams): Promise, DatabasesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, databaseName: string, parameters: DatabaseUnion, options?: DatabasesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, databaseName: string, options?: DatabasesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, clusterName: string, databaseName: string, options?: DatabasesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, clusterName: string, databaseName: string, options?: DatabasesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, clusterName: string, databaseName: string, parameters: DatabaseUnion, options?: DatabasesUpdateOptionalParams): Promise, DatabasesUpdateResponse>>; + beginUpdate(resourceGroupName: string, clusterName: string, databaseName: string, parameters: DatabaseUnion, options?: DatabasesUpdateOptionalParams): Promise, DatabasesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, clusterName: string, databaseName: string, parameters: DatabaseUnion, options?: DatabasesUpdateOptionalParams): Promise; checkNameAvailability(resourceGroupName: string, clusterName: string, resourceName: CheckNameRequest, options?: DatabasesCheckNameAvailabilityOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, databaseName: string, options?: DatabasesGetOptionalParams): Promise; @@ -643,6 +729,11 @@ export interface DatabasesCheckNameAvailabilityOptionalParams extends coreClient // @public export type DatabasesCheckNameAvailabilityResponse = CheckNameResult; +// @public +export interface DatabasesCreateOrUpdateHeaders { + azureAsyncOperation?: string; +} + // @public export interface DatabasesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { callerRole?: CallerRole; @@ -653,6 +744,11 @@ export interface DatabasesCreateOrUpdateOptionalParams extends coreClient.Operat // @public export type DatabasesCreateOrUpdateResponse = DatabaseUnion; +// @public +export interface DatabasesDeleteHeaders { + azureAsyncOperation?: string; +} + // @public export interface DatabasesDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -669,8 +765,17 @@ export type DatabasesGetResponse = DatabaseUnion; // @public export type DatabaseShareOrigin = string; +// @public +export interface DatabasesListByClusterNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabasesListByClusterNextResponse = DatabaseListResult; + // @public export interface DatabasesListByClusterOptionalParams extends coreClient.OperationOptions { + skiptoken?: string; + top?: number; } // @public @@ -735,13 +840,13 @@ export interface DataConnectionListResult { // @public export interface DataConnections { - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, databaseName: string, dataConnectionName: string, parameters: DataConnectionUnion, options?: DataConnectionsCreateOrUpdateOptionalParams): Promise, DataConnectionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, clusterName: string, databaseName: string, dataConnectionName: string, parameters: DataConnectionUnion, options?: DataConnectionsCreateOrUpdateOptionalParams): Promise, DataConnectionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, databaseName: string, dataConnectionName: string, parameters: DataConnectionUnion, options?: DataConnectionsCreateOrUpdateOptionalParams): Promise; - beginDataConnectionValidation(resourceGroupName: string, clusterName: string, databaseName: string, parameters: DataConnectionValidation, options?: DataConnectionsDataConnectionValidationOptionalParams): Promise, DataConnectionsDataConnectionValidationResponse>>; + beginDataConnectionValidation(resourceGroupName: string, clusterName: string, databaseName: string, parameters: DataConnectionValidation, options?: DataConnectionsDataConnectionValidationOptionalParams): Promise, DataConnectionsDataConnectionValidationResponse>>; beginDataConnectionValidationAndWait(resourceGroupName: string, clusterName: string, databaseName: string, parameters: DataConnectionValidation, options?: DataConnectionsDataConnectionValidationOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, databaseName: string, dataConnectionName: string, options?: DataConnectionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, clusterName: string, databaseName: string, dataConnectionName: string, options?: DataConnectionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, clusterName: string, databaseName: string, dataConnectionName: string, options?: DataConnectionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, clusterName: string, databaseName: string, dataConnectionName: string, parameters: DataConnectionUnion, options?: DataConnectionsUpdateOptionalParams): Promise, DataConnectionsUpdateResponse>>; + beginUpdate(resourceGroupName: string, clusterName: string, databaseName: string, dataConnectionName: string, parameters: DataConnectionUnion, options?: DataConnectionsUpdateOptionalParams): Promise, DataConnectionsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, clusterName: string, databaseName: string, dataConnectionName: string, parameters: DataConnectionUnion, options?: DataConnectionsUpdateOptionalParams): Promise; checkNameAvailability(resourceGroupName: string, clusterName: string, databaseName: string, dataConnectionName: DataConnectionCheckNameRequest, options?: DataConnectionsCheckNameAvailabilityOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, databaseName: string, dataConnectionName: string, options?: DataConnectionsGetOptionalParams): Promise; @@ -755,6 +860,11 @@ export interface DataConnectionsCheckNameAvailabilityOptionalParams extends core // @public export type DataConnectionsCheckNameAvailabilityResponse = CheckNameResult; +// @public +export interface DataConnectionsCreateOrUpdateHeaders { + azureAsyncOperation?: string; +} + // @public export interface DataConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -764,6 +874,11 @@ export interface DataConnectionsCreateOrUpdateOptionalParams extends coreClient. // @public export type DataConnectionsCreateOrUpdateResponse = DataConnectionUnion; +// @public +export interface DataConnectionsDataConnectionValidationHeaders { + azureAsyncOperation?: string; +} + // @public export interface DataConnectionsDataConnectionValidationOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -773,6 +888,11 @@ export interface DataConnectionsDataConnectionValidationOptionalParams extends c // @public export type DataConnectionsDataConnectionValidationResponse = DataConnectionValidationListResult; +// @public +export interface DataConnectionsDeleteHeaders { + azureAsyncOperation?: string; +} + // @public export interface DataConnectionsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -848,6 +968,26 @@ export interface EndpointDetail { // @public export type EngineType = string; +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + // @public export interface EventGridDataConnection extends DataConnection { blobStorageEventType?: BlobStorageEventType; @@ -1196,8 +1336,6 @@ export enum KnownKind { export enum KnownLanguageExtensionImageName { Python3108 = "Python3_10_8", Python365 = "Python3_6_5", - Python3912 = "Python3_9_12", - Python3912IncludeDeepLearning = "Python3_9_12IncludeDeepLearning", // (undocumented) R = "R" } @@ -1209,6 +1347,12 @@ export enum KnownLanguageExtensionName { R = "R" } +// @public +export enum KnownMigrationClusterRole { + Destination = "Destination", + Source = "Source" +} + // @public export enum KnownPrincipalsModificationKind { None = "None", @@ -1257,6 +1401,7 @@ export enum KnownState { Creating = "Creating", Deleted = "Deleted", Deleting = "Deleting", + Migrated = "Migrated", Running = "Running", Starting = "Starting", Stopped = "Stopped", @@ -1287,6 +1432,8 @@ export class KustoManagementClient extends coreClient.ServiceClient { // (undocumented) clusters: Clusters; // (undocumented) + databaseOperations: DatabaseOperations; + // (undocumented) databasePrincipalAssignments: DatabasePrincipalAssignments; // (undocumented) databases: Databases; @@ -1358,11 +1505,11 @@ export interface ManagedPrivateEndpointListResult { // @public export interface ManagedPrivateEndpoints { - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, managedPrivateEndpointName: string, parameters: ManagedPrivateEndpoint, options?: ManagedPrivateEndpointsCreateOrUpdateOptionalParams): Promise, ManagedPrivateEndpointsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, clusterName: string, managedPrivateEndpointName: string, parameters: ManagedPrivateEndpoint, options?: ManagedPrivateEndpointsCreateOrUpdateOptionalParams): Promise, ManagedPrivateEndpointsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, managedPrivateEndpointName: string, parameters: ManagedPrivateEndpoint, options?: ManagedPrivateEndpointsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, managedPrivateEndpointName: string, options?: ManagedPrivateEndpointsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, clusterName: string, managedPrivateEndpointName: string, options?: ManagedPrivateEndpointsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, clusterName: string, managedPrivateEndpointName: string, options?: ManagedPrivateEndpointsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, clusterName: string, managedPrivateEndpointName: string, parameters: ManagedPrivateEndpoint, options?: ManagedPrivateEndpointsUpdateOptionalParams): Promise, ManagedPrivateEndpointsUpdateResponse>>; + beginUpdate(resourceGroupName: string, clusterName: string, managedPrivateEndpointName: string, parameters: ManagedPrivateEndpoint, options?: ManagedPrivateEndpointsUpdateOptionalParams): Promise, ManagedPrivateEndpointsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, clusterName: string, managedPrivateEndpointName: string, parameters: ManagedPrivateEndpoint, options?: ManagedPrivateEndpointsUpdateOptionalParams): Promise; checkNameAvailability(resourceGroupName: string, clusterName: string, resourceName: ManagedPrivateEndpointsCheckNameRequest, options?: ManagedPrivateEndpointsCheckNameAvailabilityOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, managedPrivateEndpointName: string, options?: ManagedPrivateEndpointsGetOptionalParams): Promise; @@ -1382,6 +1529,11 @@ export interface ManagedPrivateEndpointsCheckNameRequest { type: "Microsoft.Kusto/clusters/managedPrivateEndpoints"; } +// @public +export interface ManagedPrivateEndpointsCreateOrUpdateHeaders { + azureAsyncOperation?: string; +} + // @public export interface ManagedPrivateEndpointsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1391,6 +1543,11 @@ export interface ManagedPrivateEndpointsCreateOrUpdateOptionalParams extends cor // @public export type ManagedPrivateEndpointsCreateOrUpdateResponse = ManagedPrivateEndpoint; +// @public +export interface ManagedPrivateEndpointsDeleteHeaders { + azureAsyncOperation?: string; +} + // @public export interface ManagedPrivateEndpointsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1425,6 +1582,17 @@ export interface ManagedPrivateEndpointsUpdateOptionalParams extends coreClient. // @public export type ManagedPrivateEndpointsUpdateResponse = ManagedPrivateEndpoint; +// @public +export interface MigrationClusterProperties { + readonly dataIngestionUri?: string; + readonly id?: string; + readonly role?: MigrationClusterRole; + readonly uri?: string; +} + +// @public +export type MigrationClusterRole = string; + // @public export interface Operation { display?: OperationDisplay; @@ -1495,13 +1663,21 @@ export type OperationsResultsGetResponse = OperationResult; // @public export interface OperationsResultsLocation { - get(location: string, operationId: string, options?: OperationsResultsLocationGetOptionalParams): Promise; + get(location: string, operationId: string, options?: OperationsResultsLocationGetOptionalParams): Promise; +} + +// @public +export interface OperationsResultsLocationGetHeaders { + azureAsyncOperation?: string; } // @public export interface OperationsResultsLocationGetOptionalParams extends coreClient.OperationOptions { } +// @public +export type OperationsResultsLocationGetResponse = OperationsResultsLocationGetHeaders; + // @public export interface OptimizedAutoscale { isEnabled: boolean; @@ -1546,9 +1722,9 @@ export interface PrivateEndpointConnectionListResult { // @public export interface PrivateEndpointConnections { - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise, PrivateEndpointConnectionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise, PrivateEndpointConnectionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise; list(resourceGroupName: string, clusterName: string, options?: PrivateEndpointConnectionsListOptionalParams): PagedAsyncIterableIterator; @@ -1563,6 +1739,11 @@ export interface PrivateEndpointConnectionsCreateOrUpdateOptionalParams extends // @public export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection; +// @public +export interface PrivateEndpointConnectionsDeleteHeaders { + azureAsyncOperation?: string; +} + // @public export interface PrivateEndpointConnectionsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1653,6 +1834,7 @@ export interface ReadOnlyFollowingDatabase extends Database { readonly provisioningState?: ProvisioningState; readonly softDeletePeriod?: string; readonly statistics?: DatabaseStatistics; + readonly suspensionDetails?: SuspensionDetails; readonly tableLevelSharingProperties?: TableLevelSharingProperties; } @@ -1660,10 +1842,12 @@ export interface ReadOnlyFollowingDatabase extends Database { export interface ReadWriteDatabase extends Database { hotCachePeriod?: string; readonly isFollowed?: boolean; + keyVaultProperties?: KeyVaultProperties; kind: "ReadWrite"; readonly provisioningState?: ProvisioningState; softDeletePeriod?: string; readonly statistics?: DatabaseStatistics; + readonly suspensionDetails?: SuspensionDetails; } // @public @@ -1712,11 +1896,11 @@ export interface ScriptListResult { // @public export interface Scripts { - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, databaseName: string, scriptName: string, parameters: Script, options?: ScriptsCreateOrUpdateOptionalParams): Promise, ScriptsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, clusterName: string, databaseName: string, scriptName: string, parameters: Script, options?: ScriptsCreateOrUpdateOptionalParams): Promise, ScriptsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, databaseName: string, scriptName: string, parameters: Script, options?: ScriptsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, databaseName: string, scriptName: string, options?: ScriptsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, clusterName: string, databaseName: string, scriptName: string, options?: ScriptsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, clusterName: string, databaseName: string, scriptName: string, options?: ScriptsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, clusterName: string, databaseName: string, scriptName: string, parameters: Script, options?: ScriptsUpdateOptionalParams): Promise, ScriptsUpdateResponse>>; + beginUpdate(resourceGroupName: string, clusterName: string, databaseName: string, scriptName: string, parameters: Script, options?: ScriptsUpdateOptionalParams): Promise, ScriptsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, clusterName: string, databaseName: string, scriptName: string, parameters: Script, options?: ScriptsUpdateOptionalParams): Promise; checkNameAvailability(resourceGroupName: string, clusterName: string, databaseName: string, scriptName: ScriptCheckNameRequest, options?: ScriptsCheckNameAvailabilityOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, databaseName: string, scriptName: string, options?: ScriptsGetOptionalParams): Promise; @@ -1730,6 +1914,11 @@ export interface ScriptsCheckNameAvailabilityOptionalParams extends coreClient.O // @public export type ScriptsCheckNameAvailabilityResponse = CheckNameResult; +// @public +export interface ScriptsCreateOrUpdateHeaders { + azureAsyncOperation?: string; +} + // @public export interface ScriptsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1739,6 +1928,11 @@ export interface ScriptsCreateOrUpdateOptionalParams extends coreClient.Operatio // @public export type ScriptsCreateOrUpdateResponse = Script; +// @public +export interface ScriptsDeleteHeaders { + azureAsyncOperation?: string; +} + // @public export interface ScriptsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1813,6 +2007,11 @@ export type State = string; // @public export type Status = string; +// @public +export interface SuspensionDetails { + suspensionStartDate?: Date; +} + // @public export interface SystemData { createdAt?: Date; diff --git a/sdk/kusto/arm-kusto/src/kustoManagementClient.ts b/sdk/kusto/arm-kusto/src/kustoManagementClient.ts index dda21d6eef1f..a81b7d776a55 100644 --- a/sdk/kusto/arm-kusto/src/kustoManagementClient.ts +++ b/sdk/kusto/arm-kusto/src/kustoManagementClient.ts @@ -21,6 +21,7 @@ import { DatabasesImpl, AttachedDatabaseConfigurationsImpl, ManagedPrivateEndpointsImpl, + DatabaseOperationsImpl, DatabasePrincipalAssignmentsImpl, ScriptsImpl, PrivateEndpointConnectionsImpl, @@ -37,6 +38,7 @@ import { Databases, AttachedDatabaseConfigurations, ManagedPrivateEndpoints, + DatabaseOperations, DatabasePrincipalAssignments, Scripts, PrivateEndpointConnections, @@ -56,8 +58,7 @@ export class KustoManagementClient extends coreClient.ServiceClient { /** * Initializes a new instance of the KustoManagementClient class. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure - * subscription. The subscription ID forms part of the URI for every service call. + * @param subscriptionId The ID of the target subscription. * @param options The parameter options */ constructor( @@ -81,7 +82,7 @@ export class KustoManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-kusto/7.3.1`; + const packageDetails = `azsdk-js-arm-kusto/8.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -134,7 +135,7 @@ export class KustoManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-12-29"; + this.apiVersion = options.apiVersion || "2023-05-02"; this.clusters = new ClustersImpl(this); this.clusterPrincipalAssignments = new ClusterPrincipalAssignmentsImpl( this @@ -145,6 +146,7 @@ export class KustoManagementClient extends coreClient.ServiceClient { this ); this.managedPrivateEndpoints = new ManagedPrivateEndpointsImpl(this); + this.databaseOperations = new DatabaseOperationsImpl(this); this.databasePrincipalAssignments = new DatabasePrincipalAssignmentsImpl( this ); @@ -192,6 +194,7 @@ export class KustoManagementClient extends coreClient.ServiceClient { databases: Databases; attachedDatabaseConfigurations: AttachedDatabaseConfigurations; managedPrivateEndpoints: ManagedPrivateEndpoints; + databaseOperations: DatabaseOperations; databasePrincipalAssignments: DatabasePrincipalAssignments; scripts: Scripts; privateEndpointConnections: PrivateEndpointConnections; diff --git a/sdk/kusto/arm-kusto/src/lroImpl.ts b/sdk/kusto/arm-kusto/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/kusto/arm-kusto/src/lroImpl.ts +++ b/sdk/kusto/arm-kusto/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; } diff --git a/sdk/kusto/arm-kusto/src/models/index.ts b/sdk/kusto/arm-kusto/src/models/index.ts index 509c9c3f06ec..c0a2b2c3a467 100644 --- a/sdk/kusto/arm-kusto/src/models/index.ts +++ b/sdk/kusto/arm-kusto/src/models/index.ts @@ -179,22 +179,83 @@ export interface Resource { readonly type?: string; } -/** An error response from Kusto. */ -export interface CloudError { - /** An error response from Kusto. */ - error?: CloudErrorBody; +/** Represents a properties of a cluster that is part of a migration. */ +export interface MigrationClusterProperties { + /** + * The resource ID of the cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The public URL of the cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly uri?: string; + /** + * The public data ingestion URL of the cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dataIngestionUri?: string; + /** + * The role of the cluster in the migration process. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly role?: MigrationClusterRole; } -/** An error response from Kusto. */ -export interface CloudErrorBody { - /** An identifier for the error. Codes are invariant and are intended to be consumed programmatically. */ - code?: string; - /** A message describing the error, intended to be suitable for displaying in a user interface. */ - message?: string; - /** The target of the particular error. For example, the name of the property in error. */ - target?: string; - /** A list of additional details about the error. */ - details?: CloudErrorBody[]; +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +/** A cluster migrate request. */ +export interface ClusterMigrateRequest { + /** Resource ID of the destination cluster or kusto pool. */ + clusterResourceId: string; } /** A principal assignment check name availability request. */ @@ -426,10 +487,26 @@ export interface AzureCapacity { /** The list Kusto databases operation response. */ export interface DatabaseListResult { + /** Link to the next page of results */ + nextLink?: string; /** The list of Kusto databases. */ value?: DatabaseUnion[]; } +/** The request to invite a follower to a database. */ +export interface DatabaseInviteFollowerRequest { + /** The email of the invited user for which the follower invitation is generated. */ + inviteeEmail: string; + /** Table level sharing specifications */ + tableLevelSharingProperties?: TableLevelSharingProperties; +} + +/** The result returned from a follower invitation generation request. */ +export interface DatabaseInviteFollowerResult { + /** The generated invitation token. */ + generatedInvitation?: string; +} + /** A principal assignment check name availability request. */ export interface DatabasePrincipalAssignmentCheckNameRequest { /** Principal Assignment resource name. */ @@ -650,6 +727,12 @@ export interface DatabaseStatistics { size?: number; } +/** The database suspension details. If the database is suspended, this object contains information related to the database's suspension state. */ +export interface SuspensionDetails { + /** The starting date and time of the suspension state. */ + suspensionStartDate?: Date; +} + /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export interface ProxyResource extends Resource {} @@ -737,6 +820,11 @@ export interface ClusterUpdate extends Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly privateEndpointConnections?: PrivateEndpointConnection[]; + /** + * Properties of the peer cluster involved in a migration to/from this cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly migrationCluster?: MigrationClusterProperties; } /** A private link resource */ @@ -1045,6 +1133,11 @@ export interface Cluster extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly privateEndpointConnections?: PrivateEndpointConnection[]; + /** + * Properties of the peer cluster involved in a migration to/from this cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly migrationCluster?: MigrationClusterProperties; } /** Class representing a read write database. */ @@ -1070,6 +1163,13 @@ export interface ReadWriteDatabase extends Database { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly isFollowed?: boolean; + /** KeyVault properties for the database encryption. */ + keyVaultProperties?: KeyVaultProperties; + /** + * The database suspension details. If the database is suspended, this object contains information related to the database's suspension state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly suspensionDetails?: SuspensionDetails; } /** Class representing a read only following database. */ @@ -1123,6 +1223,11 @@ export interface ReadOnlyFollowingDatabase extends Database { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly databaseShareOrigin?: DatabaseShareOrigin; + /** + * The database suspension details. If the database is suspended, this object contains information related to the database's suspension state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly suspensionDetails?: SuspensionDetails; } /** Class representing an event hub data connection. */ @@ -1260,31 +1365,169 @@ export interface CosmosDbDataConnection extends DataConnection { /** Defines headers for Clusters_update operation. */ export interface ClustersUpdateHeaders { - /** URL to query for status of the operation. */ + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Clusters_delete operation. */ +export interface ClustersDeleteHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Clusters_stop operation. */ +export interface ClustersStopHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Clusters_start operation. */ +export interface ClustersStartHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Clusters_migrate operation. */ +export interface ClustersMigrateHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Clusters_detachFollowerDatabases operation. */ +export interface ClustersDetachFollowerDatabasesHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Clusters_diagnoseVirtualNetwork operation. */ +export interface ClustersDiagnoseVirtualNetworkHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Clusters_addLanguageExtensions operation. */ +export interface ClustersAddLanguageExtensionsHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Clusters_removeLanguageExtensions operation. */ +export interface ClustersRemoveLanguageExtensionsHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for ClusterPrincipalAssignments_delete operation. */ +export interface ClusterPrincipalAssignmentsDeleteHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Databases_createOrUpdate operation. */ +export interface DatabasesCreateOrUpdateHeaders { + /** URL to query the status of the operation. */ azureAsyncOperation?: string; } /** Defines headers for Databases_update operation. */ export interface DatabasesUpdateHeaders { - /** URL to query for status of the operation. */ + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Databases_delete operation. */ +export interface DatabasesDeleteHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for AttachedDatabaseConfigurations_createOrUpdate operation. */ +export interface AttachedDatabaseConfigurationsCreateOrUpdateHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for AttachedDatabaseConfigurations_delete operation. */ +export interface AttachedDatabaseConfigurationsDeleteHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for ManagedPrivateEndpoints_createOrUpdate operation. */ +export interface ManagedPrivateEndpointsCreateOrUpdateHeaders { + /** URL to query the status of the operation. */ azureAsyncOperation?: string; } /** Defines headers for ManagedPrivateEndpoints_update operation. */ export interface ManagedPrivateEndpointsUpdateHeaders { - /** URL to query for status of the operation. */ + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for ManagedPrivateEndpoints_delete operation. */ +export interface ManagedPrivateEndpointsDeleteHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for DatabasePrincipalAssignments_delete operation. */ +export interface DatabasePrincipalAssignmentsDeleteHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Scripts_createOrUpdate operation. */ +export interface ScriptsCreateOrUpdateHeaders { + /** URL to query the status of the operation. */ azureAsyncOperation?: string; } /** Defines headers for Scripts_update operation. */ export interface ScriptsUpdateHeaders { - /** URL to query for status of the operation. */ + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Scripts_delete operation. */ +export interface ScriptsDeleteHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for PrivateEndpointConnections_delete operation. */ +export interface PrivateEndpointConnectionsDeleteHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for DataConnections_dataConnectionValidation operation. */ +export interface DataConnectionsDataConnectionValidationHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for DataConnections_createOrUpdate operation. */ +export interface DataConnectionsCreateOrUpdateHeaders { + /** URL to query the status of the operation. */ azureAsyncOperation?: string; } /** Defines headers for DataConnections_update operation. */ export interface DataConnectionsUpdateHeaders { - /** URL to query for status of the operation. */ + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for DataConnections_delete operation. */ +export interface DataConnectionsDeleteHeaders { + /** URL to query the status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for OperationsResultsLocation_get operation. */ +export interface OperationsResultsLocationGetHeaders { + /** URL to query the status of the operation. */ azureAsyncOperation?: string; } @@ -1577,7 +1820,9 @@ export enum KnownState { /** Starting */ Starting = "Starting", /** Updating */ - Updating = "Updating" + Updating = "Updating", + /** Migrated */ + Migrated = "Migrated" } /** @@ -1593,7 +1838,8 @@ export enum KnownState { * **Stopping** \ * **Stopped** \ * **Starting** \ - * **Updating** + * **Updating** \ + * **Migrated** */ export type State = string; @@ -1654,10 +1900,6 @@ export enum KnownLanguageExtensionImageName { R = "R", /** Python365 */ Python365 = "Python3_6_5", - /** Python3912 */ - Python3912 = "Python3_9_12", - /** Python3912IncludeDeepLearning */ - Python3912IncludeDeepLearning = "Python3_9_12IncludeDeepLearning", /** Python3108 */ Python3108 = "Python3_10_8" } @@ -1669,8 +1911,6 @@ export enum KnownLanguageExtensionImageName { * ### Known values supported by the service * **R** \ * **Python3_6_5** \ - * **Python3_9_12** \ - * **Python3_9_12IncludeDeepLearning** \ * **Python3_10_8** */ export type LanguageExtensionImageName = string; @@ -1747,6 +1987,24 @@ export enum KnownPublicIPType { */ export type PublicIPType = string; +/** Known values of {@link MigrationClusterRole} that the service accepts. */ +export enum KnownMigrationClusterRole { + /** Source */ + Source = "Source", + /** Destination */ + Destination = "Destination" +} + +/** + * Defines values for MigrationClusterRole. \ + * {@link KnownMigrationClusterRole} can be used interchangeably with MigrationClusterRole, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Source** \ + * **Destination** + */ +export type MigrationClusterRole = string; + /** Known values of {@link Reason} that the service accepts. */ export enum KnownReason { /** Invalid */ @@ -2325,6 +2583,15 @@ export interface ClustersStartOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface ClustersMigrateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + /** Optional parameters. */ export interface ClustersListFollowerDatabasesOptionalParams extends coreClient.OperationOptions {} @@ -2484,7 +2751,12 @@ export type DatabasesCheckNameAvailabilityResponse = CheckNameResult; /** Optional parameters. */ export interface DatabasesListByClusterOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** limit the number of results */ + top?: number; + /** Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. */ + skiptoken?: string; +} /** Contains response data for the listByCluster operation. */ export type DatabasesListByClusterResponse = DatabaseListResult; @@ -2554,6 +2826,13 @@ export interface DatabasesRemovePrincipalsOptionalParams /** Contains response data for the removePrincipals operation. */ export type DatabasesRemovePrincipalsResponse = DatabasePrincipalListResult; +/** Optional parameters. */ +export interface DatabasesListByClusterNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByClusterNext operation. */ +export type DatabasesListByClusterNextResponse = DatabaseListResult; + /** Optional parameters. */ export interface AttachedDatabaseConfigurationsCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions {} @@ -2650,6 +2929,13 @@ export interface ManagedPrivateEndpointsDeleteOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface DatabaseInviteFollowerOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the inviteFollower operation. */ +export type DatabaseInviteFollowerResponse = DatabaseInviteFollowerResult; + /** Optional parameters. */ export interface DatabasePrincipalAssignmentsCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions {} @@ -2885,6 +3171,9 @@ export type OperationsResultsGetResponse = OperationResult; export interface OperationsResultsLocationGetOptionalParams extends coreClient.OperationOptions {} +/** Contains response data for the get operation. */ +export type OperationsResultsLocationGetResponse = OperationsResultsLocationGetHeaders; + /** Optional parameters. */ export interface KustoManagementClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/kusto/arm-kusto/src/models/mappers.ts b/sdk/kusto/arm-kusto/src/models/mappers.ts index 64d6ef2d6c58..cf117e89814d 100644 --- a/sdk/kusto/arm-kusto/src/models/mappers.ts +++ b/sdk/kusto/arm-kusto/src/models/mappers.ts @@ -395,53 +395,107 @@ export const Resource: coreClient.CompositeMapper = { } }; -export const CloudError: coreClient.CompositeMapper = { +export const MigrationClusterProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CloudError", + className: "MigrationClusterProperties", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + uri: { + serializedName: "uri", + readOnly: true, + type: { + name: "String" + } + }, + dataIngestionUri: { + serializedName: "dataIngestionUri", + readOnly: true, + type: { + name: "String" + } + }, + role: { + serializedName: "role", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", modelProperties: { error: { serializedName: "error", type: { name: "Composite", - className: "CloudErrorBody" + className: "ErrorDetail" } } } } }; -export const CloudErrorBody: coreClient.CompositeMapper = { +export const ErrorDetail: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CloudErrorBody", + className: "ErrorDetail", modelProperties: { code: { serializedName: "code", + readOnly: true, type: { name: "String" } }, message: { serializedName: "message", + readOnly: true, type: { name: "String" } }, target: { serializedName: "target", + readOnly: true, type: { name: "String" } }, details: { serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "CloudErrorBody" + className: "ErrorAdditionalInfo" } } } @@ -450,6 +504,46 @@ export const CloudErrorBody: coreClient.CompositeMapper = { } }; +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const ClusterMigrateRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterMigrateRequest", + modelProperties: { + clusterResourceId: { + serializedName: "clusterResourceId", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const ClusterPrincipalAssignmentCheckNameRequest: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1108,6 +1202,12 @@ export const DatabaseListResult: coreClient.CompositeMapper = { name: "Composite", className: "DatabaseListResult", modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, value: { serializedName: "value", type: { @@ -1124,6 +1224,44 @@ export const DatabaseListResult: coreClient.CompositeMapper = { } }; +export const DatabaseInviteFollowerRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseInviteFollowerRequest", + modelProperties: { + inviteeEmail: { + serializedName: "inviteeEmail", + required: true, + type: { + name: "String" + } + }, + tableLevelSharingProperties: { + serializedName: "tableLevelSharingProperties", + type: { + name: "Composite", + className: "TableLevelSharingProperties" + } + } + } + } +}; + +export const DatabaseInviteFollowerResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseInviteFollowerResult", + modelProperties: { + generatedInvitation: { + serializedName: "generatedInvitation", + type: { + name: "String" + } + } + } + } +}; + export const DatabasePrincipalAssignmentCheckNameRequest: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1762,6 +1900,21 @@ export const DatabaseStatistics: coreClient.CompositeMapper = { } }; +export const SuspensionDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SuspensionDetails", + modelProperties: { + suspensionStartDate: { + serializedName: "suspensionStartDate", + type: { + name: "DateTime" + } + } + } + } +}; + export const ProxyResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2019,6 +2172,13 @@ export const ClusterUpdate: coreClient.CompositeMapper = { } } } + }, + migrationCluster: { + serializedName: "properties.migrationCluster", + type: { + name: "Composite", + className: "MigrationClusterProperties" + } } } } @@ -2751,6 +2911,13 @@ export const Cluster: coreClient.CompositeMapper = { } } } + }, + migrationCluster: { + serializedName: "properties.migrationCluster", + type: { + name: "Composite", + className: "MigrationClusterProperties" + } } } } @@ -2797,6 +2964,20 @@ export const ReadWriteDatabase: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + keyVaultProperties: { + serializedName: "properties.keyVaultProperties", + type: { + name: "Composite", + className: "KeyVaultProperties" + } + }, + suspensionDetails: { + serializedName: "properties.suspensionDetails", + type: { + name: "Composite", + className: "SuspensionDetails" + } } } } @@ -2879,6 +3060,13 @@ export const ReadOnlyFollowingDatabase: coreClient.CompositeMapper = { type: { name: "String" } + }, + suspensionDetails: { + serializedName: "properties.suspensionDetails", + type: { + name: "Composite", + className: "SuspensionDetails" + } } } } @@ -3233,6 +3421,156 @@ export const ClustersUpdateHeaders: coreClient.CompositeMapper = { } }; +export const ClustersDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClustersDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ClustersStopHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClustersStopHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ClustersStartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClustersStartHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ClustersMigrateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClustersMigrateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ClustersDetachFollowerDatabasesHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClustersDetachFollowerDatabasesHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ClustersDiagnoseVirtualNetworkHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClustersDiagnoseVirtualNetworkHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ClustersAddLanguageExtensionsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClustersAddLanguageExtensionsHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ClustersRemoveLanguageExtensionsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClustersRemoveLanguageExtensionsHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterPrincipalAssignmentsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPrincipalAssignmentsDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const DatabasesCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabasesCreateOrUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + export const DatabasesUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3248,6 +3586,66 @@ export const DatabasesUpdateHeaders: coreClient.CompositeMapper = { } }; +export const DatabasesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabasesDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const AttachedDatabaseConfigurationsCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AttachedDatabaseConfigurationsCreateOrUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const AttachedDatabaseConfigurationsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AttachedDatabaseConfigurationsDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedPrivateEndpointsCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedPrivateEndpointsCreateOrUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + export const ManagedPrivateEndpointsUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3263,6 +3661,51 @@ export const ManagedPrivateEndpointsUpdateHeaders: coreClient.CompositeMapper = } }; +export const ManagedPrivateEndpointsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedPrivateEndpointsDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const DatabasePrincipalAssignmentsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabasePrincipalAssignmentsDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ScriptsCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScriptsCreateOrUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + export const ScriptsUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3278,6 +3721,66 @@ export const ScriptsUpdateHeaders: coreClient.CompositeMapper = { } }; +export const ScriptsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScriptsDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionsDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const DataConnectionsDataConnectionValidationHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataConnectionsDataConnectionValidationHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const DataConnectionsCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataConnectionsCreateOrUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + export const DataConnectionsUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3293,6 +3796,36 @@ export const DataConnectionsUpdateHeaders: coreClient.CompositeMapper = { } }; +export const DataConnectionsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataConnectionsDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const OperationsResultsLocationGetHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationsResultsLocationGetHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + export let discriminators = { "ProxyResource.Database": Database, "ProxyResource.DataConnection": DataConnection, diff --git a/sdk/kusto/arm-kusto/src/models/parameters.ts b/sdk/kusto/arm-kusto/src/models/parameters.ts index c895ae1aa950..7c60a3ddf077 100644 --- a/sdk/kusto/arm-kusto/src/models/parameters.ts +++ b/sdk/kusto/arm-kusto/src/models/parameters.ts @@ -14,6 +14,7 @@ import { import { Cluster as ClusterMapper, ClusterUpdate as ClusterUpdateMapper, + ClusterMigrateRequest as ClusterMigrateRequestMapper, FollowerDatabaseDefinition as FollowerDatabaseDefinitionMapper, ClusterCheckNameRequest as ClusterCheckNameRequestMapper, LanguageExtensionsList as LanguageExtensionsListMapper, @@ -26,6 +27,7 @@ import { AttachedDatabaseConfiguration as AttachedDatabaseConfigurationMapper, ManagedPrivateEndpointsCheckNameRequest as ManagedPrivateEndpointsCheckNameRequestMapper, ManagedPrivateEndpoint as ManagedPrivateEndpointMapper, + DatabaseInviteFollowerRequest as DatabaseInviteFollowerRequestMapper, DatabasePrincipalAssignmentCheckNameRequest as DatabasePrincipalAssignmentCheckNameRequestMapper, DatabasePrincipalAssignment as DatabasePrincipalAssignmentMapper, Script as ScriptMapper, @@ -63,6 +65,10 @@ export const $host: OperationURLParameter = { export const resourceGroupName: OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, serializedName: "resourceGroupName", required: true, type: { @@ -74,6 +80,9 @@ export const resourceGroupName: OperationURLParameter = { export const clusterName: OperationURLParameter = { parameterPath: "clusterName", mapper: { + constraints: { + Pattern: new RegExp("^.*$") + }, serializedName: "clusterName", required: true, type: { @@ -85,6 +94,9 @@ export const clusterName: OperationURLParameter = { export const subscriptionId: OperationURLParameter = { parameterPath: "subscriptionId", mapper: { + constraints: { + MinLength: 1 + }, serializedName: "subscriptionId", required: true, type: { @@ -96,7 +108,7 @@ export const subscriptionId: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-12-29", + defaultValue: "2023-05-02", isConstant: true, serializedName: "api-version", type: { @@ -147,6 +159,11 @@ export const parameters1: OperationParameter = { mapper: ClusterUpdateMapper }; +export const clusterMigrateRequest: OperationParameter = { + parameterPath: "clusterMigrateRequest", + mapper: ClusterMigrateRequestMapper +}; + export const followerDatabaseToRemove: OperationParameter = { parameterPath: "followerDatabaseToRemove", mapper: FollowerDatabaseDefinitionMapper @@ -160,6 +177,9 @@ export const clusterName1: OperationParameter = { export const location: OperationURLParameter = { parameterPath: "location", mapper: { + constraints: { + MinLength: 1 + }, serializedName: "location", required: true, type: { @@ -198,6 +218,9 @@ export const principalAssignmentName: OperationParameter = { export const principalAssignmentName1: OperationURLParameter = { parameterPath: "principalAssignmentName", mapper: { + constraints: { + Pattern: new RegExp("^.*$") + }, serializedName: "principalAssignmentName", required: true, type: { @@ -216,9 +239,36 @@ export const resourceName: OperationParameter = { mapper: CheckNameRequestMapper }; +export const top: OperationQueryParameter = { + parameterPath: ["options", "top"], + mapper: { + constraints: { + InclusiveMaximum: 1000, + InclusiveMinimum: 5 + }, + serializedName: "$top", + type: { + name: "Number" + } + } +}; + +export const skiptoken: OperationQueryParameter = { + parameterPath: ["options", "skiptoken"], + mapper: { + serializedName: "$skiptoken", + type: { + name: "String" + } + } +}; + export const databaseName: OperationURLParameter = { parameterPath: "databaseName", mapper: { + constraints: { + Pattern: new RegExp("^.*$") + }, serializedName: "databaseName", required: true, type: { @@ -261,6 +311,9 @@ export const resourceName1: OperationParameter = { export const attachedDatabaseConfigurationName: OperationURLParameter = { parameterPath: "attachedDatabaseConfigurationName", mapper: { + constraints: { + Pattern: new RegExp("^.*$") + }, serializedName: "attachedDatabaseConfigurationName", required: true, type: { @@ -282,6 +335,9 @@ export const resourceName2: OperationParameter = { export const managedPrivateEndpointName: OperationURLParameter = { parameterPath: "managedPrivateEndpointName", mapper: { + constraints: { + Pattern: new RegExp("^.*$") + }, serializedName: "managedPrivateEndpointName", required: true, type: { @@ -295,12 +351,17 @@ export const parameters5: OperationParameter = { mapper: ManagedPrivateEndpointMapper }; +export const parameters6: OperationParameter = { + parameterPath: "parameters", + mapper: DatabaseInviteFollowerRequestMapper +}; + export const principalAssignmentName2: OperationParameter = { parameterPath: "principalAssignmentName", mapper: DatabasePrincipalAssignmentCheckNameRequestMapper }; -export const parameters6: OperationParameter = { +export const parameters7: OperationParameter = { parameterPath: "parameters", mapper: DatabasePrincipalAssignmentMapper }; @@ -308,6 +369,9 @@ export const parameters6: OperationParameter = { export const scriptName: OperationURLParameter = { parameterPath: "scriptName", mapper: { + constraints: { + Pattern: new RegExp("^.*$") + }, serializedName: "scriptName", required: true, type: { @@ -316,7 +380,7 @@ export const scriptName: OperationURLParameter = { } }; -export const parameters7: OperationParameter = { +export const parameters8: OperationParameter = { parameterPath: "parameters", mapper: ScriptMapper }; @@ -329,6 +393,9 @@ export const scriptName1: OperationParameter = { export const privateEndpointConnectionName: OperationURLParameter = { parameterPath: "privateEndpointConnectionName", mapper: { + constraints: { + Pattern: new RegExp("^.*$") + }, serializedName: "privateEndpointConnectionName", required: true, type: { @@ -337,7 +404,7 @@ export const privateEndpointConnectionName: OperationURLParameter = { } }; -export const parameters8: OperationParameter = { +export const parameters9: OperationParameter = { parameterPath: "parameters", mapper: PrivateEndpointConnectionMapper }; @@ -345,6 +412,9 @@ export const parameters8: OperationParameter = { export const privateLinkResourceName: OperationURLParameter = { parameterPath: "privateLinkResourceName", mapper: { + constraints: { + Pattern: new RegExp("^.*$") + }, serializedName: "privateLinkResourceName", required: true, type: { @@ -353,7 +423,7 @@ export const privateLinkResourceName: OperationURLParameter = { } }; -export const parameters9: OperationParameter = { +export const parameters10: OperationParameter = { parameterPath: "parameters", mapper: DataConnectionValidationMapper }; @@ -366,6 +436,9 @@ export const dataConnectionName: OperationParameter = { export const dataConnectionName1: OperationURLParameter = { parameterPath: "dataConnectionName", mapper: { + constraints: { + Pattern: new RegExp("^.*$") + }, serializedName: "dataConnectionName", required: true, type: { @@ -374,7 +447,7 @@ export const dataConnectionName1: OperationURLParameter = { } }; -export const parameters10: OperationParameter = { +export const parameters11: OperationParameter = { parameterPath: "parameters", mapper: DataConnectionMapper }; @@ -382,6 +455,9 @@ export const parameters10: OperationParameter = { export const operationId: OperationURLParameter = { parameterPath: "operationId", mapper: { + constraints: { + MinLength: 1 + }, serializedName: "operationId", required: true, type: { diff --git a/sdk/kusto/arm-kusto/src/operations/attachedDatabaseConfigurations.ts b/sdk/kusto/arm-kusto/src/operations/attachedDatabaseConfigurations.ts index 06ff8e9b2b1e..c347969acf24 100644 --- a/sdk/kusto/arm-kusto/src/operations/attachedDatabaseConfigurations.ts +++ b/sdk/kusto/arm-kusto/src/operations/attachedDatabaseConfigurations.ts @@ -12,8 +12,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { KustoManagementClient } from "../kustoManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { AttachedDatabaseConfiguration, AttachedDatabaseConfigurationsListByClusterOptionalParams, @@ -44,7 +48,7 @@ export class AttachedDatabaseConfigurationsImpl /** * Returns the list of attached database configurations of the given Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -106,7 +110,7 @@ export class AttachedDatabaseConfigurationsImpl /** * Checks that the attached database configuration resource name is valid and is not already in use. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param resourceName The name of the resource. * @param options The options parameters. @@ -125,7 +129,7 @@ export class AttachedDatabaseConfigurationsImpl /** * Returns the list of attached database configurations of the given Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -142,7 +146,7 @@ export class AttachedDatabaseConfigurationsImpl /** * Returns an attached database configuration. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param attachedDatabaseConfigurationName The name of the attached database configuration. * @param options The options parameters. @@ -166,7 +170,7 @@ export class AttachedDatabaseConfigurationsImpl /** * Creates or updates an attached database configuration. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param attachedDatabaseConfigurationName The name of the attached database configuration. * @param parameters The database parameters supplied to the CreateOrUpdate operation. @@ -179,8 +183,8 @@ export class AttachedDatabaseConfigurationsImpl parameters: AttachedDatabaseConfiguration, options?: AttachedDatabaseConfigurationsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AttachedDatabaseConfigurationsCreateOrUpdateResponse > > { @@ -190,7 +194,7 @@ export class AttachedDatabaseConfigurationsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -223,20 +227,24 @@ export class AttachedDatabaseConfigurationsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, attachedDatabaseConfigurationName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + AttachedDatabaseConfigurationsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -244,7 +252,7 @@ export class AttachedDatabaseConfigurationsImpl /** * Creates or updates an attached database configuration. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param attachedDatabaseConfigurationName The name of the attached database configuration. * @param parameters The database parameters supplied to the CreateOrUpdate operation. @@ -269,7 +277,7 @@ export class AttachedDatabaseConfigurationsImpl /** * Deletes the attached database configuration with the given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param attachedDatabaseConfigurationName The name of the attached database configuration. * @param options The options parameters. @@ -279,14 +287,14 @@ export class AttachedDatabaseConfigurationsImpl clusterName: string, attachedDatabaseConfigurationName: string, options?: AttachedDatabaseConfigurationsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -319,19 +327,20 @@ export class AttachedDatabaseConfigurationsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, attachedDatabaseConfigurationName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -339,7 +348,7 @@ export class AttachedDatabaseConfigurationsImpl /** * Deletes the attached database configuration with the given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param attachedDatabaseConfigurationName The name of the attached database configuration. * @param options The options parameters. @@ -371,7 +380,7 @@ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CheckNameResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.resourceName1, @@ -395,7 +404,7 @@ const listByClusterOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AttachedDatabaseConfigurationListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -417,7 +426,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AttachedDatabaseConfiguration }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -449,7 +458,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AttachedDatabaseConfiguration }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters4, @@ -475,7 +484,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], diff --git a/sdk/kusto/arm-kusto/src/operations/clusterPrincipalAssignments.ts b/sdk/kusto/arm-kusto/src/operations/clusterPrincipalAssignments.ts index b9d7c89048ac..0d4c287ae42c 100644 --- a/sdk/kusto/arm-kusto/src/operations/clusterPrincipalAssignments.ts +++ b/sdk/kusto/arm-kusto/src/operations/clusterPrincipalAssignments.ts @@ -12,8 +12,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { KustoManagementClient } from "../kustoManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ClusterPrincipalAssignment, ClusterPrincipalAssignmentsListOptionalParams, @@ -44,7 +48,7 @@ export class ClusterPrincipalAssignmentsImpl /** * Lists all Kusto cluster principalAssignments. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -102,7 +106,7 @@ export class ClusterPrincipalAssignmentsImpl /** * Checks that the principal assignment name is valid and is not already in use. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param principalAssignmentName The name of the principal assignment. * @param options The options parameters. @@ -121,7 +125,7 @@ export class ClusterPrincipalAssignmentsImpl /** * Gets a Kusto cluster principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. * @param options The options parameters. @@ -140,7 +144,7 @@ export class ClusterPrincipalAssignmentsImpl /** * Create a Kusto cluster principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. * @param parameters The Kusto cluster principalAssignment's parameters supplied for the operation. @@ -153,8 +157,8 @@ export class ClusterPrincipalAssignmentsImpl parameters: ClusterPrincipalAssignment, options?: ClusterPrincipalAssignmentsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClusterPrincipalAssignmentsCreateOrUpdateResponse > > { @@ -164,7 +168,7 @@ export class ClusterPrincipalAssignmentsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -197,20 +201,24 @@ export class ClusterPrincipalAssignmentsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, principalAssignmentName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ClusterPrincipalAssignmentsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -218,7 +226,7 @@ export class ClusterPrincipalAssignmentsImpl /** * Create a Kusto cluster principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. * @param parameters The Kusto cluster principalAssignment's parameters supplied for the operation. @@ -243,7 +251,7 @@ export class ClusterPrincipalAssignmentsImpl /** * Deletes a Kusto cluster principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. * @param options The options parameters. @@ -253,14 +261,14 @@ export class ClusterPrincipalAssignmentsImpl clusterName: string, principalAssignmentName: string, options?: ClusterPrincipalAssignmentsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -293,14 +301,20 @@ export class ClusterPrincipalAssignmentsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, principalAssignmentName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterName, + principalAssignmentName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -308,7 +322,7 @@ export class ClusterPrincipalAssignmentsImpl /** * Deletes a Kusto cluster principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. * @param options The options parameters. @@ -330,7 +344,7 @@ export class ClusterPrincipalAssignmentsImpl /** * Lists all Kusto cluster principalAssignments. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -357,7 +371,7 @@ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CheckNameResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.principalAssignmentName, @@ -381,7 +395,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ClusterPrincipalAssignment }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -413,7 +427,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ClusterPrincipalAssignment }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters2, @@ -439,7 +453,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -462,7 +476,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ClusterPrincipalAssignmentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], diff --git a/sdk/kusto/arm-kusto/src/operations/clusters.ts b/sdk/kusto/arm-kusto/src/operations/clusters.ts index 8ad364215799..724266dbdbff 100644 --- a/sdk/kusto/arm-kusto/src/operations/clusters.ts +++ b/sdk/kusto/arm-kusto/src/operations/clusters.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { KustoManagementClient } from "../kustoManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { FollowerDatabaseDefinition, ClustersListFollowerDatabasesOptionalParams, @@ -47,6 +51,8 @@ import { ClustersDeleteOptionalParams, ClustersStopOptionalParams, ClustersStartOptionalParams, + ClusterMigrateRequest, + ClustersMigrateOptionalParams, ClustersDetachFollowerDatabasesOptionalParams, ClustersDiagnoseVirtualNetworkOptionalParams, ClustersDiagnoseVirtualNetworkResponse, @@ -74,7 +80,7 @@ export class ClustersImpl implements Clusters { /** * Returns a list of databases that are owned by this cluster and were followed by another cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -140,7 +146,7 @@ export class ClustersImpl implements Clusters { /** * Lists all Kusto clusters within a resource group. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ public listByResourceGroup( @@ -274,7 +280,7 @@ export class ClustersImpl implements Clusters { /** * Returns the SKUs available for the provided resource. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -340,7 +346,7 @@ export class ClustersImpl implements Clusters { /** * Gets the network endpoints of all outbound dependencies of a Kusto cluster - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -424,7 +430,7 @@ export class ClustersImpl implements Clusters { /** * Returns a list of language extensions that can run within KQL queries. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -490,7 +496,7 @@ export class ClustersImpl implements Clusters { /** * Gets a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -507,7 +513,7 @@ export class ClustersImpl implements Clusters { /** * Create or update a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation. * @param options The options parameters. @@ -518,8 +524,8 @@ export class ClustersImpl implements Clusters { parameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersCreateOrUpdateResponse > > { @@ -529,7 +535,7 @@ export class ClustersImpl implements Clusters { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -562,14 +568,18 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ClustersCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -577,7 +587,7 @@ export class ClustersImpl implements Clusters { /** * Create or update a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation. * @param options The options parameters. @@ -599,7 +609,7 @@ export class ClustersImpl implements Clusters { /** * Update a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param parameters The Kusto cluster parameters supplied to the Update operation. * @param options The options parameters. @@ -610,8 +620,8 @@ export class ClustersImpl implements Clusters { parameters: ClusterUpdate, options?: ClustersUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersUpdateResponse > > { @@ -621,7 +631,7 @@ export class ClustersImpl implements Clusters { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -654,14 +664,18 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, parameters, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ClustersUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -669,7 +683,7 @@ export class ClustersImpl implements Clusters { /** * Update a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param parameters The Kusto cluster parameters supplied to the Update operation. * @param options The options parameters. @@ -691,7 +705,7 @@ export class ClustersImpl implements Clusters { /** * Deletes a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -699,14 +713,14 @@ export class ClustersImpl implements Clusters { resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -739,14 +753,15 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -754,7 +769,7 @@ export class ClustersImpl implements Clusters { /** * Deletes a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -773,7 +788,7 @@ export class ClustersImpl implements Clusters { /** * Stops a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -781,14 +796,14 @@ export class ClustersImpl implements Clusters { resourceGroupName: string, clusterName: string, options?: ClustersStopOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -821,14 +836,15 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, options }, - stopOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, options }, + spec: stopOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -836,7 +852,7 @@ export class ClustersImpl implements Clusters { /** * Stops a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -855,7 +871,7 @@ export class ClustersImpl implements Clusters { /** * Starts a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -863,14 +879,14 @@ export class ClustersImpl implements Clusters { resourceGroupName: string, clusterName: string, options?: ClustersStartOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -903,14 +919,15 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, options }, - startOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, options }, + spec: startOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -918,7 +935,7 @@ export class ClustersImpl implements Clusters { /** * Starts a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -935,9 +952,97 @@ export class ClustersImpl implements Clusters { return poller.pollUntilDone(); } + /** + * Migrate data from a Kusto cluster to another cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param clusterMigrateRequest The cluster migrate request parameters. + * @param options The options parameters. + */ + async beginMigrate( + resourceGroupName: string, + clusterName: string, + clusterMigrateRequest: ClusterMigrateRequest, + options?: ClustersMigrateOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, clusterMigrateRequest, options }, + spec: migrateOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Migrate data from a Kusto cluster to another cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param clusterMigrateRequest The cluster migrate request parameters. + * @param options The options parameters. + */ + async beginMigrateAndWait( + resourceGroupName: string, + clusterName: string, + clusterMigrateRequest: ClusterMigrateRequest, + options?: ClustersMigrateOptionalParams + ): Promise { + const poller = await this.beginMigrate( + resourceGroupName, + clusterName, + clusterMigrateRequest, + options + ); + return poller.pollUntilDone(); + } + /** * Returns a list of databases that are owned by this cluster and were followed by another cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -954,7 +1059,7 @@ export class ClustersImpl implements Clusters { /** * Detaches all followers of a database owned by this cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param followerDatabaseToRemove The follower databases properties to remove. * @param options The options parameters. @@ -964,14 +1069,14 @@ export class ClustersImpl implements Clusters { clusterName: string, followerDatabaseToRemove: FollowerDatabaseDefinition, options?: ClustersDetachFollowerDatabasesOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1004,14 +1109,20 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, followerDatabaseToRemove, options }, - detachFollowerDatabasesOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterName, + followerDatabaseToRemove, + options + }, + spec: detachFollowerDatabasesOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -1019,7 +1130,7 @@ export class ClustersImpl implements Clusters { /** * Detaches all followers of a database owned by this cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param followerDatabaseToRemove The follower databases properties to remove. * @param options The options parameters. @@ -1041,7 +1152,7 @@ export class ClustersImpl implements Clusters { /** * Diagnoses network connectivity status for external resources on which the service is dependent on. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -1050,8 +1161,8 @@ export class ClustersImpl implements Clusters { clusterName: string, options?: ClustersDiagnoseVirtualNetworkOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersDiagnoseVirtualNetworkResponse > > { @@ -1061,7 +1172,7 @@ export class ClustersImpl implements Clusters { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1094,15 +1205,18 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, options }, - diagnoseVirtualNetworkOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, options }, + spec: diagnoseVirtualNetworkOperationSpec + }); + const poller = await createHttpPoller< + ClustersDiagnoseVirtualNetworkResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -1110,7 +1224,7 @@ export class ClustersImpl implements Clusters { /** * Diagnoses network connectivity status for external resources on which the service is dependent on. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -1129,7 +1243,7 @@ export class ClustersImpl implements Clusters { /** * Lists all Kusto clusters within a resource group. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ private _listByResourceGroup( @@ -1164,7 +1278,7 @@ export class ClustersImpl implements Clusters { /** * Checks that the cluster name is valid and is not already in use. - * @param location Azure location (region) name. + * @param location The name of Azure region. * @param clusterName The name of the cluster. * @param options The options parameters. */ @@ -1181,7 +1295,7 @@ export class ClustersImpl implements Clusters { /** * Returns the SKUs available for the provided resource. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -1198,7 +1312,7 @@ export class ClustersImpl implements Clusters { /** * Gets the network endpoints of all outbound dependencies of a Kusto cluster - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -1215,7 +1329,7 @@ export class ClustersImpl implements Clusters { /** * Returns a list of language extensions that can run within KQL queries. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -1232,7 +1346,7 @@ export class ClustersImpl implements Clusters { /** * Add a list of language extensions that can run within KQL queries. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param languageExtensionsToAdd The language extensions to add. * @param options The options parameters. @@ -1242,14 +1356,14 @@ export class ClustersImpl implements Clusters { clusterName: string, languageExtensionsToAdd: LanguageExtensionsList, options?: ClustersAddLanguageExtensionsOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1282,14 +1396,20 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, languageExtensionsToAdd, options }, - addLanguageExtensionsOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterName, + languageExtensionsToAdd, + options + }, + spec: addLanguageExtensionsOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -1297,7 +1417,7 @@ export class ClustersImpl implements Clusters { /** * Add a list of language extensions that can run within KQL queries. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param languageExtensionsToAdd The language extensions to add. * @param options The options parameters. @@ -1319,7 +1439,7 @@ export class ClustersImpl implements Clusters { /** * Remove a list of language extensions that can run within KQL queries. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param languageExtensionsToRemove The language extensions to remove. * @param options The options parameters. @@ -1329,14 +1449,14 @@ export class ClustersImpl implements Clusters { clusterName: string, languageExtensionsToRemove: LanguageExtensionsList, options?: ClustersRemoveLanguageExtensionsOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1369,14 +1489,20 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, languageExtensionsToRemove, options }, - removeLanguageExtensionsOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterName, + languageExtensionsToRemove, + options + }, + spec: removeLanguageExtensionsOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -1384,7 +1510,7 @@ export class ClustersImpl implements Clusters { /** * Remove a list of language extensions that can run within KQL queries. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param languageExtensionsToRemove The language extensions to remove. * @param options The options parameters. @@ -1406,7 +1532,7 @@ export class ClustersImpl implements Clusters { /** * ListOutboundNetworkDependenciesEndpointsNext - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param nextLink The nextLink from the previous successful call to the * ListOutboundNetworkDependenciesEndpoints method. @@ -1436,7 +1562,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.Cluster }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -1467,7 +1593,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.Cluster }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters, @@ -1505,7 +1631,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.Cluster }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters1, @@ -1534,7 +1660,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -1557,7 +1683,7 @@ const stopOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -1580,7 +1706,7 @@ const startOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -1593,6 +1719,31 @@ const startOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const migrateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/migrate", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.clusterMigrateRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; const listFollowerDatabasesOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases", @@ -1602,7 +1753,7 @@ const listFollowerDatabasesOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.FollowerDatabaseListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -1625,7 +1776,7 @@ const detachFollowerDatabasesOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.followerDatabaseToRemove, @@ -1658,7 +1809,7 @@ const diagnoseVirtualNetworkOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DiagnoseVirtualNetworkResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -1680,7 +1831,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ClusterListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -1700,7 +1851,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ClusterListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -1716,7 +1867,7 @@ const listSkusOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.SkuDescriptionList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -1733,7 +1884,7 @@ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CheckNameResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.clusterName1, @@ -1756,7 +1907,7 @@ const listSkusByResourceOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ListResourceSkusResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -1778,7 +1929,7 @@ const listOutboundNetworkDependenciesEndpointsOperationSpec: coreClient.Operatio bodyMapper: Mappers.OutboundNetworkDependenciesEndpointListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -1800,7 +1951,7 @@ const listLanguageExtensionsOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.LanguageExtensionsList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -1823,7 +1974,7 @@ const addLanguageExtensionsOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.languageExtensionsToAdd, @@ -1848,7 +1999,7 @@ const removeLanguageExtensionsOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.languageExtensionsToRemove, @@ -1871,7 +2022,7 @@ const listOutboundNetworkDependenciesEndpointsNextOperationSpec: coreClient.Oper bodyMapper: Mappers.OutboundNetworkDependenciesEndpointListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, urlParameters: [ diff --git a/sdk/kusto/arm-kusto/src/operations/dataConnections.ts b/sdk/kusto/arm-kusto/src/operations/dataConnections.ts index 3fce933ed658..f131d0f53dc8 100644 --- a/sdk/kusto/arm-kusto/src/operations/dataConnections.ts +++ b/sdk/kusto/arm-kusto/src/operations/dataConnections.ts @@ -12,8 +12,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { KustoManagementClient } from "../kustoManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { DataConnectionUnion, DataConnectionsListByDatabaseOptionalParams, @@ -48,7 +52,7 @@ export class DataConnectionsImpl implements DataConnections { /** * Returns the list of data connections of the given Kusto database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -122,7 +126,7 @@ export class DataConnectionsImpl implements DataConnections { /** * Returns the list of data connections of the given Kusto database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -141,7 +145,7 @@ export class DataConnectionsImpl implements DataConnections { /** * Checks that the data connection parameters are valid. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. @@ -154,8 +158,8 @@ export class DataConnectionsImpl implements DataConnections { parameters: DataConnectionValidation, options?: DataConnectionsDataConnectionValidationOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DataConnectionsDataConnectionValidationResponse > > { @@ -165,7 +169,7 @@ export class DataConnectionsImpl implements DataConnections { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -198,15 +202,24 @@ export class DataConnectionsImpl implements DataConnections { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, databaseName, parameters, options }, - dataConnectionValidationOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterName, + databaseName, + parameters, + options + }, + spec: dataConnectionValidationOperationSpec + }); + const poller = await createHttpPoller< + DataConnectionsDataConnectionValidationResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -214,7 +227,7 @@ export class DataConnectionsImpl implements DataConnections { /** * Checks that the data connection parameters are valid. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. @@ -239,7 +252,7 @@ export class DataConnectionsImpl implements DataConnections { /** * Checks that the data connection name is valid and is not already in use. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param dataConnectionName The name of the data connection. @@ -266,7 +279,7 @@ export class DataConnectionsImpl implements DataConnections { /** * Returns a data connection. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param dataConnectionName The name of the data connection. @@ -293,7 +306,7 @@ export class DataConnectionsImpl implements DataConnections { /** * Creates or updates a data connection. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param dataConnectionName The name of the data connection. @@ -308,8 +321,8 @@ export class DataConnectionsImpl implements DataConnections { parameters: DataConnectionUnion, options?: DataConnectionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DataConnectionsCreateOrUpdateResponse > > { @@ -319,7 +332,7 @@ export class DataConnectionsImpl implements DataConnections { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -352,9 +365,9 @@ export class DataConnectionsImpl implements DataConnections { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, databaseName, @@ -362,11 +375,15 @@ export class DataConnectionsImpl implements DataConnections { parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DataConnectionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -374,7 +391,7 @@ export class DataConnectionsImpl implements DataConnections { /** * Creates or updates a data connection. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param dataConnectionName The name of the data connection. @@ -402,7 +419,7 @@ export class DataConnectionsImpl implements DataConnections { /** * Updates a data connection. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param dataConnectionName The name of the data connection. @@ -417,8 +434,8 @@ export class DataConnectionsImpl implements DataConnections { parameters: DataConnectionUnion, options?: DataConnectionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DataConnectionsUpdateResponse > > { @@ -428,7 +445,7 @@ export class DataConnectionsImpl implements DataConnections { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -461,9 +478,9 @@ export class DataConnectionsImpl implements DataConnections { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, databaseName, @@ -471,11 +488,15 @@ export class DataConnectionsImpl implements DataConnections { parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + DataConnectionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -483,7 +504,7 @@ export class DataConnectionsImpl implements DataConnections { /** * Updates a data connection. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param dataConnectionName The name of the data connection. @@ -511,7 +532,7 @@ export class DataConnectionsImpl implements DataConnections { /** * Deletes the data connection with the given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param dataConnectionName The name of the data connection. @@ -523,14 +544,14 @@ export class DataConnectionsImpl implements DataConnections { databaseName: string, dataConnectionName: string, options?: DataConnectionsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -563,20 +584,21 @@ export class DataConnectionsImpl implements DataConnections { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, databaseName, dataConnectionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -584,7 +606,7 @@ export class DataConnectionsImpl implements DataConnections { /** * Deletes the data connection with the given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param dataConnectionName The name of the data connection. @@ -619,7 +641,7 @@ const listByDatabaseOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DataConnectionListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -651,10 +673,10 @@ const dataConnectionValidationOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DataConnectionValidationListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters9, + requestBody: Parameters.parameters10, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -676,7 +698,7 @@ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CheckNameResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.dataConnectionName, @@ -701,7 +723,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DataConnection }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -734,10 +756,10 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DataConnection }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters10, + requestBody: Parameters.parameters11, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -769,10 +791,10 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DataConnection }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters10, + requestBody: Parameters.parameters11, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -796,7 +818,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], diff --git a/sdk/kusto/arm-kusto/src/operations/databaseOperations.ts b/sdk/kusto/arm-kusto/src/operations/databaseOperations.ts new file mode 100644 index 000000000000..aeb57a531108 --- /dev/null +++ b/sdk/kusto/arm-kusto/src/operations/databaseOperations.ts @@ -0,0 +1,80 @@ +/* + * 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 { DatabaseOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { KustoManagementClient } from "../kustoManagementClient"; +import { + DatabaseInviteFollowerRequest, + DatabaseInviteFollowerOptionalParams, + DatabaseInviteFollowerResponse +} from "../models"; + +/** Class containing DatabaseOperations operations. */ +export class DatabaseOperationsImpl implements DatabaseOperations { + private readonly client: KustoManagementClient; + + /** + * Initialize a new instance of the class DatabaseOperations class. + * @param client Reference to the service client + */ + constructor(client: KustoManagementClient) { + this.client = client; + } + + /** + * Generates an invitation token that allows attaching a follower database to this database. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The follower invitation request parameters. + * @param options The options parameters. + */ + inviteFollower( + resourceGroupName: string, + clusterName: string, + databaseName: string, + parameters: DatabaseInviteFollowerRequest, + options?: DatabaseInviteFollowerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, databaseName, parameters, options }, + inviteFollowerOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const inviteFollowerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/inviteFollower", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DatabaseInviteFollowerResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters6, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.subscriptionId, + Parameters.databaseName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/kusto/arm-kusto/src/operations/databasePrincipalAssignments.ts b/sdk/kusto/arm-kusto/src/operations/databasePrincipalAssignments.ts index 0c6aea18d6af..95bc9f1352dc 100644 --- a/sdk/kusto/arm-kusto/src/operations/databasePrincipalAssignments.ts +++ b/sdk/kusto/arm-kusto/src/operations/databasePrincipalAssignments.ts @@ -12,8 +12,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { KustoManagementClient } from "../kustoManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { DatabasePrincipalAssignment, DatabasePrincipalAssignmentsListOptionalParams, @@ -44,7 +48,7 @@ export class DatabasePrincipalAssignmentsImpl /** * Lists all Kusto cluster database principalAssignments. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -118,7 +122,7 @@ export class DatabasePrincipalAssignmentsImpl /** * Checks that the database principal assignment is valid and is not already in use. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param principalAssignmentName The name of the resource. @@ -145,7 +149,7 @@ export class DatabasePrincipalAssignmentsImpl /** * Gets a Kusto cluster database principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. @@ -172,7 +176,7 @@ export class DatabasePrincipalAssignmentsImpl /** * Creates a Kusto cluster database principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. @@ -187,8 +191,8 @@ export class DatabasePrincipalAssignmentsImpl parameters: DatabasePrincipalAssignment, options?: DatabasePrincipalAssignmentsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DatabasePrincipalAssignmentsCreateOrUpdateResponse > > { @@ -198,7 +202,7 @@ export class DatabasePrincipalAssignmentsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -231,9 +235,9 @@ export class DatabasePrincipalAssignmentsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, databaseName, @@ -241,11 +245,15 @@ export class DatabasePrincipalAssignmentsImpl parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DatabasePrincipalAssignmentsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -253,7 +261,7 @@ export class DatabasePrincipalAssignmentsImpl /** * Creates a Kusto cluster database principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. @@ -281,7 +289,7 @@ export class DatabasePrincipalAssignmentsImpl /** * Deletes a Kusto principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. @@ -293,14 +301,14 @@ export class DatabasePrincipalAssignmentsImpl databaseName: string, principalAssignmentName: string, options?: DatabasePrincipalAssignmentsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -333,20 +341,21 @@ export class DatabasePrincipalAssignmentsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, databaseName, principalAssignmentName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -354,7 +363,7 @@ export class DatabasePrincipalAssignmentsImpl /** * Deletes a Kusto principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. @@ -379,7 +388,7 @@ export class DatabasePrincipalAssignmentsImpl /** * Lists all Kusto cluster database principalAssignments. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -408,7 +417,7 @@ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CheckNameResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.principalAssignmentName2, @@ -433,7 +442,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DatabasePrincipalAssignment }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -466,10 +475,10 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DatabasePrincipalAssignment }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters6, + requestBody: Parameters.parameters7, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -493,7 +502,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -517,7 +526,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DatabasePrincipalAssignmentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], diff --git a/sdk/kusto/arm-kusto/src/operations/databases.ts b/sdk/kusto/arm-kusto/src/operations/databases.ts index 6837340a9aea..7be9fffd8abe 100644 --- a/sdk/kusto/arm-kusto/src/operations/databases.ts +++ b/sdk/kusto/arm-kusto/src/operations/databases.ts @@ -7,15 +7,21 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { Databases } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { KustoManagementClient } from "../kustoManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { DatabaseUnion, + DatabasesListByClusterNextOptionalParams, DatabasesListByClusterOptionalParams, DatabasesListByClusterResponse, DatabasePrincipal, @@ -35,7 +41,8 @@ import { DatabasesAddPrincipalsOptionalParams, DatabasesAddPrincipalsResponse, DatabasesRemovePrincipalsOptionalParams, - DatabasesRemovePrincipalsResponse + DatabasesRemovePrincipalsResponse, + DatabasesListByClusterNextResponse } from "../models"; /// @@ -53,7 +60,7 @@ export class DatabasesImpl implements Databases { /** * Returns the list of databases of the given Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -92,11 +99,33 @@ export class DatabasesImpl implements Databases { resourceGroupName: string, clusterName: string, options?: DatabasesListByClusterOptionalParams, - _settings?: PageSettings + settings?: PageSettings ): AsyncIterableIterator { let result: DatabasesListByClusterResponse; - result = await this._listByCluster(resourceGroupName, clusterName, options); - yield result.value || []; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByCluster( + resourceGroupName, + clusterName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByClusterNext( + resourceGroupName, + clusterName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } private async *listByClusterPagingAll( @@ -115,7 +144,7 @@ export class DatabasesImpl implements Databases { /** * Returns a list of database principals of the given Kusto cluster and database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -189,7 +218,7 @@ export class DatabasesImpl implements Databases { /** * Checks that the databases resource name is valid and is not already in use. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param resourceName The name of the resource. * @param options The options parameters. @@ -208,7 +237,7 @@ export class DatabasesImpl implements Databases { /** * Returns the list of databases of the given Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -225,7 +254,7 @@ export class DatabasesImpl implements Databases { /** * Returns a database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -244,7 +273,7 @@ export class DatabasesImpl implements Databases { /** * Creates or updates a database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the CreateOrUpdate operation. @@ -257,8 +286,8 @@ export class DatabasesImpl implements Databases { parameters: DatabaseUnion, options?: DatabasesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DatabasesCreateOrUpdateResponse > > { @@ -268,7 +297,7 @@ export class DatabasesImpl implements Databases { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -301,14 +330,24 @@ export class DatabasesImpl implements Databases { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, databaseName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterName, + databaseName, + parameters, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DatabasesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -316,7 +355,7 @@ export class DatabasesImpl implements Databases { /** * Creates or updates a database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the CreateOrUpdate operation. @@ -341,7 +380,7 @@ export class DatabasesImpl implements Databases { /** * Updates a database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the Update operation. @@ -354,8 +393,8 @@ export class DatabasesImpl implements Databases { parameters: DatabaseUnion, options?: DatabasesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DatabasesUpdateResponse > > { @@ -365,7 +404,7 @@ export class DatabasesImpl implements Databases { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -398,14 +437,24 @@ export class DatabasesImpl implements Databases { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, databaseName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterName, + databaseName, + parameters, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + DatabasesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -413,7 +462,7 @@ export class DatabasesImpl implements Databases { /** * Updates a database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the Update operation. @@ -438,7 +487,7 @@ export class DatabasesImpl implements Databases { /** * Deletes the database with the given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -448,14 +497,14 @@ export class DatabasesImpl implements Databases { clusterName: string, databaseName: string, options?: DatabasesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -488,14 +537,15 @@ export class DatabasesImpl implements Databases { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, databaseName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, databaseName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -503,7 +553,7 @@ export class DatabasesImpl implements Databases { /** * Deletes the database with the given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -525,7 +575,7 @@ export class DatabasesImpl implements Databases { /** * Returns a list of database principals of the given Kusto cluster and database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -544,7 +594,7 @@ export class DatabasesImpl implements Databases { /** * Add Database principals permissions. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param databasePrincipalsToAdd List of database principals to add. @@ -571,7 +621,7 @@ export class DatabasesImpl implements Databases { /** * Remove Database principals permissions. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param databasePrincipalsToRemove List of database principals to remove. @@ -595,6 +645,25 @@ export class DatabasesImpl implements Databases { removePrincipalsOperationSpec ); } + + /** + * ListByClusterNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param nextLink The nextLink from the previous successful call to the ListByCluster method. + * @param options The options parameters. + */ + private _listByClusterNext( + resourceGroupName: string, + clusterName: string, + nextLink: string, + options?: DatabasesListByClusterNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, nextLink, options }, + listByClusterNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -608,7 +677,7 @@ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CheckNameResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.resourceName, @@ -632,10 +701,14 @@ const listByClusterOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DatabaseListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [ + Parameters.apiVersion, + Parameters.top, + Parameters.skiptoken + ], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -654,7 +727,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.Database }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -686,7 +759,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.Database }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters3, @@ -720,7 +793,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.Database }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters3, @@ -746,7 +819,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -769,7 +842,7 @@ const listPrincipalsOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DatabasePrincipalListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -792,7 +865,7 @@ const addPrincipalsOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DatabasePrincipalListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.databasePrincipalsToAdd, @@ -817,7 +890,7 @@ const removePrincipalsOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DatabasePrincipalListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.databasePrincipalsToRemove, @@ -833,3 +906,24 @@ const removePrincipalsOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const listByClusterNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DatabaseListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/kusto/arm-kusto/src/operations/index.ts b/sdk/kusto/arm-kusto/src/operations/index.ts index 89b25c9fd28d..f59771ff77b3 100644 --- a/sdk/kusto/arm-kusto/src/operations/index.ts +++ b/sdk/kusto/arm-kusto/src/operations/index.ts @@ -12,6 +12,7 @@ export * from "./skus"; export * from "./databases"; export * from "./attachedDatabaseConfigurations"; export * from "./managedPrivateEndpoints"; +export * from "./databaseOperations"; export * from "./databasePrincipalAssignments"; export * from "./scripts"; export * from "./privateEndpointConnections"; diff --git a/sdk/kusto/arm-kusto/src/operations/managedPrivateEndpoints.ts b/sdk/kusto/arm-kusto/src/operations/managedPrivateEndpoints.ts index 94664631148b..37b8f1865d75 100644 --- a/sdk/kusto/arm-kusto/src/operations/managedPrivateEndpoints.ts +++ b/sdk/kusto/arm-kusto/src/operations/managedPrivateEndpoints.ts @@ -12,8 +12,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { KustoManagementClient } from "../kustoManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ManagedPrivateEndpoint, ManagedPrivateEndpointsListOptionalParams, @@ -45,7 +49,7 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { /** * Returns the list of managed private endpoints. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -103,7 +107,7 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { /** * Checks that the managed private endpoints resource name is valid and is not already in use. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param resourceName The name of the resource. * @param options The options parameters. @@ -122,7 +126,7 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { /** * Returns the list of managed private endpoints. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -139,7 +143,7 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { /** * Gets a managed private endpoint. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param managedPrivateEndpointName The name of the managed private endpoint. * @param options The options parameters. @@ -158,7 +162,7 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { /** * Creates a managed private endpoint. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param managedPrivateEndpointName The name of the managed private endpoint. * @param parameters The managed private endpoint parameters. @@ -171,8 +175,8 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { parameters: ManagedPrivateEndpoint, options?: ManagedPrivateEndpointsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ManagedPrivateEndpointsCreateOrUpdateResponse > > { @@ -182,7 +186,7 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -215,20 +219,24 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, managedPrivateEndpointName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ManagedPrivateEndpointsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -236,7 +244,7 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { /** * Creates a managed private endpoint. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param managedPrivateEndpointName The name of the managed private endpoint. * @param parameters The managed private endpoint parameters. @@ -261,7 +269,7 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { /** * Updates a managed private endpoint. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param managedPrivateEndpointName The name of the managed private endpoint. * @param parameters The managed private endpoint parameters. @@ -274,8 +282,8 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { parameters: ManagedPrivateEndpoint, options?: ManagedPrivateEndpointsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ManagedPrivateEndpointsUpdateResponse > > { @@ -285,7 +293,7 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -318,20 +326,24 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, managedPrivateEndpointName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ManagedPrivateEndpointsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -339,7 +351,7 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { /** * Updates a managed private endpoint. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param managedPrivateEndpointName The name of the managed private endpoint. * @param parameters The managed private endpoint parameters. @@ -364,7 +376,7 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { /** * Deletes a managed private endpoint. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param managedPrivateEndpointName The name of the managed private endpoint. * @param options The options parameters. @@ -374,14 +386,14 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { clusterName: string, managedPrivateEndpointName: string, options?: ManagedPrivateEndpointsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -414,14 +426,20 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, managedPrivateEndpointName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterName, + managedPrivateEndpointName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -429,7 +447,7 @@ export class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { /** * Deletes a managed private endpoint. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param managedPrivateEndpointName The name of the managed private endpoint. * @param options The options parameters. @@ -461,7 +479,7 @@ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CheckNameResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.resourceName2, @@ -485,7 +503,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ManagedPrivateEndpointListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -507,7 +525,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ManagedPrivateEndpoint }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -539,7 +557,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ManagedPrivateEndpoint }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters5, @@ -573,7 +591,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ManagedPrivateEndpoint }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.parameters5, @@ -599,7 +617,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], diff --git a/sdk/kusto/arm-kusto/src/operations/operations.ts b/sdk/kusto/arm-kusto/src/operations/operations.ts index c4d8908dbeac..8cb4e3e60495 100644 --- a/sdk/kusto/arm-kusto/src/operations/operations.ts +++ b/sdk/kusto/arm-kusto/src/operations/operations.ts @@ -124,7 +124,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.OperationListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -140,7 +140,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.OperationListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, urlParameters: [Parameters.$host, Parameters.nextLink], diff --git a/sdk/kusto/arm-kusto/src/operations/operationsResults.ts b/sdk/kusto/arm-kusto/src/operations/operationsResults.ts index ddaca890b142..4ffd8bbf6e0b 100644 --- a/sdk/kusto/arm-kusto/src/operations/operationsResults.ts +++ b/sdk/kusto/arm-kusto/src/operations/operationsResults.ts @@ -30,8 +30,8 @@ export class OperationsResultsImpl implements OperationsResults { /** * Returns operation results. - * @param location Azure location (region) name. - * @param operationId The Guid of the operation ID + * @param location The name of Azure region. + * @param operationId The ID of an ongoing async operation. * @param options The options parameters. */ get( @@ -57,7 +57,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.OperationResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], diff --git a/sdk/kusto/arm-kusto/src/operations/operationsResultsLocation.ts b/sdk/kusto/arm-kusto/src/operations/operationsResultsLocation.ts index 64997b40ab47..bc80386e8598 100644 --- a/sdk/kusto/arm-kusto/src/operations/operationsResultsLocation.ts +++ b/sdk/kusto/arm-kusto/src/operations/operationsResultsLocation.ts @@ -11,7 +11,10 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { KustoManagementClient } from "../kustoManagementClient"; -import { OperationsResultsLocationGetOptionalParams } from "../models"; +import { + OperationsResultsLocationGetOptionalParams, + OperationsResultsLocationGetResponse +} from "../models"; /** Class containing OperationsResultsLocation operations. */ export class OperationsResultsLocationImpl @@ -28,15 +31,15 @@ export class OperationsResultsLocationImpl /** * Returns operation results. - * @param location Azure location (region) name. - * @param operationId The Guid of the operation ID + * @param location The name of Azure region. + * @param operationId The ID of an ongoing async operation. * @param options The options parameters. */ get( location: string, operationId: string, options?: OperationsResultsLocationGetOptionalParams - ): Promise { + ): Promise { return this.client.sendOperationRequest( { location, operationId, options }, getOperationSpec @@ -50,7 +53,13 @@ const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/operationResults/{operationId}", httpMethod: "GET", - responses: { 200: {}, 202: {}, default: {} }, + responses: { + 200: {}, + 202: { + headersMapper: Mappers.OperationsResultsLocationGetHeaders + }, + default: {} + }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/kusto/arm-kusto/src/operations/privateEndpointConnections.ts b/sdk/kusto/arm-kusto/src/operations/privateEndpointConnections.ts index 562c0f7cd2f5..738e885a400d 100644 --- a/sdk/kusto/arm-kusto/src/operations/privateEndpointConnections.ts +++ b/sdk/kusto/arm-kusto/src/operations/privateEndpointConnections.ts @@ -12,8 +12,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { KustoManagementClient } from "../kustoManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { PrivateEndpointConnection, PrivateEndpointConnectionsListOptionalParams, @@ -41,7 +45,7 @@ export class PrivateEndpointConnectionsImpl /** * Returns the list of private endpoint connections. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -99,7 +103,7 @@ export class PrivateEndpointConnectionsImpl /** * Returns the list of private endpoint connections. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -116,7 +120,7 @@ export class PrivateEndpointConnectionsImpl /** * Gets a private endpoint connection. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param options The options parameters. @@ -140,7 +144,7 @@ export class PrivateEndpointConnectionsImpl /** * Approve or reject a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param parameters A private endpoint connection @@ -153,8 +157,8 @@ export class PrivateEndpointConnectionsImpl parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionsCreateOrUpdateResponse > > { @@ -164,7 +168,7 @@ export class PrivateEndpointConnectionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -197,20 +201,24 @@ export class PrivateEndpointConnectionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, privateEndpointConnectionName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PrivateEndpointConnectionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -218,7 +226,7 @@ export class PrivateEndpointConnectionsImpl /** * Approve or reject a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param parameters A private endpoint connection @@ -243,7 +251,7 @@ export class PrivateEndpointConnectionsImpl /** * Deletes a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param options The options parameters. @@ -253,14 +261,14 @@ export class PrivateEndpointConnectionsImpl clusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -293,19 +301,20 @@ export class PrivateEndpointConnectionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, privateEndpointConnectionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -313,7 +322,7 @@ export class PrivateEndpointConnectionsImpl /** * Deletes a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param options The options parameters. @@ -345,7 +354,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.PrivateEndpointConnectionListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -367,7 +376,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.PrivateEndpointConnection }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -399,10 +408,10 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.PrivateEndpointConnection }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters8, + requestBody: Parameters.parameters9, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -425,7 +434,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], diff --git a/sdk/kusto/arm-kusto/src/operations/privateLinkResources.ts b/sdk/kusto/arm-kusto/src/operations/privateLinkResources.ts index 4f129d283d26..3ca08f1a1908 100644 --- a/sdk/kusto/arm-kusto/src/operations/privateLinkResources.ts +++ b/sdk/kusto/arm-kusto/src/operations/privateLinkResources.ts @@ -35,7 +35,7 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { /** * Returns the list of private link resources. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -93,7 +93,7 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { /** * Returns the list of private link resources. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -110,7 +110,7 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { /** * Gets a private link resource. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param privateLinkResourceName The name of the private link resource. * @param options The options parameters. @@ -139,7 +139,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.PrivateLinkResourceListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -161,7 +161,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.PrivateLinkResource }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], diff --git a/sdk/kusto/arm-kusto/src/operations/scripts.ts b/sdk/kusto/arm-kusto/src/operations/scripts.ts index a4fd20ebd39b..d8cff2d2cc13 100644 --- a/sdk/kusto/arm-kusto/src/operations/scripts.ts +++ b/sdk/kusto/arm-kusto/src/operations/scripts.ts @@ -12,8 +12,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { KustoManagementClient } from "../kustoManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Script, ScriptsListByDatabaseOptionalParams, @@ -45,7 +49,7 @@ export class ScriptsImpl implements Scripts { /** * Returns the list of database scripts for given database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -119,7 +123,7 @@ export class ScriptsImpl implements Scripts { /** * Returns the list of database scripts for given database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -138,7 +142,7 @@ export class ScriptsImpl implements Scripts { /** * Gets a Kusto cluster database script. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param scriptName The name of the Kusto database script. @@ -159,7 +163,7 @@ export class ScriptsImpl implements Scripts { /** * Creates a Kusto database script. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param scriptName The name of the Kusto database script. @@ -174,8 +178,8 @@ export class ScriptsImpl implements Scripts { parameters: Script, options?: ScriptsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ScriptsCreateOrUpdateResponse > > { @@ -185,7 +189,7 @@ export class ScriptsImpl implements Scripts { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -218,9 +222,9 @@ export class ScriptsImpl implements Scripts { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, databaseName, @@ -228,11 +232,15 @@ export class ScriptsImpl implements Scripts { parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ScriptsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -240,7 +248,7 @@ export class ScriptsImpl implements Scripts { /** * Creates a Kusto database script. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param scriptName The name of the Kusto database script. @@ -268,7 +276,7 @@ export class ScriptsImpl implements Scripts { /** * Updates a database script. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param scriptName The name of the Kusto database script. @@ -283,7 +291,10 @@ export class ScriptsImpl implements Scripts { parameters: Script, options?: ScriptsUpdateOptionalParams ): Promise< - PollerLike, ScriptsUpdateResponse> + SimplePollerLike< + OperationState, + ScriptsUpdateResponse + > > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -291,7 +302,7 @@ export class ScriptsImpl implements Scripts { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -324,9 +335,9 @@ export class ScriptsImpl implements Scripts { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, databaseName, @@ -334,11 +345,15 @@ export class ScriptsImpl implements Scripts { parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ScriptsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -346,7 +361,7 @@ export class ScriptsImpl implements Scripts { /** * Updates a database script. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param scriptName The name of the Kusto database script. @@ -373,8 +388,8 @@ export class ScriptsImpl implements Scripts { } /** - * Deletes a Kusto principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * Deletes a Kusto database script. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param scriptName The name of the Kusto database script. @@ -386,14 +401,14 @@ export class ScriptsImpl implements Scripts { databaseName: string, scriptName: string, options?: ScriptsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -426,22 +441,29 @@ export class ScriptsImpl implements Scripts { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, databaseName, scriptName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterName, + databaseName, + scriptName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; } /** - * Deletes a Kusto principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * Deletes a Kusto database script. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param scriptName The name of the Kusto database script. @@ -466,7 +488,7 @@ export class ScriptsImpl implements Scripts { /** * Checks that the script name is valid and is not already in use. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param scriptName The name of the script. @@ -497,7 +519,7 @@ const listByDatabaseOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ScriptListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -520,7 +542,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.Script }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -553,10 +575,10 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.Script }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters7, + requestBody: Parameters.parameters8, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -588,10 +610,10 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.Script }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters7, + requestBody: Parameters.parameters8, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -615,7 +637,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], @@ -639,7 +661,7 @@ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CheckNameResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.scriptName1, diff --git a/sdk/kusto/arm-kusto/src/operations/skus.ts b/sdk/kusto/arm-kusto/src/operations/skus.ts index 8cfc877ce7a1..18e3e500393b 100644 --- a/sdk/kusto/arm-kusto/src/operations/skus.ts +++ b/sdk/kusto/arm-kusto/src/operations/skus.ts @@ -33,7 +33,7 @@ export class SkusImpl implements Skus { /** * Lists eligible region SKUs for Kusto resource provider by Azure region. - * @param location Azure location (region) name. + * @param location The name of Azure region. * @param options The options parameters. */ public list( @@ -78,7 +78,7 @@ export class SkusImpl implements Skus { /** * Lists eligible region SKUs for Kusto resource provider by Azure region. - * @param location Azure location (region) name. + * @param location The name of Azure region. * @param options The options parameters. */ private _list( @@ -103,7 +103,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.SkuDescriptionList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion], diff --git a/sdk/kusto/arm-kusto/src/operationsInterfaces/attachedDatabaseConfigurations.ts b/sdk/kusto/arm-kusto/src/operationsInterfaces/attachedDatabaseConfigurations.ts index 311e55588ce4..bce85ef008d4 100644 --- a/sdk/kusto/arm-kusto/src/operationsInterfaces/attachedDatabaseConfigurations.ts +++ b/sdk/kusto/arm-kusto/src/operationsInterfaces/attachedDatabaseConfigurations.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { AttachedDatabaseConfiguration, AttachedDatabaseConfigurationsListByClusterOptionalParams, @@ -26,7 +26,7 @@ import { export interface AttachedDatabaseConfigurations { /** * Returns the list of attached database configurations of the given Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -37,7 +37,7 @@ export interface AttachedDatabaseConfigurations { ): PagedAsyncIterableIterator; /** * Checks that the attached database configuration resource name is valid and is not already in use. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param resourceName The name of the resource. * @param options The options parameters. @@ -50,7 +50,7 @@ export interface AttachedDatabaseConfigurations { ): Promise; /** * Returns an attached database configuration. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param attachedDatabaseConfigurationName The name of the attached database configuration. * @param options The options parameters. @@ -63,7 +63,7 @@ export interface AttachedDatabaseConfigurations { ): Promise; /** * Creates or updates an attached database configuration. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param attachedDatabaseConfigurationName The name of the attached database configuration. * @param parameters The database parameters supplied to the CreateOrUpdate operation. @@ -76,14 +76,14 @@ export interface AttachedDatabaseConfigurations { parameters: AttachedDatabaseConfiguration, options?: AttachedDatabaseConfigurationsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AttachedDatabaseConfigurationsCreateOrUpdateResponse > >; /** * Creates or updates an attached database configuration. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param attachedDatabaseConfigurationName The name of the attached database configuration. * @param parameters The database parameters supplied to the CreateOrUpdate operation. @@ -98,7 +98,7 @@ export interface AttachedDatabaseConfigurations { ): Promise; /** * Deletes the attached database configuration with the given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param attachedDatabaseConfigurationName The name of the attached database configuration. * @param options The options parameters. @@ -108,10 +108,10 @@ export interface AttachedDatabaseConfigurations { clusterName: string, attachedDatabaseConfigurationName: string, options?: AttachedDatabaseConfigurationsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the attached database configuration with the given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param attachedDatabaseConfigurationName The name of the attached database configuration. * @param options The options parameters. diff --git a/sdk/kusto/arm-kusto/src/operationsInterfaces/clusterPrincipalAssignments.ts b/sdk/kusto/arm-kusto/src/operationsInterfaces/clusterPrincipalAssignments.ts index 498e02c5ba29..71c5fc6194bb 100644 --- a/sdk/kusto/arm-kusto/src/operationsInterfaces/clusterPrincipalAssignments.ts +++ b/sdk/kusto/arm-kusto/src/operationsInterfaces/clusterPrincipalAssignments.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ClusterPrincipalAssignment, ClusterPrincipalAssignmentsListOptionalParams, @@ -26,7 +26,7 @@ import { export interface ClusterPrincipalAssignments { /** * Lists all Kusto cluster principalAssignments. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -37,7 +37,7 @@ export interface ClusterPrincipalAssignments { ): PagedAsyncIterableIterator; /** * Checks that the principal assignment name is valid and is not already in use. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param principalAssignmentName The name of the principal assignment. * @param options The options parameters. @@ -50,7 +50,7 @@ export interface ClusterPrincipalAssignments { ): Promise; /** * Gets a Kusto cluster principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. * @param options The options parameters. @@ -63,7 +63,7 @@ export interface ClusterPrincipalAssignments { ): Promise; /** * Create a Kusto cluster principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. * @param parameters The Kusto cluster principalAssignment's parameters supplied for the operation. @@ -76,14 +76,14 @@ export interface ClusterPrincipalAssignments { parameters: ClusterPrincipalAssignment, options?: ClusterPrincipalAssignmentsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClusterPrincipalAssignmentsCreateOrUpdateResponse > >; /** * Create a Kusto cluster principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. * @param parameters The Kusto cluster principalAssignment's parameters supplied for the operation. @@ -98,7 +98,7 @@ export interface ClusterPrincipalAssignments { ): Promise; /** * Deletes a Kusto cluster principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. * @param options The options parameters. @@ -108,10 +108,10 @@ export interface ClusterPrincipalAssignments { clusterName: string, principalAssignmentName: string, options?: ClusterPrincipalAssignmentsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a Kusto cluster principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. * @param options The options parameters. diff --git a/sdk/kusto/arm-kusto/src/operationsInterfaces/clusters.ts b/sdk/kusto/arm-kusto/src/operationsInterfaces/clusters.ts index 66a3ab787b6f..01143c494c37 100644 --- a/sdk/kusto/arm-kusto/src/operationsInterfaces/clusters.ts +++ b/sdk/kusto/arm-kusto/src/operationsInterfaces/clusters.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { FollowerDatabaseDefinition, ClustersListFollowerDatabasesOptionalParams, @@ -32,6 +32,8 @@ import { ClustersDeleteOptionalParams, ClustersStopOptionalParams, ClustersStartOptionalParams, + ClusterMigrateRequest, + ClustersMigrateOptionalParams, ClustersDetachFollowerDatabasesOptionalParams, ClustersDiagnoseVirtualNetworkOptionalParams, ClustersDiagnoseVirtualNetworkResponse, @@ -48,7 +50,7 @@ import { export interface Clusters { /** * Returns a list of databases that are owned by this cluster and were followed by another cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -59,7 +61,7 @@ export interface Clusters { ): PagedAsyncIterableIterator; /** * Lists all Kusto clusters within a resource group. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ listByResourceGroup( @@ -82,7 +84,7 @@ export interface Clusters { ): PagedAsyncIterableIterator; /** * Returns the SKUs available for the provided resource. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -93,7 +95,7 @@ export interface Clusters { ): PagedAsyncIterableIterator; /** * Gets the network endpoints of all outbound dependencies of a Kusto cluster - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -104,7 +106,7 @@ export interface Clusters { ): PagedAsyncIterableIterator; /** * Returns a list of language extensions that can run within KQL queries. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -115,7 +117,7 @@ export interface Clusters { ): PagedAsyncIterableIterator; /** * Gets a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -126,7 +128,7 @@ export interface Clusters { ): Promise; /** * Create or update a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation. * @param options The options parameters. @@ -137,14 +139,14 @@ export interface Clusters { parameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersCreateOrUpdateResponse > >; /** * Create or update a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation. * @param options The options parameters. @@ -157,7 +159,7 @@ export interface Clusters { ): Promise; /** * Update a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param parameters The Kusto cluster parameters supplied to the Update operation. * @param options The options parameters. @@ -168,14 +170,14 @@ export interface Clusters { parameters: ClusterUpdate, options?: ClustersUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersUpdateResponse > >; /** * Update a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param parameters The Kusto cluster parameters supplied to the Update operation. * @param options The options parameters. @@ -188,7 +190,7 @@ export interface Clusters { ): Promise; /** * Deletes a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -196,10 +198,10 @@ export interface Clusters { resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -210,7 +212,7 @@ export interface Clusters { ): Promise; /** * Stops a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -218,10 +220,10 @@ export interface Clusters { resourceGroupName: string, clusterName: string, options?: ClustersStopOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Stops a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -232,7 +234,7 @@ export interface Clusters { ): Promise; /** * Starts a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -240,10 +242,10 @@ export interface Clusters { resourceGroupName: string, clusterName: string, options?: ClustersStartOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Starts a Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -252,9 +254,35 @@ export interface Clusters { clusterName: string, options?: ClustersStartOptionalParams ): Promise; + /** + * Migrate data from a Kusto cluster to another cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param clusterMigrateRequest The cluster migrate request parameters. + * @param options The options parameters. + */ + beginMigrate( + resourceGroupName: string, + clusterName: string, + clusterMigrateRequest: ClusterMigrateRequest, + options?: ClustersMigrateOptionalParams + ): Promise, void>>; + /** + * Migrate data from a Kusto cluster to another cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param clusterMigrateRequest The cluster migrate request parameters. + * @param options The options parameters. + */ + beginMigrateAndWait( + resourceGroupName: string, + clusterName: string, + clusterMigrateRequest: ClusterMigrateRequest, + options?: ClustersMigrateOptionalParams + ): Promise; /** * Detaches all followers of a database owned by this cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param followerDatabaseToRemove The follower databases properties to remove. * @param options The options parameters. @@ -264,10 +292,10 @@ export interface Clusters { clusterName: string, followerDatabaseToRemove: FollowerDatabaseDefinition, options?: ClustersDetachFollowerDatabasesOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Detaches all followers of a database owned by this cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param followerDatabaseToRemove The follower databases properties to remove. * @param options The options parameters. @@ -280,7 +308,7 @@ export interface Clusters { ): Promise; /** * Diagnoses network connectivity status for external resources on which the service is dependent on. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -289,14 +317,14 @@ export interface Clusters { clusterName: string, options?: ClustersDiagnoseVirtualNetworkOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersDiagnoseVirtualNetworkResponse > >; /** * Diagnoses network connectivity status for external resources on which the service is dependent on. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -307,7 +335,7 @@ export interface Clusters { ): Promise; /** * Checks that the cluster name is valid and is not already in use. - * @param location Azure location (region) name. + * @param location The name of Azure region. * @param clusterName The name of the cluster. * @param options The options parameters. */ @@ -318,7 +346,7 @@ export interface Clusters { ): Promise; /** * Add a list of language extensions that can run within KQL queries. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param languageExtensionsToAdd The language extensions to add. * @param options The options parameters. @@ -328,10 +356,10 @@ export interface Clusters { clusterName: string, languageExtensionsToAdd: LanguageExtensionsList, options?: ClustersAddLanguageExtensionsOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Add a list of language extensions that can run within KQL queries. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param languageExtensionsToAdd The language extensions to add. * @param options The options parameters. @@ -344,7 +372,7 @@ export interface Clusters { ): Promise; /** * Remove a list of language extensions that can run within KQL queries. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param languageExtensionsToRemove The language extensions to remove. * @param options The options parameters. @@ -354,10 +382,10 @@ export interface Clusters { clusterName: string, languageExtensionsToRemove: LanguageExtensionsList, options?: ClustersRemoveLanguageExtensionsOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Remove a list of language extensions that can run within KQL queries. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param languageExtensionsToRemove The language extensions to remove. * @param options The options parameters. diff --git a/sdk/kusto/arm-kusto/src/operationsInterfaces/dataConnections.ts b/sdk/kusto/arm-kusto/src/operationsInterfaces/dataConnections.ts index 1242a6633f01..ec7cfe8c2456 100644 --- a/sdk/kusto/arm-kusto/src/operationsInterfaces/dataConnections.ts +++ b/sdk/kusto/arm-kusto/src/operationsInterfaces/dataConnections.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { DataConnectionUnion, DataConnectionsListByDatabaseOptionalParams, @@ -31,7 +31,7 @@ import { export interface DataConnections { /** * Returns the list of data connections of the given Kusto database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -44,7 +44,7 @@ export interface DataConnections { ): PagedAsyncIterableIterator; /** * Checks that the data connection parameters are valid. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. @@ -57,14 +57,14 @@ export interface DataConnections { parameters: DataConnectionValidation, options?: DataConnectionsDataConnectionValidationOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DataConnectionsDataConnectionValidationResponse > >; /** * Checks that the data connection parameters are valid. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. @@ -79,7 +79,7 @@ export interface DataConnections { ): Promise; /** * Checks that the data connection name is valid and is not already in use. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param dataConnectionName The name of the data connection. @@ -94,7 +94,7 @@ export interface DataConnections { ): Promise; /** * Returns a data connection. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param dataConnectionName The name of the data connection. @@ -109,7 +109,7 @@ export interface DataConnections { ): Promise; /** * Creates or updates a data connection. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param dataConnectionName The name of the data connection. @@ -124,14 +124,14 @@ export interface DataConnections { parameters: DataConnectionUnion, options?: DataConnectionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DataConnectionsCreateOrUpdateResponse > >; /** * Creates or updates a data connection. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param dataConnectionName The name of the data connection. @@ -148,7 +148,7 @@ export interface DataConnections { ): Promise; /** * Updates a data connection. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param dataConnectionName The name of the data connection. @@ -163,14 +163,14 @@ export interface DataConnections { parameters: DataConnectionUnion, options?: DataConnectionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DataConnectionsUpdateResponse > >; /** * Updates a data connection. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param dataConnectionName The name of the data connection. @@ -187,7 +187,7 @@ export interface DataConnections { ): Promise; /** * Deletes the data connection with the given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param dataConnectionName The name of the data connection. @@ -199,10 +199,10 @@ export interface DataConnections { databaseName: string, dataConnectionName: string, options?: DataConnectionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the data connection with the given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param dataConnectionName The name of the data connection. diff --git a/sdk/kusto/arm-kusto/src/operationsInterfaces/databaseOperations.ts b/sdk/kusto/arm-kusto/src/operationsInterfaces/databaseOperations.ts new file mode 100644 index 000000000000..ae4eb6ff941b --- /dev/null +++ b/sdk/kusto/arm-kusto/src/operationsInterfaces/databaseOperations.ts @@ -0,0 +1,32 @@ +/* + * 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 { + DatabaseInviteFollowerRequest, + DatabaseInviteFollowerOptionalParams, + DatabaseInviteFollowerResponse +} from "../models"; + +/** Interface representing a DatabaseOperations. */ +export interface DatabaseOperations { + /** + * Generates an invitation token that allows attaching a follower database to this database. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The follower invitation request parameters. + * @param options The options parameters. + */ + inviteFollower( + resourceGroupName: string, + clusterName: string, + databaseName: string, + parameters: DatabaseInviteFollowerRequest, + options?: DatabaseInviteFollowerOptionalParams + ): Promise; +} diff --git a/sdk/kusto/arm-kusto/src/operationsInterfaces/databasePrincipalAssignments.ts b/sdk/kusto/arm-kusto/src/operationsInterfaces/databasePrincipalAssignments.ts index 8411f4998740..0ad67befa13d 100644 --- a/sdk/kusto/arm-kusto/src/operationsInterfaces/databasePrincipalAssignments.ts +++ b/sdk/kusto/arm-kusto/src/operationsInterfaces/databasePrincipalAssignments.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { DatabasePrincipalAssignment, DatabasePrincipalAssignmentsListOptionalParams, @@ -26,7 +26,7 @@ import { export interface DatabasePrincipalAssignments { /** * Lists all Kusto cluster database principalAssignments. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -39,7 +39,7 @@ export interface DatabasePrincipalAssignments { ): PagedAsyncIterableIterator; /** * Checks that the database principal assignment is valid and is not already in use. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param principalAssignmentName The name of the resource. @@ -54,7 +54,7 @@ export interface DatabasePrincipalAssignments { ): Promise; /** * Gets a Kusto cluster database principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. @@ -69,7 +69,7 @@ export interface DatabasePrincipalAssignments { ): Promise; /** * Creates a Kusto cluster database principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. @@ -84,14 +84,14 @@ export interface DatabasePrincipalAssignments { parameters: DatabasePrincipalAssignment, options?: DatabasePrincipalAssignmentsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DatabasePrincipalAssignmentsCreateOrUpdateResponse > >; /** * Creates a Kusto cluster database principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. @@ -108,7 +108,7 @@ export interface DatabasePrincipalAssignments { ): Promise; /** * Deletes a Kusto principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. @@ -120,10 +120,10 @@ export interface DatabasePrincipalAssignments { databaseName: string, principalAssignmentName: string, options?: DatabasePrincipalAssignmentsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a Kusto principalAssignment. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param principalAssignmentName The name of the Kusto principalAssignment. diff --git a/sdk/kusto/arm-kusto/src/operationsInterfaces/databases.ts b/sdk/kusto/arm-kusto/src/operationsInterfaces/databases.ts index 526561869aea..9f4aa575f7fb 100644 --- a/sdk/kusto/arm-kusto/src/operationsInterfaces/databases.ts +++ b/sdk/kusto/arm-kusto/src/operationsInterfaces/databases.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { DatabaseUnion, DatabasesListByClusterOptionalParams, @@ -35,7 +35,7 @@ import { export interface Databases { /** * Returns the list of databases of the given Kusto cluster. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -46,7 +46,7 @@ export interface Databases { ): PagedAsyncIterableIterator; /** * Returns a list of database principals of the given Kusto cluster and database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -59,7 +59,7 @@ export interface Databases { ): PagedAsyncIterableIterator; /** * Checks that the databases resource name is valid and is not already in use. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param resourceName The name of the resource. * @param options The options parameters. @@ -72,7 +72,7 @@ export interface Databases { ): Promise; /** * Returns a database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -85,7 +85,7 @@ export interface Databases { ): Promise; /** * Creates or updates a database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the CreateOrUpdate operation. @@ -98,14 +98,14 @@ export interface Databases { parameters: DatabaseUnion, options?: DatabasesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DatabasesCreateOrUpdateResponse > >; /** * Creates or updates a database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the CreateOrUpdate operation. @@ -120,7 +120,7 @@ export interface Databases { ): Promise; /** * Updates a database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the Update operation. @@ -133,14 +133,14 @@ export interface Databases { parameters: DatabaseUnion, options?: DatabasesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DatabasesUpdateResponse > >; /** * Updates a database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the Update operation. @@ -155,7 +155,7 @@ export interface Databases { ): Promise; /** * Deletes the database with the given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -165,10 +165,10 @@ export interface Databases { clusterName: string, databaseName: string, options?: DatabasesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the database with the given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -181,7 +181,7 @@ export interface Databases { ): Promise; /** * Add Database principals permissions. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param databasePrincipalsToAdd List of database principals to add. @@ -196,7 +196,7 @@ export interface Databases { ): Promise; /** * Remove Database principals permissions. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param databasePrincipalsToRemove List of database principals to remove. diff --git a/sdk/kusto/arm-kusto/src/operationsInterfaces/index.ts b/sdk/kusto/arm-kusto/src/operationsInterfaces/index.ts index 89b25c9fd28d..f59771ff77b3 100644 --- a/sdk/kusto/arm-kusto/src/operationsInterfaces/index.ts +++ b/sdk/kusto/arm-kusto/src/operationsInterfaces/index.ts @@ -12,6 +12,7 @@ export * from "./skus"; export * from "./databases"; export * from "./attachedDatabaseConfigurations"; export * from "./managedPrivateEndpoints"; +export * from "./databaseOperations"; export * from "./databasePrincipalAssignments"; export * from "./scripts"; export * from "./privateEndpointConnections"; diff --git a/sdk/kusto/arm-kusto/src/operationsInterfaces/managedPrivateEndpoints.ts b/sdk/kusto/arm-kusto/src/operationsInterfaces/managedPrivateEndpoints.ts index f44095331587..74f6563c8385 100644 --- a/sdk/kusto/arm-kusto/src/operationsInterfaces/managedPrivateEndpoints.ts +++ b/sdk/kusto/arm-kusto/src/operationsInterfaces/managedPrivateEndpoints.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ManagedPrivateEndpoint, ManagedPrivateEndpointsListOptionalParams, @@ -28,7 +28,7 @@ import { export interface ManagedPrivateEndpoints { /** * Returns the list of managed private endpoints. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -39,7 +39,7 @@ export interface ManagedPrivateEndpoints { ): PagedAsyncIterableIterator; /** * Checks that the managed private endpoints resource name is valid and is not already in use. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param resourceName The name of the resource. * @param options The options parameters. @@ -52,7 +52,7 @@ export interface ManagedPrivateEndpoints { ): Promise; /** * Gets a managed private endpoint. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param managedPrivateEndpointName The name of the managed private endpoint. * @param options The options parameters. @@ -65,7 +65,7 @@ export interface ManagedPrivateEndpoints { ): Promise; /** * Creates a managed private endpoint. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param managedPrivateEndpointName The name of the managed private endpoint. * @param parameters The managed private endpoint parameters. @@ -78,14 +78,14 @@ export interface ManagedPrivateEndpoints { parameters: ManagedPrivateEndpoint, options?: ManagedPrivateEndpointsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ManagedPrivateEndpointsCreateOrUpdateResponse > >; /** * Creates a managed private endpoint. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param managedPrivateEndpointName The name of the managed private endpoint. * @param parameters The managed private endpoint parameters. @@ -100,7 +100,7 @@ export interface ManagedPrivateEndpoints { ): Promise; /** * Updates a managed private endpoint. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param managedPrivateEndpointName The name of the managed private endpoint. * @param parameters The managed private endpoint parameters. @@ -113,14 +113,14 @@ export interface ManagedPrivateEndpoints { parameters: ManagedPrivateEndpoint, options?: ManagedPrivateEndpointsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ManagedPrivateEndpointsUpdateResponse > >; /** * Updates a managed private endpoint. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param managedPrivateEndpointName The name of the managed private endpoint. * @param parameters The managed private endpoint parameters. @@ -135,7 +135,7 @@ export interface ManagedPrivateEndpoints { ): Promise; /** * Deletes a managed private endpoint. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param managedPrivateEndpointName The name of the managed private endpoint. * @param options The options parameters. @@ -145,10 +145,10 @@ export interface ManagedPrivateEndpoints { clusterName: string, managedPrivateEndpointName: string, options?: ManagedPrivateEndpointsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a managed private endpoint. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param managedPrivateEndpointName The name of the managed private endpoint. * @param options The options parameters. diff --git a/sdk/kusto/arm-kusto/src/operationsInterfaces/operationsResults.ts b/sdk/kusto/arm-kusto/src/operationsInterfaces/operationsResults.ts index 3a6f544f48d5..4df39a5a6208 100644 --- a/sdk/kusto/arm-kusto/src/operationsInterfaces/operationsResults.ts +++ b/sdk/kusto/arm-kusto/src/operationsInterfaces/operationsResults.ts @@ -15,8 +15,8 @@ import { export interface OperationsResults { /** * Returns operation results. - * @param location Azure location (region) name. - * @param operationId The Guid of the operation ID + * @param location The name of Azure region. + * @param operationId The ID of an ongoing async operation. * @param options The options parameters. */ get( diff --git a/sdk/kusto/arm-kusto/src/operationsInterfaces/operationsResultsLocation.ts b/sdk/kusto/arm-kusto/src/operationsInterfaces/operationsResultsLocation.ts index 4c834c5a593f..b45c2fe00238 100644 --- a/sdk/kusto/arm-kusto/src/operationsInterfaces/operationsResultsLocation.ts +++ b/sdk/kusto/arm-kusto/src/operationsInterfaces/operationsResultsLocation.ts @@ -6,19 +6,22 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { OperationsResultsLocationGetOptionalParams } from "../models"; +import { + OperationsResultsLocationGetOptionalParams, + OperationsResultsLocationGetResponse +} from "../models"; /** Interface representing a OperationsResultsLocation. */ export interface OperationsResultsLocation { /** * Returns operation results. - * @param location Azure location (region) name. - * @param operationId The Guid of the operation ID + * @param location The name of Azure region. + * @param operationId The ID of an ongoing async operation. * @param options The options parameters. */ get( location: string, operationId: string, options?: OperationsResultsLocationGetOptionalParams - ): Promise; + ): Promise; } diff --git a/sdk/kusto/arm-kusto/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/kusto/arm-kusto/src/operationsInterfaces/privateEndpointConnections.ts index 791294b684c7..501d185b9a67 100644 --- a/sdk/kusto/arm-kusto/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/kusto/arm-kusto/src/operationsInterfaces/privateEndpointConnections.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { PrivateEndpointConnection, PrivateEndpointConnectionsListOptionalParams, @@ -23,7 +23,7 @@ import { export interface PrivateEndpointConnections { /** * Returns the list of private endpoint connections. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -34,7 +34,7 @@ export interface PrivateEndpointConnections { ): PagedAsyncIterableIterator; /** * Gets a private endpoint connection. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param options The options parameters. @@ -47,7 +47,7 @@ export interface PrivateEndpointConnections { ): Promise; /** * Approve or reject a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param parameters A private endpoint connection @@ -60,14 +60,14 @@ export interface PrivateEndpointConnections { parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionsCreateOrUpdateResponse > >; /** * Approve or reject a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param parameters A private endpoint connection @@ -82,7 +82,7 @@ export interface PrivateEndpointConnections { ): Promise; /** * Deletes a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param options The options parameters. @@ -92,10 +92,10 @@ export interface PrivateEndpointConnections { clusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param options The options parameters. diff --git a/sdk/kusto/arm-kusto/src/operationsInterfaces/privateLinkResources.ts b/sdk/kusto/arm-kusto/src/operationsInterfaces/privateLinkResources.ts index 1d941862b804..26d43f57dd63 100644 --- a/sdk/kusto/arm-kusto/src/operationsInterfaces/privateLinkResources.ts +++ b/sdk/kusto/arm-kusto/src/operationsInterfaces/privateLinkResources.ts @@ -19,7 +19,7 @@ import { export interface PrivateLinkResources { /** * Returns the list of private link resources. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param options The options parameters. */ @@ -30,7 +30,7 @@ export interface PrivateLinkResources { ): PagedAsyncIterableIterator; /** * Gets a private link resource. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param privateLinkResourceName The name of the private link resource. * @param options The options parameters. diff --git a/sdk/kusto/arm-kusto/src/operationsInterfaces/scripts.ts b/sdk/kusto/arm-kusto/src/operationsInterfaces/scripts.ts index 0fa2fe931975..834b0e2a2ec5 100644 --- a/sdk/kusto/arm-kusto/src/operationsInterfaces/scripts.ts +++ b/sdk/kusto/arm-kusto/src/operationsInterfaces/scripts.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Script, ScriptsListByDatabaseOptionalParams, @@ -28,7 +28,7 @@ import { export interface Scripts { /** * Returns the list of database scripts for given database. - * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param options The options parameters. @@ -41,7 +41,7 @@ export interface Scripts { ): PagedAsyncIterableIterator