diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index aafea9ae8794..3f465b001626 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2245,7 +2245,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/chai-as-promised/7.1.5: @@ -2267,7 +2267,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/cookie/0.4.1: @@ -2277,7 +2277,7 @@ packages: /@types/cors/2.8.13: resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/debug/4.1.8: @@ -2289,7 +2289,7 @@ packages: /@types/decompress/4.2.4: resolution: {integrity: sha512-/C8kTMRTNiNuWGl5nEyKbPiMv6HA+0RbEXzFhFBEzASM6+oa4tJro9b8nj7eRlOFfuLdzUU+DS/GPDlvvzMOhA==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/eslint/8.4.10: @@ -2310,7 +2310,7 @@ packages: /@types/express-serve-static-core/4.17.35: resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 '@types/send': 0.17.1 @@ -2328,13 +2328,13 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/inquirer/8.2.6: @@ -2347,7 +2347,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/json-schema/7.0.12: @@ -2361,13 +2361,13 @@ packages: /@types/jsonwebtoken/9.0.2: resolution: {integrity: sha512-drE6uz7QBKq1fYqqoFKTDRdFCPHd5TCub75BM+D+cMx7NU9hUz7SESLfC2fSCXVFMO5Yj8sOWHuGqPgjc+fz0Q==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/jws/3.2.5: resolution: {integrity: sha512-xGTxZH34xOryaTN8CMsvhh9lfNqFuHiMoRvsLYWQdBJHqiECyfInXVl2eK8Jz2emxZWMIn5RBlmr3oDVPeWujw==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/linkify-it/3.0.2: @@ -2418,13 +2418,13 @@ packages: /@types/mysql/2.15.19: resolution: {integrity: sha512-wSRg2QZv14CWcZXkgdvHbbV2ACufNy5EgI8mBBxnJIptchv7DBy/h53VMa2jDhyo0C9MO4iowE6z9vF8Ja1DkQ==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/node-fetch/2.6.4: resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 form-data: 3.0.1 dev: false @@ -2449,7 +2449,7 @@ packages: /@types/pg/8.6.1: resolution: {integrity: sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 pg-protocol: 1.6.0 pg-types: 2.2.0 dev: false @@ -2477,7 +2477,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/semaphore/1.1.1: @@ -2496,14 +2496,14 @@ packages: resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} dependencies: '@types/mime': 1.3.2 - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/serve-static/1.15.1: resolution: {integrity: sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==} dependencies: '@types/mime': 3.0.1 - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/sinon/10.0.15: @@ -2525,13 +2525,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/tough-cookie/4.0.2: @@ -2545,7 +2545,7 @@ packages: /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/underscore/1.11.5: @@ -2563,19 +2563,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/ws/8.5.4: resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false /@types/yargs-parser/21.0.0: @@ -2592,7 +2592,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.48 + '@types/node': 16.18.34 dev: false optional: true @@ -3601,7 +3601,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: @@ -3832,7 +3832,7 @@ packages: dependencies: semver: 7.5.1 shelljs: 0.8.5 - typescript: 5.2.0-dev.20230605 + typescript: 5.2.0-dev.20230606 dev: false /ecdsa-sig-formatter/1.0.11: @@ -3883,7 +3883,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.13 - '@types/node': 14.18.48 + '@types/node': 16.18.34 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -4807,7 +4807,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 @@ -7115,7 +7115,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 14.18.48 + '@types/node': 16.18.34 long: 5.2.3 dev: false @@ -8413,6 +8413,12 @@ packages: hasBin: true dev: false + /typescript/4.8.4: + resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: false + /typescript/5.0.4: resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} engines: {node: '>=12.20'} @@ -8425,8 +8431,8 @@ packages: hasBin: true dev: false - /typescript/5.2.0-dev.20230605: - resolution: {integrity: sha512-xMeI7pFrOfxZTt1m4a2txN1E2Qh9IzLT9LNdc0DlEwJJKXjajj5j/nFLwWOUEnaFZBT6v35jlgLogG5HuSxUyA==} + /typescript/5.2.0-dev.20230606: + resolution: {integrity: sha512-aS+7vCKtiKKuzHFWW3sZ0zX1mHqSHESmM+LgOXx2jAMQ8NnHoT+7ixl37t0Z+JWXjOb0umUbgjBepaOLiGTuSQ==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -10208,7 +10214,7 @@ packages: dev: false file:projects/arm-batch.tgz: - resolution: {integrity: sha512-2fxbZvesjWy2JPLb6VHPHvCwsZ75ahGZ4aAwTBIWrgTzUUuzHuAit+FCkuYC8ohoyoMgspiLhJqygMy12pDQ9A==, tarball: file:projects/arm-batch.tgz} + resolution: {integrity: sha512-sbqRWRXXaNP4BmdgFKNe8K55X/iZJJnqQOJXSGEiqMcXmOBhtieBe/2vpVDUCwwQEX3FyUVtg0FLzZPKKX8gxQ==, tarball: file:projects/arm-batch.tgz} name: '@rush-temp/arm-batch' version: 0.0.0 dependencies: @@ -10223,13 +10229,14 @@ packages: '@types/node': 14.18.48 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.1.4 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_6vxqa4pl2c5hli7lcaemfsm5je tslib: 2.5.3 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color @@ -18026,7 +18033,7 @@ packages: dev: false file:projects/monitor-query.tgz: - resolution: {integrity: sha512-UTfrrypI9UvxkoW1o6zxcIzxJSxXeam5tEzF35ZFa+bJnIOgH45sUvzT2p4n/YA2/blGPYogtQPT81RcWiHgBg==, tarball: file:projects/monitor-query.tgz} + resolution: {integrity: sha512-bE/JTLjfj8HMmBTGfK1pTs4Kfsy9GJwXtrvbOjgDH8pYIvzzJ3LjUNRGjVhb3r+FOPkBRbb9fxniy5U3mmmLng==, tarball: file:projects/monitor-query.tgz} name: '@rush-temp/monitor-query' version: 0.0.0 dependencies: diff --git a/sdk/batch/arm-batch/CHANGELOG.md b/sdk/batch/arm-batch/CHANGELOG.md index d221994f753e..476e30f4cd00 100644 --- a/sdk/batch/arm-batch/CHANGELOG.md +++ b/sdk/batch/arm-batch/CHANGELOG.md @@ -1,15 +1,33 @@ # Release History + +## 9.0.0 (2023-06-07) + +**Features** -## 8.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added Type Alias ContainerType + - Interface NetworkConfiguration has a new optional parameter enableAcceleratedNetworking + - Interface VMExtension has a new optional parameter enableAutomaticUpgrade + - Added Enum KnownContainerType -### Other Changes +**Breaking Changes** + - Interface ApplicationListNextOptionalParams no longer has parameter maxresults + - Interface ApplicationPackageListNextOptionalParams no longer has parameter maxresults + - Interface CertificateListByBatchAccountNextOptionalParams no longer has parameter filter + - Interface CertificateListByBatchAccountNextOptionalParams no longer has parameter maxresults + - Interface CertificateListByBatchAccountNextOptionalParams no longer has parameter select + - Interface LocationListSupportedCloudServiceSkusNextOptionalParams no longer has parameter filter + - Interface LocationListSupportedCloudServiceSkusNextOptionalParams no longer has parameter maxresults + - Interface LocationListSupportedVirtualMachineSkusNextOptionalParams no longer has parameter filter + - Interface LocationListSupportedVirtualMachineSkusNextOptionalParams no longer has parameter maxresults + - Interface PoolListByBatchAccountNextOptionalParams no longer has parameter filter + - Interface PoolListByBatchAccountNextOptionalParams no longer has parameter maxresults + - Interface PoolListByBatchAccountNextOptionalParams no longer has parameter select + - Interface PrivateEndpointConnectionListByBatchAccountNextOptionalParams no longer has parameter maxresults + - Interface PrivateLinkResourceListByBatchAccountNextOptionalParams no longer has parameter maxresults + - Type of parameter type of interface ContainerConfiguration is changed from "DockerCompatible" to ContainerType + + ## 8.0.0 (2022-11-10) **Features** diff --git a/sdk/batch/arm-batch/LICENSE b/sdk/batch/arm-batch/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/batch/arm-batch/LICENSE +++ b/sdk/batch/arm-batch/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/batch/arm-batch/_meta.json b/sdk/batch/arm-batch/_meta.json index 2d826f2fb2ec..7e35045806e1 100644 --- a/sdk/batch/arm-batch/_meta.json +++ b/sdk/batch/arm-batch/_meta.json @@ -1,8 +1,8 @@ { - "commit": "05fc1b443a1ba7b120a48e1ad204d267565ef57a", + "commit": "d6674842aa92b35ab3411008d8656e4e5dc0e066", "readme": "specification/batch/resource-manager/readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\batch\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --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/batch/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", + "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/batch/arm-batch/package.json b/sdk/batch/arm-batch/package.json index 04a0dcfbc3a2..961ab914082b 100644 --- a/sdk/batch/arm-batch/package.json +++ b/sdk/batch/arm-batch/package.json @@ -3,15 +3,15 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for BatchManagementClient.", - "version": "8.0.1", + "version": "9.0.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.0", "@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,12 +33,13 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~5.0.0", + "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", + "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", @@ -47,10 +48,8 @@ "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^14.0.0", - "@azure/dev-tool": "^1.0.0", - "@azure/arm-storage": "^17.1.0" + "@azure/dev-tool": "^1.0.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/batch/arm-batch", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -112,12 +111,5 @@ ] }, "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-batch?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/batch/arm-batch" +} \ No newline at end of file diff --git a/sdk/batch/arm-batch/review/arm-batch.api.md b/sdk/batch/arm-batch/review/arm-batch.api.md index be1b272190bb..0b8a862cf30e 100644 --- a/sdk/batch/arm-batch/review/arm-batch.api.md +++ b/sdk/batch/arm-batch/review/arm-batch.api.md @@ -6,9 +6,9 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export type AccountKeyType = "Primary" | "Secondary"; @@ -49,7 +49,6 @@ export type ApplicationGetResponse = Application; // @public export interface ApplicationListNextOptionalParams extends coreClient.OperationOptions { - maxresults?: number; } // @public @@ -109,7 +108,6 @@ export type ApplicationPackageGetResponse = ApplicationPackage; // @public export interface ApplicationPackageListNextOptionalParams extends coreClient.OperationOptions { - maxresults?: number; } // @public @@ -379,9 +377,9 @@ export interface BatchAccountListResult { // @public export interface BatchAccountOperations { - beginCreate(resourceGroupName: string, accountName: string, parameters: BatchAccountCreateParameters, options?: BatchAccountCreateOptionalParams): Promise, BatchAccountCreateResponse>>; + beginCreate(resourceGroupName: string, accountName: string, parameters: BatchAccountCreateParameters, options?: BatchAccountCreateOptionalParams): Promise, BatchAccountCreateResponse>>; beginCreateAndWait(resourceGroupName: string, accountName: string, parameters: BatchAccountCreateParameters, options?: BatchAccountCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, accountName: string, options?: BatchAccountDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, accountName: string, options?: BatchAccountDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, accountName: string, options?: BatchAccountDeleteOptionalParams): Promise; get(resourceGroupName: string, accountName: string, options?: BatchAccountGetOptionalParams): Promise; getDetector(resourceGroupName: string, accountName: string, detectorId: string, options?: BatchAccountGetDetectorOptionalParams): Promise; @@ -573,9 +571,6 @@ export type CertificateGetResponse = CertificateGetHeaders & Certificate; // @public export interface CertificateListByBatchAccountNextOptionalParams extends coreClient.OperationOptions { - filter?: string; - maxresults?: number; - select?: string; } // @public @@ -593,7 +588,7 @@ export type CertificateListByBatchAccountResponse = ListCertificatesResult; // @public export interface CertificateOperations { - beginDelete(resourceGroupName: string, accountName: string, certificateName: string, options?: CertificateDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, accountName: string, certificateName: string, options?: CertificateDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, accountName: string, certificateName: string, options?: CertificateDeleteOptionalParams): Promise; cancelDeletion(resourceGroupName: string, accountName: string, certificateName: string, options?: CertificateCancelDeletionOptionalParams): Promise; create(resourceGroupName: string, accountName: string, certificateName: string, parameters: CertificateCreateOrUpdateParameters, options?: CertificateCreateOptionalParams): Promise; @@ -698,7 +693,7 @@ export interface ComputeNodeIdentityReference { export interface ContainerConfiguration { containerImageNames?: string[]; containerRegistries?: ContainerRegistry[]; - type: "DockerCompatible"; + type: ContainerType; } // @public @@ -709,6 +704,9 @@ export interface ContainerRegistry { userName?: string; } +// @public +export type ContainerType = string; + // @public export type ContainerWorkingDirectory = "TaskWorkingDirectory" | "ContainerImageDefault"; @@ -856,6 +854,12 @@ export interface KeyVaultReference { url: string; } +// @public +export enum KnownContainerType { + CriCompatible = "CriCompatible", + DockerCompatible = "DockerCompatible" +} + // @public export interface LinuxUserConfiguration { gid?: number; @@ -924,8 +928,6 @@ export type LocationGetQuotasResponse = BatchLocationQuota; // @public export interface LocationListSupportedCloudServiceSkusNextOptionalParams extends coreClient.OperationOptions { - filter?: string; - maxresults?: number; } // @public @@ -942,8 +944,6 @@ export type LocationListSupportedCloudServiceSkusResponse = SupportedSkusResult; // @public export interface LocationListSupportedVirtualMachineSkusNextOptionalParams extends coreClient.OperationOptions { - filter?: string; - maxresults?: number; } // @public @@ -981,6 +981,7 @@ export type NameAvailabilityReason = "Invalid" | "AlreadyExists"; // @public export interface NetworkConfiguration { dynamicVnetAssignmentScope?: DynamicVNetAssignmentScope; + enableAcceleratedNetworking?: boolean; endpointConfiguration?: PoolEndpointConfiguration; publicIPAddressConfiguration?: PublicIPAddressConfiguration; subnetId?: string; @@ -1178,9 +1179,6 @@ export type PoolIdentityType = "UserAssigned" | "None"; // @public export interface PoolListByBatchAccountNextOptionalParams extends coreClient.OperationOptions { - filter?: string; - maxresults?: number; - select?: string; } // @public @@ -1198,7 +1196,7 @@ export type PoolListByBatchAccountResponse = ListPoolsResult; // @public export interface PoolOperations { - beginDelete(resourceGroupName: string, accountName: string, poolName: string, options?: PoolDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, accountName: string, poolName: string, options?: PoolDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, accountName: string, poolName: string, options?: PoolDeleteOptionalParams): Promise; create(resourceGroupName: string, accountName: string, poolName: string, parameters: Pool, options?: PoolCreateOptionalParams): Promise; disableAutoScale(resourceGroupName: string, accountName: string, poolName: string, options?: PoolDisableAutoScaleOptionalParams): Promise; @@ -1273,7 +1271,6 @@ export type PrivateEndpointConnectionGetResponse = PrivateEndpointConnection; // @public export interface PrivateEndpointConnectionListByBatchAccountNextOptionalParams extends coreClient.OperationOptions { - maxresults?: number; } // @public @@ -1289,9 +1286,9 @@ export type PrivateEndpointConnectionListByBatchAccountResponse = ListPrivateEnd // @public export interface PrivateEndpointConnectionOperations { - beginDelete(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionDeleteOptionalParams): Promise, PrivateEndpointConnectionDeleteResponse>>; + beginDelete(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionDeleteOptionalParams): Promise, PrivateEndpointConnectionDeleteResponse>>; beginDeleteAndWait(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionUpdateOptionalParams): Promise, PrivateEndpointConnectionUpdateResponse>>; + beginUpdate(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionUpdateOptionalParams): Promise, PrivateEndpointConnectionUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionUpdateOptionalParams): Promise; get(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionGetOptionalParams): Promise; listByBatchAccount(resourceGroupName: string, accountName: string, options?: PrivateEndpointConnectionListByBatchAccountOptionalParams): PagedAsyncIterableIterator; @@ -1332,7 +1329,6 @@ export type PrivateLinkResourceGetResponse = PrivateLinkResource; // @public export interface PrivateLinkResourceListByBatchAccountNextOptionalParams extends coreClient.OperationOptions { - maxresults?: number; } // @public @@ -1520,6 +1516,7 @@ export interface VirtualMachineFamilyCoreQuota { // @public export interface VMExtension { autoUpgradeMinorVersion?: boolean; + enableAutomaticUpgrade?: boolean; name: string; protectedSettings?: Record; provisionAfterExtensions?: string[]; diff --git a/sdk/batch/arm-batch/src/batchManagementClient.ts b/sdk/batch/arm-batch/src/batchManagementClient.ts index 18998ece4889..f8ac9c0268ef 100644 --- a/sdk/batch/arm-batch/src/batchManagementClient.ts +++ b/sdk/batch/arm-batch/src/batchManagementClient.ts @@ -71,7 +71,7 @@ export class BatchManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-batch/8.0.1`; + const packageDetails = `azsdk-js-arm-batch/9.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -124,7 +124,7 @@ export class BatchManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-10-01"; + this.apiVersion = options.apiVersion || "2023-05-01"; this.batchAccountOperations = new BatchAccountOperationsImpl(this); this.applicationPackageOperations = new ApplicationPackageOperationsImpl( this diff --git a/sdk/batch/arm-batch/src/lroImpl.ts b/sdk/batch/arm-batch/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/batch/arm-batch/src/lroImpl.ts +++ b/sdk/batch/arm-batch/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/batch/arm-batch/src/models/index.ts b/sdk/batch/arm-batch/src/models/index.ts index 885e04242bd8..300951c43e4f 100644 --- a/sdk/batch/arm-batch/src/models/index.ts +++ b/sdk/batch/arm-batch/src/models/index.ts @@ -91,7 +91,7 @@ export interface EncryptionProperties { /** KeyVault configuration when using an encryption KeySource of Microsoft.KeyVault. */ export interface KeyVaultProperties { /** - * Full path to the versioned secret. Example https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053. To be usable the following prerequisites must be met: + * Full path to the secret with or without version. Example https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053. or https://mykeyvault.vault.azure.net/keys/testkey. To be usable the following prerequisites must be met: * * The Batch Account has a System Assigned identity * The account identity has been granted Key/Get, Key/Unwrap and Key/Wrap permissions @@ -582,7 +582,7 @@ export interface DataDisk { /** The configuration for container-enabled pools. */ export interface ContainerConfiguration { /** The container technology to be used. */ - type: "DockerCompatible"; + type: ContainerType; /** This is the full image reference, as would be specified to "docker pull". An image will be sourced from the default Docker registry unless the image is fully qualified with an alternative registry. */ containerImageNames?: string[]; /** If any images must be downloaded from a private registry which requires credentials, then those credentials must be provided here. */ @@ -625,6 +625,8 @@ export interface VMExtension { typeHandlerVersion?: string; /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ autoUpgradeMinorVersion?: boolean; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. */ + enableAutomaticUpgrade?: boolean; /** JSON formatted public settings for the extension. */ settings?: Record; /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ @@ -703,6 +705,8 @@ export interface NetworkConfiguration { endpointConfiguration?: PoolEndpointConfiguration; /** This property is only supported on Pools with the virtualMachineConfiguration property. */ publicIPAddressConfiguration?: PublicIPAddressConfiguration; + /** Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, which may lead to improved networking performance. For more details, see: https://learn.microsoft.com/azure/virtual-network/accelerated-networking-overview. */ + enableAcceleratedNetworking?: boolean; } /** The endpoint configuration for a pool. */ @@ -1504,6 +1508,23 @@ export interface PoolStopResizeHeaders { eTag?: string; } +/** Known values of {@link ContainerType} that the service accepts. */ +export enum KnownContainerType { + /** A Docker compatible container technology will be used to launch the containers. */ + DockerCompatible = "DockerCompatible", + /** A CRI based technology will be used to launch the containers. */ + CriCompatible = "CriCompatible" +} + +/** + * Defines values for ContainerType. \ + * {@link KnownContainerType} can be used interchangeably with ContainerType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DockerCompatible**: A Docker compatible container technology will be used to launch the containers. \ + * **CriCompatible**: A CRI based technology will be used to launch the containers. + */ +export type ContainerType = string; /** Defines values for AutoStorageAuthenticationMode. */ export type AutoStorageAuthenticationMode = | "StorageKeys" @@ -1763,10 +1784,7 @@ export type ApplicationPackageListResponse = ListApplicationPackagesResult; /** Optional parameters. */ export interface ApplicationPackageListNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of items to return in the response. */ - maxresults?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type ApplicationPackageListNextResponse = ListApplicationPackagesResult; @@ -1811,10 +1829,7 @@ export type ApplicationListResponse = ListApplicationsResult; /** Optional parameters. */ export interface ApplicationListNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of items to return in the response. */ - maxresults?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type ApplicationListNextResponse = ListApplicationsResult; @@ -1859,24 +1874,14 @@ export type LocationCheckNameAvailabilityResponse = CheckNameAvailabilityResult; /** Optional parameters. */ export interface LocationListSupportedVirtualMachineSkusNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of items to return in the response. */ - maxresults?: number; - /** OData filter expression. Valid properties for filtering are "familyName". */ - filter?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listSupportedVirtualMachineSkusNext operation. */ export type LocationListSupportedVirtualMachineSkusNextResponse = SupportedSkusResult; /** Optional parameters. */ export interface LocationListSupportedCloudServiceSkusNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of items to return in the response. */ - maxresults?: number; - /** OData filter expression. Valid properties for filtering are "familyName". */ - filter?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listSupportedCloudServiceSkusNext operation. */ export type LocationListSupportedCloudServiceSkusNextResponse = SupportedSkusResult; @@ -1957,14 +1962,7 @@ export type CertificateCancelDeletionResponse = CertificateCancelDeletionHeaders /** Optional parameters. */ export interface CertificateListByBatchAccountNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of items to return in the response. */ - maxresults?: number; - /** OData filter expression. Valid properties for filtering are "properties/provisioningState", "properties/provisioningStateTransitionTime", "name". */ - filter?: string; - /** Comma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties under properties/ are valid for selection. */ - select?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByBatchAccountNext operation. */ export type CertificateListByBatchAccountNextResponse = ListCertificatesResult; @@ -1988,10 +1986,7 @@ export type PrivateLinkResourceGetResponse = PrivateLinkResource; /** Optional parameters. */ export interface PrivateLinkResourceListByBatchAccountNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of items to return in the response. */ - maxresults?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByBatchAccountNext operation. */ export type PrivateLinkResourceListByBatchAccountNextResponse = ListPrivateLinkResourcesResult; @@ -2041,10 +2036,7 @@ export type PrivateEndpointConnectionDeleteResponse = PrivateEndpointConnectionD /** Optional parameters. */ export interface PrivateEndpointConnectionListByBatchAccountNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of items to return in the response. */ - maxresults?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByBatchAccountNext operation. */ export type PrivateEndpointConnectionListByBatchAccountNextResponse = ListPrivateEndpointConnectionsResult; @@ -2127,28 +2119,7 @@ export type PoolStopResizeResponse = PoolStopResizeHeaders & Pool; /** Optional parameters. */ export interface PoolListByBatchAccountNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of items to return in the response. */ - maxresults?: number; - /** - * OData filter expression. Valid properties for filtering are: - * - * name - * properties/allocationState - * properties/allocationStateTransitionTime - * properties/creationTime - * properties/provisioningState - * properties/provisioningStateTransitionTime - * properties/lastModified - * properties/vmSize - * properties/interNodeCommunication - * properties/scaleSettings/autoScale - * properties/scaleSettings/fixedScale - */ - filter?: string; - /** Comma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties under properties/ are valid for selection. */ - select?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByBatchAccountNext operation. */ export type PoolListByBatchAccountNextResponse = ListPoolsResult; diff --git a/sdk/batch/arm-batch/src/models/mappers.ts b/sdk/batch/arm-batch/src/models/mappers.ts index fee562ba7f20..c744e4c83e18 100644 --- a/sdk/batch/arm-batch/src/models/mappers.ts +++ b/sdk/batch/arm-batch/src/models/mappers.ts @@ -1449,9 +1449,8 @@ export const ContainerConfiguration: coreClient.CompositeMapper = { className: "ContainerConfiguration", modelProperties: { type: { - defaultValue: "DockerCompatible", - isConstant: true, serializedName: "type", + required: true, type: { name: "String" } @@ -1592,6 +1591,12 @@ export const VMExtension: coreClient.CompositeMapper = { name: "Boolean" } }, + enableAutomaticUpgrade: { + serializedName: "enableAutomaticUpgrade", + type: { + name: "Boolean" + } + }, settings: { serializedName: "settings", type: { @@ -1833,6 +1838,12 @@ export const NetworkConfiguration: coreClient.CompositeMapper = { name: "Composite", className: "PublicIPAddressConfiguration" } + }, + enableAcceleratedNetworking: { + serializedName: "enableAcceleratedNetworking", + type: { + name: "Boolean" + } } } } diff --git a/sdk/batch/arm-batch/src/models/parameters.ts b/sdk/batch/arm-batch/src/models/parameters.ts index 6d4fb951e538..3be66a149d27 100644 --- a/sdk/batch/arm-batch/src/models/parameters.ts +++ b/sdk/batch/arm-batch/src/models/parameters.ts @@ -95,7 +95,7 @@ export const accountName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-10-01", + defaultValue: "2023-05-01", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/batch/arm-batch/src/operations/applicationOperations.ts b/sdk/batch/arm-batch/src/operations/applicationOperations.ts index d9a3dd1bbd73..f48191b33b65 100644 --- a/sdk/batch/arm-batch/src/operations/applicationOperations.ts +++ b/sdk/batch/arm-batch/src/operations/applicationOperations.ts @@ -362,7 +362,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.maxresults], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/batch/arm-batch/src/operations/applicationPackageOperations.ts b/sdk/batch/arm-batch/src/operations/applicationPackageOperations.ts index 0930de862544..7ff1fbc2349c 100644 --- a/sdk/batch/arm-batch/src/operations/applicationPackageOperations.ts +++ b/sdk/batch/arm-batch/src/operations/applicationPackageOperations.ts @@ -410,7 +410,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.maxresults], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts b/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts index 82577c79903d..99ba2a797294 100644 --- a/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts +++ b/sdk/batch/arm-batch/src/operations/batchAccountOperations.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 { BatchManagementClient } from "../batchManagementClient"; -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 { BatchAccount, BatchAccountListNextOptionalParams, @@ -380,8 +384,8 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations { parameters: BatchAccountCreateParameters, options?: BatchAccountCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, BatchAccountCreateResponse > > { @@ -391,7 +395,7 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -424,15 +428,18 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, accountName, parameters, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, parameters, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + BatchAccountCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -493,14 +500,14 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations { resourceGroupName: string, accountName: string, options?: BatchAccountDeleteOptionalParams - ): 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 ) => { @@ -533,15 +540,15 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, accountName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -1084,7 +1091,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1104,7 +1110,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1125,7 +1130,6 @@ const listDetectorsNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -1147,7 +1151,6 @@ const listOutboundNetworkDependenciesEndpointsNextOperationSpec: coreClient.Oper bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/batch/arm-batch/src/operations/certificateOperations.ts b/sdk/batch/arm-batch/src/operations/certificateOperations.ts index 94018e7cd0a7..faf4b1e9145a 100644 --- a/sdk/batch/arm-batch/src/operations/certificateOperations.ts +++ b/sdk/batch/arm-batch/src/operations/certificateOperations.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 { BatchManagementClient } from "../batchManagementClient"; -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 { Certificate, CertificateListByBatchAccountNextOptionalParams, @@ -217,14 +221,14 @@ export class CertificateOperationsImpl implements CertificateOperations { accountName: string, certificateName: string, options?: CertificateDeleteOptionalParams - ): 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 ) => { @@ -257,15 +261,15 @@ export class CertificateOperationsImpl implements CertificateOperations { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, accountName, certificateName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, certificateName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -543,12 +547,6 @@ const listByBatchAccountNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [ - Parameters.apiVersion, - Parameters.maxresults, - Parameters.filter, - Parameters.select - ], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/batch/arm-batch/src/operations/location.ts b/sdk/batch/arm-batch/src/operations/location.ts index 168b47494ab4..2efa1d7f3919 100644 --- a/sdk/batch/arm-batch/src/operations/location.ts +++ b/sdk/batch/arm-batch/src/operations/location.ts @@ -396,11 +396,6 @@ const listSupportedVirtualMachineSkusNextOperationSpec: coreClient.OperationSpec bodyMapper: Mappers.CloudError } }, - queryParameters: [ - Parameters.apiVersion, - Parameters.maxresults, - Parameters.filter - ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -421,11 +416,6 @@ const listSupportedCloudServiceSkusNextOperationSpec: coreClient.OperationSpec = bodyMapper: Mappers.CloudError } }, - queryParameters: [ - Parameters.apiVersion, - Parameters.maxresults, - Parameters.filter - ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/batch/arm-batch/src/operations/operations.ts b/sdk/batch/arm-batch/src/operations/operations.ts index 694c20337296..517211c24fa2 100644 --- a/sdk/batch/arm-batch/src/operations/operations.ts +++ b/sdk/batch/arm-batch/src/operations/operations.ts @@ -143,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/batch/arm-batch/src/operations/poolOperations.ts b/sdk/batch/arm-batch/src/operations/poolOperations.ts index 810bfda2eb33..f4338b80c41c 100644 --- a/sdk/batch/arm-batch/src/operations/poolOperations.ts +++ b/sdk/batch/arm-batch/src/operations/poolOperations.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 { BatchManagementClient } from "../batchManagementClient"; -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 { Pool, PoolListByBatchAccountNextOptionalParams, @@ -203,14 +207,14 @@ export class PoolOperationsImpl implements PoolOperations { accountName: string, poolName: string, options?: PoolDeleteOptionalParams - ): 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 ) => { @@ -243,15 +247,15 @@ export class PoolOperationsImpl implements PoolOperations { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, accountName, poolName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, poolName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -558,12 +562,6 @@ const listByBatchAccountNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [ - Parameters.apiVersion, - Parameters.maxresults, - Parameters.filter, - Parameters.select - ], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/batch/arm-batch/src/operations/privateEndpointConnectionOperations.ts b/sdk/batch/arm-batch/src/operations/privateEndpointConnectionOperations.ts index cb891f22460a..9b9a50fda5b7 100644 --- a/sdk/batch/arm-batch/src/operations/privateEndpointConnectionOperations.ts +++ b/sdk/batch/arm-batch/src/operations/privateEndpointConnectionOperations.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 { BatchManagementClient } from "../batchManagementClient"; -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, PrivateEndpointConnectionListByBatchAccountNextOptionalParams, @@ -186,8 +190,8 @@ export class PrivateEndpointConnectionOperationsImpl parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionUpdateResponse > > { @@ -197,7 +201,7 @@ export class PrivateEndpointConnectionOperationsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -230,21 +234,24 @@ export class PrivateEndpointConnectionOperationsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, privateEndpointConnectionName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + PrivateEndpointConnectionUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -291,8 +298,8 @@ export class PrivateEndpointConnectionOperationsImpl privateEndpointConnectionName: string, options?: PrivateEndpointConnectionDeleteOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionDeleteResponse > > { @@ -302,7 +309,7 @@ export class PrivateEndpointConnectionOperationsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -335,20 +342,23 @@ export class PrivateEndpointConnectionOperationsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, privateEndpointConnectionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + PrivateEndpointConnectionDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -525,7 +535,6 @@ const listByBatchAccountNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.maxresults], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/batch/arm-batch/src/operations/privateLinkResourceOperations.ts b/sdk/batch/arm-batch/src/operations/privateLinkResourceOperations.ts index 6f24c4dba4b6..b5bde5b736b5 100644 --- a/sdk/batch/arm-batch/src/operations/privateLinkResourceOperations.ts +++ b/sdk/batch/arm-batch/src/operations/privateLinkResourceOperations.ts @@ -236,7 +236,6 @@ const listByBatchAccountNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.maxresults], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/batch/arm-batch/src/operationsInterfaces/batchAccountOperations.ts b/sdk/batch/arm-batch/src/operationsInterfaces/batchAccountOperations.ts index 24c1be7d5026..cf1258fa85b1 100644 --- a/sdk/batch/arm-batch/src/operationsInterfaces/batchAccountOperations.ts +++ b/sdk/batch/arm-batch/src/operationsInterfaces/batchAccountOperations.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 { BatchAccount, BatchAccountListOptionalParams, @@ -98,8 +98,8 @@ export interface BatchAccountOperations { parameters: BatchAccountCreateParameters, options?: BatchAccountCreateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, BatchAccountCreateResponse > >; @@ -143,7 +143,7 @@ export interface BatchAccountOperations { resourceGroupName: string, accountName: string, options?: BatchAccountDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified Batch account. * @param resourceGroupName The name of the resource group that contains the Batch account. diff --git a/sdk/batch/arm-batch/src/operationsInterfaces/certificateOperations.ts b/sdk/batch/arm-batch/src/operationsInterfaces/certificateOperations.ts index 474fff5ac174..0d1dcf9ae7d9 100644 --- a/sdk/batch/arm-batch/src/operationsInterfaces/certificateOperations.ts +++ b/sdk/batch/arm-batch/src/operationsInterfaces/certificateOperations.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 { Certificate, CertificateListByBatchAccountOptionalParams, @@ -93,7 +93,7 @@ export interface CertificateOperations { accountName: string, certificateName: string, options?: CertificateDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Warning: This operation is deprecated and will be removed after February, 2024. Please use the * [Azure KeyVault diff --git a/sdk/batch/arm-batch/src/operationsInterfaces/poolOperations.ts b/sdk/batch/arm-batch/src/operationsInterfaces/poolOperations.ts index ed2bfa759623..0949ed1456a7 100644 --- a/sdk/batch/arm-batch/src/operationsInterfaces/poolOperations.ts +++ b/sdk/batch/arm-batch/src/operationsInterfaces/poolOperations.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 { Pool, PoolListByBatchAccountOptionalParams, @@ -81,7 +81,7 @@ export interface PoolOperations { accountName: string, poolName: string, options?: PoolDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified pool. * @param resourceGroupName The name of the resource group that contains the Batch account. diff --git a/sdk/batch/arm-batch/src/operationsInterfaces/privateEndpointConnectionOperations.ts b/sdk/batch/arm-batch/src/operationsInterfaces/privateEndpointConnectionOperations.ts index 7157f6bea448..04bd4b2bf8db 100644 --- a/sdk/batch/arm-batch/src/operationsInterfaces/privateEndpointConnectionOperations.ts +++ b/sdk/batch/arm-batch/src/operationsInterfaces/privateEndpointConnectionOperations.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, PrivateEndpointConnectionListByBatchAccountOptionalParams, @@ -64,8 +64,8 @@ export interface PrivateEndpointConnectionOperations { parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionUpdateResponse > >; @@ -100,8 +100,8 @@ export interface PrivateEndpointConnectionOperations { privateEndpointConnectionName: string, options?: PrivateEndpointConnectionDeleteOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionDeleteResponse > >; diff --git a/sdk/batch/arm-batch/src/pagingHelper.ts b/sdk/batch/arm-batch/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/batch/arm-batch/src/pagingHelper.ts +++ b/sdk/batch/arm-batch/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { diff --git a/sdk/batch/arm-batch/test/sampleTest.ts b/sdk/batch/arm-batch/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/batch/arm-batch/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/batch/arm-batch/tsconfig.json b/sdk/batch/arm-batch/tsconfig.json index 0e82052bd8fa..3e6ae96443f3 100644 --- a/sdk/batch/arm-batch/tsconfig.json +++ b/sdk/batch/arm-batch/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-batch": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"