diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 80db0d33996f..a7e0096ac5bc 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2844,7 +2844,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/chai-as-promised/7.1.5: @@ -2866,7 +2866,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/cookie/0.4.1: @@ -2876,7 +2876,7 @@ packages: /@types/cors/2.8.13: resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/debug/4.1.8: @@ -2888,7 +2888,7 @@ packages: /@types/decompress/4.2.4: resolution: {integrity: sha512-/C8kTMRTNiNuWGl5nEyKbPiMv6HA+0RbEXzFhFBEzASM6+oa4tJro9b8nj7eRlOFfuLdzUU+DS/GPDlvvzMOhA==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/eslint/8.4.10: @@ -2909,7 +2909,7 @@ packages: /@types/express-serve-static-core/4.17.35: resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 '@types/send': 0.17.1 @@ -2927,13 +2927,13 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/http-errors/2.0.1: @@ -2950,7 +2950,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/json-schema/7.0.12: @@ -2964,13 +2964,13 @@ packages: /@types/jsonwebtoken/9.0.2: resolution: {integrity: sha512-drE6uz7QBKq1fYqqoFKTDRdFCPHd5TCub75BM+D+cMx7NU9hUz7SESLfC2fSCXVFMO5Yj8sOWHuGqPgjc+fz0Q==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/jws/3.2.5: resolution: {integrity: sha512-xGTxZH34xOryaTN8CMsvhh9lfNqFuHiMoRvsLYWQdBJHqiECyfInXVl2eK8Jz2emxZWMIn5RBlmr3oDVPeWujw==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/linkify-it/3.0.2: @@ -3029,20 +3029,20 @@ packages: /@types/mysql/2.15.19: resolution: {integrity: sha512-wSRg2QZv14CWcZXkgdvHbbV2ACufNy5EgI8mBBxnJIptchv7DBy/h53VMa2jDhyo0C9MO4iowE6z9vF8Ja1DkQ==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/node-fetch/2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 form-data: 3.0.1 dev: false /@types/node-fetch/2.6.4: resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 form-data: 3.0.1 dev: false @@ -3075,7 +3075,7 @@ packages: /@types/pg/8.6.1: resolution: {integrity: sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 pg-protocol: 1.6.0 pg-types: 2.2.0 dev: false @@ -3103,7 +3103,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/resolve/1.20.2: @@ -3126,7 +3126,7 @@ packages: resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} dependencies: '@types/mime': 1.3.2 - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/serve-static/1.15.2: @@ -3134,7 +3134,7 @@ packages: dependencies: '@types/http-errors': 2.0.1 '@types/mime': 3.0.1 - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/shimmer/1.0.2: @@ -3154,13 +3154,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/tough-cookie/4.0.2: @@ -3174,7 +3174,7 @@ packages: /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/underscore/1.11.6: @@ -3192,19 +3192,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/ws/8.5.5: resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false /@types/yargs-parser/21.0.0: @@ -3221,7 +3221,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.54 + '@types/node': 16.18.39 dev: false optional: true @@ -4498,7 +4498,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: @@ -4677,7 +4677,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 @@ -4818,7 +4818,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.2.0-dev.20230731 + typescript: 5.2.0-dev.20230801 dev: false /duplexer3/0.1.5: @@ -4880,7 +4880,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.13 - '@types/node': 14.18.54 + '@types/node': 16.18.39 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -5050,7 +5050,7 @@ packages: dependencies: debug: 3.2.7 is-core-module: 2.12.1 - resolve: 1.22.3 + resolve: 1.22.2 dev: false /eslint-module-utils/2.8.0_eslint@8.46.0: @@ -5869,7 +5869,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 @@ -6194,7 +6194,7 @@ packages: /ignore-walk/3.0.4: resolution: {integrity: sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==} dependencies: - minimatch: 3.0.8 + minimatch: 3.1.2 dev: false /ignore/5.1.9: @@ -6287,7 +6287,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 @@ -8762,7 +8762,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 14.18.54 + '@types/node': 16.18.39 long: 5.2.3 dev: false @@ -10335,8 +10335,8 @@ packages: hasBin: true dev: false - /typescript/5.2.0-dev.20230731: - resolution: {integrity: sha512-RJVLgnDgu67ZrohYy0aBea+5TICfRod36+24zw0bR/KJDQJO9mlIjTC0k+/PKw87fXP5JuUHqepEk15PvFya7A==} + /typescript/5.2.0-dev.20230801: + resolution: {integrity: sha512-f8FmzL+1+agawPPUzsd38vTiZD/z+RtGax/3+tzxsBP15O/4lMsliTEXRXF7ESC7a1s/f9HsNNRMne438PPZsw==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -15477,7 +15477,7 @@ packages: dev: false file:projects/arm-operationalinsights.tgz: - resolution: {integrity: sha512-HD3OCLwP4aovozs15FQORTf4fnOVHMLj94ZTLYeDMZTYR4GM1nmjTHqt6re8uibtuManYcf/dFsgUUIatd4Vqw==, tarball: file:projects/arm-operationalinsights.tgz} + resolution: {integrity: sha512-Rvm2U/jgdNrNalbJt0T3fEztZtrHeFErNYg+gYhOexlHleGGL/wKJxphzb6YcmbKresvX8BZw86wLAl4+D8Ctw==, tarball: file:projects/arm-operationalinsights.tgz} name: '@rush-temp/arm-operationalinsights' version: 0.0.0 dependencies: @@ -15491,8 +15491,8 @@ packages: '@types/node': 14.18.54 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/operationalinsights/arm-operationalinsights/CHANGELOG.md b/sdk/operationalinsights/arm-operationalinsights/CHANGELOG.md index 204c75ca9f92..d1190b0146a2 100644 --- a/sdk/operationalinsights/arm-operationalinsights/CHANGELOG.md +++ b/sdk/operationalinsights/arm-operationalinsights/CHANGELOG.md @@ -1,15 +1,12 @@ # Release History + +## 9.1.0 (2023-08-01) + +**Features** -## 9.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Enum KnownProvisioningStateEnum has a new value Deleting + + ## 9.0.0 (2023-02-09) **Features** diff --git a/sdk/operationalinsights/arm-operationalinsights/_meta.json b/sdk/operationalinsights/arm-operationalinsights/_meta.json index 48df46aa3efc..82f3220dadc2 100644 --- a/sdk/operationalinsights/arm-operationalinsights/_meta.json +++ b/sdk/operationalinsights/arm-operationalinsights/_meta.json @@ -1,8 +1,8 @@ { - "commit": "c94b5583e56b7ffcfeaee8dbb9e09516c43fc324", + "commit": "9d171f5580576db60b1ea835a3f0b90fd453464e", "readme": "specification/operationalinsights/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\\operationalinsights\\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/operationalinsights/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/operationalinsights/arm-operationalinsights/package.json b/sdk/operationalinsights/arm-operationalinsights/package.json index 5c4f21441abe..45726928751e 100644 --- a/sdk/operationalinsights/arm-operationalinsights/package.json +++ b/sdk/operationalinsights/arm-operationalinsights/package.json @@ -3,15 +3,15 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for OperationalInsightsManagementClient.", - "version": "9.0.1", + "version": "9.1.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "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/operationalinsights/arm-operationalinsights", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-operationalinsights?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/operationalinsights/arm-operationalinsights" +} \ No newline at end of file diff --git a/sdk/operationalinsights/arm-operationalinsights/review/arm-operationalinsights.api.md b/sdk/operationalinsights/arm-operationalinsights/review/arm-operationalinsights.api.md index 02c65696148b..1281ef4077f2 100644 --- a/sdk/operationalinsights/arm-operationalinsights/review/arm-operationalinsights.api.md +++ b/sdk/operationalinsights/arm-operationalinsights/review/arm-operationalinsights.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 AssociatedWorkspace { @@ -107,11 +107,11 @@ export interface ClusterPatch { // @public export interface Clusters { - 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; - beginUpdate(resourceGroupName: string, clusterName: string, parameters: ClusterPatch, options?: ClustersUpdateOptionalParams): Promise, ClustersUpdateResponse>>; + beginUpdate(resourceGroupName: string, clusterName: string, parameters: ClusterPatch, options?: ClustersUpdateOptionalParams): Promise, ClustersUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, clusterName: string, parameters: ClusterPatch, options?: ClustersUpdateOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, options?: ClustersGetOptionalParams): Promise; list(options?: ClustersListOptionalParams): PagedAsyncIterableIterator; @@ -553,6 +553,7 @@ export enum KnownLinkedServiceEntityStatus { // @public export enum KnownProvisioningStateEnum { + Deleting = "Deleting", InProgress = "InProgress", Succeeded = "Succeeded", Updating = "Updating" @@ -669,9 +670,9 @@ export interface LinkedServiceListResult { // @public export interface LinkedServices { - beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, linkedServiceName: string, parameters: LinkedService, options?: LinkedServicesCreateOrUpdateOptionalParams): Promise, LinkedServicesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, linkedServiceName: string, parameters: LinkedService, options?: LinkedServicesCreateOrUpdateOptionalParams): Promise, LinkedServicesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, workspaceName: string, linkedServiceName: string, parameters: LinkedService, options?: LinkedServicesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options?: LinkedServicesDeleteOptionalParams): Promise, LinkedServicesDeleteResponse>>; + beginDelete(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options?: LinkedServicesDeleteOptionalParams): Promise, LinkedServicesDeleteResponse>>; beginDeleteAndWait(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options?: LinkedServicesDeleteOptionalParams): Promise; get(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options?: LinkedServicesGetOptionalParams): Promise; listByWorkspace(resourceGroupName: string, workspaceName: string, options?: LinkedServicesListByWorkspaceOptionalParams): PagedAsyncIterableIterator; @@ -1441,11 +1442,11 @@ export type TablePlanEnum = string; // @public export interface Tables { - beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, tableName: string, parameters: Table, options?: TablesCreateOrUpdateOptionalParams): Promise, TablesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, tableName: string, parameters: Table, options?: TablesCreateOrUpdateOptionalParams): Promise, TablesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, workspaceName: string, tableName: string, parameters: Table, options?: TablesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, workspaceName: string, tableName: string, options?: TablesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, workspaceName: string, tableName: string, options?: TablesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, workspaceName: string, tableName: string, options?: TablesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, workspaceName: string, tableName: string, parameters: Table, options?: TablesUpdateOptionalParams): Promise, TablesUpdateResponse>>; + beginUpdate(resourceGroupName: string, workspaceName: string, tableName: string, parameters: Table, options?: TablesUpdateOptionalParams): Promise, TablesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, workspaceName: string, tableName: string, parameters: Table, options?: TablesUpdateOptionalParams): Promise; cancelSearch(resourceGroupName: string, workspaceName: string, tableName: string, options?: TablesCancelSearchOptionalParams): Promise; get(resourceGroupName: string, workspaceName: string, tableName: string, options?: TablesGetOptionalParams): Promise; @@ -1689,9 +1690,9 @@ export interface WorkspacePurgeStatusResponse { // @public export interface Workspaces { - beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, parameters: Workspace, options?: WorkspacesCreateOrUpdateOptionalParams): Promise, WorkspacesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, parameters: Workspace, options?: WorkspacesCreateOrUpdateOptionalParams): Promise, WorkspacesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, workspaceName: string, parameters: Workspace, options?: WorkspacesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, workspaceName: string, options?: WorkspacesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, workspaceName: string, options?: WorkspacesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, workspaceName: string, options?: WorkspacesDeleteOptionalParams): Promise; get(resourceGroupName: string, workspaceName: string, options?: WorkspacesGetOptionalParams): Promise; list(options?: WorkspacesListOptionalParams): PagedAsyncIterableIterator; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/lroImpl.ts b/sdk/operationalinsights/arm-operationalinsights/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/lroImpl.ts +++ b/sdk/operationalinsights/arm-operationalinsights/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/operationalinsights/arm-operationalinsights/src/models/index.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts index e4a6ce39e9be..39985f163f69 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts @@ -1047,7 +1047,7 @@ export interface Table extends ProxyResource { readonly systemData?: SystemDataAutoGenerated; /** The table retention in days, between 4 and 730. Setting this property to -1 will default to the workspace retention. */ retentionInDays?: number; - /** The table total retention in days, between 4 and 2555. Setting this property to -1 will default to table retention. */ + /** The table total retention in days, between 4 and 2556. Setting this property to -1 will default to table retention. */ totalRetentionInDays?: number; /** * The table data archive retention in days. Calculated as (totalRetentionInDays-retentionInDays) @@ -1774,13 +1774,13 @@ export type ColumnTypeEnum = string; /** Known values of {@link ColumnDataTypeHintEnum} that the service accepts. */ export enum KnownColumnDataTypeHintEnum { - /** A string that matches the pattern of a URI, for example, scheme://username:password@host:1234/this/is/a/path?k1=v1&k2=v2#fragment */ + /** A string that matches the pattern of a URI, for example, scheme:\//username:password@host:1234\/this\/is\/a\/path?k1=v1&k2=v2#fragment */ Uri = "uri", /** A standard 128-bit GUID following the standard shape, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx */ Guid = "guid", - /** An Azure Resource Model (ARM) path: /subscriptions/{...}/resourceGroups/{...}/providers/Microsoft.{...}/{...}/{...}/{...}... */ + /** An Azure Resource Model (ARM) path: \/subscriptions\/{...}\/resourceGroups\/{...}\/providers\/Microsoft.{...}\/{...}\/{...}\/{...}... */ ArmPath = "armPath", - /** A standard V4/V6 ip address following the standard shape, x.x.x.x/y:y:y:y:y:y:y:y */ + /** A standard V4\/V6 ip address following the standard shape, x.x.x.x\/y:y:y:y:y:y:y:y */ Ip = "ip" } @@ -1866,7 +1866,9 @@ export enum KnownProvisioningStateEnum { /** Table schema is stable and without changes, table data is being updated. */ InProgress = "InProgress", /** Table state is stable and without changes, table is unlocked and open for new updates. */ - Succeeded = "Succeeded" + Succeeded = "Succeeded", + /** Table state is deleting. */ + Deleting = "Deleting" } /** @@ -1876,7 +1878,8 @@ export enum KnownProvisioningStateEnum { * ### Known values supported by the service * **Updating**: Table schema is still being built and updated, table is currently locked for any changes till the procedure is done. \ * **InProgress**: Table schema is stable and without changes, table data is being updated. \ - * **Succeeded**: Table state is stable and without changes, table is unlocked and open for new updates. + * **Succeeded**: Table state is stable and without changes, table is unlocked and open for new updates. \ + * **Deleting**: Table state is deleting. */ export type ProvisioningStateEnum = string; /** Defines values for DataSourceType. */ diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts index 32d6a1419d3b..4a6b3d8d2aaa 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts @@ -2667,7 +2667,7 @@ export const Table: coreClient.CompositeMapper = { }, totalRetentionInDays: { constraints: { - InclusiveMaximum: 2555, + InclusiveMaximum: 2556, InclusiveMinimum: 4 }, serializedName: "properties.totalRetentionInDays", diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts index 862c7d6b8948..7fe546c8f4b7 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts @@ -90,7 +90,7 @@ export class OperationalInsightsManagementClient extends coreClient.ServiceClien credential: credentials }; - const packageDetails = `azsdk-js-arm-operationalinsights/9.0.1`; + const packageDetails = `azsdk-js-arm-operationalinsights/9.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts index 90a05e20fed7..bf0c196d0234 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts +++ b/sdk/operationalinsights/arm-operationalinsights/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 { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -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 { Cluster, ClustersListByResourceGroupNextOptionalParams, @@ -209,8 +213,8 @@ export class ClustersImpl implements Clusters { parameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersCreateOrUpdateResponse > > { @@ -220,7 +224,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 ) => { @@ -253,13 +257,16 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ClustersCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -298,14 +305,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 ) => { @@ -338,13 +345,13 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -400,8 +407,8 @@ export class ClustersImpl implements Clusters { parameters: ClusterPatch, options?: ClustersUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersUpdateResponse > > { @@ -411,7 +418,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 ) => { @@ -444,13 +451,16 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, parameters, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ClustersUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts index 2e849ee9a485..848c01afc6a8 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.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 { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -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 { LinkedService, LinkedServicesListByWorkspaceOptionalParams, @@ -120,8 +124,8 @@ export class LinkedServicesImpl implements LinkedServices { parameters: LinkedService, options?: LinkedServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, LinkedServicesCreateOrUpdateResponse > > { @@ -131,7 +135,7 @@ export class LinkedServicesImpl implements LinkedServices { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -164,19 +168,22 @@ export class LinkedServicesImpl implements LinkedServices { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, workspaceName, linkedServiceName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + LinkedServicesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -221,8 +228,8 @@ export class LinkedServicesImpl implements LinkedServices { linkedServiceName: string, options?: LinkedServicesDeleteOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, LinkedServicesDeleteResponse > > { @@ -232,7 +239,7 @@ export class LinkedServicesImpl implements LinkedServices { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -265,13 +272,16 @@ export class LinkedServicesImpl implements LinkedServices { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, workspaceName, linkedServiceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, workspaceName, linkedServiceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + LinkedServicesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/tables.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/tables.ts index b02bb21f2e33..f9c12f8d6e30 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/tables.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/tables.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 { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -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 { Table, TablesListByWorkspaceOptionalParams, @@ -140,8 +144,8 @@ export class TablesImpl implements Tables { parameters: Table, options?: TablesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, TablesCreateOrUpdateResponse > > { @@ -151,7 +155,7 @@ export class TablesImpl implements Tables { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -184,15 +188,24 @@ export class TablesImpl implements Tables { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, workspaceName, tableName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + workspaceName, + tableName, + parameters, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + TablesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -238,7 +251,7 @@ export class TablesImpl implements Tables { parameters: Table, options?: TablesUpdateOptionalParams ): Promise< - PollerLike, TablesUpdateResponse> + SimplePollerLike, TablesUpdateResponse> > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -246,7 +259,7 @@ export class TablesImpl implements Tables { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -279,15 +292,24 @@ export class TablesImpl implements Tables { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, workspaceName, tableName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + workspaceName, + tableName, + parameters, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + TablesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -349,14 +371,14 @@ export class TablesImpl implements Tables { workspaceName: string, tableName: string, options?: TablesDeleteOptionalParams - ): 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 ) => { @@ -389,15 +411,15 @@ export class TablesImpl implements Tables { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, workspaceName, tableName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, workspaceName, tableName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts index c60866c149da..36e68140373d 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.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 { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -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 { Workspace, WorkspacesListOptionalParams, @@ -174,8 +178,8 @@ export class WorkspacesImpl implements Workspaces { parameters: Workspace, options?: WorkspacesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, WorkspacesCreateOrUpdateResponse > > { @@ -185,7 +189,7 @@ export class WorkspacesImpl implements Workspaces { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -218,13 +222,16 @@ export class WorkspacesImpl implements Workspaces { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, workspaceName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, workspaceName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + WorkspacesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -265,14 +272,14 @@ export class WorkspacesImpl implements Workspaces { resourceGroupName: string, workspaceName: string, options?: WorkspacesDeleteOptionalParams - ): 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 ) => { @@ -305,13 +312,13 @@ export class WorkspacesImpl implements Workspaces { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, workspaceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, workspaceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/clusters.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/clusters.ts index b83f2160fb22..ce4acaefc9b6 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/clusters.ts +++ b/sdk/operationalinsights/arm-operationalinsights/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 { Cluster, ClustersListByResourceGroupOptionalParams, @@ -54,8 +54,8 @@ export interface Clusters { parameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersCreateOrUpdateResponse > >; @@ -82,7 +82,7 @@ export interface Clusters { resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a cluster instance. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -118,8 +118,8 @@ export interface Clusters { parameters: ClusterPatch, options?: ClustersUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersUpdateResponse > >; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/linkedServices.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/linkedServices.ts index af9aafa9234b..5e2fbbbab696 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/linkedServices.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/linkedServices.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 { LinkedService, LinkedServicesListByWorkspaceOptionalParams, @@ -48,8 +48,8 @@ export interface LinkedServices { parameters: LinkedService, options?: LinkedServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, LinkedServicesCreateOrUpdateResponse > >; @@ -81,8 +81,8 @@ export interface LinkedServices { linkedServiceName: string, options?: LinkedServicesDeleteOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, LinkedServicesDeleteResponse > >; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/tables.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/tables.ts index 64f612d1abe0..b5b385dfc28e 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/tables.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/tables.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 { Table, TablesListByWorkspaceOptionalParams, @@ -51,8 +51,8 @@ export interface Tables { parameters: Table, options?: TablesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, TablesCreateOrUpdateResponse > >; @@ -86,7 +86,7 @@ export interface Tables { parameters: Table, options?: TablesUpdateOptionalParams ): Promise< - PollerLike, TablesUpdateResponse> + SimplePollerLike, TablesUpdateResponse> >; /** * Update a Log Analytics workspace table. @@ -128,7 +128,7 @@ export interface Tables { workspaceName: string, tableName: string, options?: TablesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a Log Analytics workspace table. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/workspaces.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/workspaces.ts index 3759fce290cb..69228e478c55 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/workspaces.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/workspaces.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 { Workspace, WorkspacesListOptionalParams, @@ -54,8 +54,8 @@ export interface Workspaces { parameters: Workspace, options?: WorkspacesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, WorkspacesCreateOrUpdateResponse > >; @@ -84,7 +84,7 @@ export interface Workspaces { resourceGroupName: string, workspaceName: string, options?: WorkspacesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the * same subscription, resource group and location. The name is kept for 14 days and cannot be used for diff --git a/sdk/operationalinsights/arm-operationalinsights/test/sampleTest.ts b/sdk/operationalinsights/arm-operationalinsights/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/operationalinsights/arm-operationalinsights/tsconfig.json b/sdk/operationalinsights/arm-operationalinsights/tsconfig.json index fccdcc69f6d3..3e6ae96443f3 100644 --- a/sdk/operationalinsights/arm-operationalinsights/tsconfig.json +++ b/sdk/operationalinsights/arm-operationalinsights/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-operationalinsights": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"