diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 91ad81e837e8..3551846453c5 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2131,7 +2131,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/chai-as-promised/7.1.5: @@ -2153,7 +2153,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/cookie/0.4.1: @@ -2163,7 +2163,7 @@ packages: /@types/cors/2.8.13: resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/debug/4.1.7: @@ -2190,7 +2190,7 @@ packages: /@types/express-serve-static-core/4.17.32: resolution: {integrity: sha512-aI5h/VOkxOF2Z1saPy0Zsxs5avets/iaiAJYznQFm5By/pamU31xWKL//epiF4OfUA2qTOc9PV6tCUjhO8wlZA==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 dev: false @@ -2207,20 +2207,20 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/glob/7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/inquirer/8.2.5: @@ -2232,7 +2232,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/json-schema/7.0.11: @@ -2246,13 +2246,13 @@ packages: /@types/jsonwebtoken/9.0.0: resolution: {integrity: sha512-mM4TkDpA9oixqg1Fv2vVpOFyIVLJjm5x4k0V+K/rEsizfjD7Tk7LKk3GTtbB7KCfP0FEHQtsZqFxYA0+sijNVg==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/jws/3.2.4: resolution: {integrity: sha512-aqtH4dPw1wUjFZaeMD1ak/pf8iXlu/odFe+trJrvw0g1sTh93i+SCykg0Ek8C6B7rVK3oBORbfZAsKO7P10etg==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/mdast/3.0.10: @@ -2288,7 +2288,7 @@ packages: /@types/node-fetch/2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 form-data: 3.0.1 dev: false @@ -2343,7 +2343,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/semaphore/1.1.1: @@ -2358,7 +2358,7 @@ packages: resolution: {integrity: sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==} dependencies: '@types/mime': 3.0.1 - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/sinon/10.0.13: @@ -2380,13 +2380,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/tough-cookie/4.0.2: @@ -2400,13 +2400,13 @@ packages: /@types/tunnel/0.0.1: resolution: {integrity: sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/underscore/1.11.4: @@ -2424,19 +2424,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/ws/8.5.4: resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false /@types/yargs-parser/21.0.0: @@ -2453,7 +2453,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.36 + '@types/node': 18.11.18 dev: false optional: true @@ -2843,8 +2843,8 @@ packages: hasBin: true dev: false - /autorest/3.6.2: - resolution: {integrity: sha512-JRMmAsSG4wplYUkjVOWELidF+P/OG9BjF542aQcbt4Qj85bJ+7EzRCTV09vbf8f4ScOB+I68+9IcskjNTU9UkQ==} + /autorest/3.6.3: + resolution: {integrity: sha512-j/Axwk9bniifTNtBLYVxfQZGQIGPKljFaCQCBWOiybVar2j3tkHP1btiC4a/t9pAJXY6IaFgWctoPM3G/Puhyg==} engines: {node: '>=12.0.0'} hasBin: true requiresBuild: true @@ -3491,7 +3491,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: @@ -3673,7 +3673,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.0.0-dev.20230103 + typescript: 5.0.0-dev.20230104 dev: false /downlevel-dts/0.7.0: @@ -3691,7 +3691,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 4.6.4 + typescript: 4.9.4 dev: false /ecdsa-sig-formatter/1.0.11: @@ -3742,7 +3742,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.13 - '@types/node': 14.18.36 + '@types/node': 18.11.18 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -4725,7 +4725,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 @@ -8270,8 +8270,8 @@ packages: hasBin: true dev: false - /typescript/5.0.0-dev.20230103: - resolution: {integrity: sha512-vHf8Y8+op6MsFIDgvNmZhAIAUGVmzFzYCUBysMS6hlxlhSWIh1h5AXAW7WKs4GYr325jwTF/L72NKUYZHSD6Mw==} + /typescript/5.0.0-dev.20230104: + resolution: {integrity: sha512-1W+qcvZu8Spq1fi/ajNcSobXt2ZBPDqyt6qwoNGaMgX1X82ZYmlh50oJfJVf44DNVwXNAsRfyKJ3UkXVf4OYsw==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -8874,7 +8874,7 @@ packages: '@types/chai': 4.3.4 '@types/mocha': 7.0.2 '@types/node': 14.18.36 - autorest: 3.6.2 + autorest: 3.6.3 chai: 4.3.7 cross-env: 7.0.3 csv-parse: 5.3.3 @@ -9163,7 +9163,7 @@ packages: '@microsoft/api-extractor': 7.33.7 '@types/chai': 4.3.4 '@types/node': 14.18.36 - autorest: 3.6.2 + autorest: 3.6.3 chai: 4.3.7 cross-env: 7.0.3 dotenv: 8.6.0 @@ -9696,7 +9696,7 @@ packages: '@microsoft/api-extractor': 7.33.7 '@types/chai': 4.3.4 '@types/node': 14.18.36 - autorest: 3.6.2 + autorest: 3.6.3 chai: 4.3.7 cross-env: 7.0.3 dotenv: 8.6.0 @@ -10387,7 +10387,7 @@ packages: '@microsoft/api-extractor': 7.33.7 '@types/chai': 4.3.4 '@types/node': 14.18.36 - autorest: 3.6.2 + autorest: 3.6.3 chai: 4.3.7 cross-env: 7.0.3 dotenv: 8.6.0 @@ -10619,7 +10619,7 @@ packages: '@microsoft/api-extractor': 7.33.7 '@types/chai': 4.3.4 '@types/node': 14.18.36 - autorest: 3.6.2 + autorest: 3.6.3 chai: 4.3.7 cross-env: 7.0.3 dotenv: 8.6.0 @@ -12812,7 +12812,7 @@ packages: '@microsoft/api-extractor': 7.33.7 '@types/chai': 4.3.4 '@types/node': 14.18.36 - autorest: 3.6.2 + autorest: 3.6.3 chai: 4.3.7 cross-env: 7.0.3 dotenv: 8.6.0 @@ -13966,7 +13966,7 @@ packages: '@microsoft/api-extractor': 7.33.7 '@types/chai': 4.3.4 '@types/node': 14.18.36 - autorest: 3.6.2 + autorest: 3.6.3 chai: 4.3.7 cross-env: 7.0.3 dotenv: 8.6.0 @@ -14219,7 +14219,7 @@ packages: dev: false file:projects/arm-storagecache.tgz: - resolution: {integrity: sha512-NROOAhxE/TFI5Vioqf9kdrOtXSsEEiaTDo7rj+Zymd3zvjicpt+icAcPIgMOqh1uHPC5jqSSwgsyZ0I5xl9VUA==, tarball: file:projects/arm-storagecache.tgz} + resolution: {integrity: sha512-IJadOonwIpW3X62NyITm07mtz4w9An/m6tZibNSLIY382JFjNB383mvr4BfKwCUWGEMj7TPWcVQDEncs+iQ6OQ==, tarball: file:projects/arm-storagecache.tgz} name: '@rush-temp/arm-storagecache' version: 0.0.0 dependencies: @@ -14230,18 +14230,18 @@ packages: '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 '@types/chai': 4.3.4 + '@types/node': 14.18.36 chai: 4.3.7 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 - rollup-plugin-sourcemaps: 0.6.3_rollup@2.79.1 + rollup-plugin-sourcemaps: 0.6.3_7e8d81808a761355f6c3da2f25cfe887 tslib: 2.4.1 - typescript: 4.6.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - - '@types/node' - supports-color dev: false @@ -15294,7 +15294,7 @@ packages: '@types/chai': 4.3.4 '@types/mocha': 7.0.2 '@types/node': 14.18.36 - autorest: 3.6.2 + autorest: 3.6.3 chai: 4.3.7 cross-env: 7.0.3 dotenv: 8.6.0 @@ -15988,7 +15988,7 @@ packages: '@types/node': 14.18.36 '@types/prettier': 2.7.2 '@types/semver': 7.3.13 - autorest: 3.6.2 + autorest: 3.6.3 builtin-modules: 3.3.0 chai: 4.3.7 chai-as-promised: 7.1.1_chai@4.3.7 @@ -16034,7 +16034,7 @@ packages: '@microsoft/api-extractor': 7.33.7 '@types/chai': 4.3.4 '@types/node': 14.18.36 - autorest: 3.6.2 + autorest: 3.6.3 chai: 4.3.7 cross-env: 7.0.3 dotenv: 8.6.0 @@ -16850,7 +16850,7 @@ packages: '@types/chai': 4.3.4 '@types/node': 12.20.55 '@types/uuid': 8.3.4 - autorest: 3.6.2 + autorest: 3.6.3 chai: 4.3.7 cross-env: 7.0.3 dotenv: 8.6.0 @@ -16956,7 +16956,7 @@ packages: '@types/chai': 4.3.4 '@types/mocha': 7.0.2 '@types/node': 14.18.36 - autorest: 3.6.2 + autorest: 3.6.3 chai: 4.3.7 cross-env: 7.0.3 dotenv: 8.6.0 @@ -17000,7 +17000,7 @@ packages: '@types/chai': 4.3.4 '@types/mocha': 7.0.2 '@types/node': 14.18.36 - autorest: 3.6.2 + autorest: 3.6.3 chai: 4.3.7 cross-env: 7.0.3 dotenv: 8.6.0 @@ -17044,7 +17044,7 @@ packages: '@types/chai': 4.3.4 '@types/mocha': 7.0.2 '@types/node': 12.20.55 - autorest: 3.6.2 + autorest: 3.6.3 chai: 4.3.7 cross-env: 7.0.3 dotenv: 8.6.0 @@ -17135,7 +17135,7 @@ packages: '@types/chai': 4.3.4 '@types/mocha': 7.0.2 '@types/node': 14.18.36 - autorest: 3.6.2 + autorest: 3.6.3 chai: 4.3.7 cross-env: 7.0.3 dotenv: 8.6.0 diff --git a/sdk/storagecache/arm-storagecache/CHANGELOG.md b/sdk/storagecache/arm-storagecache/CHANGELOG.md index 1f56cf228737..28f49a8d368e 100644 --- a/sdk/storagecache/arm-storagecache/CHANGELOG.md +++ b/sdk/storagecache/arm-storagecache/CHANGELOG.md @@ -1,15 +1,41 @@ # Release History + +## 6.0.0 (2023-01-04) + +**Features** -## 5.2.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation Caches.beginUpdate + - Added operation Caches.beginUpdateAndWait + - Added operation StorageTargets.beginRestoreDefaults + - Added operation StorageTargets.beginRestoreDefaultsAndWait + - Added Interface CachesDebugInfoHeaders + - Added Interface CachesDeleteHeaders + - Added Interface CachesFlushHeaders + - Added Interface CachesStartHeaders + - Added Interface CachesStopHeaders + - Added Interface CachesUpdateHeaders + - Added Interface CachesUpgradeFirmwareHeaders + - Added Interface StorageTargetFlushHeaders + - Added Interface StorageTargetInvalidateHeaders + - Added Interface StorageTargetResumeHeaders + - Added Interface StorageTargetsDeleteHeaders + - Added Interface StorageTargetsDnsRefreshHeaders + - Added Interface StorageTargetsRestoreDefaultsHeaders + - Added Interface StorageTargetsRestoreDefaultsOptionalParams + - Added Interface StorageTargetSuspendHeaders + - Interface BlobNfsTarget has a new optional parameter verificationTimer + - Interface BlobNfsTarget has a new optional parameter writeBackTimer + - Interface CachesUpdateOptionalParams has a new optional parameter resumeFrom + - Interface CachesUpdateOptionalParams has a new optional parameter updateIntervalInMs + - Interface Nfs3Target has a new optional parameter verificationTimer + - Interface Nfs3Target has a new optional parameter writeBackTimer + - Added function getContinuationToken -### Other Changes +**Breaking Changes** + - Removed operation Caches.update + + ## 5.2.0 (2022-07-15) **Features** diff --git a/sdk/storagecache/arm-storagecache/LICENSE b/sdk/storagecache/arm-storagecache/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/storagecache/arm-storagecache/LICENSE +++ b/sdk/storagecache/arm-storagecache/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/storagecache/arm-storagecache/_meta.json b/sdk/storagecache/arm-storagecache/_meta.json index a0496c3cfc19..5f87aa5cd5f5 100644 --- a/sdk/storagecache/arm-storagecache/_meta.json +++ b/sdk/storagecache/arm-storagecache/_meta.json @@ -1,8 +1,8 @@ { - "commit": "c03c258c7a01a7d57b3110cc20e2e76752b6f2d6", + "commit": "8709291a1c0a0471a39c9ac86050126223e405ca", "readme": "specification/storagecache/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.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\\storagecache\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1.20220713.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/storagecache/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.5", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.0", - "use": "@autorest/typescript@6.0.0-rc.1.20220713.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", + "use": "@autorest/typescript@6.0.0-rc.5" } \ No newline at end of file diff --git a/sdk/storagecache/arm-storagecache/package.json b/sdk/storagecache/arm-storagecache/package.json index acf148a49015..2cdb6cb6fefa 100644 --- a/sdk/storagecache/arm-storagecache/package.json +++ b/sdk/storagecache/arm-storagecache/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for StorageCacheManagementClient.", - "version": "5.2.1", + "version": "6.0.0", "engines": { "node": ">=14.0.0" }, @@ -11,7 +11,7 @@ "@azure/core-lro": "^2.2.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.5.0", + "@azure/core-client": "^1.6.1", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -36,7 +36,7 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.6.0", + "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", @@ -46,6 +46,7 @@ "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", + "@types/node": "^14.0.0", "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storagecache/arm-storagecache", @@ -109,13 +110,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-storagecache?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/storagecache/arm-storagecache/review/arm-storagecache.api.md b/sdk/storagecache/arm-storagecache/review/arm-storagecache.api.md index e31e33329157..fed551620701 100644 --- a/sdk/storagecache/arm-storagecache/review/arm-storagecache.api.md +++ b/sdk/storagecache/arm-storagecache/review/arm-storagecache.api.md @@ -87,6 +87,8 @@ export type AscUsagesListResponse = ResourceUsagesListResult; export interface BlobNfsTarget { target?: string; usageModel?: string; + verificationTimer?: number; + writeBackTimer?: number; } // @public @@ -200,12 +202,13 @@ export interface Caches { beginStopAndWait(resourceGroupName: string, cacheName: string, options?: CachesStopOptionalParams): Promise; beginStopPrimingJob(resourceGroupName: string, cacheName: string, options?: CachesStopPrimingJobOptionalParams): Promise, CachesStopPrimingJobResponse>>; beginStopPrimingJobAndWait(resourceGroupName: string, cacheName: string, options?: CachesStopPrimingJobOptionalParams): Promise; + beginUpdate(resourceGroupName: string, cacheName: string, options?: CachesUpdateOptionalParams): Promise, CachesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, cacheName: string, options?: CachesUpdateOptionalParams): Promise; beginUpgradeFirmware(resourceGroupName: string, cacheName: string, options?: CachesUpgradeFirmwareOptionalParams): Promise, void>>; beginUpgradeFirmwareAndWait(resourceGroupName: string, cacheName: string, options?: CachesUpgradeFirmwareOptionalParams): Promise; get(resourceGroupName: string, cacheName: string, options?: CachesGetOptionalParams): Promise; list(options?: CachesListOptionalParams): PagedAsyncIterableIterator; listByResourceGroup(resourceGroupName: string, options?: CachesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, cacheName: string, options?: CachesUpdateOptionalParams): Promise; } // @public @@ -218,12 +221,24 @@ export interface CachesCreateOrUpdateOptionalParams extends coreClient.Operation // @public export type CachesCreateOrUpdateResponse = Cache_2; +// @public +export interface CachesDebugInfoHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface CachesDebugInfoOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export interface CachesDeleteHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface CachesDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -235,6 +250,12 @@ export interface CacheSecuritySettings { accessPolicies?: NfsAccessPolicy[]; } +// @public +export interface CachesFlushHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface CachesFlushOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -335,6 +356,12 @@ export interface CachesSpaceAllocationOptionalParams extends coreClient.Operatio // @public export type CachesSpaceAllocationResponse = CachesSpaceAllocationHeaders; +// @public +export interface CachesStartHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface CachesStartOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -357,6 +384,12 @@ export interface CachesStartPrimingJobOptionalParams extends coreClient.Operatio // @public export type CachesStartPrimingJobResponse = CachesStartPrimingJobHeaders; +// @public +export interface CachesStopHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface CachesStopOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -379,14 +412,28 @@ export interface CachesStopPrimingJobOptionalParams extends coreClient.Operation // @public export type CachesStopPrimingJobResponse = CachesStopPrimingJobHeaders; +// @public +export interface CachesUpdateHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface CachesUpdateOptionalParams extends coreClient.OperationOptions { cache?: Cache_2; + resumeFrom?: string; + updateIntervalInMs?: number; } // @public export type CachesUpdateResponse = Cache_2; +// @public +export interface CachesUpgradeFirmwareHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface CachesUpgradeFirmwareOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -469,6 +516,9 @@ export interface ErrorResponse { // @public export type FirmwareStatusType = string; +// @public +export function getContinuationToken(page: unknown): string | undefined; + // @public export type HealthStateType = string; @@ -641,6 +691,8 @@ export interface NamespaceJunction { export interface Nfs3Target { target?: string; usageModel?: string; + verificationTimer?: number; + writeBackTimer?: number; } // @public @@ -835,12 +887,24 @@ export interface StorageTarget extends StorageTargetResource { unknown?: UnknownTarget; } +// @public +export interface StorageTargetFlushHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface StorageTargetFlushOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export interface StorageTargetInvalidateHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface StorageTargetInvalidateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -868,6 +932,12 @@ export interface StorageTargetResource { readonly type?: string; } +// @public +export interface StorageTargetResumeHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface StorageTargetResumeOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -882,6 +952,8 @@ export interface StorageTargets { beginDeleteAndWait(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: StorageTargetsDeleteOptionalParams): Promise; beginDnsRefresh(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: StorageTargetsDnsRefreshOptionalParams): Promise, void>>; beginDnsRefreshAndWait(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: StorageTargetsDnsRefreshOptionalParams): Promise; + beginRestoreDefaults(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: StorageTargetsRestoreDefaultsOptionalParams): Promise, void>>; + beginRestoreDefaultsAndWait(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: StorageTargetsRestoreDefaultsOptionalParams): Promise; get(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: StorageTargetsGetOptionalParams): Promise; listByCache(resourceGroupName: string, cacheName: string, options?: StorageTargetsListByCacheOptionalParams): PagedAsyncIterableIterator; } @@ -896,6 +968,12 @@ export interface StorageTargetsCreateOrUpdateOptionalParams extends coreClient.O // @public export type StorageTargetsCreateOrUpdateResponse = StorageTarget; +// @public +export interface StorageTargetsDeleteHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface StorageTargetsDeleteOptionalParams extends coreClient.OperationOptions { force?: string; @@ -903,6 +981,12 @@ export interface StorageTargetsDeleteOptionalParams extends coreClient.Operation updateIntervalInMs?: number; } +// @public +export interface StorageTargetsDnsRefreshHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface StorageTargetsDnsRefreshOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -936,12 +1020,30 @@ export interface StorageTargetSpaceAllocation { name?: string; } +// @public +export interface StorageTargetsRestoreDefaultsHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface StorageTargetsRestoreDefaultsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface StorageTargetsResult { nextLink?: string; value?: StorageTarget[]; } +// @public +export interface StorageTargetSuspendHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface StorageTargetSuspendOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; diff --git a/sdk/storagecache/arm-storagecache/src/index.ts b/sdk/storagecache/arm-storagecache/src/index.ts index 92127b7a821a..c75de029f0fa 100644 --- a/sdk/storagecache/arm-storagecache/src/index.ts +++ b/sdk/storagecache/arm-storagecache/src/index.ts @@ -7,6 +7,7 @@ */ /// +export { getContinuationToken } from "./pagingHelper"; export * from "./models"; export { StorageCacheManagementClient } from "./storageCacheManagementClient"; export * from "./operationsInterfaces"; diff --git a/sdk/storagecache/arm-storagecache/src/models/index.ts b/sdk/storagecache/arm-storagecache/src/models/index.ts index 92ba57f6d9a5..901a122be786 100644 --- a/sdk/storagecache/arm-storagecache/src/models/index.ts +++ b/sdk/storagecache/arm-storagecache/src/models/index.ts @@ -690,6 +690,10 @@ export interface Nfs3Target { target?: string; /** Identifies the StorageCache usage model to be used for this storage target. */ usageModel?: string; + /** Amount of time (in seconds) the cache waits before it checks the back-end storage for file updates. */ + verificationTimer?: number; + /** Amount of time (in seconds) the cache waits after the last file change before it copies the changed file to back-end storage. */ + writeBackTimer?: number; } /** Properties pertaining to the ClfsTarget */ @@ -710,6 +714,10 @@ export interface BlobNfsTarget { target?: string; /** Identifies the StorageCache usage model to be used for this storage target. */ usageModel?: string; + /** Amount of time (in seconds) the cache waits before it checks the back-end storage for file updates. */ + verificationTimer?: number; + /** Amount of time (in seconds) the cache waits after the last file change before it copies the changed file to back-end storage. */ + writeBackTimer?: number; } /** Resource used by a Cache. */ @@ -775,6 +783,54 @@ export interface StorageTarget extends StorageTargetResource { readonly allocationPercentage?: number; } +/** Defines headers for Caches_delete operation. */ +export interface CachesDeleteHeaders { + /** Location URI to poll for result */ + location?: string; + /** URI to poll for the operation status */ + azureAsyncOperation?: string; +} + +/** Defines headers for Caches_update operation. */ +export interface CachesUpdateHeaders { + /** Location URI to poll for result */ + location?: string; + /** URI to poll for the operation status */ + azureAsyncOperation?: string; +} + +/** Defines headers for Caches_debugInfo operation. */ +export interface CachesDebugInfoHeaders { + /** Location URI to poll for result */ + location?: string; + /** URI to poll for the operation status */ + azureAsyncOperation?: string; +} + +/** Defines headers for Caches_flush operation. */ +export interface CachesFlushHeaders { + /** Location URI to poll for result */ + location?: string; + /** URI to poll for the operation status */ + azureAsyncOperation?: string; +} + +/** Defines headers for Caches_start operation. */ +export interface CachesStartHeaders { + /** Location URI to poll for result */ + location?: string; + /** URI to poll for the operation status */ + azureAsyncOperation?: string; +} + +/** Defines headers for Caches_stop operation. */ +export interface CachesStopHeaders { + /** Location URI to poll for result */ + location?: string; + /** URI to poll for the operation status */ + azureAsyncOperation?: string; +} + /** Defines headers for Caches_startPrimingJob operation. */ export interface CachesStartPrimingJobHeaders { /** Location URI to poll for result */ @@ -807,6 +863,14 @@ export interface CachesResumePrimingJobHeaders { azureAsyncOperation?: string; } +/** Defines headers for Caches_upgradeFirmware operation. */ +export interface CachesUpgradeFirmwareHeaders { + /** Location URI to poll for result */ + location?: string; + /** URI to poll for the operation status */ + azureAsyncOperation?: string; +} + /** Defines headers for Caches_spaceAllocation operation. */ export interface CachesSpaceAllocationHeaders { /** Location URI to poll for result */ @@ -815,6 +879,62 @@ export interface CachesSpaceAllocationHeaders { azureAsyncOperation?: string; } +/** Defines headers for StorageTargets_dnsRefresh operation. */ +export interface StorageTargetsDnsRefreshHeaders { + /** Location URI to poll for result */ + location?: string; + /** URI to poll for the operation status */ + azureAsyncOperation?: string; +} + +/** Defines headers for StorageTargets_delete operation. */ +export interface StorageTargetsDeleteHeaders { + /** Location URI to poll for result */ + location?: string; + /** URI to poll for the operation status */ + azureAsyncOperation?: string; +} + +/** Defines headers for StorageTargets_restoreDefaults operation. */ +export interface StorageTargetsRestoreDefaultsHeaders { + /** Location URI to poll for result */ + location?: string; + /** URI to poll for the operation status */ + azureAsyncOperation?: string; +} + +/** Defines headers for StorageTarget_flush operation. */ +export interface StorageTargetFlushHeaders { + /** Location URI to poll for result */ + location?: string; + /** URI to poll for the operation status */ + azureAsyncOperation?: string; +} + +/** Defines headers for StorageTarget_suspend operation. */ +export interface StorageTargetSuspendHeaders { + /** Location URI to poll for result */ + location?: string; + /** URI to poll for the operation status */ + azureAsyncOperation?: string; +} + +/** Defines headers for StorageTarget_resume operation. */ +export interface StorageTargetResumeHeaders { + /** Location URI to poll for result */ + location?: string; + /** URI to poll for the operation status */ + azureAsyncOperation?: string; +} + +/** Defines headers for StorageTarget_invalidate operation. */ +export interface StorageTargetInvalidateHeaders { + /** Location URI to poll for result */ + location?: string; + /** URI to poll for the operation status */ + azureAsyncOperation?: string; +} + /** Known values of {@link MetricAggregationType} that the service accepts. */ export enum KnownMetricAggregationType { /** NotSpecified */ @@ -1281,6 +1401,10 @@ export interface CachesUpdateOptionalParams extends coreClient.OperationOptions { /** Object containing the user-selectable properties of the Cache. If read-only properties are included, they must match the existing values of those properties. */ cache?: Cache; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the update operation. */ @@ -1460,6 +1584,15 @@ export interface StorageTargetsCreateOrUpdateOptionalParams /** Contains response data for the createOrUpdate operation. */ export type StorageTargetsCreateOrUpdateResponse = StorageTarget; +/** Optional parameters. */ +export interface StorageTargetsRestoreDefaultsOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + /** Optional parameters. */ export interface StorageTargetsListByCacheNextOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/storagecache/arm-storagecache/src/models/mappers.ts b/sdk/storagecache/arm-storagecache/src/models/mappers.ts index c57d598878c3..ee2a6f482058 100644 --- a/sdk/storagecache/arm-storagecache/src/models/mappers.ts +++ b/sdk/storagecache/arm-storagecache/src/models/mappers.ts @@ -1812,6 +1812,18 @@ export const Nfs3Target: coreClient.CompositeMapper = { type: { name: "String" } + }, + verificationTimer: { + serializedName: "verificationTimer", + type: { + name: "Number" + } + }, + writeBackTimer: { + serializedName: "writeBackTimer", + type: { + name: "Number" + } } } } @@ -1864,6 +1876,18 @@ export const BlobNfsTarget: coreClient.CompositeMapper = { type: { name: "String" } + }, + verificationTimer: { + serializedName: "verificationTimer", + type: { + name: "Number" + } + }, + writeBackTimer: { + serializedName: "writeBackTimer", + type: { + name: "Number" + } } } } @@ -2015,6 +2039,132 @@ export const StorageTarget: coreClient.CompositeMapper = { } }; +export const CachesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CachesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const CachesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CachesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const CachesDebugInfoHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CachesDebugInfoHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const CachesFlushHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CachesFlushHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const CachesStartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CachesStartHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const CachesStopHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CachesStopHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + export const CachesStartPrimingJobHeaders: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2099,6 +2249,27 @@ export const CachesResumePrimingJobHeaders: coreClient.CompositeMapper = { } }; +export const CachesUpgradeFirmwareHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CachesUpgradeFirmwareHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + export const CachesSpaceAllocationHeaders: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2119,3 +2290,150 @@ export const CachesSpaceAllocationHeaders: coreClient.CompositeMapper = { } } }; + +export const StorageTargetsDnsRefreshHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageTargetsDnsRefreshHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const StorageTargetsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageTargetsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const StorageTargetsRestoreDefaultsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageTargetsRestoreDefaultsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const StorageTargetFlushHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageTargetFlushHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const StorageTargetSuspendHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageTargetSuspendHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const StorageTargetResumeHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageTargetResumeHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const StorageTargetInvalidateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageTargetInvalidateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/storagecache/arm-storagecache/src/models/parameters.ts b/sdk/storagecache/arm-storagecache/src/models/parameters.ts index eab980d88a5a..133e8b083323 100644 --- a/sdk/storagecache/arm-storagecache/src/models/parameters.ts +++ b/sdk/storagecache/arm-storagecache/src/models/parameters.ts @@ -45,7 +45,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-05-01", + defaultValue: "2023-01-01", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/storagecache/arm-storagecache/src/operations/ascUsages.ts b/sdk/storagecache/arm-storagecache/src/operations/ascUsages.ts index b3be708d71f6..8528090b2120 100644 --- a/sdk/storagecache/arm-storagecache/src/operations/ascUsages.ts +++ b/sdk/storagecache/arm-storagecache/src/operations/ascUsages.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { AscUsages } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -50,23 +51,35 @@ export class AscUsagesImpl implements AscUsages { [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listPagingPage(location, options); + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(location, options, settings); } }; } private async *listPagingPage( location: string, - options?: AscUsagesListOptionalParams + options?: AscUsagesListOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._list(location, options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: AscUsagesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(location, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listNext(location, continuationToken, options); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -146,7 +159,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/storagecache/arm-storagecache/src/operations/caches.ts b/sdk/storagecache/arm-storagecache/src/operations/caches.ts index 54add6ac0d73..4d6c1df8e0b6 100644 --- a/sdk/storagecache/arm-storagecache/src/operations/caches.ts +++ b/sdk/storagecache/arm-storagecache/src/operations/caches.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { Caches } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -18,9 +19,9 @@ import { Cache, CachesListNextOptionalParams, CachesListOptionalParams, + CachesListResponse, CachesListByResourceGroupNextOptionalParams, CachesListByResourceGroupOptionalParams, - CachesListResponse, CachesListByResourceGroupResponse, CachesDeleteOptionalParams, CachesGetOptionalParams, @@ -76,22 +77,34 @@ export class CachesImpl implements Caches { [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listPagingPage(options); + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); } }; } private async *listPagingPage( - options?: CachesListOptionalParams + options?: CachesListOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._list(options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: CachesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listNext(continuationToken, options); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -120,19 +133,33 @@ export class CachesImpl implements Caches { [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listByResourceGroupPagingPage(resourceGroupName, options); + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); } }; } private async *listByResourceGroupPagingPage( resourceGroupName: string, - options?: CachesListByResourceGroupOptionalParams + options?: CachesListByResourceGroupOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByResourceGroup(resourceGroupName, options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: CachesListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByResourceGroupNext( resourceGroupName, @@ -140,7 +167,9 @@ export class CachesImpl implements Caches { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -379,15 +408,84 @@ export class CachesImpl implements Caches { * the [-0-9a-zA-Z_] char class. * @param options The options parameters. */ - update( + async beginUpdate( resourceGroupName: string, cacheName: string, options?: CachesUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( + ): Promise< + PollerLike, CachesUpdateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, { resourceGroupName, cacheName, options }, updateOperationSpec ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Update a Cache instance. + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from + * the [-0-9a-zA-Z_] char class. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + cacheName: string, + options?: CachesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + cacheName, + options + ); + return poller.pollUntilDone(); } /** @@ -1414,6 +1512,15 @@ const updateOperationSpec: coreClient.OperationSpec = { 200: { bodyMapper: Mappers.Cache }, + 201: { + bodyMapper: Mappers.Cache + }, + 202: { + bodyMapper: Mappers.Cache + }, + 204: { + bodyMapper: Mappers.Cache + }, default: { bodyMapper: Mappers.CloudError } @@ -1721,7 +1828,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, @@ -1741,7 +1847,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/storagecache/arm-storagecache/src/operations/operations.ts b/sdk/storagecache/arm-storagecache/src/operations/operations.ts index 0c23b36dc4fa..8b53f335d191 100644 --- a/sdk/storagecache/arm-storagecache/src/operations/operations.ts +++ b/sdk/storagecache/arm-storagecache/src/operations/operations.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { Operations } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -48,22 +49,34 @@ export class OperationsImpl implements Operations { [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listPagingPage(options); + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); } }; } private async *listPagingPage( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._list(options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: OperationsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listNext(continuationToken, options); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -130,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/storagecache/arm-storagecache/src/operations/skus.ts b/sdk/storagecache/arm-storagecache/src/operations/skus.ts index 9f7d458638b1..e69bb780aecf 100644 --- a/sdk/storagecache/arm-storagecache/src/operations/skus.ts +++ b/sdk/storagecache/arm-storagecache/src/operations/skus.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { Skus } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -48,22 +49,34 @@ export class SkusImpl implements Skus { [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listPagingPage(options); + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); } }; } private async *listPagingPage( - options?: SkusListOptionalParams + options?: SkusListOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._list(options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: SkusListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listNext(continuationToken, options); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -128,7 +141,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/storagecache/arm-storagecache/src/operations/storageTargets.ts b/sdk/storagecache/arm-storagecache/src/operations/storageTargets.ts index 8413a7906abe..4474c4dd0e7b 100644 --- a/sdk/storagecache/arm-storagecache/src/operations/storageTargets.ts +++ b/sdk/storagecache/arm-storagecache/src/operations/storageTargets.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { StorageTargets } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -18,13 +19,14 @@ import { StorageTarget, StorageTargetsListByCacheNextOptionalParams, StorageTargetsListByCacheOptionalParams, - StorageTargetsDnsRefreshOptionalParams, StorageTargetsListByCacheResponse, + StorageTargetsDnsRefreshOptionalParams, StorageTargetsDeleteOptionalParams, StorageTargetsGetOptionalParams, StorageTargetsGetResponse, StorageTargetsCreateOrUpdateOptionalParams, StorageTargetsCreateOrUpdateResponse, + StorageTargetsRestoreDefaultsOptionalParams, StorageTargetsListByCacheNextResponse } from "../models"; @@ -65,11 +67,15 @@ export class StorageTargetsImpl implements StorageTargets { [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listByCachePagingPage( resourceGroupName, cacheName, - options + options, + settings ); } }; @@ -78,11 +84,18 @@ export class StorageTargetsImpl implements StorageTargets { private async *listByCachePagingPage( resourceGroupName: string, cacheName: string, - options?: StorageTargetsListByCacheOptionalParams + options?: StorageTargetsListByCacheOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByCache(resourceGroupName, cacheName, options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: StorageTargetsListByCacheResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByCache(resourceGroupName, cacheName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByCacheNext( resourceGroupName, @@ -91,7 +104,9 @@ export class StorageTargetsImpl implements StorageTargets { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -430,6 +445,96 @@ export class StorageTargetsImpl implements StorageTargets { return poller.pollUntilDone(); } + /** + * Tells a storage target to restore its settings to their default values. + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from + * the [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @param options The options parameters. + */ + async beginRestoreDefaults( + resourceGroupName: string, + cacheName: string, + storageTargetName: string, + options?: StorageTargetsRestoreDefaultsOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, cacheName, storageTargetName, options }, + restoreDefaultsOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Tells a storage target to restore its settings to their default values. + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from + * the [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @param options The options parameters. + */ + async beginRestoreDefaultsAndWait( + resourceGroupName: string, + cacheName: string, + storageTargetName: string, + options?: StorageTargetsRestoreDefaultsOptionalParams + ): Promise { + const poller = await this.beginRestoreDefaults( + resourceGroupName, + cacheName, + storageTargetName, + options + ); + return poller.pollUntilDone(); + } + /** * ListByCacheNext * @param resourceGroupName Target resource group. @@ -580,6 +685,30 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const restoreDefaultsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/restoreDefaults", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.cacheName, + Parameters.storageTargetName + ], + headerParameters: [Parameters.accept], + serializer +}; const listByCacheNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -591,7 +720,6 @@ const listByCacheNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/storagecache/arm-storagecache/src/operations/usageModels.ts b/sdk/storagecache/arm-storagecache/src/operations/usageModels.ts index a0f0a8f02d60..858ddc1d714e 100644 --- a/sdk/storagecache/arm-storagecache/src/operations/usageModels.ts +++ b/sdk/storagecache/arm-storagecache/src/operations/usageModels.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { UsageModels } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -48,22 +49,34 @@ export class UsageModelsImpl implements UsageModels { [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listPagingPage(options); + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); } }; } private async *listPagingPage( - options?: UsageModelsListOptionalParams + options?: UsageModelsListOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._list(options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: UsageModelsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listNext(continuationToken, options); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -131,7 +144,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/storagecache/arm-storagecache/src/operationsInterfaces/caches.ts b/sdk/storagecache/arm-storagecache/src/operationsInterfaces/caches.ts index 5ae7ffa59abf..ef3266fe8e93 100644 --- a/sdk/storagecache/arm-storagecache/src/operationsInterfaces/caches.ts +++ b/sdk/storagecache/arm-storagecache/src/operationsInterfaces/caches.ts @@ -125,7 +125,21 @@ export interface Caches { * the [-0-9a-zA-Z_] char class. * @param options The options parameters. */ - update( + beginUpdate( + resourceGroupName: string, + cacheName: string, + options?: CachesUpdateOptionalParams + ): Promise< + PollerLike, CachesUpdateResponse> + >; + /** + * Update a Cache instance. + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from + * the [-0-9a-zA-Z_] char class. + * @param options The options parameters. + */ + beginUpdateAndWait( resourceGroupName: string, cacheName: string, options?: CachesUpdateOptionalParams diff --git a/sdk/storagecache/arm-storagecache/src/operationsInterfaces/storageTargets.ts b/sdk/storagecache/arm-storagecache/src/operationsInterfaces/storageTargets.ts index 0f7e85ddc7ff..406e414e1c4b 100644 --- a/sdk/storagecache/arm-storagecache/src/operationsInterfaces/storageTargets.ts +++ b/sdk/storagecache/arm-storagecache/src/operationsInterfaces/storageTargets.ts @@ -16,7 +16,8 @@ import { StorageTargetsGetOptionalParams, StorageTargetsGetResponse, StorageTargetsCreateOrUpdateOptionalParams, - StorageTargetsCreateOrUpdateResponse + StorageTargetsCreateOrUpdateResponse, + StorageTargetsRestoreDefaultsOptionalParams } from "../models"; /// @@ -147,4 +148,32 @@ export interface StorageTargets { storageTargetName: string, options?: StorageTargetsCreateOrUpdateOptionalParams ): Promise; + /** + * Tells a storage target to restore its settings to their default values. + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from + * the [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @param options The options parameters. + */ + beginRestoreDefaults( + resourceGroupName: string, + cacheName: string, + storageTargetName: string, + options?: StorageTargetsRestoreDefaultsOptionalParams + ): Promise, void>>; + /** + * Tells a storage target to restore its settings to their default values. + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from + * the [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @param options The options parameters. + */ + beginRestoreDefaultsAndWait( + resourceGroupName: string, + cacheName: string, + storageTargetName: string, + options?: StorageTargetsRestoreDefaultsOptionalParams + ): Promise; } diff --git a/sdk/storagecache/arm-storagecache/src/pagingHelper.ts b/sdk/storagecache/arm-storagecache/src/pagingHelper.ts new file mode 100644 index 000000000000..269a2b9814b5 --- /dev/null +++ b/sdk/storagecache/arm-storagecache/src/pagingHelper.ts @@ -0,0 +1,39 @@ +/* + * 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. + */ + +export interface PageInfo { + continuationToken?: string; +} + +const pageMap = new WeakMap(); + +/** + * 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 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) { + return undefined; + } + return pageMap.get(page)?.continuationToken; +} + +export function setContinuationToken( + page: unknown, + continuationToken: string | undefined +): void { + if (typeof page !== "object" || page === null || !continuationToken) { + return; + } + const pageInfo = pageMap.get(page) ?? {}; + pageInfo.continuationToken = continuationToken; + pageMap.set(page, pageInfo); +} diff --git a/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts b/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts index 13022c40943a..1db069b9b67c 100644 --- a/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts +++ b/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts @@ -69,22 +69,19 @@ export class StorageCacheManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-storagecache/5.2.1`; + const packageDetails = `azsdk-js-arm-storagecache/6.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - if (!options.credentialScopes) { - options.credentialScopes = ["https://management.azure.com/.default"]; - } const optionsWithDefaults = { ...defaults, ...options, userAgentOptions: { userAgentPrefix }, - baseUri: + endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com" }; super(optionsWithDefaults); @@ -110,7 +107,9 @@ export class StorageCacheManagementClient extends coreClient.ServiceClient { this.pipeline.addPolicy( coreRestPipeline.bearerTokenAuthenticationPolicy({ credential: credentials, - scopes: `${optionsWithDefaults.credentialScopes}`, + scopes: + optionsWithDefaults.credentialScopes ?? + `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge @@ -123,7 +122,7 @@ export class StorageCacheManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-05-01"; + this.apiVersion = options.apiVersion || "2023-01-01"; this.operations = new OperationsImpl(this); this.skus = new SkusImpl(this); this.usageModels = new UsageModelsImpl(this); diff --git a/sdk/storagecache/arm-storagecache/tsconfig.json b/sdk/storagecache/arm-storagecache/tsconfig.json index 1054055624f9..3e6ae96443f3 100644 --- a/sdk/storagecache/arm-storagecache/tsconfig.json +++ b/sdk/storagecache/arm-storagecache/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-storagecache": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"