From 766709e6d2b63e7238bb777174f0d3d1f34b3778 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 17 Dec 2024 17:34:23 +0000 Subject: [PATCH] CodeGen from PR 31901 in Azure/azure-rest-api-specs Merge 134dab2ea4de63069e9d51cf7bfcf516ed213a6b into 59799c650469a665614dd88c261ade7b78dcf77d --- common/config/rush/pnpm-lock.yaml | 1169 +----- sdk/batch/batch-rest/CHANGELOG.md | 12 +- sdk/batch/batch-rest/MigrationGuide.md | 265 -- sdk/batch/batch-rest/README.md | 31 +- sdk/batch/batch-rest/api-extractor.json | 25 +- sdk/batch/batch-rest/assets.json | 6 - sdk/batch/batch-rest/eslint.config.mjs | 17 +- sdk/batch/batch-rest/generated/batchClient.ts | 71 - .../batch-rest/generated/clientDefinitions.ts | 1217 ------ sdk/batch/batch-rest/generated/index.ts | 15 - .../batch-rest/generated/isUnexpected.ts | 778 ---- sdk/batch/batch-rest/generated/logger.ts | 5 - sdk/batch/batch-rest/generated/models.ts | 1824 -------- .../batch-rest/generated/outputModels.ts | 2468 ----------- .../batch-rest/generated/paginateHelper.ts | 200 - sdk/batch/batch-rest/generated/parameters.ts | 3659 ----------------- sdk/batch/batch-rest/generated/responses.ts | 1745 -------- sdk/batch/batch-rest/package.json | 86 +- sdk/batch/batch-rest/review/batch.api.md | 256 +- sdk/batch/batch-rest/sample.env | 3 - .../batch-rest/samples-dev/quick-start.ts | 150 - .../samples/v1-beta/javascript/README.md | 50 - .../samples/v1-beta/javascript/package.json | 33 - .../samples/v1-beta/javascript/quick-start.js | 148 - .../samples/v1-beta/javascript/sample.env | 3 - .../samples/v1-beta/typescript/README.md | 63 - .../samples/v1-beta/typescript/package.json | 42 - .../samples/v1-beta/typescript/sample.env | 3 - .../v1-beta/typescript/src/quick-start.ts | 155 - .../samples/v1-beta/typescript/tsconfig.json | 17 - sdk/batch/batch-rest/src/batchClient.ts | 73 +- sdk/batch/batch-rest/src/clientDefinitions.ts | 298 +- .../batchSharedKeyCredentials-browser.mts | 11 - ...batchSharedKeyCredentials-react-native.mts | 11 - .../credentials/batchSharedKeyCredentials.ts | 147 - sdk/batch/batch-rest/src/index.ts | 1 - sdk/batch/batch-rest/src/isUnexpected.ts | 72 +- sdk/batch/batch-rest/src/models.ts | 32 +- sdk/batch/batch-rest/src/outputModels.ts | 34 +- sdk/batch/batch-rest/src/paginateHelper.ts | 199 +- sdk/batch/batch-rest/src/parameters.ts | 381 +- .../src/replacePoolPropertiesPolicy.ts | 36 - sdk/batch/batch-rest/src/responses.ts | 15 +- .../browser/batchSharedKeyCredentials.spec.ts | 14 - .../batch-rest/test/computeNodes.spec.ts | 298 -- .../batch-rest/test/jobSchedules.spec.ts | 233 -- sdk/batch/batch-rest/test/jobs.spec.ts | 249 -- sdk/batch/batch-rest/test/poolScaling.spec.ts | 178 - sdk/batch/batch-rest/test/pools.spec.ts | 766 ---- .../batch-rest/test/public/sampleTest.spec.ts | 21 + .../test/public/utils/recordedClient.ts | 29 + sdk/batch/batch-rest/test/tasks.spec.ts | 530 --- .../batch-rest/test/utils/env-browser.mts | 2 - sdk/batch/batch-rest/test/utils/env.ts | 6 - .../test/utils/envTokenCredential.ts | 24 - .../batch-rest/test/utils/fakeTestSecrets.ts | 12 - sdk/batch/batch-rest/test/utils/helpers.ts | 31 - sdk/batch/batch-rest/test/utils/pool.ts | 34 - .../batch-rest/test/utils/recordedClient.ts | 82 - sdk/batch/batch-rest/test/utils/wait.ts | 10 - .../batch-rest/tsconfig.browser.config.json | 9 +- sdk/batch/batch-rest/tsconfig.json | 19 +- sdk/batch/batch-rest/tsconfig.samples.json | 8 - sdk/batch/batch-rest/tsconfig.src.json | 3 - sdk/batch/batch-rest/tsconfig.test.json | 3 - sdk/batch/batch-rest/tsp-location.yaml | 6 +- sdk/batch/batch-rest/vitest.browser.config.ts | 44 +- sdk/batch/batch-rest/vitest.config.ts | 39 +- sdk/batch/batch-rest/vitest.esm.config.ts | 11 - sdk/batch/ci.yml | 6 +- 70 files changed, 1299 insertions(+), 17194 deletions(-) delete mode 100644 sdk/batch/batch-rest/MigrationGuide.md delete mode 100644 sdk/batch/batch-rest/assets.json delete mode 100644 sdk/batch/batch-rest/generated/batchClient.ts delete mode 100644 sdk/batch/batch-rest/generated/clientDefinitions.ts delete mode 100644 sdk/batch/batch-rest/generated/index.ts delete mode 100644 sdk/batch/batch-rest/generated/isUnexpected.ts delete mode 100644 sdk/batch/batch-rest/generated/logger.ts delete mode 100644 sdk/batch/batch-rest/generated/models.ts delete mode 100644 sdk/batch/batch-rest/generated/outputModels.ts delete mode 100644 sdk/batch/batch-rest/generated/paginateHelper.ts delete mode 100644 sdk/batch/batch-rest/generated/parameters.ts delete mode 100644 sdk/batch/batch-rest/generated/responses.ts delete mode 100644 sdk/batch/batch-rest/sample.env delete mode 100644 sdk/batch/batch-rest/samples-dev/quick-start.ts delete mode 100644 sdk/batch/batch-rest/samples/v1-beta/javascript/README.md delete mode 100644 sdk/batch/batch-rest/samples/v1-beta/javascript/package.json delete mode 100644 sdk/batch/batch-rest/samples/v1-beta/javascript/quick-start.js delete mode 100644 sdk/batch/batch-rest/samples/v1-beta/javascript/sample.env delete mode 100644 sdk/batch/batch-rest/samples/v1-beta/typescript/README.md delete mode 100644 sdk/batch/batch-rest/samples/v1-beta/typescript/package.json delete mode 100644 sdk/batch/batch-rest/samples/v1-beta/typescript/sample.env delete mode 100644 sdk/batch/batch-rest/samples/v1-beta/typescript/src/quick-start.ts delete mode 100644 sdk/batch/batch-rest/samples/v1-beta/typescript/tsconfig.json delete mode 100644 sdk/batch/batch-rest/src/credentials/batchSharedKeyCredentials-browser.mts delete mode 100644 sdk/batch/batch-rest/src/credentials/batchSharedKeyCredentials-react-native.mts delete mode 100644 sdk/batch/batch-rest/src/credentials/batchSharedKeyCredentials.ts delete mode 100644 sdk/batch/batch-rest/src/replacePoolPropertiesPolicy.ts delete mode 100644 sdk/batch/batch-rest/test/browser/batchSharedKeyCredentials.spec.ts delete mode 100644 sdk/batch/batch-rest/test/computeNodes.spec.ts delete mode 100644 sdk/batch/batch-rest/test/jobSchedules.spec.ts delete mode 100644 sdk/batch/batch-rest/test/jobs.spec.ts delete mode 100644 sdk/batch/batch-rest/test/poolScaling.spec.ts delete mode 100644 sdk/batch/batch-rest/test/pools.spec.ts create mode 100644 sdk/batch/batch-rest/test/public/sampleTest.spec.ts create mode 100644 sdk/batch/batch-rest/test/public/utils/recordedClient.ts delete mode 100644 sdk/batch/batch-rest/test/tasks.spec.ts delete mode 100644 sdk/batch/batch-rest/test/utils/env-browser.mts delete mode 100644 sdk/batch/batch-rest/test/utils/env.ts delete mode 100644 sdk/batch/batch-rest/test/utils/envTokenCredential.ts delete mode 100644 sdk/batch/batch-rest/test/utils/fakeTestSecrets.ts delete mode 100644 sdk/batch/batch-rest/test/utils/helpers.ts delete mode 100644 sdk/batch/batch-rest/test/utils/pool.ts delete mode 100644 sdk/batch/batch-rest/test/utils/recordedClient.ts delete mode 100644 sdk/batch/batch-rest/test/utils/wait.ts delete mode 100644 sdk/batch/batch-rest/tsconfig.samples.json delete mode 100644 sdk/batch/batch-rest/tsconfig.src.json delete mode 100644 sdk/batch/batch-rest/tsconfig.test.json delete mode 100644 sdk/batch/batch-rest/vitest.esm.config.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index c40ce8aab8ff..febd72e4a422 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1528,12 +1528,6 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.24.0': - resolution: {integrity: sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] - '@esbuild/android-arm64@0.21.5': resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} engines: {node: '>=12'} @@ -1546,12 +1540,6 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.24.0': - resolution: {integrity: sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] - '@esbuild/android-arm@0.21.5': resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} engines: {node: '>=12'} @@ -1564,12 +1552,6 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.24.0': - resolution: {integrity: sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] - '@esbuild/android-x64@0.21.5': resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} engines: {node: '>=12'} @@ -1582,12 +1564,6 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.24.0': - resolution: {integrity: sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] - '@esbuild/darwin-arm64@0.21.5': resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} engines: {node: '>=12'} @@ -1600,12 +1576,6 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.24.0': - resolution: {integrity: sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] - '@esbuild/darwin-x64@0.21.5': resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} engines: {node: '>=12'} @@ -1618,12 +1588,6 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.24.0': - resolution: {integrity: sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==} - engines: {node: '>=18'} - cpu: [x64] - os: [darwin] - '@esbuild/freebsd-arm64@0.21.5': resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} engines: {node: '>=12'} @@ -1636,12 +1600,6 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.24.0': - resolution: {integrity: sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] - '@esbuild/freebsd-x64@0.21.5': resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} engines: {node: '>=12'} @@ -1654,12 +1612,6 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.24.0': - resolution: {integrity: sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] - '@esbuild/linux-arm64@0.21.5': resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} engines: {node: '>=12'} @@ -1672,12 +1624,6 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.24.0': - resolution: {integrity: sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - '@esbuild/linux-arm@0.21.5': resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} engines: {node: '>=12'} @@ -1690,12 +1636,6 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.24.0': - resolution: {integrity: sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] - '@esbuild/linux-ia32@0.21.5': resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} engines: {node: '>=12'} @@ -1708,12 +1648,6 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.24.0': - resolution: {integrity: sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - '@esbuild/linux-loong64@0.21.5': resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} engines: {node: '>=12'} @@ -1726,12 +1660,6 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.24.0': - resolution: {integrity: sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] - '@esbuild/linux-mips64el@0.21.5': resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} engines: {node: '>=12'} @@ -1744,12 +1672,6 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.24.0': - resolution: {integrity: sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] - '@esbuild/linux-ppc64@0.21.5': resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} engines: {node: '>=12'} @@ -1762,12 +1684,6 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.24.0': - resolution: {integrity: sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] - '@esbuild/linux-riscv64@0.21.5': resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} engines: {node: '>=12'} @@ -1780,12 +1696,6 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.24.0': - resolution: {integrity: sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] - '@esbuild/linux-s390x@0.21.5': resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} engines: {node: '>=12'} @@ -1798,12 +1708,6 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.24.0': - resolution: {integrity: sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] - '@esbuild/linux-x64@0.21.5': resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} engines: {node: '>=12'} @@ -1816,12 +1720,6 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.24.0': - resolution: {integrity: sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] - '@esbuild/netbsd-x64@0.21.5': resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} engines: {node: '>=12'} @@ -1834,24 +1732,12 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.24.0': - resolution: {integrity: sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - '@esbuild/openbsd-arm64@0.23.1': resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-arm64@0.24.0': - resolution: {integrity: sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - '@esbuild/openbsd-x64@0.21.5': resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} engines: {node: '>=12'} @@ -1864,12 +1750,6 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.24.0': - resolution: {integrity: sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] - '@esbuild/sunos-x64@0.21.5': resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} engines: {node: '>=12'} @@ -1882,12 +1762,6 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.24.0': - resolution: {integrity: sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] - '@esbuild/win32-arm64@0.21.5': resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} engines: {node: '>=12'} @@ -1900,12 +1774,6 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.24.0': - resolution: {integrity: sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] - '@esbuild/win32-ia32@0.21.5': resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} engines: {node: '>=12'} @@ -1918,12 +1786,6 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.24.0': - resolution: {integrity: sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] - '@esbuild/win32-x64@0.21.5': resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} engines: {node: '>=12'} @@ -1936,12 +1798,6 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.24.0': - resolution: {integrity: sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] - '@eslint-community/eslint-utils@4.4.1': resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2006,9 +1862,6 @@ packages: engines: {node: '>=6'} hasBin: true - '@hapi/bourne@3.0.0': - resolution: {integrity: sha512-Waj1cwPXJDucOib4a3bAISsKJVb15MKi9IvmTI/7ssVEm6sywXGjVJDhl6/umt1pK1ZS7PacXU3A1PmFKHEZ2w==} - '@humanfs/core@0.19.1': resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} engines: {node: '>=18.18.0'} @@ -2120,9 +1973,6 @@ packages: peerDependencies: tslib: '2' - '@mdn/browser-compat-data@4.2.1': - resolution: {integrity: sha512-EWUguj2kd7ldmrF9F+vI5hUOralPd+sdsUnYbRy33vZTuZkduC1shE9TtEMEjAQwyfyMb4ole5KtjF8MsnQOlA==} - '@microsoft/api-extractor-model@7.30.0': resolution: {integrity: sha512-26/LJZBrsWDKAkOWRiQbdVgcfd1F3nyJnAiJzsAgpouPk7LtOIj7PK9aJtBaw/pUXrkotEg27RrT+Jm/q0bbug==} @@ -3676,7 +3526,7 @@ packages: version: 0.0.0 '@rush-temp/batch@file:projects/batch.tgz': - resolution: {integrity: sha512-XuL+PYlzGB/YmNDbnPrIq9AjDzOIhnjUFAr7XTwTGR8huP18WZWmL/m0YW4MlwP69ewEyjD8dWCAb0KmJl92pQ==, tarball: file:projects/batch.tgz} + resolution: {integrity: sha512-66eXDVkb8yvSINH26xa04Q5mDeA2SPCK5GgHfa5DXFBvkfVjAelMPiZcurPqLjz1DSw4XLD3lZxPO+HuonsOUw==, tarball: file:projects/batch.tgz} version: 0.0.0 '@rush-temp/communication-alpha-ids@file:projects/communication-alpha-ids.tgz': @@ -4004,11 +3854,11 @@ packages: version: 0.0.0 '@rush-temp/perf-ai-metrics-advisor@file:projects/perf-ai-metrics-advisor.tgz': - resolution: {integrity: sha512-6JSVuIfIFvRVwSXA5O5uLyr0gPb5j2Spu6AFzoHNcoMtfCl/94mWPmgofhG9qGsIOybTyAVS0jkD1nlxcsQWkQ==, tarball: file:projects/perf-ai-metrics-advisor.tgz} + resolution: {integrity: sha512-+EI1/2y01yAyGAf7ICP7CLKMCEaPxr2UH1wE/oZrmx3JyF+DzBfGAXEzifrNNFcSlM9B/4SThFzzk9w202G1Kw==, tarball: file:projects/perf-ai-metrics-advisor.tgz} version: 0.0.0 '@rush-temp/perf-ai-text-analytics@file:projects/perf-ai-text-analytics.tgz': - resolution: {integrity: sha512-HEeXcquBy4/HxCQDiHYIh56U/wSyFktEifaFi6u5aWjQHA0YVCZ2mL4n2UNp8/B+G7Z4Di2gAsinuyXdk04VFQ==, tarball: file:projects/perf-ai-text-analytics.tgz} + resolution: {integrity: sha512-Pan1PGinVC3NSJWrVyHJT04npqIDFlna70gSOyN/gwPRa1CGoWSa2UCeH1bXbXwzE02/hWfyCfNCenj4ZK+xkg==, tarball: file:projects/perf-ai-text-analytics.tgz} version: 0.0.0 '@rush-temp/perf-app-configuration@file:projects/perf-app-configuration.tgz': @@ -4020,7 +3870,7 @@ packages: version: 0.0.0 '@rush-temp/perf-core-rest-pipeline@file:projects/perf-core-rest-pipeline.tgz': - resolution: {integrity: sha512-CA4ACPBdLdTWNEL9EeXGvHFkFEbjL4L6z92yZHgr5kZH2mG3WyweFp5jAVeI1iXFtfaTKvPkma7l+uUhDj9hXw==, tarball: file:projects/perf-core-rest-pipeline.tgz} + resolution: {integrity: sha512-KWEPnchNnpCiHjuk8vd2aza0LmqMfhUOVJ402HWrXZXo0ilrsq1YYvoPhbNj1Bk5sNjLDvA4Y9xI9ofAe1NwGQ==, tarball: file:projects/perf-core-rest-pipeline.tgz} version: 0.0.0 '@rush-temp/perf-data-tables@file:projects/perf-data-tables.tgz': @@ -4212,7 +4062,7 @@ packages: version: 0.0.0 '@rush-temp/test-utils@file:projects/test-utils.tgz': - resolution: {integrity: sha512-PhzayiVPJXdsu6TATkAFgyqHODq6FhybsoAjVI+W+7fDUQzdGHoYDCBn5vcqiDb5Xe49R9aBheHPRvTXNHFfwA==, tarball: file:projects/test-utils.tgz} + resolution: {integrity: sha512-A1LivzUuFF+kXN4mR9u430aQKuLaD5pVk94AzzOcAAASvkTPJQuU2yE34MR8FtXFi9yKmwnLFw56stqEontcdw==, tarball: file:projects/test-utils.tgz} version: 0.0.0 '@rush-temp/ts-http-runtime@file:projects/ts-http-runtime.tgz': @@ -4314,9 +4164,6 @@ packages: '@tsconfig/node16@1.0.4': resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} - '@types/accepts@1.3.7': - resolution: {integrity: sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==} - '@types/archiver@6.0.3': resolution: {integrity: sha512-a6wUll6k3zX6qs5KlxIggs1P1JcYJaTCx2gnlr+f0S1yd2DoaEwoIK10HmBaLnZwWneBz+JBm0dwcZu0zECBcQ==} @@ -4326,9 +4173,6 @@ packages: '@types/aria-query@5.0.4': resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} - '@types/babel__code-frame@7.0.6': - resolution: {integrity: sha512-Anitqkl3+KrzcW2k77lRlg/GfLZLWXBuNgbEcIOU6M92yw42vsd3xV/Z/yAHEj8m+KUjL6bWOVOFqX8PFPJ4LA==} - '@types/body-parser@1.19.5': resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} @@ -4347,36 +4191,18 @@ packages: '@types/chai@5.0.1': resolution: {integrity: sha512-5T8ajsg3M/FOncpLYW7sdOcD6yf4+722sze/tc4KQV0P8Z2rAr3SAuHCIkYmYpt8VbcQlnz8SxlOlPQYefe4cA==} - '@types/co-body@6.1.3': - resolution: {integrity: sha512-UhuhrQ5hclX6UJctv5m4Rfp52AfG9o9+d9/HwjxhVB5NjXxr5t9oKgJxN8xRHgr35oo8meUEHUPFWiKg6y71aA==} - - '@types/command-line-args@5.2.3': - resolution: {integrity: sha512-uv0aG6R0Y8WHZLTamZwtfsDLVRnOa+n+n5rEvFWL5Na5gZ8V2Teab/duDPFzIIIhs9qizDpcavCusCLJZu62Kw==} - '@types/connect@3.4.38': resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} - '@types/content-disposition@0.5.8': - resolution: {integrity: sha512-QVSSvno3dE0MgO76pJhmv4Qyi/j0Yk9pBp0Y7TJ2Tlj+KCgJWY6qX7nnxCOLkZ3VYRSIk1WTxCvwUSdx6CCLdg==} - - '@types/convert-source-map@2.0.3': - resolution: {integrity: sha512-ag0BfJLZf6CQz8VIuRIEYQ5Ggwk/82uvTQf27RcpyDNbY0Vw49LIPqAxk5tqYfrCs9xDaIMvl4aj7ZopnYL8bA==} - '@types/cookie@0.4.1': resolution: {integrity: sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==} '@types/cookie@0.6.0': resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} - '@types/cookies@0.9.0': - resolution: {integrity: sha512-40Zk8qR147RABiQ7NQnBzWzDcjKzNrntB5BAmeGCb2p/MIyOE+4BVvc17wumsUqUw00bJYqoXFHYygQnEFh4/Q==} - '@types/cors@2.8.17': resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==} - '@types/debounce@1.2.4': - resolution: {integrity: sha512-jBqiORIzKDOToaF63Fm//haOCHuwQuLa2202RK4MozpA6lh93eCBc+/8+wZn5OzjJt3ySdc+74SXWXB55Ewtyw==} - '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} @@ -4413,9 +4239,6 @@ packages: '@types/glob@7.2.0': resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} - '@types/http-assert@1.5.6': - resolution: {integrity: sha512-TTEwmtjgVbYAzZYWyeHPrrtWnfVkm8tQkP8P21uQifPgMRgjrow3XDEYqucuC8SKZJT7pUnhU/JymvjggxO9vw==} - '@types/http-errors@2.0.4': resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} @@ -4425,15 +4248,6 @@ packages: '@types/is-buffer@2.0.2': resolution: {integrity: sha512-G6OXy83Va+xEo8XgqAJYOuvOMxeey9xM5XKkvwJNmN8rVdcB+r15HvHsG86hl86JvU0y1aa7Z2ERkNFYWw9ySg==} - '@types/istanbul-lib-coverage@2.0.6': - resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} - - '@types/istanbul-lib-report@3.0.3': - resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} - - '@types/istanbul-reports@3.0.4': - resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} - '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -4446,15 +4260,6 @@ packages: '@types/jws@3.2.10': resolution: {integrity: sha512-cOevhttJmssERB88/+XvZXvsq5m9JLKZNUiGfgjUb5lcPRdV2ZQciU6dU76D/qXXFYpSqkP3PrSg4hMTiafTZw==} - '@types/keygrip@1.0.6': - resolution: {integrity: sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ==} - - '@types/koa-compose@3.2.8': - resolution: {integrity: sha512-4Olc63RY+MKvxMwVknCUDhRQX1pFQoBZ/lXcRLP69PQkEpze/0cr8LNqJQe5NFb/b19DWi2a5bTi2VAlQzhJuA==} - - '@types/koa@2.15.0': - resolution: {integrity: sha512-7QFsywoE5URbuVnG3loe03QXuGajrnotr3gQkXcEBShORai23MePfFYdhz90FEtBBpkyIYQbVD+evKtloCgX3g==} - '@types/linkify-it@5.0.0': resolution: {integrity: sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==} @@ -4506,9 +4311,6 @@ packages: '@types/pako@2.0.3': resolution: {integrity: sha512-bq0hMV9opAcrmE0Byyo0fY3Ew4tgOevJmQ9grUhpXQhYfyLJ1Kqg3P33JT5fdbT2AjeAjR51zqqVjAL/HMkx7Q==} - '@types/parse5@6.0.3': - resolution: {integrity: sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==} - '@types/pg-pool@2.0.6': resolution: {integrity: sha512-TaAUE5rq2VQYxab5Ts7WZhKNmuN78Q6PiFonTDdpbx8a1H0M1vhy3rhiMjl+e2iHmogyMw7jZF4FrE6eJUy5HQ==} @@ -4736,64 +4538,6 @@ packages: '@vitest/utils@2.1.8': resolution: {integrity: sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==} - '@web/browser-logs@0.4.0': - resolution: {integrity: sha512-/EBiDAUCJ2DzZhaFxTPRIznEPeafdLbXShIL6aTu7x73x7ZoxSDv7DGuTsh2rWNMUa4+AKli4UORrpyv6QBOiA==} - engines: {node: '>=18.0.0'} - - '@web/config-loader@0.3.2': - resolution: {integrity: sha512-Vrjv/FexBGmAdnCYpJKLHX1dfT1UaUdvHmX1JRaWos9OvDf/tFznYJ5SpJwww3Rl87/ewvLSYG7kfsMqEAsizQ==} - engines: {node: '>=18.0.0'} - - '@web/dev-server-core@0.7.4': - resolution: {integrity: sha512-nHSNrJ1J9GjmSceKNHpWRMjvpfE2NTV9EYUffPIr7j0sIV59gK7NI/4+9slotJ/ODXw0+e1gSeJshTOhjjVNxQ==} - engines: {node: '>=18.0.0'} - - '@web/dev-server-esbuild@1.0.3': - resolution: {integrity: sha512-oImN4/cpyfQC8+JcCx61M7WIo09zE2aDMFuwh+brqxuNXIBRQ+hnRGQK7fEIZSQeWWT5dFrWmH4oYZfqzCAlfQ==} - engines: {node: '>=18.0.0'} - - '@web/dev-server-rollup@0.6.4': - resolution: {integrity: sha512-sJZfTGCCrdku5xYnQQG51odGI092hKY9YFM0X3Z0tRY3iXKXcYRaLZrErw5KfCxr6g0JRuhe4BBhqXTA5Q2I3Q==} - engines: {node: '>=18.0.0'} - - '@web/dev-server@0.4.6': - resolution: {integrity: sha512-jj/1bcElAy5EZet8m2CcUdzxT+CRvUjIXGh8Lt7vxtthkN9PzY9wlhWx/9WOs5iwlnG1oj0VGo6f/zvbPO0s9w==} - engines: {node: '>=18.0.0'} - hasBin: true - - '@web/parse5-utils@2.1.0': - resolution: {integrity: sha512-GzfK5disEJ6wEjoPwx8AVNwUe9gYIiwc+x//QYxYDAFKUp4Xb1OJAGLc2l2gVrSQmtPGLKrTRcW90Hv4pEq1qA==} - engines: {node: '>=18.0.0'} - - '@web/test-runner-chrome@0.17.0': - resolution: {integrity: sha512-Il5N9z41NKWCrQM1TVgRaDWWYoJtG5Ha4fG+cN1MWL2OlzBS4WoOb4lFV3EylZ7+W3twZOFr1zy2Rx61yDYd/A==} - engines: {node: '>=18.0.0'} - - '@web/test-runner-commands@0.9.0': - resolution: {integrity: sha512-zeLI6QdH0jzzJMDV5O42Pd8WLJtYqovgdt0JdytgHc0d1EpzXDsc7NTCJSImboc2NcayIsWAvvGGeRF69SMMYg==} - engines: {node: '>=18.0.0'} - - '@web/test-runner-core@0.13.4': - resolution: {integrity: sha512-84E1025aUSjvZU1j17eCTwV7m5Zg3cZHErV3+CaJM9JPCesZwLraIa0ONIQ9w4KLgcDgJFw9UnJ0LbFf42h6tg==} - engines: {node: '>=18.0.0'} - - '@web/test-runner-coverage-v8@0.8.0': - resolution: {integrity: sha512-PskiucYpjUtgNfR2zF2AWqWwjXL7H3WW/SnCAYmzUrtob7X9o/+BjdyZ4wKbOxWWSbJO4lEdGIDLu+8X2Xw+lA==} - engines: {node: '>=18.0.0'} - - '@web/test-runner-mocha@0.9.0': - resolution: {integrity: sha512-ZL9F6FXd0DBQvo/h/+mSfzFTSRVxzV9st/AHhpgABtUtV/AIpVE9to6+xdkpu6827kwjezdpuadPfg+PlrBWqQ==} - engines: {node: '>=18.0.0'} - - '@web/test-runner-playwright@0.11.0': - resolution: {integrity: sha512-s+f43DSAcssKYVOD9SuzueUcctJdHzq1by45gAnSCKa9FQcaTbuYe8CzmxA21g+NcL5+ayo4z+MA9PO4H+PssQ==} - engines: {node: '>=18.0.0'} - - '@web/test-runner@0.19.0': - resolution: {integrity: sha512-qLUupi88OK1Kl52cWPD/2JewUCRUxYsZ1V1DyLd05P7u09zCdrUYrtkB/cViWyxlBe/TOvqkSNpcTv6zLJ9GoA==} - engines: {node: '>=18.0.0'} - hasBin: true - abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} @@ -4926,14 +4670,6 @@ packages: aria-query@5.3.0: resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} - array-back@3.1.0: - resolution: {integrity: sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==} - engines: {node: '>=6'} - - array-back@6.2.2: - resolution: {integrity: sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==} - engines: {node: '>=12.17'} - array-flatten@1.1.1: resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} @@ -4960,16 +4696,6 @@ packages: resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} engines: {node: '>=4'} - astral-regex@2.0.0: - resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} - engines: {node: '>=8'} - - async-mutex@0.4.0: - resolution: {integrity: sha512-eJFZ1YhRR8UN8eBLoNzcDPcy/jqjsg6I1AP+KvWQX80BqOSW1oJPJXDylPUEeMr2ZQvHgnQ//Lp6f3RQ1zI7HA==} - - async@2.6.4: - resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} - asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -5093,10 +4819,6 @@ packages: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} - cache-content-type@1.0.1: - resolution: {integrity: sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==} - engines: {node: '>= 6.0.0'} - caching-transform@4.0.0: resolution: {integrity: sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==} engines: {node: '>=8'} @@ -5168,10 +4890,6 @@ packages: resolution: {integrity: sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==} engines: {node: '>=12'} - chalk-template@0.4.0: - resolution: {integrity: sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==} - engines: {node: '>=12'} - chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -5211,18 +4929,9 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} - chokidar@4.0.2: - resolution: {integrity: sha512-/b57FK+bblSU+dfewfFe0rT1YjVDfOmeLQwCAuC+vwvgLkXboATqqmy+Ipux6JrF6L5joe5CBnFOw+gLWH6yKg==} - engines: {node: '>= 14.16.0'} - chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} - chrome-launcher@0.15.2: - resolution: {integrity: sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ==} - engines: {node: '>=12.13.0'} - hasBin: true - chromium-bidi@0.8.0: resolution: {integrity: sha512-uJydbGdTw0DEUjhoogGveneJVWX/9YuqkWePzMmkBYwtdAqo5d3J/ovNKFr+/2hWXYmYCr6it8mSSTIj6SS6Ug==} peerDependencies: @@ -5274,18 +4983,6 @@ packages: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} - clone@2.1.2: - resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==} - engines: {node: '>=0.8'} - - co-body@6.2.0: - resolution: {integrity: sha512-Kbpv2Yd1NdL1V/V4cwLVxraHDV6K8ayohr2rmH0J87Er8+zJjcTa6dAn9QMPC9CRgU8+aNajKbSf1TzDB1yKPA==} - engines: {node: '>=8.0.0'} - - co@4.6.0: - resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} - engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} - code-block-writer@13.0.3: resolution: {integrity: sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==} @@ -5309,14 +5006,6 @@ packages: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} - command-line-args@5.2.1: - resolution: {integrity: sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==} - engines: {node: '>=4.0.0'} - - command-line-usage@7.0.3: - resolution: {integrity: sha512-PqMLy5+YGwhMh1wS04mVG44oqDsgyLRSKJBdOo1bnYhMKBW65gZF1dRp2OZRhiTjgUHljy99qkO7bsctLaw35Q==} - engines: {node: '>=12.20.0'} - commander@10.0.1: resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} engines: {node: '>=14'} @@ -5371,10 +5060,6 @@ packages: resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} engines: {node: '>= 0.6'} - cookies@0.9.1: - resolution: {integrity: sha512-TG2hpqe4ELx54QER/S3HQ9SRVnQnGBtKUz5bLQWtYAQ+o6GpgMs6sYUvaiJjVxb+UXwhRhAEP3m7LbsIZ77Hmw==} - engines: {node: '>= 0.8'} - copyfiles@2.4.1: resolution: {integrity: sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==} hasBin: true @@ -5441,15 +5126,9 @@ packages: dayjs@1.11.13: resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==} - debounce@1.2.1: - resolution: {integrity: sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==} - debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} - debug@3.2.7: - resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} - debug@4.3.7: resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} engines: {node: '>=6.0'} @@ -5516,9 +5195,6 @@ packages: resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} engines: {node: '>=6'} - deep-equal@1.0.1: - resolution: {integrity: sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw==} - deep-extend@0.6.0: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} @@ -5538,10 +5214,6 @@ packages: resolution: {integrity: sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==} engines: {node: '>=18'} - default-gateway@6.0.3: - resolution: {integrity: sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==} - engines: {node: '>= 10'} - default-require-extensions@3.0.1: resolution: {integrity: sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==} engines: {node: '>=8'} @@ -5569,21 +5241,10 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - delegates@1.0.0: - resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} - - depd@1.1.2: - resolution: {integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==} - engines: {node: '>= 0.6'} - depd@2.0.0: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} - dependency-graph@0.11.0: - resolution: {integrity: sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==} - engines: {node: '>= 0.6.0'} - dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} @@ -5703,9 +5364,6 @@ packages: error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - errorstacks@2.4.1: - resolution: {integrity: sha512-jE4i0SMYevwu/xxAuzhly/KTwtj0xDhbzB6m1xPImxTkw8wcCbgarOQPfCVMi5JKVyW7in29pNJCCJrry3Ynnw==} - es-define-property@1.0.1: resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} engines: {node: '>= 0.4'} @@ -5737,11 +5395,6 @@ packages: engines: {node: '>=18'} hasBin: true - esbuild@0.24.0: - resolution: {integrity: sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==} - engines: {node: '>=18'} - hasBin: true - escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -6026,10 +5679,6 @@ packages: resolution: {integrity: sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==} engines: {node: '>=8'} - find-replace@3.0.0: - resolution: {integrity: sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==} - engines: {node: '>=4.0.0'} - find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -6215,10 +5864,6 @@ packages: resolution: {integrity: sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==} engines: {node: '>=8'} - globby@11.1.0: - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} - engines: {node: '>=10'} - globby@13.2.2: resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -6285,18 +5930,6 @@ packages: html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} - http-assert@1.5.0: - resolution: {integrity: sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==} - engines: {node: '>= 0.8'} - - http-errors@1.6.3: - resolution: {integrity: sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==} - engines: {node: '>= 0.6'} - - http-errors@1.8.1: - resolution: {integrity: sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==} - engines: {node: '>= 0.6'} - http-errors@2.0.0: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} @@ -6370,17 +6003,10 @@ packages: resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==} engines: {node: '>=12'} - inflation@2.1.0: - resolution: {integrity: sha512-t54PPJHG1Pp7VQvxyVCJ9mBbjG3Hqryges9bXoOO6GExCPa+//i/d5GSuFtpx3ALLd7lgIAur6zrIlBQyJuMlQ==} - engines: {node: '>= 0.8.0'} - inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - inherits@2.0.3: - resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==} - inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -6391,18 +6017,10 @@ packages: resolution: {integrity: sha512-LJKFHCSeIRq9hanN14IlOtPSTe3lNES7TYDTE2xxdAy1LS5rYphajK1qtwvj3YmQXvvk0U2Vbmcni8P9EIQW9w==} engines: {node: '>=18'} - internal-ip@6.2.0: - resolution: {integrity: sha512-D8WGsR6yDt8uq7vDMu7mjcR+yRMm3dW8yufyChmszWRjcSHuxLBkR3GdS2HZAjodsaGuCvXeEJpueisXJULghg==} - engines: {node: '>=10'} - ip-address@9.0.5: resolution: {integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==} engines: {node: '>= 12'} - ip-regex@4.3.0: - resolution: {integrity: sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==} - engines: {node: '>=8'} - ipaddr.js@1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} @@ -6477,10 +6095,6 @@ packages: resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} engines: {node: '>=8'} - is-ip@3.1.0: - resolution: {integrity: sha512-35vd5necO7IitFPjd/YBeqwWnyDWbuLH9ZXQdMfDA8TEo7pv5X8yfrvVO3xbJbLUlERCMvf6X0hTUamQxCYJ9Q==} - engines: {node: '>=8'} - is-module@1.0.0: resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} @@ -6558,10 +6172,6 @@ packages: resolution: {integrity: sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==} engines: {node: '>= 8.0.0'} - isbinaryfile@5.0.4: - resolution: {integrity: sha512-YKBKVkKhty7s8rxddb40oOkuP0NbaeXrQvLin6QMHL7Ypiy2RW9LwOVrVgZRyOrhQlayMd9t+D8yDy8MKFTSDQ==} - engines: {node: '>= 18.0.0'} - isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -6753,10 +6363,6 @@ packages: engines: {node: '>= 10'} hasBin: true - keygrip@1.1.0: - resolution: {integrity: sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==} - engines: {node: '>= 0.6'} - keytar@7.9.0: resolution: {integrity: sha512-VPD8mtVtm5JNtA2AErl6Chp06JBfy7diFQ7TQQhdpWOl6MrCRB+eRbvAZUsbGQS9kiMq0coJsy0W0vHpDCkWsQ==} @@ -6774,28 +6380,6 @@ packages: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} - koa-compose@4.1.0: - resolution: {integrity: sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==} - - koa-convert@2.0.0: - resolution: {integrity: sha512-asOvN6bFlSnxewce2e/DK3p4tltyfC4VM7ZwuTuepI7dEQVcvpyFuBcEARu1+Hxg8DIwytce2n7jrZtRlPrARA==} - engines: {node: '>= 10'} - - koa-etag@4.0.0: - resolution: {integrity: sha512-1cSdezCkBWlyuB9l6c/IFoe1ANCDdPBxkDkRiaIup40xpUub6U/wwRXoKBZw/O5BifX9OlqAjYnDyzM6+l+TAg==} - - koa-send@5.0.1: - resolution: {integrity: sha512-tmcyQ/wXXuxpDxyNXv5yNNkdAMdFRqwtegBXUaowiQzUKqJehttS0x2j0eOZDQAyloAth5w6wwBImnFzkUz3pQ==} - engines: {node: '>= 8'} - - koa-static@5.0.0: - resolution: {integrity: sha512-UqyYyH5YEXaJrf9S8E23GoJFQZXkBVJ9zYYMPGz919MSX1KuvAcycIuS0ci150HCoPf4XQVhQ84Qf8xRPWxFaQ==} - engines: {node: '>= 7.6.0'} - - koa@2.15.3: - resolution: {integrity: sha512-j/8tY9j5t+GVMLeioLaxweJiKUayFhlGqNTzf2ZGwL0ZCQijd2RLHK0SLW5Tsko8YyyqCZC2cojIb0/s62qTAg==} - engines: {node: ^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4} - levn@0.3.0: resolution: {integrity: sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==} engines: {node: '>= 0.8.0'} @@ -6804,9 +6388,6 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} - lighthouse-logger@1.4.2: - resolution: {integrity: sha512-gPWxznF6TKmUHrOQjlVo2UbaL2EJ71mb2CCeRs/2qBpi4L/g4LUVc9+3lKQ6DTUZwJswfM7ainGrLO1+fOqa2g==} - lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -6869,10 +6450,6 @@ packages: resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} engines: {node: '>=10'} - log-update@4.0.0: - resolution: {integrity: sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==} - engines: {node: '>=10'} - log4js@6.9.1: resolution: {integrity: sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==} engines: {node: '>=8.0'} @@ -6907,10 +6484,6 @@ packages: resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} engines: {node: '>=12'} - lru-cache@8.0.5: - resolution: {integrity: sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==} - engines: {node: '>=16.14'} - lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true @@ -6970,9 +6543,6 @@ packages: engines: {node: '>= 16'} hasBin: true - marky@1.2.5: - resolution: {integrity: sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q==} - matched@5.0.1: resolution: {integrity: sha512-E1fhSTPRyhAlNaNvGXAgZQlq1hL0bgYMTk/6bktVlIhzUnX/SZs7296ACdVeNJE8xFNGSuvd9IpI7vSnmcqLvw==} engines: {node: '>=10'} @@ -7172,9 +6742,6 @@ packages: mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} - nanocolors@0.2.13: - resolution: {integrity: sha512-0n3mSAQLPpGLV9ORXT5+C/D4mwew7Ebws69Hx4E2sgz2ZA5+32Q80B9tL8PbL7XHnRDiAxH/pnrUJ9a4fkTNTA==} - nanoid@3.3.8: resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -7289,9 +6856,6 @@ packages: resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} engines: {node: '>=12'} - only@0.0.2: - resolution: {integrity: sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==} - open@10.1.0: resolution: {integrity: sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==} engines: {node: '>=18'} @@ -7328,10 +6892,6 @@ packages: outvariant@1.4.3: resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} - p-event@4.2.0: - resolution: {integrity: sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==} - engines: {node: '>=8'} - p-event@5.0.1: resolution: {integrity: sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -7340,10 +6900,6 @@ packages: resolution: {integrity: sha512-QtoWLjXAW++uTX67HZQz1dbTpqBfiidsB6VtQUC9iR85S120+s0T5sO6s+B5MLzFcZkrEd/DGMmCjR+f2Qpxwg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - p-finally@1.0.0: - resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} - engines: {node: '>=4'} - p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -7376,10 +6932,6 @@ packages: resolution: {integrity: sha512-T8BatKGY+k5rU+Q/GTYgrEf2r4xRMevAN5mtXc2aPc4rS1j3s+vWTaO2Wag94neXuCAUAs8cxBL9EeB5EA6diw==} engines: {node: '>=16'} - p-timeout@3.2.0: - resolution: {integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==} - engines: {node: '>=8'} - p-timeout@5.1.0: resolution: {integrity: sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==} engines: {node: '>=12'} @@ -7546,10 +7098,6 @@ packages: resolution: {integrity: sha512-OLS/0XeUAcE8a2fdwemNja+udKgXNnY6yKVIXqAD2zVRx1KvY6Ato/rZ2vdzbxqYwPW0u6SCNC/bAMPNzpzxbw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - portfinder@1.0.32: - resolution: {integrity: sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==} - engines: {node: '>= 0.12.0'} - possible-typed-array-names@1.0.0: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} @@ -7738,10 +7286,6 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} - readdirp@4.0.2: - resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==} - engines: {node: '>= 14.16.0'} - redent@4.0.0: resolution: {integrity: sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==} engines: {node: '>=12'} @@ -7791,10 +7335,6 @@ packages: resolution: {integrity: sha512-CIw9e64QcKcCFUj9+KxUCJPy8hYofv6eVfo3U9wdhCm2E4IjvFnZ6G4/yIC4yP3f11+h6uU5b3LdS7O64LgqrA==} engines: {node: 16 >=16.17.0 || 18 >= 18.6.0 || >=20} - resolve-path@1.4.0: - resolution: {integrity: sha512-i1xevIst/Qa+nA9olDxLWnLk8YZbi8R/7JPbCMcgyWaFR6bKWaexgJgEB5oc2PKMjYdrHynyz0NY+if+H98t1w==} - engines: {node: '>= 0.8'} - resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} @@ -7922,9 +7462,6 @@ packages: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} - setprototypeof@1.1.0: - resolution: {integrity: sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==} - setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} @@ -8000,10 +7537,6 @@ packages: resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} engines: {node: '>=12'} - slice-ansi@4.0.0: - resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} - engines: {node: '>=10'} - smart-buffer@4.2.0: resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} @@ -8193,10 +7726,6 @@ packages: engines: {node: '>=14'} hasBin: true - table-layout@4.1.1: - resolution: {integrity: sha512-iK5/YhZxq5GO5z8wb0bY1317uDF3Zjpha0QFFLA8/trAoiLbQD0HUbMesEaxyzUgDxi2QlcbM8IvqOlEjgoXBA==} - engines: {node: '>=12.17'} - tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} @@ -8314,10 +7843,6 @@ packages: tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - tr46@5.0.0: - resolution: {integrity: sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==} - engines: {node: '>=18'} - tree-dump@1.0.2: resolution: {integrity: sha512-dpev9ABuLWdEubk+cIaI9cHwRNNDjkBBLXTwI4UCUFdQ5xXKqNXoK4FEciw/vxf+NQ7Cb7sGUyeUtORvHIdRXQ==} engines: {node: '>=10.0'} @@ -8372,10 +7897,6 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - tsscmp@1.0.6: - resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==} - engines: {node: '>=0.6.x'} - tsx@4.19.2: resolution: {integrity: sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==} engines: {node: '>=18.0.0'} @@ -8478,22 +7999,10 @@ packages: engines: {node: '>=14.17'} hasBin: true - typical@4.0.0: - resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==} - engines: {node: '>=8'} - - typical@7.3.0: - resolution: {integrity: sha512-ya4mg/30vm+DOWfBg4YK3j2WD6TWtRkCbasOJr40CseYENzCUby/7rIvXA99JGsQHeNxLbnXdyLLxKSv3tauFw==} - engines: {node: '>=12.17'} - ua-parser-js@0.7.39: resolution: {integrity: sha512-IZ6acm6RhQHNibSt7+c09hhvsKy9WUr4DVbeq9U8o71qxyYtJpQeDxQnMrVqnIFMLcQjHO0I9wgfO2vIahht4w==} hasBin: true - ua-parser-js@1.0.39: - resolution: {integrity: sha512-k24RCVWlEcjkdOxYmVJgeD/0a1TiSpqLg+ZalVGV9lsnr4yqu0w7tX/x2xX6G4zpkgQnRf89lxuZ1wsbjXM8lw==} - hasBin: true - uc.micro@2.1.0: resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} @@ -8588,10 +8097,6 @@ packages: v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - v8-to-istanbul@9.3.0: - resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} - engines: {node: '>=10.12.0'} - validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} @@ -8711,14 +8216,6 @@ packages: webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - webidl-conversions@7.0.0: - resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} - engines: {node: '>=12'} - - whatwg-url@14.1.0: - resolution: {integrity: sha512-jlf/foYIKywAt3x/XWKZ/3rz8OSJPiWktjmk891alJUEjiVxKX9LEO92qH3hv4aJ0mN3MWPvGMCy8jQi95xK4w==} - engines: {node: '>=18'} - whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} @@ -8756,10 +8253,6 @@ packages: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} - wordwrapjs@5.1.0: - resolution: {integrity: sha512-JNjcULU2e4KJwUNv6CHgI46UvDGitb6dGryHajXTDiLgg1/RiGoPSDw4kZfYnwGtEXf2ZMeIewDQgFGzkCB2Sg==} - engines: {node: '>=12.17'} - workerpool@6.5.1: resolution: {integrity: sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==} @@ -8877,10 +8370,6 @@ packages: yauzl@2.10.0: resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} - ylru@1.4.0: - resolution: {integrity: sha512-2OQsPNEmBCvXuFlIni/a+Rn+R2pHW9INm0BxXJ4hVDA8TirqMj+J/Rp9ItLatT/5pZqWwefVrTQcHpixsxnVlA==} - engines: {node: '>= 4.0.0'} - yn@3.1.1: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} @@ -9454,213 +8943,141 @@ snapshots: '@esbuild/aix-ppc64@0.23.1': optional: true - '@esbuild/aix-ppc64@0.24.0': - optional: true - '@esbuild/android-arm64@0.21.5': optional: true '@esbuild/android-arm64@0.23.1': optional: true - '@esbuild/android-arm64@0.24.0': - optional: true - '@esbuild/android-arm@0.21.5': optional: true '@esbuild/android-arm@0.23.1': optional: true - '@esbuild/android-arm@0.24.0': - optional: true - '@esbuild/android-x64@0.21.5': optional: true '@esbuild/android-x64@0.23.1': optional: true - '@esbuild/android-x64@0.24.0': - optional: true - - '@esbuild/darwin-arm64@0.21.5': + '@esbuild/darwin-arm64@0.21.5': optional: true '@esbuild/darwin-arm64@0.23.1': optional: true - '@esbuild/darwin-arm64@0.24.0': - optional: true - '@esbuild/darwin-x64@0.21.5': optional: true '@esbuild/darwin-x64@0.23.1': optional: true - '@esbuild/darwin-x64@0.24.0': - optional: true - '@esbuild/freebsd-arm64@0.21.5': optional: true '@esbuild/freebsd-arm64@0.23.1': optional: true - '@esbuild/freebsd-arm64@0.24.0': - optional: true - '@esbuild/freebsd-x64@0.21.5': optional: true '@esbuild/freebsd-x64@0.23.1': optional: true - '@esbuild/freebsd-x64@0.24.0': - optional: true - '@esbuild/linux-arm64@0.21.5': optional: true '@esbuild/linux-arm64@0.23.1': optional: true - '@esbuild/linux-arm64@0.24.0': - optional: true - '@esbuild/linux-arm@0.21.5': optional: true '@esbuild/linux-arm@0.23.1': optional: true - '@esbuild/linux-arm@0.24.0': - optional: true - '@esbuild/linux-ia32@0.21.5': optional: true '@esbuild/linux-ia32@0.23.1': optional: true - '@esbuild/linux-ia32@0.24.0': - optional: true - '@esbuild/linux-loong64@0.21.5': optional: true '@esbuild/linux-loong64@0.23.1': optional: true - '@esbuild/linux-loong64@0.24.0': - optional: true - '@esbuild/linux-mips64el@0.21.5': optional: true '@esbuild/linux-mips64el@0.23.1': optional: true - '@esbuild/linux-mips64el@0.24.0': - optional: true - '@esbuild/linux-ppc64@0.21.5': optional: true '@esbuild/linux-ppc64@0.23.1': optional: true - '@esbuild/linux-ppc64@0.24.0': - optional: true - '@esbuild/linux-riscv64@0.21.5': optional: true '@esbuild/linux-riscv64@0.23.1': optional: true - '@esbuild/linux-riscv64@0.24.0': - optional: true - '@esbuild/linux-s390x@0.21.5': optional: true '@esbuild/linux-s390x@0.23.1': optional: true - '@esbuild/linux-s390x@0.24.0': - optional: true - '@esbuild/linux-x64@0.21.5': optional: true '@esbuild/linux-x64@0.23.1': optional: true - '@esbuild/linux-x64@0.24.0': - optional: true - '@esbuild/netbsd-x64@0.21.5': optional: true '@esbuild/netbsd-x64@0.23.1': optional: true - '@esbuild/netbsd-x64@0.24.0': - optional: true - '@esbuild/openbsd-arm64@0.23.1': optional: true - '@esbuild/openbsd-arm64@0.24.0': - optional: true - '@esbuild/openbsd-x64@0.21.5': optional: true '@esbuild/openbsd-x64@0.23.1': optional: true - '@esbuild/openbsd-x64@0.24.0': - optional: true - '@esbuild/sunos-x64@0.21.5': optional: true '@esbuild/sunos-x64@0.23.1': optional: true - '@esbuild/sunos-x64@0.24.0': - optional: true - '@esbuild/win32-arm64@0.21.5': optional: true '@esbuild/win32-arm64@0.23.1': optional: true - '@esbuild/win32-arm64@0.24.0': - optional: true - '@esbuild/win32-ia32@0.21.5': optional: true '@esbuild/win32-ia32@0.23.1': optional: true - '@esbuild/win32-ia32@0.24.0': - optional: true - '@esbuild/win32-x64@0.21.5': optional: true '@esbuild/win32-x64@0.23.1': optional: true - '@esbuild/win32-x64@0.24.0': - optional: true - '@eslint-community/eslint-utils@4.4.1(eslint@8.57.1)': dependencies: eslint: 8.57.1 @@ -9741,8 +9158,6 @@ snapshots: protobufjs: 7.4.0 yargs: 17.7.2 - '@hapi/bourne@3.0.0': {} - '@humanfs/core@0.19.1': {} '@humanfs/node@0.16.6': @@ -9883,8 +9298,6 @@ snapshots: dependencies: tslib: 2.8.1 - '@mdn/browser-compat-data@4.2.1': {} - '@microsoft/api-extractor-model@7.30.0(@types/node@18.19.68)': dependencies: '@microsoft/tsdoc': 0.15.1 @@ -16303,12 +15716,12 @@ snapshots: '@rush-temp/batch@file:projects/batch.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: + '@microsoft/api-extractor': 7.48.0(@types/node@18.19.68) '@types/node': 18.19.68 '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 eslint: 9.17.0 - moment: 2.30.1 playwright: 1.49.1 tslib: 2.8.1 typescript: 5.6.3 @@ -19077,12 +18490,9 @@ snapshots: '@types/node': 18.19.68 dotenv: 16.4.7 eslint: 9.17.0 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) tslib: 2.8.1 typescript: 5.6.3 transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' - jiti - supports-color @@ -19091,12 +18501,9 @@ snapshots: '@types/node': 18.19.68 dotenv: 16.4.7 eslint: 9.17.0 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) tslib: 2.8.1 typescript: 5.6.3 transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' - jiti - supports-color @@ -19134,13 +18541,10 @@ snapshots: dotenv: 16.4.7 eslint: 9.17.0 express: 4.21.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) tslib: 2.8.1 typescript: 5.6.3 undici: 7.1.0 transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' - jiti - supports-color @@ -20428,15 +19832,11 @@ snapshots: '@types/chai-as-promised': 7.1.8 '@types/node': 18.19.68 '@types/sinon': 17.0.3 - '@web/dev-server-esbuild': 1.0.3 - '@web/test-runner': 0.19.0 - '@web/test-runner-playwright': 0.11.0 chai: 4.5.0 chai-as-promised: 7.1.2(chai@4.5.0) chai-exclude: 2.1.1(chai@4.5.0) eslint: 9.17.0 mocha: 11.0.2 - playwright: 1.49.1 sinon: 19.0.2 ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) tslib: 2.8.1 @@ -20444,10 +19844,8 @@ snapshots: transitivePeerDependencies: - '@swc/core' - '@swc/wasm' - - bufferutil - jiti - supports-color - - utf-8-validate '@rush-temp/ts-http-runtime@file:projects/ts-http-runtime.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: @@ -20730,10 +20128,6 @@ snapshots: '@tsconfig/node16@1.0.4': {} - '@types/accepts@1.3.7': - dependencies: - '@types/node': 22.7.9 - '@types/archiver@6.0.3': dependencies: '@types/readdir-glob': 1.1.5 @@ -20742,8 +20136,6 @@ snapshots: '@types/aria-query@5.0.4': {} - '@types/babel__code-frame@7.0.6': {} - '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 @@ -20767,38 +20159,18 @@ snapshots: dependencies: '@types/deep-eql': 4.0.2 - '@types/co-body@6.1.3': - dependencies: - '@types/node': 22.7.9 - '@types/qs': 6.9.17 - - '@types/command-line-args@5.2.3': {} - '@types/connect@3.4.38': dependencies: '@types/node': 18.19.68 - '@types/content-disposition@0.5.8': {} - - '@types/convert-source-map@2.0.3': {} - '@types/cookie@0.4.1': {} '@types/cookie@0.6.0': {} - '@types/cookies@0.9.0': - dependencies: - '@types/connect': 3.4.38 - '@types/express': 4.17.21 - '@types/keygrip': 1.0.6 - '@types/node': 22.7.9 - '@types/cors@2.8.17': dependencies: '@types/node': 18.19.68 - '@types/debounce@1.2.4': {} - '@types/debug@4.1.12': dependencies: '@types/ms': 0.7.34 @@ -20850,8 +20222,6 @@ snapshots: '@types/minimatch': 5.1.2 '@types/node': 18.19.68 - '@types/http-assert@1.5.6': {} - '@types/http-errors@2.0.4': {} '@types/inquirer@9.0.7': @@ -20863,16 +20233,6 @@ snapshots: dependencies: '@types/node': 18.19.68 - '@types/istanbul-lib-coverage@2.0.6': {} - - '@types/istanbul-lib-report@3.0.3': - dependencies: - '@types/istanbul-lib-coverage': 2.0.6 - - '@types/istanbul-reports@3.0.4': - dependencies: - '@types/istanbul-lib-report': 3.0.3 - '@types/json-schema@7.0.15': {} '@types/jsonfile@6.1.4': @@ -20887,23 +20247,6 @@ snapshots: dependencies: '@types/node': 18.19.68 - '@types/keygrip@1.0.6': {} - - '@types/koa-compose@3.2.8': - dependencies: - '@types/koa': 2.15.0 - - '@types/koa@2.15.0': - dependencies: - '@types/accepts': 1.3.7 - '@types/content-disposition': 0.5.8 - '@types/cookies': 0.9.0 - '@types/http-assert': 1.5.6 - '@types/http-errors': 2.0.4 - '@types/keygrip': 1.0.6 - '@types/koa-compose': 3.2.8 - '@types/node': 22.7.9 - '@types/linkify-it@5.0.0': {} '@types/markdown-it@14.1.2': @@ -20954,8 +20297,6 @@ snapshots: '@types/pako@2.0.3': {} - '@types/parse5@6.0.3': {} - '@types/pg-pool@2.0.6': dependencies: '@types/pg': 8.6.1 @@ -21361,195 +20702,6 @@ snapshots: loupe: 3.1.2 tinyrainbow: 1.2.0 - '@web/browser-logs@0.4.0': - dependencies: - errorstacks: 2.4.1 - - '@web/config-loader@0.3.2': {} - - '@web/dev-server-core@0.7.4': - dependencies: - '@types/koa': 2.15.0 - '@types/ws': 7.4.7 - '@web/parse5-utils': 2.1.0 - chokidar: 4.0.2 - clone: 2.1.2 - es-module-lexer: 1.5.4 - get-stream: 6.0.1 - is-stream: 2.0.1 - isbinaryfile: 5.0.4 - koa: 2.15.3 - koa-etag: 4.0.0 - koa-send: 5.0.1 - koa-static: 5.0.0 - lru-cache: 8.0.5 - mime-types: 2.1.35 - parse5: 6.0.1 - picomatch: 2.3.1 - ws: 7.5.10 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - '@web/dev-server-esbuild@1.0.3': - dependencies: - '@mdn/browser-compat-data': 4.2.1 - '@web/dev-server-core': 0.7.4 - esbuild: 0.24.0 - parse5: 6.0.1 - ua-parser-js: 1.0.39 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - '@web/dev-server-rollup@0.6.4': - dependencies: - '@rollup/plugin-node-resolve': 15.3.0(rollup@4.28.1) - '@web/dev-server-core': 0.7.4 - nanocolors: 0.2.13 - parse5: 6.0.1 - rollup: 4.28.1 - whatwg-url: 14.1.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - '@web/dev-server@0.4.6': - dependencies: - '@babel/code-frame': 7.26.2 - '@types/command-line-args': 5.2.3 - '@web/config-loader': 0.3.2 - '@web/dev-server-core': 0.7.4 - '@web/dev-server-rollup': 0.6.4 - camelcase: 6.3.0 - command-line-args: 5.2.1 - command-line-usage: 7.0.3 - debounce: 1.2.1 - deepmerge: 4.3.1 - internal-ip: 6.2.0 - nanocolors: 0.2.13 - open: 8.4.2 - portfinder: 1.0.32 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - '@web/parse5-utils@2.1.0': - dependencies: - '@types/parse5': 6.0.3 - parse5: 6.0.1 - - '@web/test-runner-chrome@0.17.0': - dependencies: - '@web/test-runner-core': 0.13.4 - '@web/test-runner-coverage-v8': 0.8.0 - async-mutex: 0.4.0 - chrome-launcher: 0.15.2 - puppeteer-core: 23.10.4 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - '@web/test-runner-commands@0.9.0': - dependencies: - '@web/test-runner-core': 0.13.4 - mkdirp: 1.0.4 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - '@web/test-runner-core@0.13.4': - dependencies: - '@babel/code-frame': 7.26.2 - '@types/babel__code-frame': 7.0.6 - '@types/co-body': 6.1.3 - '@types/convert-source-map': 2.0.3 - '@types/debounce': 1.2.4 - '@types/istanbul-lib-coverage': 2.0.6 - '@types/istanbul-reports': 3.0.4 - '@web/browser-logs': 0.4.0 - '@web/dev-server-core': 0.7.4 - chokidar: 4.0.2 - cli-cursor: 3.1.0 - co-body: 6.2.0 - convert-source-map: 2.0.0 - debounce: 1.2.1 - dependency-graph: 0.11.0 - globby: 11.1.0 - internal-ip: 6.2.0 - istanbul-lib-coverage: 3.2.2 - istanbul-lib-report: 3.0.1 - istanbul-reports: 3.1.7 - log-update: 4.0.0 - nanocolors: 0.2.13 - nanoid: 3.3.8 - open: 8.4.2 - picomatch: 2.3.1 - source-map: 0.7.4 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - '@web/test-runner-coverage-v8@0.8.0': - dependencies: - '@web/test-runner-core': 0.13.4 - istanbul-lib-coverage: 3.2.2 - lru-cache: 8.0.5 - picomatch: 2.3.1 - v8-to-istanbul: 9.3.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - '@web/test-runner-mocha@0.9.0': - dependencies: - '@web/test-runner-core': 0.13.4 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - '@web/test-runner-playwright@0.11.0': - dependencies: - '@web/test-runner-core': 0.13.4 - '@web/test-runner-coverage-v8': 0.8.0 - playwright: 1.49.1 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - '@web/test-runner@0.19.0': - dependencies: - '@web/browser-logs': 0.4.0 - '@web/config-loader': 0.3.2 - '@web/dev-server': 0.4.6 - '@web/test-runner-chrome': 0.17.0 - '@web/test-runner-commands': 0.9.0 - '@web/test-runner-core': 0.13.4 - '@web/test-runner-mocha': 0.9.0 - camelcase: 6.3.0 - command-line-args: 5.2.1 - command-line-usage: 7.0.3 - convert-source-map: 2.0.0 - diff: 5.2.0 - globby: 11.1.0 - nanocolors: 0.2.13 - portfinder: 1.0.32 - source-map: 0.7.4 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - abort-controller@3.0.0: dependencies: event-target-shim: 5.0.1 @@ -21678,10 +20830,6 @@ snapshots: dependencies: dequal: 2.0.3 - array-back@3.1.0: {} - - array-back@6.2.2: {} - array-flatten@1.1.1: {} array-union@2.1.0: {} @@ -21698,16 +20846,6 @@ snapshots: dependencies: tslib: 2.8.1 - astral-regex@2.0.0: {} - - async-mutex@0.4.0: - dependencies: - tslib: 2.8.1 - - async@2.6.4: - dependencies: - lodash: 4.17.21 - asynckit@0.4.0: {} autorest@3.7.1: {} @@ -21838,11 +20976,6 @@ snapshots: cac@6.7.14: {} - cache-content-type@1.0.1: - dependencies: - mime-types: 2.1.35 - ylru: 1.4.0 - caching-transform@4.0.0: dependencies: hasha: 5.2.2 @@ -21934,10 +21067,6 @@ snapshots: loupe: 3.1.2 pathval: 2.0.0 - chalk-template@0.4.0: - dependencies: - chalk: 4.1.2 - chalk@2.4.2: dependencies: ansi-styles: 3.2.1 @@ -21979,19 +21108,8 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - chokidar@4.0.2: - dependencies: - readdirp: 4.0.2 - chownr@1.1.4: {} - chrome-launcher@0.15.2: - dependencies: - '@types/node': 22.7.9 - escape-string-regexp: 4.0.0 - is-wsl: 2.2.0 - lighthouse-logger: 1.4.2 - chromium-bidi@0.8.0(devtools-protocol@0.0.1367902): dependencies: devtools-protocol: 0.0.1367902 @@ -22050,18 +21168,6 @@ snapshots: clone@1.0.4: {} - clone@2.1.2: {} - - co-body@6.2.0: - dependencies: - '@hapi/bourne': 3.0.0 - inflation: 2.1.0 - qs: 6.13.0 - raw-body: 2.5.2 - type-is: 1.6.18 - - co@4.6.0: {} - code-block-writer@13.0.3: {} color-convert@1.9.3: @@ -22082,20 +21188,6 @@ snapshots: dependencies: delayed-stream: 1.0.0 - command-line-args@5.2.1: - dependencies: - array-back: 3.1.0 - find-replace: 3.0.0 - lodash.camelcase: 4.3.0 - typical: 4.0.0 - - command-line-usage@7.0.3: - dependencies: - array-back: 6.2.2 - chalk-template: 0.4.0 - table-layout: 4.1.1 - typical: 7.3.0 - commander@10.0.1: {} commander@2.20.3: {} @@ -22143,11 +21235,6 @@ snapshots: cookie@0.7.2: {} - cookies@0.9.1: - dependencies: - depd: 2.0.0 - keygrip: 1.1.0 - copyfiles@2.4.1: dependencies: glob: 7.2.3 @@ -22222,16 +21309,10 @@ snapshots: dayjs@1.11.13: {} - debounce@1.2.1: {} - debug@2.6.9: dependencies: ms: 2.0.0 - debug@3.2.7: - dependencies: - ms: 2.1.3 - debug@4.3.7: dependencies: ms: 2.1.3 @@ -22301,8 +21382,6 @@ snapshots: deep-eql@5.0.2: {} - deep-equal@1.0.1: {} - deep-extend@0.6.0: {} deep-is@0.1.4: {} @@ -22316,10 +21395,6 @@ snapshots: bundle-name: 4.1.0 default-browser-id: 5.0.0 - default-gateway@6.0.3: - dependencies: - execa: 5.1.1 - default-require-extensions@3.0.1: dependencies: strip-bom: 4.0.0 @@ -22346,14 +21421,8 @@ snapshots: delayed-stream@1.0.0: {} - delegates@1.0.0: {} - - depd@1.1.2: {} - depd@2.0.0: {} - dependency-graph@0.11.0: {} - dequal@2.0.3: {} destroy@1.2.0: {} @@ -22459,8 +21528,6 @@ snapshots: dependencies: is-arrayish: 0.2.1 - errorstacks@2.4.1: {} - es-define-property@1.0.1: {} es-errors@1.3.0: {} @@ -22528,33 +21595,6 @@ snapshots: '@esbuild/win32-ia32': 0.23.1 '@esbuild/win32-x64': 0.23.1 - esbuild@0.24.0: - optionalDependencies: - '@esbuild/aix-ppc64': 0.24.0 - '@esbuild/android-arm': 0.24.0 - '@esbuild/android-arm64': 0.24.0 - '@esbuild/android-x64': 0.24.0 - '@esbuild/darwin-arm64': 0.24.0 - '@esbuild/darwin-x64': 0.24.0 - '@esbuild/freebsd-arm64': 0.24.0 - '@esbuild/freebsd-x64': 0.24.0 - '@esbuild/linux-arm': 0.24.0 - '@esbuild/linux-arm64': 0.24.0 - '@esbuild/linux-ia32': 0.24.0 - '@esbuild/linux-loong64': 0.24.0 - '@esbuild/linux-mips64el': 0.24.0 - '@esbuild/linux-ppc64': 0.24.0 - '@esbuild/linux-riscv64': 0.24.0 - '@esbuild/linux-s390x': 0.24.0 - '@esbuild/linux-x64': 0.24.0 - '@esbuild/netbsd-x64': 0.24.0 - '@esbuild/openbsd-arm64': 0.24.0 - '@esbuild/openbsd-x64': 0.24.0 - '@esbuild/sunos-x64': 0.24.0 - '@esbuild/win32-arm64': 0.24.0 - '@esbuild/win32-ia32': 0.24.0 - '@esbuild/win32-x64': 0.24.0 - escalade@3.2.0: {} escape-html@1.0.3: {} @@ -22946,10 +21986,6 @@ snapshots: make-dir: 3.1.0 pkg-dir: 4.2.0 - find-replace@3.0.0: - dependencies: - array-back: 3.1.0 - find-up@4.1.0: dependencies: locate-path: 5.0.0 @@ -23145,15 +22181,6 @@ snapshots: merge2: 1.4.1 slash: 3.0.0 - globby@11.1.0: - dependencies: - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.3.2 - ignore: 5.3.2 - merge2: 1.4.1 - slash: 3.0.0 - globby@13.2.2: dependencies: dir-glob: 3.0.1 @@ -23207,26 +22234,6 @@ snapshots: html-escaper@2.0.2: {} - http-assert@1.5.0: - dependencies: - deep-equal: 1.0.1 - http-errors: 1.8.1 - - http-errors@1.6.3: - dependencies: - depd: 1.1.2 - inherits: 2.0.3 - setprototypeof: 1.1.0 - statuses: 1.5.0 - - http-errors@1.8.1: - dependencies: - depd: 1.1.2 - inherits: 2.0.4 - setprototypeof: 1.2.0 - statuses: 1.5.0 - toidentifier: 1.0.1 - http-errors@2.0.0: dependencies: depd: 2.0.0 @@ -23301,15 +22308,11 @@ snapshots: indent-string@5.0.0: {} - inflation@2.1.0: {} - inflight@1.0.6: dependencies: once: 1.4.0 wrappy: 1.0.2 - inherits@2.0.3: {} - inherits@2.0.4: {} ini@1.3.8: {} @@ -23329,20 +22332,11 @@ snapshots: wrap-ansi: 6.2.0 yoctocolors-cjs: 2.1.2 - internal-ip@6.2.0: - dependencies: - default-gateway: 6.0.3 - ipaddr.js: 1.9.1 - is-ip: 3.1.0 - p-event: 4.2.0 - ip-address@9.0.5: dependencies: jsbn: 1.1.0 sprintf-js: 1.1.3 - ip-regex@4.3.0: {} - ipaddr.js@1.9.1: {} is-alphabetical@1.0.4: {} @@ -23397,10 +22391,6 @@ snapshots: is-interactive@1.0.0: {} - is-ip@3.1.0: - dependencies: - ip-regex: 4.3.0 - is-module@1.0.0: {} is-natural-number@4.0.1: {} @@ -23451,8 +22441,6 @@ snapshots: isbinaryfile@4.0.10: {} - isbinaryfile@5.0.4: {} - isexe@2.0.0: {} istanbul-lib-coverage@3.2.2: {} @@ -23727,10 +22715,6 @@ snapshots: - supports-color - utf-8-validate - keygrip@1.1.0: - dependencies: - tsscmp: 1.0.6 - keytar@7.9.0: dependencies: node-addon-api: 4.3.0 @@ -23748,60 +22732,6 @@ snapshots: kleur@3.0.3: {} - koa-compose@4.1.0: {} - - koa-convert@2.0.0: - dependencies: - co: 4.6.0 - koa-compose: 4.1.0 - - koa-etag@4.0.0: - dependencies: - etag: 1.8.1 - - koa-send@5.0.1: - dependencies: - debug: 4.4.0(supports-color@8.1.1) - http-errors: 1.8.1 - resolve-path: 1.4.0 - transitivePeerDependencies: - - supports-color - - koa-static@5.0.0: - dependencies: - debug: 3.2.7 - koa-send: 5.0.1 - transitivePeerDependencies: - - supports-color - - koa@2.15.3: - dependencies: - accepts: 1.3.8 - cache-content-type: 1.0.1 - content-disposition: 0.5.4 - content-type: 1.0.5 - cookies: 0.9.1 - debug: 4.4.0(supports-color@8.1.1) - delegates: 1.0.0 - depd: 2.0.0 - destroy: 1.2.0 - encodeurl: 1.0.2 - escape-html: 1.0.3 - fresh: 0.5.2 - http-assert: 1.5.0 - http-errors: 1.8.1 - is-generator-function: 1.0.10 - koa-compose: 4.1.0 - koa-convert: 2.0.0 - on-finished: 2.4.1 - only: 0.0.2 - parseurl: 1.3.3 - statuses: 1.5.0 - type-is: 1.6.18 - vary: 1.1.2 - transitivePeerDependencies: - - supports-color - levn@0.3.0: dependencies: prelude-ls: 1.1.2 @@ -23812,11 +22742,6 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 - lighthouse-logger@1.4.2: - dependencies: - debug: 2.6.9 - marky: 1.2.5 - lines-and-columns@1.2.4: {} linkify-it@5.0.0: @@ -23869,13 +22794,6 @@ snapshots: chalk: 4.1.2 is-unicode-supported: 0.1.0 - log-update@4.0.0: - dependencies: - ansi-escapes: 4.3.2 - cli-cursor: 3.1.0 - slice-ansi: 4.0.0 - wrap-ansi: 6.2.0 - log4js@6.9.1: dependencies: date-format: 4.0.14 @@ -23917,8 +22835,6 @@ snapshots: lru-cache@7.18.3: {} - lru-cache@8.0.5: {} - lz-string@1.5.0: {} magic-string@0.30.15: @@ -23978,8 +22894,6 @@ snapshots: marked@9.1.6: {} - marky@1.2.5: {} - matched@5.0.1: dependencies: glob: 7.2.3 @@ -24294,8 +23208,6 @@ snapshots: object-assign: 4.1.1 thenify-all: 1.6.0 - nanocolors@0.2.13: {} - nanoid@3.3.8: {} napi-build-utils@1.0.2: {} @@ -24435,8 +23347,6 @@ snapshots: dependencies: mimic-fn: 4.0.0 - only@0.0.2: {} - open@10.1.0: dependencies: default-browser: 5.2.1 @@ -24498,10 +23408,6 @@ snapshots: outvariant@1.4.3: {} - p-event@4.2.0: - dependencies: - p-timeout: 3.2.0 - p-event@5.0.1: dependencies: p-timeout: 5.1.0 @@ -24510,8 +23416,6 @@ snapshots: dependencies: p-map: 5.5.0 - p-finally@1.0.0: {} - p-limit@2.3.0: dependencies: p-try: 2.2.0 @@ -24542,10 +23446,6 @@ snapshots: p-map@6.0.0: {} - p-timeout@3.2.0: - dependencies: - p-finally: 1.0.0 - p-timeout@5.1.0: {} p-try@2.2.0: {} @@ -24692,12 +23592,6 @@ snapshots: polite-json@5.0.0: {} - portfinder@1.0.32: - dependencies: - async: 2.6.4 - debug: 3.2.7 - mkdirp: 0.5.6 - possible-typed-array-names@1.0.0: {} postcss@8.4.49: @@ -24937,8 +23831,6 @@ snapshots: dependencies: picomatch: 2.3.1 - readdirp@4.0.2: {} - redent@4.0.0: dependencies: indent-string: 5.0.0 @@ -24981,11 +23873,6 @@ snapshots: glob: 10.4.5 walk-up-path: 3.0.1 - resolve-path@1.4.0: - dependencies: - http-errors: 1.6.3 - path-is-absolute: 1.0.1 - resolve-pkg-maps@1.0.0: {} resolve@1.19.0: @@ -25149,8 +24036,6 @@ snapshots: gopd: 1.2.0 has-property-descriptors: 1.0.2 - setprototypeof@1.1.0: {} - setprototypeof@1.2.0: {} shebang-command@2.0.0: @@ -25239,12 +24124,6 @@ snapshots: slash@4.0.0: {} - slice-ansi@4.0.0: - dependencies: - ansi-styles: 4.3.0 - astral-regex: 2.0.0 - is-fullwidth-code-point: 3.0.0 - smart-buffer@4.2.0: {} socket.io-adapter@2.5.5: @@ -25450,11 +24329,6 @@ snapshots: path-scurry: 1.11.1 rimraf: 5.0.10 - table-layout@4.1.1: - dependencies: - array-back: 6.2.2 - wordwrapjs: 5.1.0 - tapable@2.2.1: {} tar-fs@2.1.1: @@ -25583,10 +24457,6 @@ snapshots: tr46@0.0.3: {} - tr46@5.0.0: - dependencies: - punycode: 2.3.1 - tree-dump@1.0.2(tslib@2.8.1): dependencies: tslib: 2.8.1 @@ -25672,8 +24542,6 @@ snapshots: tslib@2.8.1: {} - tsscmp@1.0.6: {} - tsx@4.19.2: dependencies: esbuild: 0.23.1 @@ -25748,14 +24616,8 @@ snapshots: typescript@5.7.2: {} - typical@4.0.0: {} - - typical@7.3.0: {} - ua-parser-js@0.7.39: {} - ua-parser-js@1.0.39: {} - uc.micro@2.1.0: {} ufo@1.5.4: {} @@ -25830,12 +24692,6 @@ snapshots: v8-compile-cache-lib@3.0.1: {} - v8-to-istanbul@9.3.0: - dependencies: - '@jridgewell/trace-mapping': 0.3.25 - '@types/istanbul-lib-coverage': 2.0.6 - convert-source-map: 2.0.0 - validate-npm-package-license@3.0.4: dependencies: spdx-correct: 3.2.0 @@ -26097,13 +24953,6 @@ snapshots: webidl-conversions@3.0.1: {} - webidl-conversions@7.0.0: {} - - whatwg-url@14.1.0: - dependencies: - tr46: 5.0.0 - webidl-conversions: 7.0.0 - whatwg-url@5.0.0: dependencies: tr46: 0.0.3 @@ -26144,8 +24993,6 @@ snapshots: word-wrap@1.2.5: {} - wordwrapjs@5.1.0: {} - workerpool@6.5.1: {} wrap-ansi@6.2.0: @@ -26252,8 +25099,6 @@ snapshots: buffer-crc32: 0.2.13 fd-slicer: 1.1.0 - ylru@1.4.0: {} - yn@3.1.1: {} yocto-queue@0.1.0: {} diff --git a/sdk/batch/batch-rest/CHANGELOG.md b/sdk/batch/batch-rest/CHANGELOG.md index ee113ce358b8..0e51ed856a7c 100644 --- a/sdk/batch/batch-rest/CHANGELOG.md +++ b/sdk/batch/batch-rest/CHANGELOG.md @@ -1,13 +1,7 @@ # Release History - -## 1.0.0-beta.2 (2024-11-07) - -### Features Added - -- Update API version to `2024-07-01.20.0` for Azure Batch service. - -## 1.0.0-beta.1 (2024-08-07) + +## 1.0.0 (2024-12-17) ### Features Added -- This is the initial beta release for the Azure Batch SDK, which is a common API supporting Azure Batch services. +The package of @azure-rest/batch is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). diff --git a/sdk/batch/batch-rest/MigrationGuide.md b/sdk/batch/batch-rest/MigrationGuide.md deleted file mode 100644 index 789975107c46..000000000000 --- a/sdk/batch/batch-rest/MigrationGuide.md +++ /dev/null @@ -1,265 +0,0 @@ -# Guide for migrating to `@azure-rest/batch` from `@azure/batch` - -This guide is intended to assist customers in migrating to `@azure-rest/batch` from the legacy `@azure/batch` package. It will focus on side-by-side comparisons of similar operations between the two packages. - -Familiarity with the legacy client library is assumed. For those new to the Azure Batch JavaScript client library, please refer to the [README](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/batch/batch-rest/README.md) and [samples](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/batch/batch-rest/samples) of `@azure-rest/batch` instead of this guide. - -## Table of Contents - -- [Migration Benefits](#migration-benefits) -- [Constructing the Clients](#constructing-the-clients) - - [Authenticate with Shared Key Credentials](#authenticate-with-shared-key-credentials) - - [Authenticate with Microsoft Entra ID](#authenticate-with-microsoft-entra-id) -- [Operation Response Differences](#operation-response-differences) -- [Error Handling](#error-handling) -- [More Examples](#more-examples) - - [Create Pools](#create-pools) - - [Create Jobs](#create-jobs) - - [Submit Tasks](#submit-tasks) - -## Migration Benefits - -- Reduced package size: `@azure-rest/batch` is a [REST client](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md), which is more lightweight compared to the `@azure/batch` package. It takes advantage of TypeScript type inferences and reduces bundle size when used in a browser environment. For more information, please see this [doc](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md) and our introduction [blog](https://devblogs.microsoft.com/azure-sdk/azure-rest-libraries-for-javascript/). - -- Embrace the latest Azure JavaScript SDK ecosystem: Works with [`@azure/identity`](https://www.npmjs.com/package/@azure/identity) for simpler and more secure authentication. Also leverages common paging and logging utilities used by all REST clients. - -- Get the latest features of the Azure Batch service: The `@azure/batch` package is scheduled for deprecation and may not support new features and API versions of the service as they become available. - -## Constructing the Clients - -### Authenticate with Shared Key Credentials - -Both `@azure/batch` and `@azure-rest/batch` support shared key authentication. - -Previously in `@azure/batch`, you could use the `BatchSharedKeyCredentials` class exported from `@azure/batch` to construct a shared key credential, then pass the credential and account endpoint to the `BatchServiceClient` constructor to create a client instance. - -```typescript -import { BatchSharedKeyCredentials, BatchServiceClient } from '@azure/batch'; - -const credential = new BatchSharedKeyCredentials("", ""); -const client = new BatchServiceClient(credential, ""); -``` - -Now in `@azure-rest/batch`, you need to install the [`@azure/core-auth`](https://www.npmjs.com/package/@azure/core-auth) package and use the `AzureNamedKeyCredential` class exported from `@azure/core-auth` to construct a shared key credential. Then, pass the credential and account endpoint to the default exported `createClient` method from `@azure-rest/batch` to create a client instance. - -```typescript -import { AzureNamedKeyCredential } from "@azure/core-auth"; -import createClient from "@azure-rest/batch"; - -const credential = new AzureNamedKeyCredential("", ""); -const client = createClient("", credential); -``` - -### Authenticate with Microsoft Entra ID - -Previously in `@azure/batch`, it only supported the legacy [@azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package, and the browser environment was not supported. The following example uses the `loginWithVmMSI` method exported from `@azure/ms-rest-nodeauth` to authenticate with the Azure Batch service using MSI (Managed Service Identity) based login from a virtual machine created in Azure. - -```typescript -import { BatchServiceClient } from "@azure/batch"; -import { loginWithVmMSI } from "@azure/ms-rest-nodeauth"; - -const credential = await loginWithVmMSI({ - resource: "https://batch.core.windows.net/" -}); -const client = new BatchServiceClient(credential, ""); -``` - -Now in `@azure-rest/batch`, you can pass any of the [credentials from the `@azure/identity` package](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md) to the `createClient` method to make use of your Microsoft Entra ID credentials. In the following sample, it creates an instance of [`DefaultAzureCredential`](https://learn.microsoft.com/javascript/api/@azure/identity/defaultazurecredential) to authenticate with the Azure Batch service. - -```typescript -import { DefaultAzureCredential } from "@azure/identity"; -import createClient from "@azure-rest/batch"; - -const credential = new DefaultAzureCredential(); -const client = createClient("", credential); -``` - -## Operation Response Differences - -Previously in `@azure/batch`, the client operation returned a `Promise` that resolves to the result of the response body JSON. The following example demonstrates how to get a job with the `BatchServiceClient` instance. - -```typescript -const job = await client.job.get(""); -console.log(`Job id: ${job.id}, state: ${job.state}`); -``` - -Now in `@azure-rest/batch`, the client operation returns a `Promise` that resolves to the response object, which contains the response body and the status code. In order to get the response body JSON, you need to first check if the response is unexpected with the `isUnexpected` helper method, then access the response body. The following example demonstrates how to get a job in `@azure-rest/batch`. - -```typescript -import { isUnexpected } from '@azure-rest/batch'; -const response = await client.path("/jobs/{jobId}", "").get(); -if (isUnexpected(response)) { - throw new Error(`Failed to get job: ${response.body.message}`); -} -console.log(`Response status code: ${response.status}`); - -const job = response.body; -console.log(`Job id: ${job.id}, state: ${job.state}`); -``` - -## Error Handling - -Previously in `@azure/batch`, the client operation succeeded only when the service returned the expected HTTP status code, for example `201` for create resource operations or `200` for general HTTP GET requests. Unexpected HTTP status codes would throw a `RestError` from the `@azure/ms-rest-js` package. The following example demonstrates how to handle different errors that might occur in the get pool request. - -```typescript -import { RestError } from "@azure/ms-rest-js"; - -try { - const pool = await client.pool.get(""); - console.log("Get pool success: ", pool) -} catch (error) { - if (error instanceof RestError) { - // Returned HTTP status is not 200 - console.log(`Service returned unexpected status code ${error.statusCode}: ${error.body}`) - } else { - // Other errors like connection errors or other exceptions - console.log("Failed to get pool with error: ", error) - } -} -``` - -Now, for `@azure-rest/batch`, the client operation won't throw errors even when the returned HTTP status code is unexpected. Instead, it exports a helper method `isUnexpected` to help you check if the response is unexpected. The following example demonstrates how to handle different errors that might occur in the get pool request. - -```typescript -try { - const response = await client.path("/pools/{poolId}", "").get(); - if (isUnexpected(response)) { - // Returned HTTP status is not 200 - console.log(`Service returned unexpected status code ${response.status}: ${response.body}`) - } { - console.log("Get pool success: ", response.body) - } -} catch (error) { - // Other errors like connection errors or other exceptions - console.log("Failed to get pool with error: ", error) -} -``` - -## More Examples - -### Create Pools - -Previously in `@azure/batch`, you could use the `BatchServiceClient` instance to create a pool with the `pool.add` method. The following example demonstrates how to create a pool with the `BatchServiceClient` instance. - -```typescript -import { BatchServiceModels } from "@azure/batch"; -import { RestError } from "@azure/ms-rest-js"; -const poolParams: BatchServiceModels.PoolAddParameter = { - id: "", - vmSize: "Standard_D1_v2", - virtualMachineConfiguration: { - nodeAgentSKUId: "batch.node.windows amd64", - imageReference: { - publisher: "microsoftwindowsserver", - offer: "windowsserver", - sku: "2022-datacenter", - }, - }, - networkConfiguration: { - enableAcceleratedNetworking: true, - }, - targetDedicatedNodes: 1, -}; -const result = await client.pool.add(poolParams); -console.log("Pool created"); -``` - -Now in `@azure-rest/batch`, you can use the `path` method of the client instance to send a POST request to the `/pools` endpoint with the pool parameters. Note that the `CreatePoolParameters` interface has a `body` field to hold the request body and a `contentType` field to specify the content type of the request. - -```typescript -import { CreatePoolParameters, isUnexpected } from "@azure-rest/batch" - -const poolParams: CreatePoolParameters = { - body: { - id: "", - vmSize: "Standard_D1_v2", - virtualMachineConfiguration: { - nodeAgentSKUId: "batch.node.windows amd64", - imageReference: { - publisher: "microsoftwindowsserver", - offer: "windowsserver", - sku: "2022-datacenter", - }, - }, - networkConfiguration: { - enableAcceleratedNetworking: true, - }, - targetDedicatedNodes: 1, - }, - contentType: "application/json; odata=minimalmetadata", -}; - -const result = await client.path("/pools").post(poolParams); -if (isUnexpected(result)) { - throw new Error(`Failed to create pool: ${result.body.message}`); -} -console.log("Pool created"); -``` - -## Create jobs - -Previously in `@azure/batch`, you could use the `BatchServiceClient` instance to create a job with the `job.add` method. The following example demonstrates how to create a job with the `BatchServiceClient` instance. - -```typescript -import { BatchServiceModels } from "@azure/batch" -const jobAddParam: BatchServiceModels.JobAddParameter = { - id: "", - poolInfo: { poolId: "" }, -}; -const result = await client.job.add(JobAddParameter); -console.log("Job created"); -``` - -Now in `@azure-rest/batch`, you can use the `path` method of the client instance to send a POST request to the `/jobs` endpoint with the job parameters. - -```typescript -import { CreateJobParameters, isUnexpected } from "@azure-rest/batch" - -const jobAddParam: CreateJobParameters = { - body: { - id: "", - poolInfo: { poolId: "" }, - }, - contentType: "application/json; odata=minimalmetadata", -}; - -const result = await client.path("/jobs").post(jobAddParam); -if (isUnexpected(result)) { - throw new Error(`Failed to create job: ${result.body.message}`); -} -console.log(`Job created`); -``` - -## Submit tasks - -Previously in `@azure/batch`, you could use the `BatchServiceClient` instance to submit a task to a job with the `task.add` method. The following example demonstrates how to submit a task with the `BatchServiceClient` instance. - -```typescript -import { BatchServiceModels } from "@azure/batch" -const taskAddParam: BatchServiceModels.TaskAddParameter = { - id: "", - commandLine: "cmd /c echo hello", -}; -const result = await client.task.add("", taskAddParam); -console.log("Task submitted"); -``` - -Now in `@azure-rest/batch`, you can use the `path` method of the client instance to send a POST request to the `/jobs/{jobId}/tasks` endpoint with the task parameters. - -```typescript -import { CreateTaskParameters, isUnexpected } from "@azure-rest/batch" - -const taskAddParam: CreateTaskParameters = { - body: { - id: "", - commandLine: "cmd /c echo hello", - }, - contentType: "application/json; odata=minimalmetadata", -}; - -const result = await client.path("/jobs/{jobId}/tasks", "").post(taskAddParam); -if (isUnexpected(result)) { - throw new Error(`Failed to submit task: ${result.body.message}`); -} -console.log("Task submitted"); -``` diff --git a/sdk/batch/batch-rest/README.md b/sdk/batch/batch-rest/README.md index e8bd2d12248b..ac8c4240367e 100644 --- a/sdk/batch/batch-rest/README.md +++ b/sdk/batch/batch-rest/README.md @@ -6,8 +6,9 @@ Azure Batch provides Cloud-scale job scheduling and compute management. Key links: +- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/batch/batch-rest) - [Package (NPM)](https://www.npmjs.com/package/@azure-rest/batch) -- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure-rest/batch) +- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure-rest/batch?view=azure-node-preview) ## Getting started @@ -21,7 +22,7 @@ Key links: ### Install the `@azure-rest/batch` package -Install the Azure Batch REST client library for JavaScript with `npm`: +Install the Azure Batch REST client REST client library for JavaScript with `npm`: ```bash npm install @azure-rest/batch @@ -29,38 +30,16 @@ npm install @azure-rest/batch ### Create and authenticate a `BatchClient` -Azure batch supports authentication either via Microsoft Entra ID or Shared Key. - -- [Microsoft Entra ID](#microsoft-entra-id) -- [Shared Key](#shared-key) - -#### Microsoft Entra ID - -To use an [Microsoft Entra ID token credential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token), +To use an [Azure Active Directory (AAD) token credential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token), provide an instance of the desired credential type obtained from the [@azure/identity](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) library. -To authenticate with Microsoft Entra ID, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity) +To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity) After setup, you can choose which type of [credential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) from `@azure/identity` to use. As an example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential) can be used to authenticate the client. -Set the values of the client ID, tenant ID, and client secret of the Microsoft Entra ID application as environment variables: -AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET - -#### Shared Key - -To use shared key to authenticate, you must first `npm` install [`@azure/core-auth`](https://www.npmjs.com/package/@azure/core-auth), then provide the account name and account key to construct the an `AzureNamedKeyCredential` credential from `@azure/core-auth` - -```typescript -import { AzureNamedKeyCredential } from "@azure/core-auth"; -import createClient from "@azure-rest/batch"; - -const credential = new AzureNamedKeyCredential("", ""); -const batchClient = createClient("", credential); -``` - ## Troubleshooting ### Logging diff --git a/sdk/batch/batch-rest/api-extractor.json b/sdk/batch/batch-rest/api-extractor.json index 66e454b87cac..92f88cfb806c 100644 --- a/sdk/batch/batch-rest/api-extractor.json +++ b/sdk/batch/batch-rest/api-extractor.json @@ -1,18 +1,31 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "./dist/esm/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/batch.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/batch/batch-rest/assets.json b/sdk/batch/batch-rest/assets.json deleted file mode 100644 index 49ae52aa555c..000000000000 --- a/sdk/batch/batch-rest/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/batch/batch-rest", - "Tag": "js/batch/batch-rest_f23a4f3e48" -} diff --git a/sdk/batch/batch-rest/eslint.config.mjs b/sdk/batch/batch-rest/eslint.config.mjs index d7dafe8e8d4d..113bdc3eaf5f 100644 --- a/sdk/batch/batch-rest/eslint.config.mjs +++ b/sdk/batch/batch-rest/eslint.config.mjs @@ -1,10 +1,17 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default azsdkEslint.config([ +export default [ + ...azsdkEslint.configs.recommended, { rules: { - "tsdoc/syntax": "warn", "@azure/azure-sdk/ts-modules-only-named": "warn", - }, - }, -]); + "@azure/azure-sdk/ts-apiextractor-json-types": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "@azure/azure-sdk/ts-package-json-module": "off", + "@azure/azure-sdk/ts-package-json-files-required": "off", + "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", + "tsdoc/syntax": "warn" + } + } +]; diff --git a/sdk/batch/batch-rest/generated/batchClient.ts b/sdk/batch/batch-rest/generated/batchClient.ts deleted file mode 100644 index a9c83a85ea36..000000000000 --- a/sdk/batch/batch-rest/generated/batchClient.ts +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { getClient, ClientOptions } from "@azure-rest/core-client"; -import { logger } from "./logger.js"; -import { TokenCredential } from "@azure/core-auth"; -import { BatchClient } from "./clientDefinitions.js"; - -/** The optional parameters for the client */ -export interface BatchClientOptions extends ClientOptions { - /** The api version option of the client */ - apiVersion?: string; -} - -/** - * Initialize a new instance of `BatchClient` - * @param endpointParam - Batch account endpoint (for example: https://batchaccount.eastus2.batch.azure.com). - * @param credentials - uniquely identify client credential - * @param options - the parameter for all optional parameters - */ -export default function createClient( - endpointParam: string, - credentials: TokenCredential, - { apiVersion = "2024-07-01.20.0", ...options }: BatchClientOptions = {}, -): BatchClient { - const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}`; - const userAgentInfo = `azsdk-js-batch-rest/1.0.0-beta.1`; - const userAgentPrefix = - options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` - : `${userAgentInfo}`; - options = { - ...options, - userAgentOptions: { - userAgentPrefix, - }, - loggingOptions: { - logger: options.loggingOptions?.logger ?? logger.info, - }, - telemetryOptions: { - clientRequestIdHeaderName: - options.telemetryOptions?.clientRequestIdHeaderName ?? - "client-request-id", - }, - credentials: { - scopes: options.credentials?.scopes ?? [ - "https://batch.core.windows.net//.default", - ], - }, - }; - const client = getClient(endpointUrl, credentials, options) as BatchClient; - - client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); - client.pipeline.addPolicy({ - name: "ClientApiVersionPolicy", - sendRequest: (req, next) => { - // Use the apiVersion defined in request url directly - // Append one if there is no apiVersion and we have one at client options - const url = new URL(req.url); - if (!url.searchParams.get("api-version") && apiVersion) { - req.url = `${req.url}${ - Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" - }api-version=${apiVersion}`; - } - - return next(req); - }, - }); - - return client; -} diff --git a/sdk/batch/batch-rest/generated/clientDefinitions.ts b/sdk/batch/batch-rest/generated/clientDefinitions.ts deleted file mode 100644 index 4a122daf2aba..000000000000 --- a/sdk/batch/batch-rest/generated/clientDefinitions.ts +++ /dev/null @@ -1,1217 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { - ListApplicationsParameters, - GetApplicationParameters, - ListPoolUsageMetricsParameters, - CreatePoolParameters, - ListPoolsParameters, - DeletePoolParameters, - PoolExistsParameters, - GetPoolParameters, - UpdatePoolParameters, - DisablePoolAutoScaleParameters, - EnablePoolAutoScaleParameters, - EvaluatePoolAutoScaleParameters, - ResizePoolParameters, - StopPoolResizeParameters, - ReplacePoolPropertiesParameters, - RemoveNodesParameters, - ListSupportedImagesParameters, - ListPoolNodeCountsParameters, - DeleteJobParameters, - GetJobParameters, - UpdateJobParameters, - ReplaceJobParameters, - DisableJobParameters, - EnableJobParameters, - TerminateJobParameters, - CreateJobParameters, - ListJobsParameters, - ListJobsFromScheduleParameters, - ListJobPreparationAndReleaseTaskStatusParameters, - GetJobTaskCountsParameters, - JobScheduleExistsParameters, - DeleteJobScheduleParameters, - GetJobScheduleParameters, - UpdateJobScheduleParameters, - ReplaceJobScheduleParameters, - DisableJobScheduleParameters, - EnableJobScheduleParameters, - TerminateJobScheduleParameters, - CreateJobScheduleParameters, - ListJobSchedulesParameters, - CreateTaskParameters, - ListTasksParameters, - CreateTaskCollectionParameters, - DeleteTaskParameters, - GetTaskParameters, - ReplaceTaskParameters, - ListSubTasksParameters, - TerminateTaskParameters, - ReactivateTaskParameters, - DeleteTaskFileParameters, - GetTaskFileParameters, - GetTaskFilePropertiesParameters, - ListTaskFilesParameters, - CreateNodeUserParameters, - DeleteNodeUserParameters, - ReplaceNodeUserParameters, - GetNodeParameters, - RebootNodeParameters, - StartNodeParameters, - DeallocateNodeParameters, - ReimageNodeParameters, - DisableNodeSchedulingParameters, - EnableNodeSchedulingParameters, - GetNodeRemoteLoginSettingsParameters, - UploadNodeLogsParameters, - ListNodesParameters, - GetNodeExtensionParameters, - ListNodeExtensionsParameters, - DeleteNodeFileParameters, - GetNodeFileParameters, - GetNodeFilePropertiesParameters, - ListNodeFilesParameters, -} from "./parameters.js"; -import { - ListApplications200Response, - ListApplicationsDefaultResponse, - GetApplication200Response, - GetApplicationDefaultResponse, - ListPoolUsageMetrics200Response, - ListPoolUsageMetricsDefaultResponse, - CreatePool201Response, - CreatePoolDefaultResponse, - ListPools200Response, - ListPoolsDefaultResponse, - DeletePool202Response, - DeletePoolDefaultResponse, - PoolExists200Response, - PoolExists404Response, - PoolExistsDefaultResponse, - GetPool200Response, - GetPoolDefaultResponse, - UpdatePool200Response, - UpdatePoolDefaultResponse, - DisablePoolAutoScale200Response, - DisablePoolAutoScaleDefaultResponse, - EnablePoolAutoScale200Response, - EnablePoolAutoScaleDefaultResponse, - EvaluatePoolAutoScale200Response, - EvaluatePoolAutoScaleDefaultResponse, - ResizePool202Response, - ResizePoolDefaultResponse, - StopPoolResize202Response, - StopPoolResizeDefaultResponse, - ReplacePoolProperties204Response, - ReplacePoolPropertiesDefaultResponse, - RemoveNodes202Response, - RemoveNodesDefaultResponse, - ListSupportedImages200Response, - ListSupportedImagesDefaultResponse, - ListPoolNodeCounts200Response, - ListPoolNodeCountsDefaultResponse, - DeleteJob202Response, - DeleteJobDefaultResponse, - GetJob200Response, - GetJobDefaultResponse, - UpdateJob200Response, - UpdateJobDefaultResponse, - ReplaceJob200Response, - ReplaceJobDefaultResponse, - DisableJob202Response, - DisableJobDefaultResponse, - EnableJob202Response, - EnableJobDefaultResponse, - TerminateJob202Response, - TerminateJobDefaultResponse, - CreateJob201Response, - CreateJobDefaultResponse, - ListJobs200Response, - ListJobsDefaultResponse, - ListJobsFromSchedule200Response, - ListJobsFromScheduleDefaultResponse, - ListJobPreparationAndReleaseTaskStatus200Response, - ListJobPreparationAndReleaseTaskStatusDefaultResponse, - GetJobTaskCounts200Response, - GetJobTaskCountsDefaultResponse, - JobScheduleExists200Response, - JobScheduleExists404Response, - JobScheduleExistsDefaultResponse, - DeleteJobSchedule202Response, - DeleteJobScheduleDefaultResponse, - GetJobSchedule200Response, - GetJobScheduleDefaultResponse, - UpdateJobSchedule200Response, - UpdateJobScheduleDefaultResponse, - ReplaceJobSchedule200Response, - ReplaceJobScheduleDefaultResponse, - DisableJobSchedule204Response, - DisableJobScheduleDefaultResponse, - EnableJobSchedule204Response, - EnableJobScheduleDefaultResponse, - TerminateJobSchedule202Response, - TerminateJobScheduleDefaultResponse, - CreateJobSchedule201Response, - CreateJobScheduleDefaultResponse, - ListJobSchedules200Response, - ListJobSchedulesDefaultResponse, - CreateTask201Response, - CreateTaskDefaultResponse, - ListTasks200Response, - ListTasksDefaultResponse, - CreateTaskCollection200Response, - CreateTaskCollectionDefaultResponse, - DeleteTask200Response, - DeleteTaskDefaultResponse, - GetTask200Response, - GetTaskDefaultResponse, - ReplaceTask200Response, - ReplaceTaskDefaultResponse, - ListSubTasks200Response, - ListSubTasksDefaultResponse, - TerminateTask204Response, - TerminateTaskDefaultResponse, - ReactivateTask204Response, - ReactivateTaskDefaultResponse, - DeleteTaskFile200Response, - DeleteTaskFileDefaultResponse, - GetTaskFile200Response, - GetTaskFileDefaultResponse, - GetTaskFileProperties200Response, - GetTaskFilePropertiesDefaultResponse, - ListTaskFiles200Response, - ListTaskFilesDefaultResponse, - CreateNodeUser201Response, - CreateNodeUserDefaultResponse, - DeleteNodeUser200Response, - DeleteNodeUserDefaultResponse, - ReplaceNodeUser200Response, - ReplaceNodeUserDefaultResponse, - GetNode200Response, - GetNodeDefaultResponse, - RebootNode202Response, - RebootNodeDefaultResponse, - StartNode202Response, - StartNodeDefaultResponse, - DeallocateNode202Response, - DeallocateNodeDefaultResponse, - ReimageNode202Response, - ReimageNodeDefaultResponse, - DisableNodeScheduling200Response, - DisableNodeSchedulingDefaultResponse, - EnableNodeScheduling200Response, - EnableNodeSchedulingDefaultResponse, - GetNodeRemoteLoginSettings200Response, - GetNodeRemoteLoginSettingsDefaultResponse, - UploadNodeLogs200Response, - UploadNodeLogsDefaultResponse, - ListNodes200Response, - ListNodesDefaultResponse, - GetNodeExtension200Response, - GetNodeExtensionDefaultResponse, - ListNodeExtensions200Response, - ListNodeExtensionsDefaultResponse, - DeleteNodeFile200Response, - DeleteNodeFileDefaultResponse, - GetNodeFile200Response, - GetNodeFileDefaultResponse, - GetNodeFileProperties200Response, - GetNodeFilePropertiesDefaultResponse, - ListNodeFiles200Response, - ListNodeFilesDefaultResponse, -} from "./responses.js"; -import { Client, StreamableMethod } from "@azure-rest/core-client"; - -export interface ListApplications { - /** - * This operation returns only Applications and versions that are available for - * use on Compute Nodes; that is, that can be used in an Package reference. For - * administrator information about applications and versions that are not yet - * available to Compute Nodes, use the Azure portal or the Azure Resource Manager - * API. - */ - get( - options?: ListApplicationsParameters, - ): StreamableMethod< - ListApplications200Response | ListApplicationsDefaultResponse - >; -} - -export interface GetApplication { - /** - * This operation returns only Applications and versions that are available for - * use on Compute Nodes; that is, that can be used in an Package reference. For - * administrator information about Applications and versions that are not yet - * available to Compute Nodes, use the Azure portal or the Azure Resource Manager - * API. - */ - get( - options?: GetApplicationParameters, - ): StreamableMethod< - GetApplication200Response | GetApplicationDefaultResponse - >; -} - -export interface ListPoolUsageMetrics { - /** - * If you do not specify a $filter clause including a poolId, the response - * includes all Pools that existed in the Account in the time range of the - * returned aggregation intervals. If you do not specify a $filter clause - * including a startTime or endTime these filters default to the start and end - * times of the last aggregation interval currently available; that is, only the - * last aggregation interval is returned. - */ - get( - options?: ListPoolUsageMetricsParameters, - ): StreamableMethod< - ListPoolUsageMetrics200Response | ListPoolUsageMetricsDefaultResponse - >; -} - -export interface CreatePool { - /** - * When naming Pools, avoid including sensitive information such as user names or - * secret project names. This information may appear in telemetry logs accessible - * to Microsoft Support engineers. - */ - post( - options: CreatePoolParameters, - ): StreamableMethod; - /** Lists all of the Pools which be mounted. */ - get( - options?: ListPoolsParameters, - ): StreamableMethod; -} - -export interface DeletePool { - /** - * When you request that a Pool be deleted, the following actions occur: the Pool - * state is set to deleting; any ongoing resize operation on the Pool are stopped; - * the Batch service starts resizing the Pool to zero Compute Nodes; any Tasks - * running on existing Compute Nodes are terminated and requeued (as if a resize - * Pool operation had been requested with the default requeue option); finally, - * the Pool is removed from the system. Because running Tasks are requeued, the - * user can rerun these Tasks by updating their Job to target a different Pool. - * The Tasks can then run on the new Pool. If you want to override the requeue - * behavior, then you should call resize Pool explicitly to shrink the Pool to - * zero size before deleting the Pool. If you call an Update, Patch or Delete API - * on a Pool in the deleting state, it will fail with HTTP status code 409 with - * error code PoolBeingDeleted. - */ - delete( - options?: DeletePoolParameters, - ): StreamableMethod; - /** Gets basic properties of a Pool. */ - head( - options?: PoolExistsParameters, - ): StreamableMethod< - PoolExists200Response | PoolExists404Response | PoolExistsDefaultResponse - >; - /** Gets information about the specified Pool. */ - get( - options?: GetPoolParameters, - ): StreamableMethod; - /** - * This only replaces the Pool properties specified in the request. For example, - * if the Pool has a StartTask associated with it, and a request does not specify - * a StartTask element, then the Pool keeps the existing StartTask. - */ - patch( - options: UpdatePoolParameters, - ): StreamableMethod; -} - -export interface DisablePoolAutoScale { - /** Disables automatic scaling for a Pool. */ - post( - options?: DisablePoolAutoScaleParameters, - ): StreamableMethod< - DisablePoolAutoScale200Response | DisablePoolAutoScaleDefaultResponse - >; -} - -export interface EnablePoolAutoScale { - /** - * You cannot enable automatic scaling on a Pool if a resize operation is in - * progress on the Pool. If automatic scaling of the Pool is currently disabled, - * you must specify a valid autoscale formula as part of the request. If automatic - * scaling of the Pool is already enabled, you may specify a new autoscale formula - * and/or a new evaluation interval. You cannot call this API for the same Pool - * more than once every 30 seconds. - */ - post( - options: EnablePoolAutoScaleParameters, - ): StreamableMethod< - EnablePoolAutoScale200Response | EnablePoolAutoScaleDefaultResponse - >; -} - -export interface EvaluatePoolAutoScale { - /** - * This API is primarily for validating an autoscale formula, as it simply returns - * the result without applying the formula to the Pool. The Pool must have auto - * scaling enabled in order to evaluate a formula. - */ - post( - options: EvaluatePoolAutoScaleParameters, - ): StreamableMethod< - EvaluatePoolAutoScale200Response | EvaluatePoolAutoScaleDefaultResponse - >; -} - -export interface ResizePool { - /** - * You can only resize a Pool when its allocation state is steady. If the Pool is - * already resizing, the request fails with status code 409. When you resize a - * Pool, the Pool's allocation state changes from steady to resizing. You cannot - * resize Pools which are configured for automatic scaling. If you try to do this, - * the Batch service returns an error 409. If you resize a Pool downwards, the - * Batch service chooses which Compute Nodes to remove. To remove specific Compute - * Nodes, use the Pool remove Compute Nodes API instead. - */ - post( - options: ResizePoolParameters, - ): StreamableMethod; -} - -export interface StopPoolResize { - /** - * This does not restore the Pool to its previous state before the resize - * operation: it only stops any further changes being made, and the Pool maintains - * its current state. After stopping, the Pool stabilizes at the number of Compute - * Nodes it was at when the stop operation was done. During the stop operation, - * the Pool allocation state changes first to stopping and then to steady. A - * resize operation need not be an explicit resize Pool request; this API can also - * be used to halt the initial sizing of the Pool when it is created. - */ - post( - options?: StopPoolResizeParameters, - ): StreamableMethod< - StopPoolResize202Response | StopPoolResizeDefaultResponse - >; -} - -export interface ReplacePoolProperties { - /** - * This fully replaces all the updatable properties of the Pool. For example, if - * the Pool has a StartTask associated with it and if StartTask is not specified - * with this request, then the Batch service will remove the existing StartTask. - */ - post( - options: ReplacePoolPropertiesParameters, - ): StreamableMethod< - ReplacePoolProperties204Response | ReplacePoolPropertiesDefaultResponse - >; -} - -export interface RemoveNodes { - /** - * This operation can only run when the allocation state of the Pool is steady. - * When this operation runs, the allocation state changes from steady to resizing. - * Each request may remove up to 100 nodes. - */ - post( - options: RemoveNodesParameters, - ): StreamableMethod; -} - -export interface ListSupportedImages { - /** Lists all Virtual Machine Images supported by the Azure Batch service. */ - get( - options?: ListSupportedImagesParameters, - ): StreamableMethod< - ListSupportedImages200Response | ListSupportedImagesDefaultResponse - >; -} - -export interface ListPoolNodeCounts { - /** - * Gets the number of Compute Nodes in each state, grouped by Pool. Note that the - * numbers returned may not always be up to date. If you need exact node counts, - * use a list query. - */ - get( - options?: ListPoolNodeCountsParameters, - ): StreamableMethod< - ListPoolNodeCounts200Response | ListPoolNodeCountsDefaultResponse - >; -} - -export interface DeleteJob { - /** - * Deleting a Job also deletes all Tasks that are part of that Job, and all Job - * statistics. This also overrides the retention period for Task data; that is, if - * the Job contains Tasks which are still retained on Compute Nodes, the Batch - * services deletes those Tasks' working directories and all their contents. When - * a Delete Job request is received, the Batch service sets the Job to the - * deleting state. All update operations on a Job that is in deleting state will - * fail with status code 409 (Conflict), with additional information indicating - * that the Job is being deleted. - */ - delete( - options?: DeleteJobParameters, - ): StreamableMethod; - /** Gets information about the specified Job. */ - get( - options?: GetJobParameters, - ): StreamableMethod; - /** - * This replaces only the Job properties specified in the request. For example, if - * the Job has constraints, and a request does not specify the constraints - * element, then the Job keeps the existing constraints. - */ - patch( - options: UpdateJobParameters, - ): StreamableMethod; - /** - * This fully replaces all the updatable properties of the Job. For example, if - * the Job has constraints associated with it and if constraints is not specified - * with this request, then the Batch service will remove the existing constraints. - */ - put( - options: ReplaceJobParameters, - ): StreamableMethod; -} - -export interface DisableJob { - /** - * The Batch Service immediately moves the Job to the disabling state. Batch then - * uses the disableTasks parameter to determine what to do with the currently - * running Tasks of the Job. The Job remains in the disabling state until the - * disable operation is completed and all Tasks have been dealt with according to - * the disableTasks option; the Job then moves to the disabled state. No new Tasks - * are started under the Job until it moves back to active state. If you try to - * disable a Job that is in any state other than active, disabling, or disabled, - * the request fails with status code 409. - */ - post( - options: DisableJobParameters, - ): StreamableMethod; -} - -export interface EnableJob { - /** - * When you call this API, the Batch service sets a disabled Job to the enabling - * state. After the this operation is completed, the Job moves to the active - * state, and scheduling of new Tasks under the Job resumes. The Batch service - * does not allow a Task to remain in the active state for more than 180 days. - * Therefore, if you enable a Job containing active Tasks which were added more - * than 180 days ago, those Tasks will not run. - */ - post( - options?: EnableJobParameters, - ): StreamableMethod; -} - -export interface TerminateJob { - /** - * When a Terminate Job request is received, the Batch service sets the Job to the - * terminating state. The Batch service then terminates any running Tasks - * associated with the Job and runs any required Job release Tasks. Then the Job - * moves into the completed state. If there are any Tasks in the Job in the active - * state, they will remain in the active state. Once a Job is terminated, new - * Tasks cannot be added and any remaining active Tasks will not be scheduled. - */ - post( - options: TerminateJobParameters, - ): StreamableMethod; -} - -export interface CreateJob { - /** - * The Batch service supports two ways to control the work done as part of a Job. - * In the first approach, the user specifies a Job Manager Task. The Batch service - * launches this Task when it is ready to start the Job. The Job Manager Task - * controls all other Tasks that run under this Job, by using the Task APIs. In - * the second approach, the user directly controls the execution of Tasks under an - * active Job, by using the Task APIs. Also note: when naming Jobs, avoid - * including sensitive information such as user names or secret project names. - * This information may appear in telemetry logs accessible to Microsoft Support - * engineers. - */ - post( - options: CreateJobParameters, - ): StreamableMethod; - /** Lists all of the Jobs in the specified Account. */ - get( - options?: ListJobsParameters, - ): StreamableMethod; -} - -export interface ListJobsFromSchedule { - /** Lists the Jobs that have been created under the specified Job Schedule. */ - get( - options?: ListJobsFromScheduleParameters, - ): StreamableMethod< - ListJobsFromSchedule200Response | ListJobsFromScheduleDefaultResponse - >; -} - -export interface ListJobPreparationAndReleaseTaskStatus { - /** - * This API returns the Job Preparation and Job Release Task status on all Compute - * Nodes that have run the Job Preparation or Job Release Task. This includes - * Compute Nodes which have since been removed from the Pool. If this API is - * invoked on a Job which has no Job Preparation or Job Release Task, the Batch - * service returns HTTP status code 409 (Conflict) with an error code of - * JobPreparationTaskNotSpecified. - */ - get( - options?: ListJobPreparationAndReleaseTaskStatusParameters, - ): StreamableMethod< - | ListJobPreparationAndReleaseTaskStatus200Response - | ListJobPreparationAndReleaseTaskStatusDefaultResponse - >; -} - -export interface GetJobTaskCounts { - /** - * Task counts provide a count of the Tasks by active, running or completed Task - * state, and a count of Tasks which succeeded or failed. Tasks in the preparing - * state are counted as running. Note that the numbers returned may not always be - * up to date. If you need exact task counts, use a list query. - */ - get( - options?: GetJobTaskCountsParameters, - ): StreamableMethod< - GetJobTaskCounts200Response | GetJobTaskCountsDefaultResponse - >; -} - -export interface JobScheduleExists { - /** Checks the specified Job Schedule exists. */ - head( - options?: JobScheduleExistsParameters, - ): StreamableMethod< - | JobScheduleExists200Response - | JobScheduleExists404Response - | JobScheduleExistsDefaultResponse - >; - /** - * When you delete a Job Schedule, this also deletes all Jobs and Tasks under that - * schedule. When Tasks are deleted, all the files in their working directories on - * the Compute Nodes are also deleted (the retention period is ignored). The Job - * Schedule statistics are no longer accessible once the Job Schedule is deleted, - * though they are still counted towards Account lifetime statistics. - */ - delete( - options?: DeleteJobScheduleParameters, - ): StreamableMethod< - DeleteJobSchedule202Response | DeleteJobScheduleDefaultResponse - >; - /** Gets information about the specified Job Schedule. */ - get( - options?: GetJobScheduleParameters, - ): StreamableMethod< - GetJobSchedule200Response | GetJobScheduleDefaultResponse - >; - /** - * This replaces only the Job Schedule properties specified in the request. For - * example, if the schedule property is not specified with this request, then the - * Batch service will keep the existing schedule. Changes to a Job Schedule only - * impact Jobs created by the schedule after the update has taken place; currently - * running Jobs are unaffected. - */ - patch( - options: UpdateJobScheduleParameters, - ): StreamableMethod< - UpdateJobSchedule200Response | UpdateJobScheduleDefaultResponse - >; - /** - * This fully replaces all the updatable properties of the Job Schedule. For - * example, if the schedule property is not specified with this request, then the - * Batch service will remove the existing schedule. Changes to a Job Schedule only - * impact Jobs created by the schedule after the update has taken place; currently - * running Jobs are unaffected. - */ - put( - options: ReplaceJobScheduleParameters, - ): StreamableMethod< - ReplaceJobSchedule200Response | ReplaceJobScheduleDefaultResponse - >; -} - -export interface DisableJobSchedule { - /** No new Jobs will be created until the Job Schedule is enabled again. */ - post( - options?: DisableJobScheduleParameters, - ): StreamableMethod< - DisableJobSchedule204Response | DisableJobScheduleDefaultResponse - >; -} - -export interface EnableJobSchedule { - /** Enables a Job Schedule. */ - post( - options?: EnableJobScheduleParameters, - ): StreamableMethod< - EnableJobSchedule204Response | EnableJobScheduleDefaultResponse - >; -} - -export interface TerminateJobSchedule { - /** Terminates a Job Schedule. */ - post( - options?: TerminateJobScheduleParameters, - ): StreamableMethod< - TerminateJobSchedule202Response | TerminateJobScheduleDefaultResponse - >; -} - -export interface CreateJobSchedule { - /** Creates a Job Schedule to the specified Account. */ - post( - options: CreateJobScheduleParameters, - ): StreamableMethod< - CreateJobSchedule201Response | CreateJobScheduleDefaultResponse - >; - /** Lists all of the Job Schedules in the specified Account. */ - get( - options?: ListJobSchedulesParameters, - ): StreamableMethod< - ListJobSchedules200Response | ListJobSchedulesDefaultResponse - >; -} - -export interface CreateTask { - /** - * The maximum lifetime of a Task from addition to completion is 180 days. If a - * Task has not completed within 180 days of being added it will be terminated by - * the Batch service and left in whatever state it was in at that time. - */ - post( - options: CreateTaskParameters, - ): StreamableMethod; - /** - * For multi-instance Tasks, information such as affinityId, executionInfo and - * nodeInfo refer to the primary Task. Use the list subtasks API to retrieve - * information about subtasks. - */ - get( - options?: ListTasksParameters, - ): StreamableMethod; -} - -export interface CreateTaskCollection { - /** - * Note that each Task must have a unique ID. The Batch service may not return the - * results for each Task in the same order the Tasks were submitted in this - * request. If the server times out or the connection is closed during the - * request, the request may have been partially or fully processed, or not at all. - * In such cases, the user should re-issue the request. Note that it is up to the - * user to correctly handle failures when re-issuing a request. For example, you - * should use the same Task IDs during a retry so that if the prior operation - * succeeded, the retry will not create extra Tasks unexpectedly. If the response - * contains any Tasks which failed to add, a client can retry the request. In a - * retry, it is most efficient to resubmit only Tasks that failed to add, and to - * omit Tasks that were successfully added on the first attempt. The maximum - * lifetime of a Task from addition to completion is 180 days. If a Task has not - * completed within 180 days of being added it will be terminated by the Batch - * service and left in whatever state it was in at that time. - */ - post( - options: CreateTaskCollectionParameters, - ): StreamableMethod< - CreateTaskCollection200Response | CreateTaskCollectionDefaultResponse - >; -} - -export interface DeleteTask { - /** - * When a Task is deleted, all of the files in its directory on the Compute Node - * where it ran are also deleted (regardless of the retention time). For - * multi-instance Tasks, the delete Task operation applies synchronously to the - * primary task; subtasks and their files are then deleted asynchronously in the - * background. - */ - delete( - options?: DeleteTaskParameters, - ): StreamableMethod; - /** - * For multi-instance Tasks, information such as affinityId, executionInfo and - * nodeInfo refer to the primary Task. Use the list subtasks API to retrieve - * information about subtasks. - */ - get( - options?: GetTaskParameters, - ): StreamableMethod; - /** Updates the properties of the specified Task. */ - put( - options: ReplaceTaskParameters, - ): StreamableMethod; -} - -export interface ListSubTasks { - /** If the Task is not a multi-instance Task then this returns an empty collection. */ - get( - options?: ListSubTasksParameters, - ): StreamableMethod; -} - -export interface TerminateTask { - /** - * When the Task has been terminated, it moves to the completed state. For - * multi-instance Tasks, the terminate Task operation applies synchronously to the - * primary task; subtasks are then terminated asynchronously in the background. - */ - post( - options?: TerminateTaskParameters, - ): StreamableMethod; -} - -export interface ReactivateTask { - /** - * Reactivation makes a Task eligible to be retried again up to its maximum retry - * count. The Task's state is changed to active. As the Task is no longer in the - * completed state, any previous exit code or failure information is no longer - * available after reactivation. Each time a Task is reactivated, its retry count - * is reset to 0. Reactivation will fail for Tasks that are not completed or that - * previously completed successfully (with an exit code of 0). Additionally, it - * will fail if the Job has completed (or is terminating or deleting). - */ - post( - options?: ReactivateTaskParameters, - ): StreamableMethod< - ReactivateTask204Response | ReactivateTaskDefaultResponse - >; -} - -export interface DeleteTaskFile { - /** Deletes the specified Task file from the Compute Node where the Task ran. */ - delete( - options?: DeleteTaskFileParameters, - ): StreamableMethod< - DeleteTaskFile200Response | DeleteTaskFileDefaultResponse - >; - /** Returns the content of the specified Task file. */ - get( - options?: GetTaskFileParameters, - ): StreamableMethod; - /** Gets the properties of the specified Task file. */ - head( - options?: GetTaskFilePropertiesParameters, - ): StreamableMethod< - GetTaskFileProperties200Response | GetTaskFilePropertiesDefaultResponse - >; -} - -export interface ListTaskFiles { - /** Lists the files in a Task's directory on its Compute Node. */ - get( - options?: ListTaskFilesParameters, - ): StreamableMethod; -} - -export interface CreateNodeUser { - /** - * You can add a user Account to a Compute Node only when it is in the idle or - * running state. - */ - post( - options: CreateNodeUserParameters, - ): StreamableMethod< - CreateNodeUser201Response | CreateNodeUserDefaultResponse - >; -} - -export interface DeleteNodeUser { - /** - * You can delete a user Account to a Compute Node only when it is in the idle or - * running state. - */ - delete( - options?: DeleteNodeUserParameters, - ): StreamableMethod< - DeleteNodeUser200Response | DeleteNodeUserDefaultResponse - >; - /** - * This operation replaces of all the updatable properties of the Account. For - * example, if the expiryTime element is not specified, the current value is - * replaced with the default value, not left unmodified. You can update a user - * Account on a Compute Node only when it is in the idle or running state. - */ - put( - options: ReplaceNodeUserParameters, - ): StreamableMethod< - ReplaceNodeUser200Response | ReplaceNodeUserDefaultResponse - >; -} - -export interface GetNode { - /** Gets information about the specified Compute Node. */ - get( - options?: GetNodeParameters, - ): StreamableMethod; -} - -export interface RebootNode { - /** You can restart a Compute Node only if it is in an idle or running state. */ - post( - options: RebootNodeParameters, - ): StreamableMethod; -} - -export interface StartNode { - /** You can start a Compute Node only if it has been deallocated. */ - post( - options?: StartNodeParameters, - ): StreamableMethod; -} - -export interface DeallocateNode { - /** You can deallocate a Compute Node only if it is in an idle or running state. */ - post( - options: DeallocateNodeParameters, - ): StreamableMethod< - DeallocateNode202Response | DeallocateNodeDefaultResponse - >; -} - -export interface ReimageNode { - /** - * You can reinstall the operating system on a Compute Node only if it is in an - * idle or running state. This API can be invoked only on Pools created with the - * cloud service configuration property. - */ - post( - options: ReimageNodeParameters, - ): StreamableMethod; -} - -export interface DisableNodeScheduling { - /** - * You can disable Task scheduling on a Compute Node only if its current - * scheduling state is enabled. - */ - post( - options: DisableNodeSchedulingParameters, - ): StreamableMethod< - DisableNodeScheduling200Response | DisableNodeSchedulingDefaultResponse - >; -} - -export interface EnableNodeScheduling { - /** - * You can enable Task scheduling on a Compute Node only if its current scheduling - * state is disabled - */ - post( - options?: EnableNodeSchedulingParameters, - ): StreamableMethod< - EnableNodeScheduling200Response | EnableNodeSchedulingDefaultResponse - >; -} - -export interface GetNodeRemoteLoginSettings { - /** - * Before you can remotely login to a Compute Node using the remote login settings, - * you must create a user Account on the Compute Node. - */ - get( - options?: GetNodeRemoteLoginSettingsParameters, - ): StreamableMethod< - | GetNodeRemoteLoginSettings200Response - | GetNodeRemoteLoginSettingsDefaultResponse - >; -} - -export interface UploadNodeLogs { - /** - * This is for gathering Azure Batch service log files in an automated fashion - * from Compute Nodes if you are experiencing an error and wish to escalate to - * Azure support. The Azure Batch service log files should be shared with Azure - * support to aid in debugging issues with the Batch service. - */ - post( - options: UploadNodeLogsParameters, - ): StreamableMethod< - UploadNodeLogs200Response | UploadNodeLogsDefaultResponse - >; -} - -export interface ListNodes { - /** Lists the Compute Nodes in the specified Pool. */ - get( - options?: ListNodesParameters, - ): StreamableMethod; -} - -export interface GetNodeExtension { - /** Gets information about the specified Compute Node Extension. */ - get( - options?: GetNodeExtensionParameters, - ): StreamableMethod< - GetNodeExtension200Response | GetNodeExtensionDefaultResponse - >; -} - -export interface ListNodeExtensions { - /** Lists the Compute Nodes Extensions in the specified Pool. */ - get( - options?: ListNodeExtensionsParameters, - ): StreamableMethod< - ListNodeExtensions200Response | ListNodeExtensionsDefaultResponse - >; -} - -export interface DeleteNodeFile { - /** Deletes the specified file from the Compute Node. */ - delete( - options?: DeleteNodeFileParameters, - ): StreamableMethod< - DeleteNodeFile200Response | DeleteNodeFileDefaultResponse - >; - /** Returns the content of the specified Compute Node file. */ - get( - options?: GetNodeFileParameters, - ): StreamableMethod; - /** Gets the properties of the specified Compute Node file. */ - head( - options?: GetNodeFilePropertiesParameters, - ): StreamableMethod< - GetNodeFileProperties200Response | GetNodeFilePropertiesDefaultResponse - >; -} - -export interface ListNodeFiles { - /** Lists all of the files in Task directories on the specified Compute Node. */ - get( - options?: ListNodeFilesParameters, - ): StreamableMethod; -} - -export interface Routes { - /** Resource for '/applications' has methods for the following verbs: get */ - (path: "/applications"): ListApplications; - /** Resource for '/applications/\{applicationId\}' has methods for the following verbs: get */ - ( - path: "/applications/{applicationId}", - applicationId: string, - ): GetApplication; - /** Resource for '/poolusagemetrics' has methods for the following verbs: get */ - (path: "/poolusagemetrics"): ListPoolUsageMetrics; - /** Resource for '/pools' has methods for the following verbs: post, get */ - (path: "/pools"): CreatePool; - /** Resource for '/pools/\{poolId\}' has methods for the following verbs: delete, head, get, patch */ - (path: "/pools/{poolId}", poolId: string): DeletePool; - /** Resource for '/pools/\{poolId\}/disableautoscale' has methods for the following verbs: post */ - ( - path: "/pools/{poolId}/disableautoscale", - poolId: string, - ): DisablePoolAutoScale; - /** Resource for '/pools/\{poolId\}/enableautoscale' has methods for the following verbs: post */ - ( - path: "/pools/{poolId}/enableautoscale", - poolId: string, - ): EnablePoolAutoScale; - /** Resource for '/pools/\{poolId\}/evaluateautoscale' has methods for the following verbs: post */ - ( - path: "/pools/{poolId}/evaluateautoscale", - poolId: string, - ): EvaluatePoolAutoScale; - /** Resource for '/pools/\{poolId\}/resize' has methods for the following verbs: post */ - (path: "/pools/{poolId}/resize", poolId: string): ResizePool; - /** Resource for '/pools/\{poolId\}/stopresize' has methods for the following verbs: post */ - (path: "/pools/{poolId}/stopresize", poolId: string): StopPoolResize; - /** Resource for '/pools/\{poolId\}/updateproperties' has methods for the following verbs: post */ - ( - path: "/pools/{poolId}/updateproperties", - poolId: string, - ): ReplacePoolProperties; - /** Resource for '/pools/\{poolId\}/removenodes' has methods for the following verbs: post */ - (path: "/pools/{poolId}/removenodes", poolId: string): RemoveNodes; - /** Resource for '/supportedimages' has methods for the following verbs: get */ - (path: "/supportedimages"): ListSupportedImages; - /** Resource for '/nodecounts' has methods for the following verbs: get */ - (path: "/nodecounts"): ListPoolNodeCounts; - /** Resource for '/jobs/\{jobId\}' has methods for the following verbs: delete, get, patch, put */ - (path: "/jobs/{jobId}", jobId: string): DeleteJob; - /** Resource for '/jobs/\{jobId\}/disable' has methods for the following verbs: post */ - (path: "/jobs/{jobId}/disable", jobId: string): DisableJob; - /** Resource for '/jobs/\{jobId\}/enable' has methods for the following verbs: post */ - (path: "/jobs/{jobId}/enable", jobId: string): EnableJob; - /** Resource for '/jobs/\{jobId\}/terminate' has methods for the following verbs: post */ - (path: "/jobs/{jobId}/terminate", jobId: string): TerminateJob; - /** Resource for '/jobs' has methods for the following verbs: post, get */ - (path: "/jobs"): CreateJob; - /** Resource for '/jobschedules/\{jobScheduleId\}/jobs' has methods for the following verbs: get */ - ( - path: "/jobschedules/{jobScheduleId}/jobs", - jobScheduleId: string, - ): ListJobsFromSchedule; - /** Resource for '/jobs/\{jobId\}/jobpreparationandreleasetaskstatus' has methods for the following verbs: get */ - ( - path: "/jobs/{jobId}/jobpreparationandreleasetaskstatus", - jobId: string, - ): ListJobPreparationAndReleaseTaskStatus; - /** Resource for '/jobs/\{jobId\}/taskcounts' has methods for the following verbs: get */ - (path: "/jobs/{jobId}/taskcounts", jobId: string): GetJobTaskCounts; - /** Resource for '/jobschedules/\{jobScheduleId\}' has methods for the following verbs: head, delete, get, patch, put */ - ( - path: "/jobschedules/{jobScheduleId}", - jobScheduleId: string, - ): JobScheduleExists; - /** Resource for '/jobschedules/\{jobScheduleId\}/disable' has methods for the following verbs: post */ - ( - path: "/jobschedules/{jobScheduleId}/disable", - jobScheduleId: string, - ): DisableJobSchedule; - /** Resource for '/jobschedules/\{jobScheduleId\}/enable' has methods for the following verbs: post */ - ( - path: "/jobschedules/{jobScheduleId}/enable", - jobScheduleId: string, - ): EnableJobSchedule; - /** Resource for '/jobschedules/\{jobScheduleId\}/terminate' has methods for the following verbs: post */ - ( - path: "/jobschedules/{jobScheduleId}/terminate", - jobScheduleId: string, - ): TerminateJobSchedule; - /** Resource for '/jobschedules' has methods for the following verbs: post, get */ - (path: "/jobschedules"): CreateJobSchedule; - /** Resource for '/jobs/\{jobId\}/tasks' has methods for the following verbs: post, get */ - (path: "/jobs/{jobId}/tasks", jobId: string): CreateTask; - /** Resource for '/jobs/\{jobId\}/addtaskcollection' has methods for the following verbs: post */ - ( - path: "/jobs/{jobId}/addtaskcollection", - jobId: string, - ): CreateTaskCollection; - /** Resource for '/jobs/\{jobId\}/tasks/\{taskId\}' has methods for the following verbs: delete, get, put */ - ( - path: "/jobs/{jobId}/tasks/{taskId}", - jobId: string, - taskId: string, - ): DeleteTask; - /** Resource for '/jobs/\{jobId\}/tasks/\{taskId\}/subtasksinfo' has methods for the following verbs: get */ - ( - path: "/jobs/{jobId}/tasks/{taskId}/subtasksinfo", - jobId: string, - taskId: string, - ): ListSubTasks; - /** Resource for '/jobs/\{jobId\}/tasks/\{taskId\}/terminate' has methods for the following verbs: post */ - ( - path: "/jobs/{jobId}/tasks/{taskId}/terminate", - jobId: string, - taskId: string, - ): TerminateTask; - /** Resource for '/jobs/\{jobId\}/tasks/\{taskId\}/reactivate' has methods for the following verbs: post */ - ( - path: "/jobs/{jobId}/tasks/{taskId}/reactivate", - jobId: string, - taskId: string, - ): ReactivateTask; - /** Resource for '/jobs/\{jobId\}/tasks/\{taskId\}/files/\{filePath\}' has methods for the following verbs: delete, get, head */ - ( - path: "/jobs/{jobId}/tasks/{taskId}/files/{filePath}", - jobId: string, - taskId: string, - filePath: string, - ): DeleteTaskFile; - /** Resource for '/jobs/\{jobId\}/tasks/\{taskId\}/files' has methods for the following verbs: get */ - ( - path: "/jobs/{jobId}/tasks/{taskId}/files", - jobId: string, - taskId: string, - ): ListTaskFiles; - /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/users' has methods for the following verbs: post */ - ( - path: "/pools/{poolId}/nodes/{nodeId}/users", - poolId: string, - nodeId: string, - ): CreateNodeUser; - /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/users/\{userName\}' has methods for the following verbs: delete, put */ - ( - path: "/pools/{poolId}/nodes/{nodeId}/users/{userName}", - poolId: string, - nodeId: string, - userName: string, - ): DeleteNodeUser; - /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}' has methods for the following verbs: get */ - ( - path: "/pools/{poolId}/nodes/{nodeId}", - poolId: string, - nodeId: string, - ): GetNode; - /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/reboot' has methods for the following verbs: post */ - ( - path: "/pools/{poolId}/nodes/{nodeId}/reboot", - poolId: string, - nodeId: string, - ): RebootNode; - /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/start' has methods for the following verbs: post */ - ( - path: "/pools/{poolId}/nodes/{nodeId}/start", - poolId: string, - nodeId: string, - ): StartNode; - /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/deallocate' has methods for the following verbs: post */ - ( - path: "/pools/{poolId}/nodes/{nodeId}/deallocate", - poolId: string, - nodeId: string, - ): DeallocateNode; - /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/reimage' has methods for the following verbs: post */ - ( - path: "/pools/{poolId}/nodes/{nodeId}/reimage", - poolId: string, - nodeId: string, - ): ReimageNode; - /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/disablescheduling' has methods for the following verbs: post */ - ( - path: "/pools/{poolId}/nodes/{nodeId}/disablescheduling", - poolId: string, - nodeId: string, - ): DisableNodeScheduling; - /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/enablescheduling' has methods for the following verbs: post */ - ( - path: "/pools/{poolId}/nodes/{nodeId}/enablescheduling", - poolId: string, - nodeId: string, - ): EnableNodeScheduling; - /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/remoteloginsettings' has methods for the following verbs: get */ - ( - path: "/pools/{poolId}/nodes/{nodeId}/remoteloginsettings", - poolId: string, - nodeId: string, - ): GetNodeRemoteLoginSettings; - /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/uploadbatchservicelogs' has methods for the following verbs: post */ - ( - path: "/pools/{poolId}/nodes/{nodeId}/uploadbatchservicelogs", - poolId: string, - nodeId: string, - ): UploadNodeLogs; - /** Resource for '/pools/\{poolId\}/nodes' has methods for the following verbs: get */ - (path: "/pools/{poolId}/nodes", poolId: string): ListNodes; - /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/extensions/\{extensionName\}' has methods for the following verbs: get */ - ( - path: "/pools/{poolId}/nodes/{nodeId}/extensions/{extensionName}", - poolId: string, - nodeId: string, - extensionName: string, - ): GetNodeExtension; - /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/extensions' has methods for the following verbs: get */ - ( - path: "/pools/{poolId}/nodes/{nodeId}/extensions", - poolId: string, - nodeId: string, - ): ListNodeExtensions; - /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/files/\{filePath\}' has methods for the following verbs: delete, get, head */ - ( - path: "/pools/{poolId}/nodes/{nodeId}/files/{filePath}", - poolId: string, - nodeId: string, - filePath: string, - ): DeleteNodeFile; - /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/files' has methods for the following verbs: get */ - ( - path: "/pools/{poolId}/nodes/{nodeId}/files", - poolId: string, - nodeId: string, - ): ListNodeFiles; -} - -export type BatchClient = Client & { - path: Routes; -}; diff --git a/sdk/batch/batch-rest/generated/index.ts b/sdk/batch/batch-rest/generated/index.ts deleted file mode 100644 index 00fd811e00c7..000000000000 --- a/sdk/batch/batch-rest/generated/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import BatchClient from "./batchClient.js"; - -export * from "./batchClient.js"; -export * from "./parameters.js"; -export * from "./responses.js"; -export * from "./clientDefinitions.js"; -export * from "./isUnexpected.js"; -export * from "./models.js"; -export * from "./outputModels.js"; -export * from "./paginateHelper.js"; - -export default BatchClient; diff --git a/sdk/batch/batch-rest/generated/isUnexpected.ts b/sdk/batch/batch-rest/generated/isUnexpected.ts deleted file mode 100644 index d58bf659df98..000000000000 --- a/sdk/batch/batch-rest/generated/isUnexpected.ts +++ /dev/null @@ -1,778 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { - ListApplications200Response, - ListApplicationsDefaultResponse, - GetApplication200Response, - GetApplicationDefaultResponse, - ListPoolUsageMetrics200Response, - ListPoolUsageMetricsDefaultResponse, - CreatePool201Response, - CreatePoolDefaultResponse, - ListPools200Response, - ListPoolsDefaultResponse, - DeletePool202Response, - DeletePoolDefaultResponse, - PoolExists200Response, - PoolExists404Response, - PoolExistsDefaultResponse, - GetPool200Response, - GetPoolDefaultResponse, - UpdatePool200Response, - UpdatePoolDefaultResponse, - DisablePoolAutoScale200Response, - DisablePoolAutoScaleDefaultResponse, - EnablePoolAutoScale200Response, - EnablePoolAutoScaleDefaultResponse, - EvaluatePoolAutoScale200Response, - EvaluatePoolAutoScaleDefaultResponse, - ResizePool202Response, - ResizePoolDefaultResponse, - StopPoolResize202Response, - StopPoolResizeDefaultResponse, - ReplacePoolProperties204Response, - ReplacePoolPropertiesDefaultResponse, - RemoveNodes202Response, - RemoveNodesDefaultResponse, - ListSupportedImages200Response, - ListSupportedImagesDefaultResponse, - ListPoolNodeCounts200Response, - ListPoolNodeCountsDefaultResponse, - DeleteJob202Response, - DeleteJobDefaultResponse, - GetJob200Response, - GetJobDefaultResponse, - UpdateJob200Response, - UpdateJobDefaultResponse, - ReplaceJob200Response, - ReplaceJobDefaultResponse, - DisableJob202Response, - DisableJobDefaultResponse, - EnableJob202Response, - EnableJobDefaultResponse, - TerminateJob202Response, - TerminateJobDefaultResponse, - CreateJob201Response, - CreateJobDefaultResponse, - ListJobs200Response, - ListJobsDefaultResponse, - ListJobsFromSchedule200Response, - ListJobsFromScheduleDefaultResponse, - ListJobPreparationAndReleaseTaskStatus200Response, - ListJobPreparationAndReleaseTaskStatusDefaultResponse, - GetJobTaskCounts200Response, - GetJobTaskCountsDefaultResponse, - JobScheduleExists200Response, - JobScheduleExists404Response, - JobScheduleExistsDefaultResponse, - DeleteJobSchedule202Response, - DeleteJobScheduleDefaultResponse, - GetJobSchedule200Response, - GetJobScheduleDefaultResponse, - UpdateJobSchedule200Response, - UpdateJobScheduleDefaultResponse, - ReplaceJobSchedule200Response, - ReplaceJobScheduleDefaultResponse, - DisableJobSchedule204Response, - DisableJobScheduleDefaultResponse, - EnableJobSchedule204Response, - EnableJobScheduleDefaultResponse, - TerminateJobSchedule202Response, - TerminateJobScheduleDefaultResponse, - CreateJobSchedule201Response, - CreateJobScheduleDefaultResponse, - ListJobSchedules200Response, - ListJobSchedulesDefaultResponse, - CreateTask201Response, - CreateTaskDefaultResponse, - ListTasks200Response, - ListTasksDefaultResponse, - CreateTaskCollection200Response, - CreateTaskCollectionDefaultResponse, - DeleteTask200Response, - DeleteTaskDefaultResponse, - GetTask200Response, - GetTaskDefaultResponse, - ReplaceTask200Response, - ReplaceTaskDefaultResponse, - ListSubTasks200Response, - ListSubTasksDefaultResponse, - TerminateTask204Response, - TerminateTaskDefaultResponse, - ReactivateTask204Response, - ReactivateTaskDefaultResponse, - DeleteTaskFile200Response, - DeleteTaskFileDefaultResponse, - GetTaskFile200Response, - GetTaskFileDefaultResponse, - GetTaskFileProperties200Response, - GetTaskFilePropertiesDefaultResponse, - ListTaskFiles200Response, - ListTaskFilesDefaultResponse, - CreateNodeUser201Response, - CreateNodeUserDefaultResponse, - DeleteNodeUser200Response, - DeleteNodeUserDefaultResponse, - ReplaceNodeUser200Response, - ReplaceNodeUserDefaultResponse, - GetNode200Response, - GetNodeDefaultResponse, - RebootNode202Response, - RebootNodeDefaultResponse, - StartNode202Response, - StartNodeDefaultResponse, - DeallocateNode202Response, - DeallocateNodeDefaultResponse, - ReimageNode202Response, - ReimageNodeDefaultResponse, - DisableNodeScheduling200Response, - DisableNodeSchedulingDefaultResponse, - EnableNodeScheduling200Response, - EnableNodeSchedulingDefaultResponse, - GetNodeRemoteLoginSettings200Response, - GetNodeRemoteLoginSettingsDefaultResponse, - UploadNodeLogs200Response, - UploadNodeLogsDefaultResponse, - ListNodes200Response, - ListNodesDefaultResponse, - GetNodeExtension200Response, - GetNodeExtensionDefaultResponse, - ListNodeExtensions200Response, - ListNodeExtensionsDefaultResponse, - DeleteNodeFile200Response, - DeleteNodeFileDefaultResponse, - GetNodeFile200Response, - GetNodeFileDefaultResponse, - GetNodeFileProperties200Response, - GetNodeFilePropertiesDefaultResponse, - ListNodeFiles200Response, - ListNodeFilesDefaultResponse, -} from "./responses.js"; - -const responseMap: Record = { - "GET /applications": ["200"], - "GET /applications/{applicationId}": ["200"], - "GET /poolusagemetrics": ["200"], - "POST /pools": ["201"], - "GET /pools": ["200"], - "DELETE /pools/{poolId}": ["202"], - "HEAD /pools/{poolId}": ["200", "404"], - "GET /pools/{poolId}": ["200"], - "PATCH /pools/{poolId}": ["200"], - "POST /pools/{poolId}/disableautoscale": ["200"], - "POST /pools/{poolId}/enableautoscale": ["200"], - "POST /pools/{poolId}/evaluateautoscale": ["200"], - "POST /pools/{poolId}/resize": ["202"], - "POST /pools/{poolId}/stopresize": ["202"], - "POST /pools/{poolId}/updateproperties": ["204"], - "POST /pools/{poolId}/removenodes": ["202"], - "GET /supportedimages": ["200"], - "GET /nodecounts": ["200"], - "DELETE /jobs/{jobId}": ["202"], - "GET /jobs/{jobId}": ["200"], - "PATCH /jobs/{jobId}": ["200"], - "PUT /jobs/{jobId}": ["200"], - "POST /jobs/{jobId}/disable": ["202"], - "POST /jobs/{jobId}/enable": ["202"], - "POST /jobs/{jobId}/terminate": ["202"], - "POST /jobs": ["201"], - "GET /jobs": ["200"], - "GET /jobschedules/{jobScheduleId}/jobs": ["200"], - "GET /jobs/{jobId}/jobpreparationandreleasetaskstatus": ["200"], - "GET /jobs/{jobId}/taskcounts": ["200"], - "HEAD /jobschedules/{jobScheduleId}": ["200", "404"], - "DELETE /jobschedules/{jobScheduleId}": ["202"], - "GET /jobschedules/{jobScheduleId}": ["200"], - "PATCH /jobschedules/{jobScheduleId}": ["200"], - "PUT /jobschedules/{jobScheduleId}": ["200"], - "POST /jobschedules/{jobScheduleId}/disable": ["204"], - "POST /jobschedules/{jobScheduleId}/enable": ["204"], - "POST /jobschedules/{jobScheduleId}/terminate": ["202"], - "POST /jobschedules": ["201"], - "GET /jobschedules": ["200"], - "POST /jobs/{jobId}/tasks": ["201"], - "GET /jobs/{jobId}/tasks": ["200"], - "POST /jobs/{jobId}/addtaskcollection": ["200"], - "DELETE /jobs/{jobId}/tasks/{taskId}": ["200"], - "GET /jobs/{jobId}/tasks/{taskId}": ["200"], - "PUT /jobs/{jobId}/tasks/{taskId}": ["200"], - "GET /jobs/{jobId}/tasks/{taskId}/subtasksinfo": ["200"], - "POST /jobs/{jobId}/tasks/{taskId}/terminate": ["204"], - "POST /jobs/{jobId}/tasks/{taskId}/reactivate": ["204"], - "DELETE /jobs/{jobId}/tasks/{taskId}/files/{filePath}": ["200"], - "GET /jobs/{jobId}/tasks/{taskId}/files/{filePath}": ["200"], - "HEAD /jobs/{jobId}/tasks/{taskId}/files/{filePath}": ["200"], - "GET /jobs/{jobId}/tasks/{taskId}/files": ["200"], - "POST /pools/{poolId}/nodes/{nodeId}/users": ["201"], - "DELETE /pools/{poolId}/nodes/{nodeId}/users/{userName}": ["200"], - "PUT /pools/{poolId}/nodes/{nodeId}/users/{userName}": ["200"], - "GET /pools/{poolId}/nodes/{nodeId}": ["200"], - "POST /pools/{poolId}/nodes/{nodeId}/reboot": ["202"], - "POST /pools/{poolId}/nodes/{nodeId}/start": ["202"], - "POST /pools/{poolId}/nodes/{nodeId}/deallocate": ["202"], - "POST /pools/{poolId}/nodes/{nodeId}/reimage": ["202"], - "POST /pools/{poolId}/nodes/{nodeId}/disablescheduling": ["200"], - "POST /pools/{poolId}/nodes/{nodeId}/enablescheduling": ["200"], - "GET /pools/{poolId}/nodes/{nodeId}/remoteloginsettings": ["200"], - "POST /pools/{poolId}/nodes/{nodeId}/uploadbatchservicelogs": ["200"], - "GET /pools/{poolId}/nodes": ["200"], - "GET /pools/{poolId}/nodes/{nodeId}/extensions/{extensionName}": ["200"], - "GET /pools/{poolId}/nodes/{nodeId}/extensions": ["200"], - "DELETE /pools/{poolId}/nodes/{nodeId}/files/{filePath}": ["200"], - "GET /pools/{poolId}/nodes/{nodeId}/files/{filePath}": ["200"], - "HEAD /pools/{poolId}/nodes/{nodeId}/files/{filePath}": ["200"], - "GET /pools/{poolId}/nodes/{nodeId}/files": ["200"], -}; - -export function isUnexpected( - response: ListApplications200Response | ListApplicationsDefaultResponse, -): response is ListApplicationsDefaultResponse; -export function isUnexpected( - response: GetApplication200Response | GetApplicationDefaultResponse, -): response is GetApplicationDefaultResponse; -export function isUnexpected( - response: - | ListPoolUsageMetrics200Response - | ListPoolUsageMetricsDefaultResponse, -): response is ListPoolUsageMetricsDefaultResponse; -export function isUnexpected( - response: CreatePool201Response | CreatePoolDefaultResponse, -): response is CreatePoolDefaultResponse; -export function isUnexpected( - response: ListPools200Response | ListPoolsDefaultResponse, -): response is ListPoolsDefaultResponse; -export function isUnexpected( - response: DeletePool202Response | DeletePoolDefaultResponse, -): response is DeletePoolDefaultResponse; -export function isUnexpected( - response: - | PoolExists200Response - | PoolExists404Response - | PoolExistsDefaultResponse, -): response is PoolExistsDefaultResponse; -export function isUnexpected( - response: GetPool200Response | GetPoolDefaultResponse, -): response is GetPoolDefaultResponse; -export function isUnexpected( - response: UpdatePool200Response | UpdatePoolDefaultResponse, -): response is UpdatePoolDefaultResponse; -export function isUnexpected( - response: - | DisablePoolAutoScale200Response - | DisablePoolAutoScaleDefaultResponse, -): response is DisablePoolAutoScaleDefaultResponse; -export function isUnexpected( - response: EnablePoolAutoScale200Response | EnablePoolAutoScaleDefaultResponse, -): response is EnablePoolAutoScaleDefaultResponse; -export function isUnexpected( - response: - | EvaluatePoolAutoScale200Response - | EvaluatePoolAutoScaleDefaultResponse, -): response is EvaluatePoolAutoScaleDefaultResponse; -export function isUnexpected( - response: ResizePool202Response | ResizePoolDefaultResponse, -): response is ResizePoolDefaultResponse; -export function isUnexpected( - response: StopPoolResize202Response | StopPoolResizeDefaultResponse, -): response is StopPoolResizeDefaultResponse; -export function isUnexpected( - response: - | ReplacePoolProperties204Response - | ReplacePoolPropertiesDefaultResponse, -): response is ReplacePoolPropertiesDefaultResponse; -export function isUnexpected( - response: RemoveNodes202Response | RemoveNodesDefaultResponse, -): response is RemoveNodesDefaultResponse; -export function isUnexpected( - response: ListSupportedImages200Response | ListSupportedImagesDefaultResponse, -): response is ListSupportedImagesDefaultResponse; -export function isUnexpected( - response: ListPoolNodeCounts200Response | ListPoolNodeCountsDefaultResponse, -): response is ListPoolNodeCountsDefaultResponse; -export function isUnexpected( - response: DeleteJob202Response | DeleteJobDefaultResponse, -): response is DeleteJobDefaultResponse; -export function isUnexpected( - response: GetJob200Response | GetJobDefaultResponse, -): response is GetJobDefaultResponse; -export function isUnexpected( - response: UpdateJob200Response | UpdateJobDefaultResponse, -): response is UpdateJobDefaultResponse; -export function isUnexpected( - response: ReplaceJob200Response | ReplaceJobDefaultResponse, -): response is ReplaceJobDefaultResponse; -export function isUnexpected( - response: DisableJob202Response | DisableJobDefaultResponse, -): response is DisableJobDefaultResponse; -export function isUnexpected( - response: EnableJob202Response | EnableJobDefaultResponse, -): response is EnableJobDefaultResponse; -export function isUnexpected( - response: TerminateJob202Response | TerminateJobDefaultResponse, -): response is TerminateJobDefaultResponse; -export function isUnexpected( - response: CreateJob201Response | CreateJobDefaultResponse, -): response is CreateJobDefaultResponse; -export function isUnexpected( - response: ListJobs200Response | ListJobsDefaultResponse, -): response is ListJobsDefaultResponse; -export function isUnexpected( - response: - | ListJobsFromSchedule200Response - | ListJobsFromScheduleDefaultResponse, -): response is ListJobsFromScheduleDefaultResponse; -export function isUnexpected( - response: - | ListJobPreparationAndReleaseTaskStatus200Response - | ListJobPreparationAndReleaseTaskStatusDefaultResponse, -): response is ListJobPreparationAndReleaseTaskStatusDefaultResponse; -export function isUnexpected( - response: GetJobTaskCounts200Response | GetJobTaskCountsDefaultResponse, -): response is GetJobTaskCountsDefaultResponse; -export function isUnexpected( - response: - | JobScheduleExists200Response - | JobScheduleExists404Response - | JobScheduleExistsDefaultResponse, -): response is JobScheduleExistsDefaultResponse; -export function isUnexpected( - response: DeleteJobSchedule202Response | DeleteJobScheduleDefaultResponse, -): response is DeleteJobScheduleDefaultResponse; -export function isUnexpected( - response: GetJobSchedule200Response | GetJobScheduleDefaultResponse, -): response is GetJobScheduleDefaultResponse; -export function isUnexpected( - response: UpdateJobSchedule200Response | UpdateJobScheduleDefaultResponse, -): response is UpdateJobScheduleDefaultResponse; -export function isUnexpected( - response: ReplaceJobSchedule200Response | ReplaceJobScheduleDefaultResponse, -): response is ReplaceJobScheduleDefaultResponse; -export function isUnexpected( - response: DisableJobSchedule204Response | DisableJobScheduleDefaultResponse, -): response is DisableJobScheduleDefaultResponse; -export function isUnexpected( - response: EnableJobSchedule204Response | EnableJobScheduleDefaultResponse, -): response is EnableJobScheduleDefaultResponse; -export function isUnexpected( - response: - | TerminateJobSchedule202Response - | TerminateJobScheduleDefaultResponse, -): response is TerminateJobScheduleDefaultResponse; -export function isUnexpected( - response: CreateJobSchedule201Response | CreateJobScheduleDefaultResponse, -): response is CreateJobScheduleDefaultResponse; -export function isUnexpected( - response: ListJobSchedules200Response | ListJobSchedulesDefaultResponse, -): response is ListJobSchedulesDefaultResponse; -export function isUnexpected( - response: CreateTask201Response | CreateTaskDefaultResponse, -): response is CreateTaskDefaultResponse; -export function isUnexpected( - response: ListTasks200Response | ListTasksDefaultResponse, -): response is ListTasksDefaultResponse; -export function isUnexpected( - response: - | CreateTaskCollection200Response - | CreateTaskCollectionDefaultResponse, -): response is CreateTaskCollectionDefaultResponse; -export function isUnexpected( - response: DeleteTask200Response | DeleteTaskDefaultResponse, -): response is DeleteTaskDefaultResponse; -export function isUnexpected( - response: GetTask200Response | GetTaskDefaultResponse, -): response is GetTaskDefaultResponse; -export function isUnexpected( - response: ReplaceTask200Response | ReplaceTaskDefaultResponse, -): response is ReplaceTaskDefaultResponse; -export function isUnexpected( - response: ListSubTasks200Response | ListSubTasksDefaultResponse, -): response is ListSubTasksDefaultResponse; -export function isUnexpected( - response: TerminateTask204Response | TerminateTaskDefaultResponse, -): response is TerminateTaskDefaultResponse; -export function isUnexpected( - response: ReactivateTask204Response | ReactivateTaskDefaultResponse, -): response is ReactivateTaskDefaultResponse; -export function isUnexpected( - response: DeleteTaskFile200Response | DeleteTaskFileDefaultResponse, -): response is DeleteTaskFileDefaultResponse; -export function isUnexpected( - response: GetTaskFile200Response | GetTaskFileDefaultResponse, -): response is GetTaskFileDefaultResponse; -export function isUnexpected( - response: - | GetTaskFileProperties200Response - | GetTaskFilePropertiesDefaultResponse, -): response is GetTaskFilePropertiesDefaultResponse; -export function isUnexpected( - response: ListTaskFiles200Response | ListTaskFilesDefaultResponse, -): response is ListTaskFilesDefaultResponse; -export function isUnexpected( - response: CreateNodeUser201Response | CreateNodeUserDefaultResponse, -): response is CreateNodeUserDefaultResponse; -export function isUnexpected( - response: DeleteNodeUser200Response | DeleteNodeUserDefaultResponse, -): response is DeleteNodeUserDefaultResponse; -export function isUnexpected( - response: ReplaceNodeUser200Response | ReplaceNodeUserDefaultResponse, -): response is ReplaceNodeUserDefaultResponse; -export function isUnexpected( - response: GetNode200Response | GetNodeDefaultResponse, -): response is GetNodeDefaultResponse; -export function isUnexpected( - response: RebootNode202Response | RebootNodeDefaultResponse, -): response is RebootNodeDefaultResponse; -export function isUnexpected( - response: StartNode202Response | StartNodeDefaultResponse, -): response is StartNodeDefaultResponse; -export function isUnexpected( - response: DeallocateNode202Response | DeallocateNodeDefaultResponse, -): response is DeallocateNodeDefaultResponse; -export function isUnexpected( - response: ReimageNode202Response | ReimageNodeDefaultResponse, -): response is ReimageNodeDefaultResponse; -export function isUnexpected( - response: - | DisableNodeScheduling200Response - | DisableNodeSchedulingDefaultResponse, -): response is DisableNodeSchedulingDefaultResponse; -export function isUnexpected( - response: - | EnableNodeScheduling200Response - | EnableNodeSchedulingDefaultResponse, -): response is EnableNodeSchedulingDefaultResponse; -export function isUnexpected( - response: - | GetNodeRemoteLoginSettings200Response - | GetNodeRemoteLoginSettingsDefaultResponse, -): response is GetNodeRemoteLoginSettingsDefaultResponse; -export function isUnexpected( - response: UploadNodeLogs200Response | UploadNodeLogsDefaultResponse, -): response is UploadNodeLogsDefaultResponse; -export function isUnexpected( - response: ListNodes200Response | ListNodesDefaultResponse, -): response is ListNodesDefaultResponse; -export function isUnexpected( - response: GetNodeExtension200Response | GetNodeExtensionDefaultResponse, -): response is GetNodeExtensionDefaultResponse; -export function isUnexpected( - response: ListNodeExtensions200Response | ListNodeExtensionsDefaultResponse, -): response is ListNodeExtensionsDefaultResponse; -export function isUnexpected( - response: DeleteNodeFile200Response | DeleteNodeFileDefaultResponse, -): response is DeleteNodeFileDefaultResponse; -export function isUnexpected( - response: GetNodeFile200Response | GetNodeFileDefaultResponse, -): response is GetNodeFileDefaultResponse; -export function isUnexpected( - response: - | GetNodeFileProperties200Response - | GetNodeFilePropertiesDefaultResponse, -): response is GetNodeFilePropertiesDefaultResponse; -export function isUnexpected( - response: ListNodeFiles200Response | ListNodeFilesDefaultResponse, -): response is ListNodeFilesDefaultResponse; -export function isUnexpected( - response: - | ListApplications200Response - | ListApplicationsDefaultResponse - | GetApplication200Response - | GetApplicationDefaultResponse - | ListPoolUsageMetrics200Response - | ListPoolUsageMetricsDefaultResponse - | CreatePool201Response - | CreatePoolDefaultResponse - | ListPools200Response - | ListPoolsDefaultResponse - | DeletePool202Response - | DeletePoolDefaultResponse - | PoolExists200Response - | PoolExists404Response - | PoolExistsDefaultResponse - | GetPool200Response - | GetPoolDefaultResponse - | UpdatePool200Response - | UpdatePoolDefaultResponse - | DisablePoolAutoScale200Response - | DisablePoolAutoScaleDefaultResponse - | EnablePoolAutoScale200Response - | EnablePoolAutoScaleDefaultResponse - | EvaluatePoolAutoScale200Response - | EvaluatePoolAutoScaleDefaultResponse - | ResizePool202Response - | ResizePoolDefaultResponse - | StopPoolResize202Response - | StopPoolResizeDefaultResponse - | ReplacePoolProperties204Response - | ReplacePoolPropertiesDefaultResponse - | RemoveNodes202Response - | RemoveNodesDefaultResponse - | ListSupportedImages200Response - | ListSupportedImagesDefaultResponse - | ListPoolNodeCounts200Response - | ListPoolNodeCountsDefaultResponse - | DeleteJob202Response - | DeleteJobDefaultResponse - | GetJob200Response - | GetJobDefaultResponse - | UpdateJob200Response - | UpdateJobDefaultResponse - | ReplaceJob200Response - | ReplaceJobDefaultResponse - | DisableJob202Response - | DisableJobDefaultResponse - | EnableJob202Response - | EnableJobDefaultResponse - | TerminateJob202Response - | TerminateJobDefaultResponse - | CreateJob201Response - | CreateJobDefaultResponse - | ListJobs200Response - | ListJobsDefaultResponse - | ListJobsFromSchedule200Response - | ListJobsFromScheduleDefaultResponse - | ListJobPreparationAndReleaseTaskStatus200Response - | ListJobPreparationAndReleaseTaskStatusDefaultResponse - | GetJobTaskCounts200Response - | GetJobTaskCountsDefaultResponse - | JobScheduleExists200Response - | JobScheduleExists404Response - | JobScheduleExistsDefaultResponse - | DeleteJobSchedule202Response - | DeleteJobScheduleDefaultResponse - | GetJobSchedule200Response - | GetJobScheduleDefaultResponse - | UpdateJobSchedule200Response - | UpdateJobScheduleDefaultResponse - | ReplaceJobSchedule200Response - | ReplaceJobScheduleDefaultResponse - | DisableJobSchedule204Response - | DisableJobScheduleDefaultResponse - | EnableJobSchedule204Response - | EnableJobScheduleDefaultResponse - | TerminateJobSchedule202Response - | TerminateJobScheduleDefaultResponse - | CreateJobSchedule201Response - | CreateJobScheduleDefaultResponse - | ListJobSchedules200Response - | ListJobSchedulesDefaultResponse - | CreateTask201Response - | CreateTaskDefaultResponse - | ListTasks200Response - | ListTasksDefaultResponse - | CreateTaskCollection200Response - | CreateTaskCollectionDefaultResponse - | DeleteTask200Response - | DeleteTaskDefaultResponse - | GetTask200Response - | GetTaskDefaultResponse - | ReplaceTask200Response - | ReplaceTaskDefaultResponse - | ListSubTasks200Response - | ListSubTasksDefaultResponse - | TerminateTask204Response - | TerminateTaskDefaultResponse - | ReactivateTask204Response - | ReactivateTaskDefaultResponse - | DeleteTaskFile200Response - | DeleteTaskFileDefaultResponse - | GetTaskFile200Response - | GetTaskFileDefaultResponse - | GetTaskFileProperties200Response - | GetTaskFilePropertiesDefaultResponse - | ListTaskFiles200Response - | ListTaskFilesDefaultResponse - | CreateNodeUser201Response - | CreateNodeUserDefaultResponse - | DeleteNodeUser200Response - | DeleteNodeUserDefaultResponse - | ReplaceNodeUser200Response - | ReplaceNodeUserDefaultResponse - | GetNode200Response - | GetNodeDefaultResponse - | RebootNode202Response - | RebootNodeDefaultResponse - | StartNode202Response - | StartNodeDefaultResponse - | DeallocateNode202Response - | DeallocateNodeDefaultResponse - | ReimageNode202Response - | ReimageNodeDefaultResponse - | DisableNodeScheduling200Response - | DisableNodeSchedulingDefaultResponse - | EnableNodeScheduling200Response - | EnableNodeSchedulingDefaultResponse - | GetNodeRemoteLoginSettings200Response - | GetNodeRemoteLoginSettingsDefaultResponse - | UploadNodeLogs200Response - | UploadNodeLogsDefaultResponse - | ListNodes200Response - | ListNodesDefaultResponse - | GetNodeExtension200Response - | GetNodeExtensionDefaultResponse - | ListNodeExtensions200Response - | ListNodeExtensionsDefaultResponse - | DeleteNodeFile200Response - | DeleteNodeFileDefaultResponse - | GetNodeFile200Response - | GetNodeFileDefaultResponse - | GetNodeFileProperties200Response - | GetNodeFilePropertiesDefaultResponse - | ListNodeFiles200Response - | ListNodeFilesDefaultResponse, -): response is - | ListApplicationsDefaultResponse - | GetApplicationDefaultResponse - | ListPoolUsageMetricsDefaultResponse - | CreatePoolDefaultResponse - | ListPoolsDefaultResponse - | DeletePoolDefaultResponse - | PoolExistsDefaultResponse - | GetPoolDefaultResponse - | UpdatePoolDefaultResponse - | DisablePoolAutoScaleDefaultResponse - | EnablePoolAutoScaleDefaultResponse - | EvaluatePoolAutoScaleDefaultResponse - | ResizePoolDefaultResponse - | StopPoolResizeDefaultResponse - | ReplacePoolPropertiesDefaultResponse - | RemoveNodesDefaultResponse - | ListSupportedImagesDefaultResponse - | ListPoolNodeCountsDefaultResponse - | DeleteJobDefaultResponse - | GetJobDefaultResponse - | UpdateJobDefaultResponse - | ReplaceJobDefaultResponse - | DisableJobDefaultResponse - | EnableJobDefaultResponse - | TerminateJobDefaultResponse - | CreateJobDefaultResponse - | ListJobsDefaultResponse - | ListJobsFromScheduleDefaultResponse - | ListJobPreparationAndReleaseTaskStatusDefaultResponse - | GetJobTaskCountsDefaultResponse - | JobScheduleExistsDefaultResponse - | DeleteJobScheduleDefaultResponse - | GetJobScheduleDefaultResponse - | UpdateJobScheduleDefaultResponse - | ReplaceJobScheduleDefaultResponse - | DisableJobScheduleDefaultResponse - | EnableJobScheduleDefaultResponse - | TerminateJobScheduleDefaultResponse - | CreateJobScheduleDefaultResponse - | ListJobSchedulesDefaultResponse - | CreateTaskDefaultResponse - | ListTasksDefaultResponse - | CreateTaskCollectionDefaultResponse - | DeleteTaskDefaultResponse - | GetTaskDefaultResponse - | ReplaceTaskDefaultResponse - | ListSubTasksDefaultResponse - | TerminateTaskDefaultResponse - | ReactivateTaskDefaultResponse - | DeleteTaskFileDefaultResponse - | GetTaskFileDefaultResponse - | GetTaskFilePropertiesDefaultResponse - | ListTaskFilesDefaultResponse - | CreateNodeUserDefaultResponse - | DeleteNodeUserDefaultResponse - | ReplaceNodeUserDefaultResponse - | GetNodeDefaultResponse - | RebootNodeDefaultResponse - | StartNodeDefaultResponse - | DeallocateNodeDefaultResponse - | ReimageNodeDefaultResponse - | DisableNodeSchedulingDefaultResponse - | EnableNodeSchedulingDefaultResponse - | GetNodeRemoteLoginSettingsDefaultResponse - | UploadNodeLogsDefaultResponse - | ListNodesDefaultResponse - | GetNodeExtensionDefaultResponse - | ListNodeExtensionsDefaultResponse - | DeleteNodeFileDefaultResponse - | GetNodeFileDefaultResponse - | GetNodeFilePropertiesDefaultResponse - | ListNodeFilesDefaultResponse { - const lroOriginal = response.headers["x-ms-original-url"]; - const url = new URL(lroOriginal ?? response.request.url); - const method = response.request.method; - let pathDetails = responseMap[`${method} ${url.pathname}`]; - if (!pathDetails) { - pathDetails = getParametrizedPathSuccess(method, url.pathname); - } - return !pathDetails.includes(response.status); -} - -function getParametrizedPathSuccess(method: string, path: string): string[] { - const pathParts = path.split("/"); - - // Traverse list to match the longest candidate - // matchedLen: the length of candidate path - // matchedValue: the matched status code array - let matchedLen = -1, - matchedValue: string[] = []; - - // Iterate the responseMap to find a match - for (const [key, value] of Object.entries(responseMap)) { - // Extracting the path from the map key which is in format - // GET /path/foo - if (!key.startsWith(method)) { - continue; - } - const candidatePath = getPathFromMapKey(key); - // Get each part of the url path - const candidateParts = candidatePath.split("/"); - - // track if we have found a match to return the values found. - let found = true; - for ( - let i = candidateParts.length - 1, j = pathParts.length - 1; - i >= 1 && j >= 1; - i--, j-- - ) { - if ( - candidateParts[i]?.startsWith("{") && - candidateParts[i]?.indexOf("}") !== -1 - ) { - const start = candidateParts[i]!.indexOf("}") + 1, - end = candidateParts[i]?.length; - // If the current part of the candidate is a "template" part - // Try to use the suffix of pattern to match the path - // {guid} ==> $ - // {guid}:export ==> :export$ - const isMatched = new RegExp( - `${candidateParts[i]?.slice(start, end)}`, - ).test(pathParts[j] || ""); - - if (!isMatched) { - found = false; - break; - } - continue; - } - - // If the candidate part is not a template and - // the parts don't match mark the candidate as not found - // to move on with the next candidate path. - if (candidateParts[i] !== pathParts[j]) { - found = false; - break; - } - } - - // We finished evaluating the current candidate parts - // Update the matched value if and only if we found the longer pattern - if (found && candidatePath.length > matchedLen) { - matchedLen = candidatePath.length; - matchedValue = value; - } - } - - return matchedValue; -} - -function getPathFromMapKey(mapKey: string): string { - const pathStart = mapKey.indexOf("/"); - return mapKey.slice(pathStart); -} diff --git a/sdk/batch/batch-rest/generated/logger.ts b/sdk/batch/batch-rest/generated/logger.ts deleted file mode 100644 index 20094085989e..000000000000 --- a/sdk/batch/batch-rest/generated/logger.ts +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { createClientLogger } from "@azure/logger"; -export const logger = createClientLogger("batch"); diff --git a/sdk/batch/batch-rest/generated/models.ts b/sdk/batch/batch-rest/generated/models.ts deleted file mode 100644 index 8f910053f15c..000000000000 --- a/sdk/batch/batch-rest/generated/models.ts +++ /dev/null @@ -1,1824 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** Parameters for creating an Azure Batch Pool. */ -export interface BatchPoolCreateContent { - /** A string that uniquely identifies the Pool within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two Pool IDs within an Account that differ only by case). */ - id: string; - /** The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. */ - displayName?: string; - /** The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available VM sizes for Pools using Images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration), see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). */ - vmSize: string; - /** The virtual machine configuration for the Pool. This property must be specified. */ - virtualMachineConfiguration?: VirtualMachineConfiguration; - /** The timeout for allocation of Compute Nodes to the Pool. This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). */ - resizeTimeout?: string; - /** The user-specified tags associated with the pool. The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. */ - resourceTags?: Record; - /** The desired number of dedicated Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. */ - targetDedicatedNodes?: number; - /** The desired number of Spot/Low-priority Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. */ - targetLowPriorityNodes?: number; - /** Whether the Pool size should automatically adjust over time. If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula property is required and the Pool automatically resizes according to the formula. The default value is false. */ - enableAutoScale?: boolean; - /** A formula for the desired number of Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the Pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see 'Automatically scale Compute Nodes in an Azure Batch Pool' (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/). */ - autoScaleFormula?: string; - /** The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). */ - autoScaleEvaluationInterval?: string; - /** Whether the Pool permits direct communication between Compute Nodes. Enabling inter-node communication limits the maximum size of the Pool due to deployment restrictions on the Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The default value is false. */ - enableInterNodeCommunication?: boolean; - /** The network configuration for the Pool. */ - networkConfiguration?: NetworkConfiguration; - /** A Task specified to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. */ - startTask?: BatchStartTask; - /** The list of Packages to be installed on each Compute Node in the Pool. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}). Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package references on any given Pool. */ - applicationPackageReferences?: Array; - /** The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. */ - taskSlotsPerNode?: number; - /** How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. */ - taskSchedulingPolicy?: BatchTaskSchedulingPolicy; - /** The list of user Accounts to be created on each Compute Node in the Pool. */ - userAccounts?: Array; - /** A list of name-value pairs associated with the Pool as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. */ - metadata?: Array; - /** Mount storage using specified file system for the entire lifetime of the pool. Mount the storage using Azure fileshare, NFS, CIFS or Blobfuse based file system. */ - mountConfiguration?: Array; - /** - * The desired node communication mode for the pool. If omitted, the default value is Default. - * - * Possible values: "default", "classic", "simplified" - */ - targetNodeCommunicationMode?: BatchNodeCommunicationMode; - /** The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling. */ - upgradePolicy?: UpgradePolicy; -} - -/** - * The configuration for Compute Nodes in a Pool based on the Azure Virtual - * Machines infrastructure. - */ -export interface VirtualMachineConfiguration { - /** A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use. */ - imageReference: ImageReference; - /** The SKU of the Batch Compute Node agent to be provisioned on Compute Nodes in the Pool. The Batch Compute Node agent is a program that runs on each Compute Node in the Pool, and provides the command-and-control interface between the Compute Node and the Batch service. There are different implementations of the Compute Node agent, known as SKUs, for different operating systems. You must specify a Compute Node agent SKU which matches the selected Image reference. To get the list of supported Compute Node agent SKUs along with their list of verified Image references, see the 'List supported Compute Node agent SKUs' operation. */ - nodeAgentSKUId: string; - /** Windows operating system settings on the virtual machine. This property must not be specified if the imageReference property specifies a Linux OS Image. */ - windowsConfiguration?: WindowsConfiguration; - /** The configuration for data disks attached to the Compute Nodes in the Pool. This property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them. This cannot be updated. Each Compute Node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the Compute Node is removed from the Pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://docs.microsoft.com/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://docs.microsoft.com/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. */ - dataDisks?: Array; - /** - * This only applies to Images that contain the Windows operating system, and - * should only be used when you hold valid on-premises licenses for the Compute - * Nodes which will be deployed. If omitted, no on-premises licensing discount is - * applied. Values are: - * - * Windows_Server - The on-premises license is for Windows - * Server. - * Windows_Client - The on-premises license is for Windows Client. - * - */ - licenseType?: string; - /** The container configuration for the Pool. If specified, setup is performed on each Compute Node in the Pool to allow Tasks to run in containers. All regular Tasks and Job manager Tasks run on this Pool must specify the containerSettings property, and all other Tasks may specify it. */ - containerConfiguration?: ContainerConfiguration; - /** The disk encryption configuration for the pool. If specified, encryption is performed on each node in the pool during node provisioning. */ - diskEncryptionConfiguration?: DiskEncryptionConfiguration; - /** The node placement configuration for the pool. This configuration will specify rules on how nodes in the pool will be physically allocated. */ - nodePlacementConfiguration?: BatchNodePlacementConfiguration; - /** The virtual machine extension for the pool. If specified, the extensions mentioned in this configuration will be installed on each node. */ - extensions?: Array; - /** Settings for the operating system disk of the Virtual Machine. */ - osDisk?: OSDisk; - /** Specifies the security profile settings for the virtual machine or virtual machine scale set. */ - securityProfile?: SecurityProfile; - /** Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName} */ - serviceArtifactReference?: ServiceArtifactReference; -} - -/** - * A reference to an Azure Virtual Machines Marketplace Image or a Azure Compute Gallery Image. - * To get the list of all Azure Marketplace Image references verified by Azure Batch, see the - * ' List Supported Images ' operation. - */ -export interface ImageReference { - /** The publisher of the Azure Virtual Machines Marketplace Image. For example, Canonical or MicrosoftWindowsServer. */ - publisher?: string; - /** The offer type of the Azure Virtual Machines Marketplace Image. For example, UbuntuServer or WindowsServer. */ - offer?: string; - /** The SKU of the Azure Virtual Machines Marketplace Image. For example, 18.04-LTS or 2019-Datacenter. */ - sku?: string; - /** The version of the Azure Virtual Machines Marketplace Image. A value of 'latest' can be specified to select the latest version of an Image. If omitted, the default is 'latest'. */ - version?: string; - /** The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ - virtualMachineImageId?: string; - /** The shared gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from shared gallery image GET call. */ - sharedGalleryImageId?: string; - /** The community gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from community gallery image GET call. */ - communityGalleryImageId?: string; -} - -/** Windows operating system settings to apply to the virtual machine. */ -export interface WindowsConfiguration { - /** Whether automatic updates are enabled on the virtual machine. If omitted, the default value is true. */ - enableAutomaticUpdates?: boolean; -} - -/** - * Settings which will be used by the data disks associated to Compute Nodes in - * the Pool. When using attached data disks, you need to mount and format the - * disks from within a VM to use them. - */ -export interface DataDisk { - /** The logical unit number. The logicalUnitNumber is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct logicalUnitNumber. The value must be between 0 and 63, inclusive. */ - lun: number; - /** - * The type of caching to be enabled for the data disks. The default value for caching is readwrite. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * - * Possible values: "none", "readonly", "readwrite" - */ - caching?: CachingType; - /** The initial disk size in gigabytes. */ - diskSizeGB: number; - /** - * The storage Account type to be used for the data disk. If omitted, the default is "standard_lrs". - * - * Possible values: "standard_lrs", "premium_lrs", "standardssd_lrs" - */ - storageAccountType?: StorageAccountType; -} - -/** The configuration for container-enabled Pools. */ -export interface ContainerConfiguration { - /** - * The container technology to be used. - * - * Possible values: "dockerCompatible", "criCompatible" - */ - type: ContainerType; - /** The collection of container Image names. 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[]; - /** Additional private registries from which containers can be pulled. If any Images must be downloaded from a private registry which requires credentials, then those credentials must be provided here. */ - containerRegistries?: Array; -} - -/** A private container registry. */ -export interface ContainerRegistryReference { - /** The user name to log into the registry server. */ - username?: string; - /** The password to log into the registry server. */ - password?: string; - /** The registry URL. If omitted, the default is "docker.io". */ - registryServer?: string; - /** The reference to the user assigned identity to use to access an Azure Container Registry instead of username and password. */ - identityReference?: BatchNodeIdentityReference; -} - -/** - * The reference to a user assigned identity associated with the Batch pool which - * a compute node will use. - */ -export interface BatchNodeIdentityReference { - /** The ARM resource id of the user assigned identity. */ - resourceId?: string; -} - -/** - * The disk encryption configuration applied on compute nodes in the pool. - * Disk encryption configuration is not supported on Linux pool created with - * Azure Compute Gallery Image. - */ -export interface DiskEncryptionConfiguration { - /** The list of disk targets Batch Service will encrypt on the compute node. The list of disk targets Batch Service will encrypt on the compute node. */ - targets?: DiskEncryptionTarget[]; -} - -/** - * For regional placement, nodes in the pool will be allocated in the same region. - * For zonal placement, nodes in the pool will be spread across different zones - * with best effort balancing. - */ -export interface BatchNodePlacementConfiguration { - /** - * Node placement Policy type on Batch Pools. Allocation policy used by Batch Service to provision the nodes. If not specified, Batch will use the regional policy. - * - * Possible values: "Shared", "Startup", "VfsMounts", "Task", "JobPrep", "Applications" - */ - policy?: BatchNodePlacementPolicyType; -} - -/** The configuration for virtual machine extensions. */ -export interface VMExtension { - /** The name of the virtual machine extension. */ - name: string; - /** The name of the extension handler publisher. */ - publisher: string; - /** The type of the extension. */ - type: string; - /** The version of script handler. */ - 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. */ - protectedSettings?: Record; - /** The collection of extension names. Collection of extension names after which this extension needs to be provisioned. */ - provisionAfterExtensions?: string[]; -} - -/** Settings for the operating system disk of the compute node (VM). */ -export interface OSDisk { - /** Specifies the ephemeral Disk Settings for the operating system disk used by the compute node (VM). */ - ephemeralOSDiskSettings?: DiffDiskSettings; - /** - * Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage. - * - * Possible values: "none", "readonly", "readwrite" - */ - caching?: CachingType; - /** The initial disk size in GB when creating new OS disk. */ - diskSizeGB?: number; - /** The managed disk parameters. */ - managedDisk?: ManagedDisk; - /** Specifies whether writeAccelerator should be enabled or disabled on the disk. */ - writeAcceleratorEnabled?: boolean; -} - -/** - * Specifies the ephemeral Disk Settings for the operating system disk used by the - * compute node (VM). - */ -export interface DiffDiskSettings { - /** - * Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose the location e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. - * - * Possible values: "cachedisk" - */ - placement?: DiffDiskPlacement; -} - -/** The managed disk parameters. */ -export interface ManagedDisk { - /** - * The storage account type for managed disk. - * - * Possible values: "standard_lrs", "premium_lrs", "standardssd_lrs" - */ - storageAccountType?: StorageAccountType; - /** Specifies the security profile settings for the managed disk. */ - securityProfile?: VMDiskSecurityProfile; -} - -/** Specifies the security profile settings for the managed disk. **Note**: It can only be set for Confidential VMs and required when using Confidential VMs. */ -export interface VMDiskSecurityProfile { - /** - * Specifies the EncryptionType of the managed disk. It is set to VMGuestStateOnly for encryption of just the VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the VMGuestState blob. **Note**: It can be set for only Confidential VMs and is required when using Confidential VMs. - * - * Possible values: "NonPersistedTPM", "VMGuestStateOnly" - */ - securityEncryptionType?: SecurityEncryptionTypes; -} - -/** Specifies the security profile settings for the virtual machine or virtual machine scale set. */ -export interface SecurityProfile { - /** This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. For more information on encryption at host requirements, please refer to https://learn.microsoft.com/azure/virtual-machines/disk-encryption#supported-vm-sizes. */ - encryptionAtHost: boolean; - /** - * Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. - * - * Possible values: "trustedLaunch", "confidentialVM" - */ - securityType: SecurityTypes; - /** Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Specifies the security settings like secure boot and vTPM used while creating the virtual machine. */ - uefiSettings: UefiSettings; -} - -/** Specifies the security settings like secure boot and vTPM used while creating the virtual machine. */ -export interface UefiSettings { - /** Specifies whether secure boot should be enabled on the virtual machine. */ - secureBootEnabled?: boolean; - /** Specifies whether vTPM should be enabled on the virtual machine. */ - vTpmEnabled?: boolean; -} - -/** - * Specifies the service artifact reference id used to set same image version - * for all virtual machines in the scale set when using 'latest' image version. - */ -export interface ServiceArtifactReference { - /** The service artifact reference id of ServiceArtifactReference. The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName} */ - id: string; -} - -/** The network configuration for a Pool. */ -export interface NetworkConfiguration { - /** The ARM resource identifier of the virtual network subnet which the Compute Nodes of the Pool will join. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes in the Pool. If the subnet doesn't have enough free IP addresses, the Pool will partially allocate Nodes and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. Only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication. Enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Also enable outbound connections to Azure Storage on port 443. For more details see: https://docs.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ - subnetId?: string; - /** - * The scope of dynamic vnet assignment. - * - * Possible values: "none", "job" - */ - dynamicVNetAssignmentScope?: DynamicVNetAssignmentScope; - /** The configuration for endpoints on Compute Nodes in the Batch Pool. */ - endpointConfiguration?: BatchPoolEndpointConfiguration; - /** The Public IPAddress configuration for Compute Nodes in the Batch Pool. */ - publicIPAddressConfiguration?: PublicIpAddressConfiguration; - /** Whether this pool should enable accelerated networking. 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. */ -export interface BatchPoolEndpointConfiguration { - /** A list of inbound NAT Pools that can be used to address specific ports on an individual Compute Node externally. The maximum number of inbound NAT Pools per Batch Pool is 5. If the maximum number of inbound NAT Pools is exceeded the request fails with HTTP status code 400. This cannot be specified if the IPAddressProvisioningType is NoPublicIPAddresses. */ - inboundNATPools: Array; -} - -/** - * A inbound NAT Pool that can be used to address specific ports on Compute Nodes - * in a Batch Pool externally. - */ -export interface InboundNatPool { - /** The name of the endpoint. The name must be unique within a Batch Pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters. If any invalid values are provided the request fails with HTTP status code 400. */ - name: string; - /** - * The protocol of the endpoint. - * - * Possible values: "tcp", "udp" - */ - protocol: InboundEndpointProtocol; - /** The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. */ - backendPort: number; - /** The first port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. */ - frontendPortRangeStart: number; - /** The last port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. */ - frontendPortRangeEnd: number; - /** A list of network security group rules that will be applied to the endpoint. The maximum number of rules that can be specified across all the endpoints on a Batch Pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400. */ - networkSecurityGroupRules?: Array; -} - -/** A network security group rule to apply to an inbound endpoint. */ -export interface NetworkSecurityGroupRule { - /** The priority for this rule. Priorities within a Pool must be unique and are evaluated in order of priority. The lower the number the higher the priority. For example, rules could be specified with order numbers of 150, 250, and 350. The rule with the order number of 150 takes precedence over the rule that has an order of 250. Allowed priorities are 150 to 4096. If any reserved or duplicate values are provided the request fails with HTTP status code 400. */ - priority: number; - /** - * The action that should be taken for a specified IP address, subnet range or tag. - * - * Possible values: "allow", "deny" - */ - access: NetworkSecurityGroupRuleAccess; - /** The source address prefix or tag to match for the rule. Valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If any other values are provided the request fails with HTTP status code 400. */ - sourceAddressPrefix: string; - /** The source port ranges to match for the rule. Valid values are '*' (for all ports 0 - 65535), a specific port (i.e. 22), or a port range (i.e. 100-200). The ports must be in the range of 0 to 65535. Each entry in this collection must not overlap any other entry (either a range or an individual port). If any other values are provided the request fails with HTTP status code 400. The default value is '*'. */ - sourcePortRanges?: string[]; -} - -/** The public IP Address configuration of the networking configuration of a Pool. */ -export interface PublicIpAddressConfiguration { - /** - * The provisioning type for Public IP Addresses for the Pool. The default value is BatchManaged. - * - * Possible values: "batchmanaged", "usermanaged", "nopublicipaddresses" - */ - provision?: IpAddressProvisioningType; - /** The list of public IPs which the Batch service will use when provisioning Compute Nodes. The number of IPs specified here limits the maximum size of the Pool - 100 dedicated nodes or 100 Spot/Low-priority nodes can be allocated for each public IP. For example, a pool needing 250 dedicated VMs would need at least 3 public IPs specified. Each element of this collection is of the form: /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. */ - ipAddressIds?: string[]; -} - -/** - * Batch will retry Tasks when a recovery operation is triggered on a Node. - * Examples of recovery operations include (but are not limited to) when an - * unhealthy Node is rebooted or a Compute Node disappeared due to host failure. - * Retries due to recovery operations are independent of and are not counted - * against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal - * retry due to a recovery operation may occur. Because of this, all Tasks should - * be idempotent. This means Tasks need to tolerate being interrupted and - * restarted without causing any corruption or duplicate data. The best practice - * for long running Tasks is to use some form of checkpointing. In some cases the - * StartTask may be re-run even though the Compute Node was not rebooted. Special - * care should be taken to avoid StartTasks which create breakaway process or - * install/launch services from the StartTask working directory, as this will - * block Batch from being able to re-run the StartTask. - */ -export interface BatchStartTask { - /** The command line of the StartTask. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ - commandLine: string; - /** The settings for the container under which the StartTask runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ - containerSettings?: BatchTaskContainerSettings; - /** A list of files that the Batch service will download to the Compute Node before running the command line. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. Files listed under this element are located in the Task's working directory. */ - resourceFiles?: Array; - /** A list of environment variable settings for the StartTask. */ - environmentSettings?: Array; - /** The user identity under which the StartTask runs. If omitted, the Task runs as a non-administrative user unique to the Task. */ - userIdentity?: UserIdentity; - /** The maximum number of times the Task may be retried. The Batch service retries a Task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try the Task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the Task. If the maximum retry count is -1, the Batch service retries the Task without limit, however this is not recommended for a start task or any task. The default value is 0 (no retries). */ - maxTaskRetryCount?: number; - /** Whether the Batch service should wait for the StartTask to complete successfully (that is, to exit with exit code 0) before scheduling any Tasks on the Compute Node. If true and the StartTask fails on a Node, the Batch service retries the StartTask up to its maximum retry count (maxTaskRetryCount). If the Task has still not completed successfully after all retries, then the Batch service marks the Node unusable, and will not schedule Tasks to it. This condition can be detected via the Compute Node state and failure info details. If false, the Batch service will not wait for the StartTask to complete. In this case, other Tasks can start executing on the Compute Node while the StartTask is still running; and even if the StartTask fails, new Tasks will continue to be scheduled on the Compute Node. The default is true. */ - waitForSuccess?: boolean; -} - -/** The container settings for a Task. */ -export interface BatchTaskContainerSettings { - /** Additional options to the container create command. These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service. */ - containerRunOptions?: string; - /** The Image to use to create the container in which the Task will run. This is the full Image reference, as would be specified to "docker pull". If no tag is provided as part of the Image name, the tag ":latest" is used as a default. */ - imageName: string; - /** The private registry which contains the container Image. This setting can be omitted if was already provided at Pool creation. */ - registry?: ContainerRegistryReference; - /** - * The location of the container Task working directory. The default is 'taskWorkingDirectory'. - * - * Possible values: "taskWorkingDirectory", "containerImageDefault" - */ - workingDirectory?: ContainerWorkingDirectory; - /** The paths you want to mounted to container task. If this array is null or be not present, container task will mount entire temporary disk drive in windows (or AZ_BATCH_NODE_ROOT_DIR in Linux). It won't' mount any data paths into container if this array is set as empty. */ - containerHostBatchBindMounts?: Array; -} - -/** The entry of path and mount mode you want to mount into task container. */ -export interface ContainerHostBatchBindMountEntry { - /** - * The path which be mounted to container customer can select. - * - * Possible values: "regional", "zonal" - */ - source?: ContainerHostDataPath; - /** Mount this source path as read-only mode or not. Default value is false (read/write mode). For Linux, if you mount this path as a read/write mode, this does not mean that all users in container have the read/write access for the path, it depends on the access in host VM. If this path is mounted read-only, all users within the container will not be able to modify the path. */ - isReadOnly?: boolean; -} - -/** A single file or multiple files to be downloaded to a Compute Node. */ -export interface ResourceFile { - /** The storage container name in the auto storage Account. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. */ - autoStorageContainerName?: string; - /** The URL of the blob container within Azure Blob Storage. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. This URL must be readable and listable from compute nodes. There are three ways to get such a URL for a container in Azure storage: include a Shared Access Signature (SAS) granting read and list permissions on the container, use a managed identity with read and list permissions, or set the ACL for the container to allow public access. */ - storageContainerUrl?: string; - /** The URL of the file to download. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. If the URL points to Azure Blob Storage, it must be readable from compute nodes. There are three ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, use a managed identity with read permission, or set the ACL for the blob or its container to allow public access. */ - httpUrl?: string; - /** The blob prefix to use when downloading blobs from an Azure Storage container. Only the blobs whose names begin with the specified prefix will be downloaded. The property is valid only when autoStorageContainerName or storageContainerUrl is used. This prefix can be a partial filename or a subdirectory. If a prefix is not specified, all the files in the container will be downloaded. */ - blobPrefix?: string; - /** The location on the Compute Node to which to download the file(s), relative to the Task's working directory. If the httpUrl property is specified, the filePath is required and describes the path which the file will be downloaded to, including the filename. Otherwise, if the autoStorageContainerName or storageContainerUrl property is specified, filePath is optional and is the directory to download the files to. In the case where filePath is used as a directory, any directory structure already associated with the input data will be retained in full and appended to the specified filePath directory. The specified relative path cannot break out of the Task's working directory (for example by using '..'). */ - filePath?: string; - /** The file permission mode attribute in octal format. This property applies only to files being downloaded to Linux Compute Nodes. It will be ignored if it is specified for a resourceFile which will be downloaded to a Windows Compute Node. If this property is not specified for a Linux Compute Node, then a default value of 0770 is applied to the file. */ - fileMode?: string; - /** The reference to the user assigned identity to use to access Azure Blob Storage specified by storageContainerUrl or httpUrl. */ - identityReference?: BatchNodeIdentityReference; -} - -/** An environment variable to be set on a Task process. */ -export interface EnvironmentSetting { - /** The name of the environment variable. */ - name: string; - /** The value of the environment variable. */ - value?: string; -} - -/** The definition of the user identity under which the Task is run. Specify either the userName or autoUser property, but not both. */ -export interface UserIdentity { - /** The name of the user identity under which the Task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both. */ - username?: string; - /** The auto user under which the Task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both. */ - autoUser?: AutoUserSpecification; -} - -/** Specifies the options for the auto user that runs an Azure Batch Task. */ -export interface AutoUserSpecification { - /** - * The scope for the auto user. The default value is pool. If the pool is running Windows, a value of Task should be specified if stricter isolation between tasks is required, such as if the task mutates the registry in a way which could impact other tasks. - * - * Possible values: "task", "pool" - */ - scope?: AutoUserScope; - /** - * The elevation level of the auto user. The default value is nonAdmin. - * - * Possible values: "nonadmin", "admin" - */ - elevationLevel?: ElevationLevel; -} - -/** A reference to an Package to be deployed to Compute Nodes. */ -export interface BatchApplicationPackageReference { - /** The ID of the application to deploy. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}). */ - applicationId: string; - /** The version of the application to deploy. If omitted, the default version is deployed. If this is omitted on a Pool, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences and HTTP status code 409. If this is omitted on a Task, and no default version is specified for this application, the Task fails with a pre-processing error. */ - version?: string; -} - -/** Specifies how Tasks should be distributed across Compute Nodes. */ -export interface BatchTaskSchedulingPolicy { - /** - * How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. - * - * Possible values: "spread", "pack" - */ - nodeFillType: BatchNodeFillType; -} - -/** - * Properties used to create a user used to execute Tasks on an Azure Batch - * Compute Node. - */ -export interface UserAccount { - /** The name of the user Account. Names can contain any Unicode characters up to a maximum length of 20. */ - name: string; - /** The password for the user Account. */ - password: string; - /** - * The elevation level of the user Account. The default value is nonAdmin. - * - * Possible values: "nonadmin", "admin" - */ - elevationLevel?: ElevationLevel; - /** The Linux-specific user configuration for the user Account. This property is ignored if specified on a Windows Pool. If not specified, the user is created with the default options. */ - linuxUserConfiguration?: LinuxUserConfiguration; - /** The Windows-specific user configuration for the user Account. This property can only be specified if the user is on a Windows Pool. If not specified and on a Windows Pool, the user is created with the default options. */ - windowsUserConfiguration?: WindowsUserConfiguration; -} - -/** Properties used to create a user Account on a Linux Compute Node. */ -export interface LinuxUserConfiguration { - /** The user ID of the user Account. The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the uid. */ - uid?: number; - /** The group ID for the user Account. The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the gid. */ - gid?: number; - /** The SSH private key for the user Account. The private key must not be password protected. The private key is used to automatically configure asymmetric-key based authentication for SSH between Compute Nodes in a Linux Pool when the Pool's enableInterNodeCommunication property is true (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair into the user's .ssh directory. If not specified, password-less SSH is not configured between Compute Nodes (no modification of the user's .ssh directory is done). */ - sshPrivateKey?: string; -} - -/** Properties used to create a user Account on a Windows Compute Node. */ -export interface WindowsUserConfiguration { - /** - * The login mode for the user. The default is 'batch'. - * - * Possible values: "batch", "interactive" - */ - loginMode?: LoginMode; -} - -/** - * The Batch service does not assign any meaning to this metadata; it is solely - * for the use of user code. - */ -export interface MetadataItem { - /** The name of the metadata item. */ - name: string; - /** The value of the metadata item. */ - value: string; -} - -/** The file system to mount on each node. */ -export interface MountConfiguration { - /** The Azure Storage Container to mount using blob FUSE on each node. This property is mutually exclusive with all other properties. */ - azureBlobFileSystemConfiguration?: AzureBlobFileSystemConfiguration; - /** The NFS file system to mount on each node. This property is mutually exclusive with all other properties. */ - nfsMountConfiguration?: NfsMountConfiguration; - /** The CIFS/SMB file system to mount on each node. This property is mutually exclusive with all other properties. */ - cifsMountConfiguration?: CifsMountConfiguration; - /** The Azure File Share to mount on each node. This property is mutually exclusive with all other properties. */ - azureFileShareConfiguration?: AzureFileShareConfiguration; -} - -/** Information used to connect to an Azure Storage Container using Blobfuse. */ -export interface AzureBlobFileSystemConfiguration { - /** The Azure Storage Account name. */ - accountName: string; - /** The Azure Blob Storage Container name. */ - containerName: string; - /** The Azure Storage Account key. This property is mutually exclusive with both sasKey and identity; exactly one must be specified. */ - accountKey?: string; - /** The Azure Storage SAS token. This property is mutually exclusive with both accountKey and identity; exactly one must be specified. */ - sasKey?: string; - /** Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. */ - blobfuseOptions?: string; - /** The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. */ - relativeMountPath: string; - /** The reference to the user assigned identity to use to access containerName. This property is mutually exclusive with both accountKey and sasKey; exactly one must be specified. */ - identityReference?: BatchNodeIdentityReference; -} - -/** Information used to connect to an NFS file system. */ -export interface NfsMountConfiguration { - /** The URI of the file system to mount. */ - source: string; - /** The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. */ - relativeMountPath: string; - /** Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. */ - mountOptions?: string; -} - -/** Information used to connect to a CIFS file system. */ -export interface CifsMountConfiguration { - /** The user to use for authentication against the CIFS file system. */ - username: string; - /** The URI of the file system to mount. */ - source: string; - /** The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. */ - relativeMountPath: string; - /** Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. */ - mountOptions?: string; - /** The password to use for authentication against the CIFS file system. */ - password: string; -} - -/** Information used to connect to an Azure Fileshare. */ -export interface AzureFileShareConfiguration { - /** The Azure Storage account name. */ - accountName: string; - /** The Azure Files URL. This is of the form 'https://{account}.file.core.windows.net/'. */ - azureFileUrl: string; - /** The Azure Storage account key. */ - accountKey: string; - /** The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. */ - relativeMountPath: string; - /** Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. */ - mountOptions?: string; -} - -/** Describes an upgrade policy - automatic, manual, or rolling. */ -export interface UpgradePolicy { - /** - * Specifies the mode of an upgrade to virtual machines in the scale set.

Possible values are:

**Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.

**Automatic** - All virtual machines in the scale set are automatically updated at the same time.

**Rolling** - Scale set performs updates in batches with an optional pause time in between. - * - * Possible values: "automatic", "manual", "rolling" - */ - mode: UpgradeMode; - /** Configuration parameters used for performing automatic OS Upgrade. The configuration parameters used for performing automatic OS upgrade. */ - automaticOSUpgradePolicy?: AutomaticOsUpgradePolicy; - /** The configuration parameters used while performing a rolling upgrade. */ - rollingUpgradePolicy?: RollingUpgradePolicy; -} - -/** The configuration parameters used for performing automatic OS upgrade. */ -export interface AutomaticOsUpgradePolicy { - /** Whether OS image rollback feature should be disabled. */ - disableAutomaticRollback?: boolean; - /** Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available.

If this is set to true for Windows based pools, [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/rest/api/batchservice/pool/add?tabs=HTTP#windowsconfiguration) cannot be set to true. */ - enableAutomaticOSUpgrade?: boolean; - /** Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS. */ - useRollingUpgradePolicy?: boolean; - /** Defer OS upgrades on the TVMs if they are running tasks. */ - osRollingUpgradeDeferral?: boolean; -} - -/** The configuration parameters used while performing a rolling upgrade. */ -export interface RollingUpgradePolicy { - /** Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size. This field is able to be set to true or false only when using NodePlacementConfiguration as Zonal. */ - enableCrossZoneUpgrade?: boolean; - /** The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent. */ - maxBatchInstancePercent?: number; - /** The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent. */ - maxUnhealthyInstancePercent?: number; - /** The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The value of this field should be between 0 and 100, inclusive. */ - maxUnhealthyUpgradedInstancePercent?: number; - /** The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format.. */ - pauseTimeBetweenBatches?: string; - /** Upgrade all unhealthy instances in a scale set before any healthy instances. */ - prioritizeUnhealthyInstances?: boolean; - /** Rollback failed instances to previous model if the Rolling Upgrade policy is violated. */ - rollbackFailedInstancesOnPolicyBreach?: boolean; -} - -/** Represents a name-value pair. */ -export interface NameValuePair { - /** The name in the name-value pair. */ - name?: string; - /** The value in the name-value pair. */ - value?: string; -} - -/** Parameters for updating an Azure Batch Pool. */ -export interface BatchPoolUpdateContent { - /** The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. This field can be updated only when the pool is empty. */ - displayName?: string; - /** The size of virtual machines in the Pool. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes).

This field can be updated only when the pool is empty. */ - vmSize?: string; - /** Whether the Pool permits direct communication between Compute Nodes. Enabling inter-node communication limits the maximum size of the Pool due to deployment restrictions on the Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The default value is false.

This field can be updated only when the pool is empty. */ - enableInterNodeCommunication?: boolean; - /** A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. If this element is present, it overwrites any existing StartTask. If omitted, any existing StartTask is left unchanged. */ - startTask?: BatchStartTask; - /** A list of Packages to be installed on each Compute Node in the Pool. Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. If this element is present, it replaces any existing Package references. If you specify an empty collection, then all Package references are removed from the Pool. If omitted, any existing Package references are left unchanged. */ - applicationPackageReferences?: Array; - /** A list of name-value pairs associated with the Pool as metadata. If this element is present, it replaces any existing metadata configured on the Pool. If you specify an empty collection, any metadata is removed from the Pool. If omitted, any existing metadata is left unchanged. */ - metadata?: Array; - /** The virtual machine configuration for the Pool. This property must be specified.

This field can be updated only when the pool is empty. */ - virtualMachineConfiguration?: VirtualMachineConfiguration; - /** - * The desired node communication mode for the pool. If this element is present, it replaces the existing targetNodeCommunicationMode configured on the Pool. If omitted, any existing metadata is left unchanged. - * - * Possible values: "default", "classic", "simplified" - */ - targetNodeCommunicationMode?: BatchNodeCommunicationMode; - /** The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256.

This field can be updated only when the pool is empty. */ - taskSlotsPerNode?: number; - /** How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread.

This field can be updated only when the pool is empty. */ - taskSchedulingPolicy?: BatchTaskSchedulingPolicy; - /** The network configuration for the Pool. This field can be updated only when the pool is empty. */ - networkConfiguration?: NetworkConfiguration; - /** The user-specified tags associated with the pool. The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'.

This field can be updated only when the pool is empty. */ - resourceTags?: Record; - /** The list of user Accounts to be created on each Compute Node in the Pool. This field can be updated only when the pool is empty. */ - userAccounts?: Array; - /** Mount storage using specified file system for the entire lifetime of the pool. Mount the storage using Azure fileshare, NFS, CIFS or Blobfuse based file system.

This field can be updated only when the pool is empty. */ - mountConfiguration?: Array; - /** The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling.

This field can be updated only when the pool is empty. */ - upgradePolicy?: UpgradePolicy; -} - -/** Parameters for enabling automatic scaling on an Azure Batch Pool. */ -export interface BatchPoolEnableAutoScaleContent { - /** The formula for the desired number of Compute Nodes in the Pool. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued. */ - autoScaleFormula?: string; - /** The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued. */ - autoScaleEvaluationInterval?: string; -} - -/** Parameters for evaluating an automatic scaling formula on an Azure Batch Pool. */ -export interface BatchPoolEvaluateAutoScaleContent { - /** The formula for the desired number of Compute Nodes in the Pool. The formula is validated and its results calculated, but it is not applied to the Pool. To apply the formula to the Pool, 'Enable automatic scaling on a Pool'. For more information about specifying this formula, see Automatically scale Compute Nodes in an Azure Batch Pool (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling). */ - autoScaleFormula: string; -} - -/** Parameters for changing the size of an Azure Batch Pool. */ -export interface BatchPoolResizeContent { - /** The desired number of dedicated Compute Nodes in the Pool. */ - targetDedicatedNodes?: number; - /** The desired number of Spot/Low-priority Compute Nodes in the Pool. */ - targetLowPriorityNodes?: number; - /** The timeout for allocation of Nodes to the Pool or removal of Compute Nodes from the Pool. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). */ - resizeTimeout?: string; - /** - * Determines what to do with a Compute Node and its running task(s) if the Pool size is decreasing. The default value is requeue. - * - * Possible values: "requeue", "terminate", "taskcompletion", "retaineddata" - */ - nodeDeallocationOption?: BatchNodeDeallocationOption; -} - -/** Parameters for replacing properties on an Azure Batch Pool. */ -export interface BatchPoolReplaceContent { - /** A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. If this element is present, it overwrites any existing StartTask. If omitted, any existing StartTask is removed from the Pool. */ - startTask?: BatchStartTask; - /** The list of Application Packages to be installed on each Compute Node in the Pool. The list replaces any existing Application Package references on the Pool. Changes to Application Package references affect all new Compute Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Application Package references on any given Pool. If omitted, or if you specify an empty collection, any existing Application Packages references are removed from the Pool. A maximum of 10 references may be specified on a given Pool. */ - applicationPackageReferences: Array; - /** A list of name-value pairs associated with the Pool as metadata. This list replaces any existing metadata configured on the Pool. If omitted, or if you specify an empty collection, any existing metadata is removed from the Pool. */ - metadata: Array; - /** - * The desired node communication mode for the pool. This setting replaces any existing targetNodeCommunication setting on the Pool. If omitted, the existing setting is default. - * - * Possible values: "default", "classic", "simplified" - */ - targetNodeCommunicationMode?: BatchNodeCommunicationMode; -} - -/** Parameters for removing nodes from an Azure Batch Pool. */ -export interface BatchNodeRemoveContent { - /** A list containing the IDs of the Compute Nodes to be removed from the specified Pool. A maximum of 100 nodes may be removed per request. */ - nodeList: string[]; - /** The timeout for removal of Compute Nodes to the Pool. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). */ - resizeTimeout?: string; - /** - * Determines what to do with a Compute Node and its running task(s) after it has been selected for deallocation. The default value is requeue. - * - * Possible values: "requeue", "terminate", "taskcompletion", "retaineddata" - */ - nodeDeallocationOption?: BatchNodeDeallocationOption; -} - -/** An Azure Batch Job. */ -export interface BatchJob { - /** The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. */ - priority?: number; - /** Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. */ - allowTaskPreemption?: boolean; - /** The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. */ - maxParallelTasks?: number; - /** The execution constraints for the Job. */ - constraints?: BatchJobConstraints; - /** The Pool settings associated with the Job. */ - poolInfo: BatchPoolInfo; - /** - * The action the Batch service should take when all Tasks in the Job are in the completed state. The default is noaction. - * - * Possible values: "noaction", "terminatejob" - */ - onAllTasksComplete?: OnAllBatchTasksComplete; - /** A list of name-value pairs associated with the Job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. */ - metadata?: Array; -} - -/** The execution constraints for a Job. */ -export interface BatchJobConstraints { - /** The maximum elapsed time that the Job may run, measured from the time the Job is created. If the Job does not complete within the time limit, the Batch service terminates it and any Tasks that are still running. In this case, the termination reason will be MaxWallClockTimeExpiry. If this property is not specified, there is no time limit on how long the Job may run. */ - maxWallClockTime?: string; - /** The maximum number of times each Task may be retried. The Batch service retries a Task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try each Task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries a Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry Tasks. If the maximum retry count is -1, the Batch service retries Tasks without limit. The default value is 0 (no retries). */ - maxTaskRetryCount?: number; -} - -/** - * Specifies details of a Job Manager Task. - * The Job Manager Task is automatically started when the Job is created. The - * Batch service tries to schedule the Job Manager Task before any other Tasks in - * the Job. When shrinking a Pool, the Batch service tries to preserve Nodes where - * Job Manager Tasks are running for as long as possible (that is, Compute Nodes - * running 'normal' Tasks are removed before Compute Nodes running Job Manager - * Tasks). When a Job Manager Task fails and needs to be restarted, the system - * tries to schedule it at the highest priority. If there are no idle Compute - * Nodes available, the system may terminate one of the running Tasks in the Pool - * and return it to the queue in order to make room for the Job Manager Task to - * restart. Note that a Job Manager Task in one Job does not have priority over - * Tasks in other Jobs. Across Jobs, only Job level priorities are observed. For - * example, if a Job Manager in a priority 0 Job needs to be restarted, it will - * not displace Tasks of a priority 1 Job. Batch will retry Tasks when a recovery - * operation is triggered on a Node. Examples of recovery operations include (but - * are not limited to) when an unhealthy Node is rebooted or a Compute Node - * disappeared due to host failure. Retries due to recovery operations are - * independent of and are not counted against the maxTaskRetryCount. Even if the - * maxTaskRetryCount is 0, an internal retry due to a recovery operation may - * occur. Because of this, all Tasks should be idempotent. This means Tasks need - * to tolerate being interrupted and restarted without causing any corruption or - * duplicate data. The best practice for long running Tasks is to use some form of - * checkpointing. - */ -export interface BatchJobManagerTask { - /** A string that uniquely identifies the Job Manager Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. */ - id: string; - /** The display name of the Job Manager Task. It need not be unique and can contain any Unicode characters up to a maximum length of 1024. */ - displayName?: string; - /** The command line of the Job Manager Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ - commandLine: string; - /** The settings for the container under which the Job Manager Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ - containerSettings?: BatchTaskContainerSettings; - /** A list of files that the Batch service will download to the Compute Node before running the command line. Files listed under this element are located in the Task's working directory. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. */ - resourceFiles?: Array; - /** A list of files that the Batch service will upload from the Compute Node after running the command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. */ - outputFiles?: Array; - /** A list of environment variable settings for the Job Manager Task. */ - environmentSettings?: Array; - /** Constraints that apply to the Job Manager Task. */ - constraints?: BatchTaskConstraints; - /** The number of scheduling slots that the Task requires to run. The default is 1. A Task can only be scheduled to run on a compute node if the node has enough free scheduling slots available. For multi-instance Tasks, this property is not supported and must not be specified. */ - requiredSlots?: number; - /** Whether completion of the Job Manager Task signifies completion of the entire Job. If true, when the Job Manager Task completes, the Batch service marks the Job as complete. If any Tasks are still running at this time (other than Job Release), those Tasks are terminated. If false, the completion of the Job Manager Task does not affect the Job status. In this case, you should either use the onAllTasksComplete attribute to terminate the Job, or have a client or user terminate the Job explicitly. An example of this is if the Job Manager creates a set of Tasks but then takes no further role in their execution. The default value is true. If you are using the onAllTasksComplete and onTaskFailure attributes to control Job lifetime, and using the Job Manager Task only to create the Tasks for the Job (not to monitor progress), then it is important to set killJobOnCompletion to false. */ - killJobOnCompletion?: boolean; - /** The user identity under which the Job Manager Task runs. If omitted, the Task runs as a non-administrative user unique to the Task. */ - userIdentity?: UserIdentity; - /** Whether the Job Manager Task requires exclusive use of the Compute Node where it runs. If true, no other Tasks will run on the same Node for as long as the Job Manager is running. If false, other Tasks can run simultaneously with the Job Manager on a Compute Node. The Job Manager Task counts normally against the Compute Node's concurrent Task limit, so this is only relevant if the Compute Node allows multiple concurrent Tasks. The default value is true. */ - runExclusive?: boolean; - /** - * A list of Application Packages that the Batch service will deploy to the - * Compute Node before running the command line.Application Packages are - * downloaded and deployed to a shared directory, not the Task working - * directory. Therefore, if a referenced Application Package is already - * on the Compute Node, and is up to date, then it is not re-downloaded; - * the existing copy on the Compute Node is used. If a referenced Application - * Package cannot be installed, for example because the package has been deleted - * or because download failed, the Task fails. - */ - applicationPackageReferences?: Array; - /** The settings for an authentication token that the Task can use to perform Batch service operations. If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job. */ - authenticationTokenSettings?: AuthenticationTokenSettings; - /** Whether the Job Manager Task may run on a Spot/Low-priority Compute Node. The default value is true. */ - allowLowPriorityNode?: boolean; -} - -/** On every file uploads, Batch service writes two log files to the compute node, 'fileuploadout.txt' and 'fileuploaderr.txt'. These log files are used to learn more about a specific failure. */ -export interface OutputFile { - /** A pattern indicating which file(s) to upload. Both relative and absolute paths are supported. Relative paths are relative to the Task working directory. The following wildcards are supported: * matches 0 or more characters (for example pattern abc* would match abc or abcdef), ** matches any directory, ? matches any single character, [abc] matches one character in the brackets, and [a-c] matches one character in the range. Brackets can include a negation to match any character not specified (for example [!abc] matches any character but a, b, or c). If a file name starts with "." it is ignored by default but may be matched by specifying it explicitly (for example *.gif will not match .a.gif, but .*.gif will). A simple example: **\*.txt matches any file that does not start in '.' and ends with .txt in the Task working directory or any subdirectory. If the filename contains a wildcard character it can be escaped using brackets (for example abc[*] would match a file named abc*). Note that both \ and / are treated as directory separators on Windows, but only / is on Linux. Environment variables (%var% on Windows or $var on Linux) are expanded prior to the pattern being applied. */ - filePattern: string; - /** The destination for the output file(s). */ - destination: OutputFileDestination; - /** Additional options for the upload operation, including under what conditions to perform the upload. */ - uploadOptions: OutputFileUploadConfig; -} - -/** The destination to which a file should be uploaded. */ -export interface OutputFileDestination { - /** A location in Azure blob storage to which files are uploaded. */ - container?: OutputFileBlobContainerDestination; -} - -/** Specifies a file upload destination within an Azure blob storage container. */ -export interface OutputFileBlobContainerDestination { - /** The destination blob or virtual directory within the Azure Storage container. If filePattern refers to a specific file (i.e. contains no wildcards), then path is the name of the blob to which to upload that file. If filePattern contains one or more wildcards (and therefore may match multiple files), then path is the name of the blob virtual directory (which is prepended to each blob name) to which to upload the file(s). If omitted, file(s) are uploaded to the root of the container with a blob name matching their file name. */ - path?: string; - /** The URL of the container within Azure Blob Storage to which to upload the file(s). If not using a managed identity, the URL must include a Shared Access Signature (SAS) granting write permissions to the container. */ - containerUrl: string; - /** The reference to the user assigned identity to use to access Azure Blob Storage specified by containerUrl. The identity must have write access to the Azure Blob Storage container. */ - identityReference?: BatchNodeIdentityReference; - /** A list of name-value pairs for headers to be used in uploading output files. These headers will be specified when uploading files to Azure Storage. Official document on allowed headers when uploading blobs: https://docs.microsoft.com/rest/api/storageservices/put-blob#request-headers-all-blob-types. */ - uploadHeaders?: Array; -} - -/** An HTTP header name-value pair */ -export interface HttpHeader { - /** The case-insensitive name of the header to be used while uploading output files. */ - name: string; - /** The value of the header to be used while uploading output files. */ - value?: string; -} - -/** - * Options for an output file upload operation, including under what conditions - * to perform the upload. - */ -export interface OutputFileUploadConfig { - /** - * The conditions under which the Task output file or set of files should be uploaded. The default is taskcompletion. - * - * Possible values: "tasksuccess", "taskfailure", "taskcompletion" - */ - uploadCondition: OutputFileUploadCondition; -} - -/** Execution constraints to apply to a Task. */ -export interface BatchTaskConstraints { - /** The maximum elapsed time that the Task may run, measured from the time the Task starts. If the Task does not complete within the time limit, the Batch service terminates it. If this is not specified, there is no time limit on how long the Task may run. */ - maxWallClockTime?: string; - /** The minimum time to retain the Task directory on the Compute Node where it ran, from the time it completes execution. After this time, the Batch service may delete the Task directory and all its contents. The default is 7 days, i.e. the Task directory will be retained for 7 days unless the Compute Node is removed or the Job is deleted. */ - retentionTime?: string; - /** The maximum number of times the Task may be retried. The Batch service retries a Task if its exit code is nonzero. Note that this value specifically controls the number of retries for the Task executable due to a nonzero exit code. The Batch service will try the Task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the Task after the first attempt. If the maximum retry count is -1, the Batch service retries the Task without limit, however this is not recommended for a start task or any task. The default value is 0 (no retries). */ - maxTaskRetryCount?: number; -} - -/** - * The settings for an authentication token that the Task can use to perform Batch - * service operations. - */ -export interface AuthenticationTokenSettings { - /** The Batch resources to which the token grants access. The authentication token grants access to a limited set of Batch service operations. Currently the only supported value for the access property is 'job', which grants access to all operations related to the Job which contains the Task. */ - access?: AccessScope[]; -} - -/** - * A Job Preparation Task to run before any Tasks of the Job on any given Compute Node. - * You can use Job Preparation to prepare a Node to run Tasks for the Job. - * Activities commonly performed in Job Preparation include: Downloading common - * resource files used by all the Tasks in the Job. The Job Preparation Task can - * download these common resource files to the shared location on the Node. - * (AZ_BATCH_NODE_ROOT_DIR\shared), or starting a local service on the Node so - * that all Tasks of that Job can communicate with it. If the Job Preparation Task - * fails (that is, exhausts its retry count before exiting with exit code 0), - * Batch will not run Tasks of this Job on the Node. The Compute Node remains - * ineligible to run Tasks of this Job until it is reimaged. The Compute Node - * remains active and can be used for other Jobs. The Job Preparation Task can run - * multiple times on the same Node. Therefore, you should write the Job - * Preparation Task to handle re-execution. If the Node is rebooted, the Job - * Preparation Task is run again on the Compute Node before scheduling any other - * Task of the Job, if rerunOnNodeRebootAfterSuccess is true or if the Job - * Preparation Task did not previously complete. If the Node is reimaged, the Job - * Preparation Task is run again before scheduling any Task of the Job. Batch will - * retry Tasks when a recovery operation is triggered on a Node. Examples of - * recovery operations include (but are not limited to) when an unhealthy Node is - * rebooted or a Compute Node disappeared due to host failure. Retries due to - * recovery operations are independent of and are not counted against the - * maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due to - * a recovery operation may occur. Because of this, all Tasks should be - * idempotent. This means Tasks need to tolerate being interrupted and restarted - * without causing any corruption or duplicate data. The best practice for long - * running Tasks is to use some form of checkpointing. - */ -export interface BatchJobPreparationTask { - /** A string that uniquely identifies the Job Preparation Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobpreparation'. No other Task in the Job can have the same ID as the Job Preparation Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobPreparationTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). */ - id?: string; - /** The command line of the Job Preparation Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ - commandLine: string; - /** The settings for the container under which the Job Preparation Task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ - containerSettings?: BatchTaskContainerSettings; - /** A list of files that the Batch service will download to the Compute Node before running the command line. Files listed under this element are located in the Task's working directory. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. */ - resourceFiles?: Array; - /** A list of environment variable settings for the Job Preparation Task. */ - environmentSettings?: Array; - /** Constraints that apply to the Job Preparation Task. */ - constraints?: BatchTaskConstraints; - /** Whether the Batch service should wait for the Job Preparation Task to complete successfully before scheduling any other Tasks of the Job on the Compute Node. A Job Preparation Task has completed successfully if it exits with exit code 0. If true and the Job Preparation Task fails on a Node, the Batch service retries the Job Preparation Task up to its maximum retry count (as specified in the constraints element). If the Task has still not completed successfully after all retries, then the Batch service will not schedule Tasks of the Job to the Node. The Node remains active and eligible to run Tasks of other Jobs. If false, the Batch service will not wait for the Job Preparation Task to complete. In this case, other Tasks of the Job can start executing on the Compute Node while the Job Preparation Task is still running; and even if the Job Preparation Task fails, new Tasks will continue to be scheduled on the Compute Node. The default value is true. */ - waitForSuccess?: boolean; - /** The user identity under which the Job Preparation Task runs. If omitted, the Task runs as a non-administrative user unique to the Task on Windows Compute Nodes, or a non-administrative user unique to the Pool on Linux Compute Nodes. */ - userIdentity?: UserIdentity; - /** Whether the Batch service should rerun the Job Preparation Task after a Compute Node reboots. The Job Preparation Task is always rerun if a Compute Node is reimaged, or if the Job Preparation Task did not complete (e.g. because the reboot occurred while the Task was running). Therefore, you should always write a Job Preparation Task to be idempotent and to behave correctly if run multiple times. The default value is true. */ - rerunOnNodeRebootAfterSuccess?: boolean; -} - -/** - * A Job Release Task to run on Job completion on any Compute Node where the Job has run. - * The Job Release Task runs when the Job ends, because of one of the following: - * The user calls the Terminate Job API, or the Delete Job API while the Job is - * still active, the Job's maximum wall clock time constraint is reached, and the - * Job is still active, or the Job's Job Manager Task completed, and the Job is - * configured to terminate when the Job Manager completes. The Job Release Task - * runs on each Node where Tasks of the Job have run and the Job Preparation Task - * ran and completed. If you reimage a Node after it has run the Job Preparation - * Task, and the Job ends without any further Tasks of the Job running on that - * Node (and hence the Job Preparation Task does not re-run), then the Job Release - * Task does not run on that Compute Node. If a Node reboots while the Job Release - * Task is still running, the Job Release Task runs again when the Compute Node - * starts up. The Job is not marked as complete until all Job Release Tasks have - * completed. The Job Release Task runs in the background. It does not occupy a - * scheduling slot; that is, it does not count towards the taskSlotsPerNode limit - * specified on the Pool. - */ -export interface BatchJobReleaseTask { - /** A string that uniquely identifies the Job Release Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobrelease'. No other Task in the Job can have the same ID as the Job Release Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). */ - id?: string; - /** The command line of the Job Release Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ - commandLine: string; - /** The settings for the container under which the Job Release Task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ - containerSettings?: BatchTaskContainerSettings; - /** A list of files that the Batch service will download to the Compute Node before running the command line. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. Files listed under this element are located in the Task's working directory. */ - resourceFiles?: Array; - /** A list of environment variable settings for the Job Release Task. */ - environmentSettings?: Array; - /** The maximum elapsed time that the Job Release Task may run on a given Compute Node, measured from the time the Task starts. If the Task does not complete within the time limit, the Batch service terminates it. The default value is 15 minutes. You may not specify a timeout longer than 15 minutes. If you do, the Batch service rejects it with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). */ - maxWallClockTime?: string; - /** The minimum time to retain the Task directory for the Job Release Task on the Compute Node. After this time, the Batch service may delete the Task directory and all its contents. The default is 7 days, i.e. the Task directory will be retained for 7 days unless the Compute Node is removed or the Job is deleted. */ - retentionTime?: string; - /** The user identity under which the Job Release Task runs. If omitted, the Task runs as a non-administrative user unique to the Task. */ - userIdentity?: UserIdentity; -} - -/** Specifies how a Job should be assigned to a Pool. */ -export interface BatchPoolInfo { - /** The ID of an existing Pool. All the Tasks of the Job will run on the specified Pool. You must ensure that the Pool referenced by this property exists. If the Pool does not exist at the time the Batch service tries to schedule a Job, no Tasks for the Job will run until you create a Pool with that id. Note that the Batch service will not reject the Job request; it will simply not run Tasks until the Pool exists. You must specify either the Pool ID or the auto Pool specification, but not both. */ - poolId?: string; - /** Characteristics for a temporary 'auto pool'. The Batch service will create this auto Pool when the Job is submitted. If auto Pool creation fails, the Batch service moves the Job to a completed state, and the Pool creation error is set in the Job's scheduling error property. The Batch service manages the lifetime (both creation and, unless keepAlive is specified, deletion) of the auto Pool. Any user actions that affect the lifetime of the auto Pool while the Job is active will result in unexpected behavior. You must specify either the Pool ID or the auto Pool specification, but not both. */ - autoPoolSpecification?: BatchAutoPoolSpecification; -} - -/** - * Specifies characteristics for a temporary 'auto pool'. The Batch service will - * create this auto Pool when the Job is submitted. - */ -export interface BatchAutoPoolSpecification { - /** A prefix to be added to the unique identifier when a Pool is automatically created. The Batch service assigns each auto Pool a unique identifier on creation. To distinguish between Pools created for different purposes, you can specify this element to add a prefix to the ID that is assigned. The prefix can be up to 20 characters long. */ - autoPoolIdPrefix?: string; - /** - * The minimum lifetime of created auto Pools, and how multiple Jobs on a schedule are assigned to Pools. - * - * Possible values: "jobschedule", "job" - */ - poolLifetimeOption: BatchPoolLifetimeOption; - /** Whether to keep an auto Pool alive after its lifetime expires. If false, the Batch service deletes the Pool once its lifetime (as determined by the poolLifetimeOption setting) expires; that is, when the Job or Job Schedule completes. If true, the Batch service does not delete the Pool automatically. It is up to the user to delete auto Pools created with this option. */ - keepAlive?: boolean; - /** The Pool specification for the auto Pool. */ - pool?: BatchPoolSpecification; -} - -/** Specification for creating a new Pool. */ -export interface BatchPoolSpecification { - /** The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. */ - displayName?: string; - /** The size of the virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). */ - vmSize: string; - /** The virtual machine configuration for the Pool. This property must be specified. */ - virtualMachineConfiguration?: VirtualMachineConfiguration; - /** The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. */ - taskSlotsPerNode?: number; - /** How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. */ - taskSchedulingPolicy?: BatchTaskSchedulingPolicy; - /** The timeout for allocation of Compute Nodes to the Pool. This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service rejects the request with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). */ - resizeTimeout?: string; - /** The user-specified tags associated with the pool.The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. */ - resourceTags?: string; - /** The desired number of dedicated Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. */ - targetDedicatedNodes?: number; - /** The desired number of Spot/Low-priority Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. */ - targetLowPriorityNodes?: number; - /** Whether the Pool size should automatically adjust over time. If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula element is required. The Pool automatically resizes according to the formula. The default value is false. */ - enableAutoScale?: boolean; - /** The formula for the desired number of Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the Pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information. */ - autoScaleFormula?: string; - /** The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). */ - autoScaleEvaluationInterval?: string; - /** Whether the Pool permits direct communication between Compute Nodes. Enabling inter-node communication limits the maximum size of the Pool due to deployment restrictions on the Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The default value is false. */ - enableInterNodeCommunication?: boolean; - /** The network configuration for the Pool. */ - networkConfiguration?: NetworkConfiguration; - /** A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. */ - startTask?: BatchStartTask; - /** The list of Packages to be installed on each Compute Node in the Pool. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}). Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package references on any given Pool. */ - applicationPackageReferences?: Array; - /** The list of user Accounts to be created on each Compute Node in the Pool. */ - userAccounts?: Array; - /** A list of name-value pairs associated with the Pool as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. */ - metadata?: Array; - /** A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. */ - mountConfiguration?: Array; - /** - * The desired node communication mode for the pool. If omitted, the default value is Default. - * - * Possible values: "default", "classic", "simplified" - */ - targetNodeCommunicationMode?: BatchNodeCommunicationMode; - /** The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling. */ - upgradePolicy?: UpgradePolicy; -} - -/** The network configuration for the Job. */ -export interface BatchJobNetworkConfiguration { - /** The ARM resource identifier of the virtual network subnet which Compute Nodes running Tasks from the Job will join for the duration of the Task. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes which will run Tasks from the Job. This can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet so that Azure Batch service can schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication from the Azure Batch service. For Pools created with a Virtual Machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Port 443 is also required to be open for outbound connections for communications to Azure Storage. For more details see: https://docs.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ - subnetId: string; - /** Whether to withdraw Compute Nodes from the virtual network to DNC when the job is terminated or deleted. If true, nodes will remain joined to the virtual network to DNC. If false, nodes will automatically withdraw when the job ends. Defaults to false. */ - skipWithdrawFromVNet: boolean; -} - -/** Contains information about the execution of a Job in the Azure Batch service. */ -export interface BatchJobExecutionInfo { - /** The start time of the Job. This is the time at which the Job was created. */ - startTime: Date | string; - /** The completion time of the Job. This property is set only if the Job is in the completed state. */ - endTime?: Date | string; - /** The ID of the Pool to which this Job is assigned. This element contains the actual Pool where the Job is assigned. When you get Job details from the service, they also contain a poolInfo element, which contains the Pool configuration data from when the Job was added or updated. That poolInfo element may also contain a poolId element. If it does, the two IDs are the same. If it does not, it means the Job ran on an auto Pool, and this property contains the ID of that auto Pool. */ - poolId?: string; - /** Details of any error encountered by the service in starting the Job. This property is not set if there was no error starting the Job. */ - schedulingError?: BatchJobSchedulingError; - /** A string describing the reason the Job ended. This property is set only if the Job is in the completed state. If the Batch service terminates the Job, it sets the reason as follows: JMComplete - the Job Manager Task completed, and killJobOnCompletion was set to true. MaxWallClockTimeExpiry - the Job reached its maxWallClockTime constraint. TerminateJobSchedule - the Job ran as part of a schedule, and the schedule terminated. AllTasksComplete - the Job's onAllTasksComplete attribute is set to terminatejob, and all Tasks in the Job are complete. TaskFailed - the Job's onTaskFailure attribute is set to performExitOptionsJobAction, and a Task in the Job failed with an exit condition that specified a jobAction of terminatejob. Any other string is a user-defined reason specified in a call to the 'Terminate a Job' operation. */ - terminateReason?: string; -} - -/** An error encountered by the Batch service when scheduling a Job. */ -export interface BatchJobSchedulingError { - /** - * The category of the Job scheduling error. - * - * Possible values: "usererror", "servererror" - */ - category: ErrorCategory; - /** An identifier for the Job scheduling error. Codes are invariant and are intended to be consumed programmatically. */ - code?: string; - /** A message describing the Job scheduling error, intended to be suitable for display in a user interface. */ - message?: string; - /** A list of additional error details related to the scheduling error. */ - details?: Array; -} - -/** Resource usage statistics for a Job. */ -export interface BatchJobStatistics { - /** The URL of the statistics. */ - url: string; - /** The start time of the time range covered by the statistics. */ - startTime: Date | string; - /** The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. */ - lastUpdateTime: Date | string; - /** The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in the Job. */ - userCPUTime: string; - /** The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in the Job. */ - kernelCPUTime: string; - /** The total wall clock time of all Tasks in the Job. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If a Task was retried, this includes the wall clock time of all the Task retries. */ - wallClockTime: string; - /** The total number of disk read operations made by all Tasks in the Job. */ - readIOps: number; - /** The total number of disk write operations made by all Tasks in the Job. */ - writeIOps: number; - /** The total amount of data in GiB read from disk by all Tasks in the Job. */ - readIOGiB: number; - /** The total amount of data in GiB written to disk by all Tasks in the Job. */ - writeIOGiB: number; - /** The total number of Tasks successfully completed in the Job during the given time range. A Task completes successfully if it returns exit code 0. */ - numSucceededTasks: number; - /** The total number of Tasks in the Job that failed during the given time range. A Task fails if it exhausts its maximum retry count without returning exit code 0. */ - numFailedTasks: number; - /** The total number of retries on all the Tasks in the Job during the given time range. */ - numTaskRetries: number; - /** The total wait time of all Tasks in the Job. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.) This value is only reported in the Account lifetime statistics; it is not included in the Job statistics. */ - waitTime: string; -} - -/** Parameters for updating an Azure Batch Job. */ -export interface BatchJobUpdateContent { - /** The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. If omitted, the priority of the Job is left unchanged. */ - priority?: number; - /** Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. */ - allowTaskPreemption?: boolean; - /** The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. */ - maxParallelTasks?: number; - /** The execution constraints for the Job. If omitted, the existing execution constraints are left unchanged. */ - constraints?: BatchJobConstraints; - /** The Pool on which the Batch service runs the Job's Tasks. You may change the Pool for a Job only when the Job is disabled. The Patch Job call will fail if you include the poolInfo element and the Job is not disabled. If you specify an autoPoolSpecification in the poolInfo, only the keepAlive property of the autoPoolSpecification can be updated, and then only if the autoPoolSpecification has a poolLifetimeOption of Job (other job properties can be updated as normal). If omitted, the Job continues to run on its current Pool. */ - poolInfo?: BatchPoolInfo; - /** - * The action the Batch service should take when all Tasks in the Job are in the completed state. If omitted, the completion behavior is left unchanged. You may not change the value from terminatejob to noaction - that is, once you have engaged automatic Job termination, you cannot turn it off again. If you try to do this, the request fails with an 'invalid property value' error response; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). - * - * Possible values: "noaction", "terminatejob" - */ - onAllTasksComplete?: OnAllBatchTasksComplete; - /** A list of name-value pairs associated with the Job as metadata. If omitted, the existing Job metadata is left unchanged. */ - metadata?: Array; - /** The network configuration for the Job. */ - networkConfiguration?: BatchJobNetworkConfiguration; -} - -/** Parameters for disabling an Azure Batch Job. */ -export interface BatchJobDisableContent { - /** - * What to do with active Tasks associated with the Job. - * - * Possible values: "requeue", "terminate", "wait" - */ - disableTasks: DisableBatchJobOption; -} - -/** Parameters for terminating an Azure Batch Job. */ -export interface BatchJobTerminateContent { - /** The text you want to appear as the Job's TerminationReason. The default is 'UserTerminate'. */ - terminateReason?: string; -} - -/** Parameters for creating an Azure Batch Job. */ -export interface BatchJobCreateContent { - /** A string that uniquely identifies the Job within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). */ - id: string; - /** The display name for the Job. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. */ - displayName?: string; - /** Whether Tasks in the Job can define dependencies on each other. The default is false. */ - usesTaskDependencies?: boolean; - /** The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. */ - priority?: number; - /** Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. */ - allowTaskPreemption?: boolean; - /** The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. */ - maxParallelTasks?: number; - /** The execution constraints for the Job. */ - constraints?: BatchJobConstraints; - /** Details of a Job Manager Task to be launched when the Job is started. If the Job does not specify a Job Manager Task, the user must explicitly add Tasks to the Job. If the Job does specify a Job Manager Task, the Batch service creates the Job Manager Task when the Job is created, and will try to schedule the Job Manager Task before scheduling other Tasks in the Job. The Job Manager Task's typical purpose is to control and/or monitor Job execution, for example by deciding what additional Tasks to run, determining when the work is complete, etc. (However, a Job Manager Task is not restricted to these activities - it is a fully-fledged Task in the system and perform whatever actions are required for the Job.) For example, a Job Manager Task might download a file specified as a parameter, analyze the contents of that file and submit additional Tasks based on those contents. */ - jobManagerTask?: BatchJobManagerTask; - /** The Job Preparation Task. If a Job has a Job Preparation Task, the Batch service will run the Job Preparation Task on a Node before starting any Tasks of that Job on that Compute Node. */ - jobPreparationTask?: BatchJobPreparationTask; - /** The Job Release Task. A Job Release Task cannot be specified without also specifying a Job Preparation Task for the Job. The Batch service runs the Job Release Task on the Nodes that have run the Job Preparation Task. The primary purpose of the Job Release Task is to undo changes to Compute Nodes made by the Job Preparation Task. Example activities include deleting local files, or shutting down services that were started as part of Job preparation. */ - jobReleaseTask?: BatchJobReleaseTask; - /** The list of common environment variable settings. These environment variables are set for all Tasks in the Job (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value. */ - commonEnvironmentSettings?: Array; - /** The Pool on which the Batch service runs the Job's Tasks. */ - poolInfo: BatchPoolInfo; - /** - * The action the Batch service should take when all Tasks in the Job are in the completed state. Note that if a Job contains no Tasks, then all Tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic Job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the Job properties to set onAllTasksComplete to terminatejob once you have finished adding Tasks. The default is noaction. - * - * Possible values: "noaction", "terminatejob" - */ - onAllTasksComplete?: OnAllBatchTasksComplete; - /** - * The action the Batch service should take when any Task in the Job fails. A Task is considered to have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction. - * - * Possible values: "noaction", "performexitoptionsjobaction" - */ - onTaskFailure?: OnBatchTaskFailure; - /** The network configuration for the Job. */ - networkConfiguration?: BatchJobNetworkConfiguration; - /** A list of name-value pairs associated with the Job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. */ - metadata?: Array; -} - -/** Contains information about the container which a Task is executing. */ -export interface BatchTaskContainerExecutionInfo { - /** The ID of the container. */ - containerId?: string; - /** The state of the container. This is the state of the container according to the Docker service. It is equivalent to the status field returned by "docker inspect". */ - state?: string; - /** Detailed error information about the container. This is the detailed error string from the Docker service, if available. It is equivalent to the error field returned by "docker inspect". */ - error?: string; -} - -/** Information about a Task failure. */ -export interface BatchTaskFailureInfo { - /** - * The category of the Task error. - * - * Possible values: "usererror", "servererror" - */ - category: ErrorCategory; - /** An identifier for the Task error. Codes are invariant and are intended to be consumed programmatically. */ - code?: string; - /** A message describing the Task error, intended to be suitable for display in a user interface. */ - message?: string; - /** A list of additional details related to the error. */ - details?: Array; -} - -/** - * A Job Schedule that allows recurring Jobs by specifying when to run Jobs and a - * specification used to create each Job. - */ -export interface BatchJobSchedule { - /** The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time. */ - schedule?: BatchJobScheduleConfiguration; - /** The details of the Jobs to be created on this schedule. */ - jobSpecification: BatchJobSpecification; - /** A list of name-value pairs associated with the schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. */ - metadata?: Array; -} - -/** - * The schedule according to which Jobs will be created. All times are fixed - * respective to UTC and are not impacted by daylight saving time. - */ -export interface BatchJobScheduleConfiguration { - /** The earliest time at which any Job may be created under this Job Schedule. If you do not specify a doNotRunUntil time, the schedule becomes ready to create Jobs immediately. */ - doNotRunUntil?: Date | string; - /** A time after which no Job will be created under this Job Schedule. The schedule will move to the completed state as soon as this deadline is past and there is no active Job under this Job Schedule. If you do not specify a doNotRunAfter time, and you are creating a recurring Job Schedule, the Job Schedule will remain active until you explicitly terminate it. */ - doNotRunAfter?: Date | string; - /** The time interval, starting from the time at which the schedule indicates a Job should be created, within which a Job must be created. If a Job is not created within the startWindow interval, then the 'opportunity' is lost; no Job will be created until the next recurrence of the schedule. If the schedule is recurring, and the startWindow is longer than the recurrence interval, then this is equivalent to an infinite startWindow, because the Job that is 'due' in one recurrenceInterval is not carried forward into the next recurrence interval. The default is infinite. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). */ - startWindow?: string; - /** The time interval between the start times of two successive Jobs under the Job Schedule. A Job Schedule can have at most one active Job under it at any given time. Because a Job Schedule can have at most one active Job under it at any given time, if it is time to create a new Job under a Job Schedule, but the previous Job is still running, the Batch service will not create the new Job until the previous Job finishes. If the previous Job does not finish within the startWindow period of the new recurrenceInterval, then no new Job will be scheduled for that interval. For recurring Jobs, you should normally specify a jobManagerTask in the jobSpecification. If you do not use jobManagerTask, you will need an external process to monitor when Jobs are created, add Tasks to the Jobs and terminate the Jobs ready for the next recurrence. The default is that the schedule does not recur: one Job is created, within the startWindow after the doNotRunUntil time, and the schedule is complete as soon as that Job finishes. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). */ - recurrenceInterval?: string; -} - -/** Specifies details of the Jobs to be created on a schedule. */ -export interface BatchJobSpecification { - /** The priority of Jobs created under this schedule. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. This priority is used as the default for all Jobs under the Job Schedule. You can update a Job's priority after it has been created using by using the update Job API. */ - priority?: number; - /** Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. */ - allowTaskPreemption?: boolean; - /** The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. */ - maxParallelTasks?: number; - /** The display name for Jobs created under this schedule. The name need not be unique and can contain any Unicode characters up to a maximum length of 1024. */ - displayName?: string; - /** Whether Tasks in the Job can define dependencies on each other. The default is false. */ - usesTaskDependencies?: boolean; - /** - * The action the Batch service should take when all Tasks in a Job created under this schedule are in the completed state. Note that if a Job contains no Tasks, then all Tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic Job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the Job properties to set onAllTasksComplete to terminatejob once you have finished adding Tasks. The default is noaction. - * - * Possible values: "noaction", "terminatejob" - */ - onAllTasksComplete?: OnAllBatchTasksComplete; - /** - * The action the Batch service should take when any Task fails in a Job created under this schedule. A Task is considered to have failed if it have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction. - * - * Possible values: "noaction", "performexitoptionsjobaction" - */ - onTaskFailure?: OnBatchTaskFailure; - /** The network configuration for the Job. */ - networkConfiguration?: BatchJobNetworkConfiguration; - /** The execution constraints for Jobs created under this schedule. */ - constraints?: BatchJobConstraints; - /** The details of a Job Manager Task to be launched when a Job is started under this schedule. If the Job does not specify a Job Manager Task, the user must explicitly add Tasks to the Job using the Task API. If the Job does specify a Job Manager Task, the Batch service creates the Job Manager Task when the Job is created, and will try to schedule the Job Manager Task before scheduling other Tasks in the Job. */ - jobManagerTask?: BatchJobManagerTask; - /** The Job Preparation Task for Jobs created under this schedule. If a Job has a Job Preparation Task, the Batch service will run the Job Preparation Task on a Node before starting any Tasks of that Job on that Compute Node. */ - jobPreparationTask?: BatchJobPreparationTask; - /** The Job Release Task for Jobs created under this schedule. The primary purpose of the Job Release Task is to undo changes to Nodes made by the Job Preparation Task. Example activities include deleting local files, or shutting down services that were started as part of Job preparation. A Job Release Task cannot be specified without also specifying a Job Preparation Task for the Job. The Batch service runs the Job Release Task on the Compute Nodes that have run the Job Preparation Task. */ - jobReleaseTask?: BatchJobReleaseTask; - /** A list of common environment variable settings. These environment variables are set for all Tasks in Jobs created under this schedule (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value. */ - commonEnvironmentSettings?: Array; - /** The Pool on which the Batch service runs the Tasks of Jobs created under this schedule. */ - poolInfo: BatchPoolInfo; - /** A list of name-value pairs associated with each Job created under this schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. */ - metadata?: Array; -} - -/** - * Contains information about Jobs that have been and will be run under a Job - * Schedule. - */ -export interface BatchJobScheduleExecutionInfo { - /** The next time at which a Job will be created under this schedule. This property is meaningful only if the schedule is in the active state when the time comes around. For example, if the schedule is disabled, no Job will be created at nextRunTime unless the Job is enabled before then. */ - nextRunTime?: Date | string; - /** Information about the most recent Job under the Job Schedule. This property is present only if the at least one Job has run under the schedule. */ - recentJob?: RecentBatchJob; - /** The time at which the schedule ended. This property is set only if the Job Schedule is in the completed state. */ - endTime?: Date | string; -} - -/** Information about the most recent Job to run under the Job Schedule. */ -export interface RecentBatchJob { - /** The ID of the Job. */ - id?: string; - /** The URL of the Job. */ - url?: string; -} - -/** Resource usage statistics for a Job Schedule. */ -export interface BatchJobScheduleStatistics { - /** The URL of the statistics. */ - url: string; - /** The start time of the time range covered by the statistics. */ - startTime: Date | string; - /** The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. */ - lastUpdateTime: Date | string; - /** The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in all Jobs created under the schedule. */ - userCPUTime: string; - /** The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in all Jobs created under the schedule. */ - kernelCPUTime: string; - /** The total wall clock time of all the Tasks in all the Jobs created under the schedule. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If a Task was retried, this includes the wall clock time of all the Task retries. */ - wallClockTime: string; - /** The total number of disk read operations made by all Tasks in all Jobs created under the schedule. */ - readIOps: number; - /** The total number of disk write operations made by all Tasks in all Jobs created under the schedule. */ - writeIOps: number; - /** The total gibibytes read from disk by all Tasks in all Jobs created under the schedule. */ - readIOGiB: number; - /** The total gibibytes written to disk by all Tasks in all Jobs created under the schedule. */ - writeIOGiB: number; - /** The total number of Tasks successfully completed during the given time range in Jobs created under the schedule. A Task completes successfully if it returns exit code 0. */ - numSucceededTasks: number; - /** The total number of Tasks that failed during the given time range in Jobs created under the schedule. A Task fails if it exhausts its maximum retry count without returning exit code 0. */ - numFailedTasks: number; - /** The total number of retries during the given time range on all Tasks in all Jobs created under the schedule. */ - numTaskRetries: number; - /** The total wait time of all Tasks in all Jobs created under the schedule. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.). This value is only reported in the Account lifetime statistics; it is not included in the Job statistics. */ - waitTime: string; -} - -/** Parameters for updating an Azure Batch Job Schedule. */ -export interface BatchJobScheduleUpdateContent { - /** The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time. If you do not specify this element, the existing schedule is left unchanged. */ - schedule?: BatchJobScheduleConfiguration; - /** The details of the Jobs to be created on this schedule. Updates affect only Jobs that are started after the update has taken place. Any currently active Job continues with the older specification. */ - jobSpecification?: BatchJobSpecification; - /** A list of name-value pairs associated with the Job Schedule as metadata. If you do not specify this element, existing metadata is left unchanged. */ - metadata?: Array; -} - -/** Parameters for creating an Azure Batch Job Schedule */ -export interface BatchJobScheduleCreateContent { - /** A string that uniquely identifies the schedule within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). */ - id: string; - /** The display name for the schedule. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. */ - displayName?: string; - /** The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time. */ - schedule: BatchJobScheduleConfiguration; - /** The details of the Jobs to be created on this schedule. */ - jobSpecification: BatchJobSpecification; - /** A list of name-value pairs associated with the schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. */ - metadata?: Array; -} - -/** Parameters for creating an Azure Batch Task. */ -export interface BatchTaskCreateContent { - /** A string that uniquely identifies the Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within a Job that differ only by case). */ - id: string; - /** A display name for the Task. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. */ - displayName?: string; - /** How the Batch service should respond when the Task completes. */ - exitConditions?: ExitConditions; - /** The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). */ - commandLine: string; - /** The settings for the container under which the Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ - containerSettings?: BatchTaskContainerSettings; - /** A list of files that the Batch service will download to the Compute Node before running the command line. For multi-instance Tasks, the resource files will only be downloaded to the Compute Node on which the primary Task is executed. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. */ - resourceFiles?: Array; - /** A list of files that the Batch service will upload from the Compute Node after running the command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. */ - outputFiles?: Array; - /** A list of environment variable settings for the Task. */ - environmentSettings?: Array; - /** A locality hint that can be used by the Batch service to select a Compute Node on which to start the new Task. */ - affinityInfo?: AffinityInfo; - /** The execution constraints that apply to this Task. If you do not specify constraints, the maxTaskRetryCount is the maxTaskRetryCount specified for the Job, the maxWallClockTime is infinite, and the retentionTime is 7 days. */ - constraints?: BatchTaskConstraints; - /** The number of scheduling slots that the Task required to run. The default is 1. A Task can only be scheduled to run on a compute node if the node has enough free scheduling slots available. For multi-instance Tasks, this must be 1. */ - requiredSlots?: number; - /** The user identity under which the Task runs. If omitted, the Task runs as a non-administrative user unique to the Task. */ - userIdentity?: UserIdentity; - /** An object that indicates that the Task is a multi-instance Task, and contains information about how to run the multi-instance Task. */ - multiInstanceSettings?: MultiInstanceSettings; - /** The Tasks that this Task depends on. This Task will not be scheduled until all Tasks that it depends on have completed successfully. If any of those Tasks fail and exhaust their retry counts, this Task will never be scheduled. If the Job does not have usesTaskDependencies set to true, and this element is present, the request fails with error code TaskDependenciesNotSpecifiedOnJob. */ - dependsOn?: BatchTaskDependencies; - /** A list of Packages that the Batch service will deploy to the Compute Node before running the command line. Application packages are downloaded and deployed to a shared directory, not the Task working directory. Therefore, if a referenced package is already on the Node, and is up to date, then it is not re-downloaded; the existing copy on the Compute Node is used. If a referenced Package cannot be installed, for example because the package has been deleted or because download failed, the Task fails. */ - applicationPackageReferences?: Array; - /** The settings for an authentication token that the Task can use to perform Batch service operations. If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job. */ - authenticationTokenSettings?: AuthenticationTokenSettings; -} - -/** Specifies how the Batch service should respond when the Task completes. */ -export interface ExitConditions { - /** A list of individual Task exit codes and how the Batch service should respond to them. */ - exitCodes?: Array; - /** A list of Task exit code ranges and how the Batch service should respond to them. */ - exitCodeRanges?: Array; - /** How the Batch service should respond if the Task fails to start due to an error. */ - preProcessingError?: ExitOptions; - /** How the Batch service should respond if a file upload error occurs. If the Task exited with an exit code that was specified via exitCodes or exitCodeRanges, and then encountered a file upload error, then the action specified by the exit code takes precedence. */ - fileUploadError?: ExitOptions; - /** How the Batch service should respond if the Task fails with an exit condition not covered by any of the other properties. This value is used if the Task exits with any nonzero exit code not listed in the exitCodes or exitCodeRanges collection, with a pre-processing error if the preProcessingError property is not present, or with a file upload error if the fileUploadError property is not present. If you want non-default behavior on exit code 0, you must list it explicitly using the exitCodes or exitCodeRanges collection. */ - default?: ExitOptions; -} - -/** - * How the Batch service should respond if a Task exits with a particular exit - * code. - */ -export interface ExitCodeMapping { - /** A process exit code. */ - code: number; - /** How the Batch service should respond if the Task exits with this exit code. */ - exitOptions: ExitOptions; -} - -/** Specifies how the Batch service responds to a particular exit condition. */ -export interface ExitOptions { - /** - * An action to take on the Job containing the Task, if the Task completes with the given exit condition and the Job's onTaskFailed property is 'performExitOptionsJobAction'. The default is none for exit code 0 and terminate for all other exit conditions. If the Job's onTaskFailed property is noaction, then specifying this property returns an error and the add Task request fails with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). - * - * Possible values: "none", "disable", "terminate" - */ - jobAction?: BatchJobAction; - /** - * An action that the Batch service performs on Tasks that depend on this Task. Possible values are 'satisfy' (allowing dependent tasks to progress) and 'block' (dependent tasks continue to wait). Batch does not yet support cancellation of dependent tasks. - * - * Possible values: "satisfy", "block" - */ - dependencyAction?: DependencyAction; -} - -/** - * A range of exit codes and how the Batch service should respond to exit codes - * within that range. - */ -export interface ExitCodeRangeMapping { - /** The first exit code in the range. */ - start: number; - /** The last exit code in the range. */ - end: number; - /** How the Batch service should respond if the Task exits with an exit code in the range start to end (inclusive). */ - exitOptions: ExitOptions; -} - -/** - * A locality hint that can be used by the Batch service to select a Compute Node - * on which to start a Task. - */ -export interface AffinityInfo { - /** An opaque string representing the location of a Compute Node or a Task that has run previously. You can pass the affinityId of a Node to indicate that this Task needs to run on that Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere. */ - affinityId: string; -} - -/** - * Multi-instance Tasks are commonly used to support MPI Tasks. In the MPI case, - * if any of the subtasks fail (for example due to exiting with a non-zero exit - * code) the entire multi-instance Task fails. The multi-instance Task is then - * terminated and retried, up to its retry limit. - */ -export interface MultiInstanceSettings { - /** The number of Compute Nodes required by the Task. If omitted, the default is 1. */ - numberOfInstances?: number; - /** The command line to run on all the Compute Nodes to enable them to coordinate when the primary runs the main Task command. A typical coordination command line launches a background service and verifies that the service is ready to process inter-node messages. */ - coordinationCommandLine: string; - /** A list of files that the Batch service will download before running the coordination command line. The difference between common resource files and Task resource files is that common resource files are downloaded for all subtasks including the primary, whereas Task resource files are downloaded only for the primary. Also note that these resource files are not downloaded to the Task working directory, but instead are downloaded to the Task root directory (one directory above the working directory). There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. */ - commonResourceFiles?: Array; -} - -/** - * Specifies any dependencies of a Task. Any Task that is explicitly specified or - * within a dependency range must complete before the dependant Task will be - * scheduled. - */ -export interface BatchTaskDependencies { - /** The list of Task IDs that this Task depends on. All Tasks in this list must complete successfully before the dependent Task can be scheduled. The taskIds collection is limited to 64000 characters total (i.e. the combined length of all Task IDs). If the taskIds collection exceeds the maximum length, the Add Task request fails with error code TaskDependencyListTooLong. In this case consider using Task ID ranges instead. */ - taskIds?: string[]; - /** The list of Task ID ranges that this Task depends on. All Tasks in all ranges must complete successfully before the dependent Task can be scheduled. */ - taskIdRanges?: Array; -} - -/** - * The start and end of the range are inclusive. For example, if a range has start - * 9 and end 12, then it represents Tasks '9', '10', '11' and '12'. - */ -export interface BatchTaskIdRange { - /** The first Task ID in the range. */ - start: number; - /** The last Task ID in the range. */ - end: number; -} - -/** - * Batch will retry Tasks when a recovery operation is triggered on a Node. - * Examples of recovery operations include (but are not limited to) when an - * unhealthy Node is rebooted or a Compute Node disappeared due to host failure. - * Retries due to recovery operations are independent of and are not counted - * against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal - * retry due to a recovery operation may occur. Because of this, all Tasks should - * be idempotent. This means Tasks need to tolerate being interrupted and - * restarted without causing any corruption or duplicate data. The best practice - * for long running Tasks is to use some form of checkpointing. - */ -export interface BatchTask { - /** The execution constraints that apply to this Task. */ - constraints?: BatchTaskConstraints; -} - -/** Information about the execution of a Task. */ -export interface BatchTaskExecutionInfo { - /** The time at which the Task started running. 'Running' corresponds to the running state, so if the Task specifies resource files or Packages, then the start time reflects the time at which the Task started downloading or deploying these. If the Task has been restarted or retried, this is the most recent time at which the Task started running. This property is present only for Tasks that are in the running or completed state. */ - startTime?: Date | string; - /** The time at which the Task completed. This property is set only if the Task is in the Completed state. */ - endTime?: Date | string; - /** The exit code of the program specified on the Task command line. This property is set only if the Task is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the Task (due to timeout, or user termination via the API) you may see an operating system-defined exit code. */ - exitCode?: number; - /** Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. */ - containerInfo?: BatchTaskContainerExecutionInfo; - /** Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. */ - failureInfo?: BatchTaskFailureInfo; - /** The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. */ - retryCount: number; - /** The most recent time at which a retry of the Task started running. This element is present only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. */ - lastRetryTime?: Date | string; - /** The number of times the Task has been requeued by the Batch service as the result of a user request. When the user removes Compute Nodes from a Pool (by resizing/shrinking the pool) or when the Job is being disabled, the user can specify that running Tasks on the Compute Nodes be requeued for execution. This count tracks how many times the Task has been requeued for these reasons. */ - requeueCount: number; - /** The most recent time at which the Task has been requeued by the Batch service as the result of a user request. This property is set only if the requeueCount is nonzero. */ - lastRequeueTime?: Date | string; - /** - * The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. - * - * Possible values: "success", "failure" - */ - result?: BatchTaskExecutionResult; -} - -/** Information about the Compute Node on which a Task ran. */ -export interface BatchNodeInfo { - /** An identifier for the Node on which the Task ran, which can be passed when adding a Task to request that the Task be scheduled on this Compute Node. */ - affinityId?: string; - /** The URL of the Compute Node on which the Task ran. */ - nodeUrl?: string; - /** The ID of the Pool on which the Task ran. */ - poolId?: string; - /** The ID of the Compute Node on which the Task ran. */ - nodeId?: string; - /** The root directory of the Task on the Compute Node. */ - taskRootDirectory?: string; - /** The URL to the root directory of the Task on the Compute Node. */ - taskRootDirectoryUrl?: string; -} - -/** Resource usage statistics for a Task. */ -export interface BatchTaskStatistics { - /** The URL of the statistics. */ - url: string; - /** The start time of the time range covered by the statistics. */ - startTime: Date | string; - /** The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. */ - lastUpdateTime: Date | string; - /** The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by the Task. */ - userCPUTime: string; - /** The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by the Task. */ - kernelCPUTime: string; - /** The total wall clock time of the Task. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If the Task was retried, this includes the wall clock time of all the Task retries. */ - wallClockTime: string; - /** The total number of disk read operations made by the Task. */ - readIOps: number; - /** The total number of disk write operations made by the Task. */ - writeIOps: number; - /** The total gibibytes read from disk by the Task. */ - readIOGiB: number; - /** The total gibibytes written to disk by the Task. */ - writeIOGiB: number; - /** The total wait time of the Task. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.). */ - waitTime: string; -} - -/** A collection of Azure Batch Tasks to add. */ -export interface BatchTaskGroup { - /** The collection of Tasks to add. The maximum count of Tasks is 100. The total serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example if each Task has 100's of resource files or environment variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again with fewer Tasks. */ - value: Array; -} - -/** Parameters for creating a user account for RDP or SSH access on an Azure Batch Compute Node. */ -export interface BatchNodeUserCreateContent { - /** The user name of the Account. */ - name: string; - /** Whether the Account should be an administrator on the Compute Node. The default value is false. */ - isAdmin?: boolean; - /** The time at which the Account should expire. If omitted, the default is 1 day from the current time. For Linux Compute Nodes, the expiryTime has a precision up to a day. */ - expiryTime?: Date | string; - /** The password of the Account. The password is required for Windows Compute Nodes. For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property. */ - password?: string; - /** The SSH public key that can be used for remote login to the Compute Node. The public key should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be specified only for Linux Compute Nodes. If this is specified for a Windows Compute Node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). */ - sshPublicKey?: string; -} - -/** Parameters for updating a user account for RDP or SSH access on an Azure Batch Compute Node. */ -export interface BatchNodeUserUpdateContent { - /** The password of the Account. The password is required for Windows Compute Nodes. For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property. If omitted, any existing password is removed. */ - password?: string; - /** The time at which the Account should expire. If omitted, the default is 1 day from the current time. For Linux Compute Nodes, the expiryTime has a precision up to a day. */ - expiryTime?: Date | string; - /** The SSH public key that can be used for remote login to the Compute Node. The public key should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be specified only for Linux Compute Nodes. If this is specified for a Windows Compute Node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If omitted, any existing SSH public key is removed. */ - sshPublicKey?: string; -} - -/** Parameters for rebooting an Azure Batch Compute Node. */ -export interface BatchNodeRebootContent { - /** - * When to reboot the Compute Node and what to do with currently running Tasks. The default value is requeue. - * - * Possible values: "requeue", "terminate", "taskcompletion", "retaineddata" - */ - nodeRebootOption?: BatchNodeRebootOption; -} - -/** Options for deallocating a Compute Node. */ -export interface BatchNodeDeallocateContent { - /** - * When to deallocate the Compute Node and what to do with currently running Tasks. The default value is requeue. - * - * Possible values: "requeue", "terminate", "taskcompletion", "retaineddata" - */ - nodeDeallocateOption?: BatchNodeDeallocateOption; -} - -/** Parameters for reimaging an Azure Batch Compute Node. */ -export interface BatchNodeReimageContent { - /** - * When to reimage the Compute Node and what to do with currently running Tasks. The default value is requeue. - * - * Possible values: "requeue", "terminate", "taskcompletion", "retaineddata" - */ - nodeReimageOption?: BatchNodeReimageOption; -} - -/** Parameters for disabling scheduling on an Azure Batch Compute Node. */ -export interface BatchNodeDisableSchedulingContent { - /** - * What to do with currently running Tasks when disabling Task scheduling on the Compute Node. The default value is requeue. - * - * Possible values: "requeue", "terminate", "taskcompletion" - */ - nodeDisableSchedulingOption?: BatchNodeDisableSchedulingOption; -} - -/** The Azure Batch service log files upload parameters for a Compute Node. */ -export interface UploadBatchServiceLogsContent { - /** The URL of the container within Azure Blob Storage to which to upload the Batch Service log file(s). If a user assigned managed identity is not being used, the URL must include a Shared Access Signature (SAS) granting write permissions to the container. The SAS duration must allow enough time for the upload to finish. The start time for SAS is optional and recommended to not be specified. */ - containerUrl: string; - /** The start of the time range from which to upload Batch Service log file(s). Any log file containing a log message in the time range will be uploaded. This means that the operation might retrieve more logs than have been requested since the entire log file is always uploaded, but the operation should not retrieve fewer logs than have been requested. */ - startTime: Date | string; - /** The end of the time range from which to upload Batch Service log file(s). Any log file containing a log message in the time range will be uploaded. This means that the operation might retrieve more logs than have been requested since the entire log file is always uploaded, but the operation should not retrieve fewer logs than have been requested. If omitted, the default is to upload all logs available after the startTime. */ - endTime?: Date | string; - /** The reference to the user assigned identity to use to access Azure Blob Storage specified by containerUrl. The identity must have write access to the Azure Blob Storage container. */ - identityReference?: BatchNodeIdentityReference; -} - -/** Alias for CachingType */ -export type CachingType = string; -/** Alias for StorageAccountType */ -export type StorageAccountType = string; -/** Alias for ContainerType */ -export type ContainerType = string; -/** Alias for DiskEncryptionTarget */ -export type DiskEncryptionTarget = string; -/** Alias for BatchNodePlacementPolicyType */ -export type BatchNodePlacementPolicyType = string; -/** Alias for DiffDiskPlacement */ -export type DiffDiskPlacement = string; -/** Alias for SecurityEncryptionTypes */ -export type SecurityEncryptionTypes = string; -/** Alias for SecurityTypes */ -export type SecurityTypes = string; -/** Alias for DynamicVNetAssignmentScope */ -export type DynamicVNetAssignmentScope = string; -/** Alias for InboundEndpointProtocol */ -export type InboundEndpointProtocol = string; -/** Alias for NetworkSecurityGroupRuleAccess */ -export type NetworkSecurityGroupRuleAccess = string; -/** Alias for IpAddressProvisioningType */ -export type IpAddressProvisioningType = string; -/** Alias for ContainerWorkingDirectory */ -export type ContainerWorkingDirectory = string; -/** Alias for ContainerHostDataPath */ -export type ContainerHostDataPath = string; -/** Alias for AutoUserScope */ -export type AutoUserScope = string; -/** Alias for ElevationLevel */ -export type ElevationLevel = string; -/** Alias for BatchNodeFillType */ -export type BatchNodeFillType = string; -/** Alias for LoginMode */ -export type LoginMode = string; -/** Alias for BatchNodeCommunicationMode */ -export type BatchNodeCommunicationMode = string; -/** Alias for UpgradeMode */ -export type UpgradeMode = string; -/** Alias for BatchNodeDeallocationOption */ -export type BatchNodeDeallocationOption = string; -/** Alias for BatchJobState */ -export type BatchJobState = string; -/** Alias for OutputFileUploadCondition */ -export type OutputFileUploadCondition = string; -/** Alias for AccessScope */ -export type AccessScope = string; -/** Alias for BatchPoolLifetimeOption */ -export type BatchPoolLifetimeOption = string; -/** Alias for OnAllBatchTasksComplete */ -export type OnAllBatchTasksComplete = string; -/** Alias for OnBatchTaskFailure */ -export type OnBatchTaskFailure = string; -/** Alias for ErrorCategory */ -export type ErrorCategory = string; -/** Alias for DisableBatchJobOption */ -export type DisableBatchJobOption = string; -/** Alias for BatchTaskExecutionResult */ -export type BatchTaskExecutionResult = string; -/** Alias for BatchJobScheduleState */ -export type BatchJobScheduleState = string; -/** Alias for BatchJobAction */ -export type BatchJobAction = string; -/** Alias for DependencyAction */ -export type DependencyAction = string; -/** Alias for BatchTaskState */ -export type BatchTaskState = string; -/** Alias for BatchNodeRebootOption */ -export type BatchNodeRebootOption = string; -/** Alias for BatchNodeDeallocateOption */ -export type BatchNodeDeallocateOption = string; -/** Alias for BatchNodeReimageOption */ -export type BatchNodeReimageOption = string; -/** Alias for BatchNodeDisableSchedulingOption */ -export type BatchNodeDisableSchedulingOption = string; diff --git a/sdk/batch/batch-rest/generated/outputModels.ts b/sdk/batch/batch-rest/generated/outputModels.ts deleted file mode 100644 index 44f19538a936..000000000000 --- a/sdk/batch/batch-rest/generated/outputModels.ts +++ /dev/null @@ -1,2468 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** The result of listing the applications available in an Account. */ -export interface BatchApplicationListResultOutput { - /** The list of applications available in the Account. */ - value?: Array; - /** The URL to get the next set of results. */ - "odata.nextLink"?: string; -} - -/** Contains information about an application in an Azure Batch Account. */ -export interface BatchApplicationOutput { - /** A string that uniquely identifies the application within the Account. */ - id: string; - /** The display name for the application. */ - displayName: string; - /** The list of available versions of the application. */ - versions: string[]; -} - -/** An error response received from the Azure Batch service. */ -export interface BatchErrorOutput { - /** An identifier for the error. Codes are invariant and are intended to be consumed programmatically. */ - code: string; - /** A message describing the error, intended to be suitable for display in a user interface. */ - message?: BatchErrorMessageOutput; - /** A collection of key-value pairs containing additional details about the error. */ - values?: Array; -} - -/** An error message received in an Azure Batch error response. */ -export interface BatchErrorMessageOutput { - /** The language code of the error message. */ - lang?: string; - /** The text of the message. */ - value?: string; -} - -/** An item of additional information included in an Azure Batch error response. */ -export interface BatchErrorDetailOutput { - /** An identifier specifying the meaning of the Value property. */ - key?: string; - /** The additional information included with the error response. */ - value?: string; -} - -/** The result of a listing the usage metrics for an Account. */ -export interface BatchPoolListUsageMetricsResultOutput { - /** The Pool usage metrics data. */ - value?: Array; - /** The URL to get the next set of results. */ - "odata.nextLink"?: string; -} - -/** Usage metrics for a Pool across an aggregation interval. */ -export interface BatchPoolUsageMetricsOutput { - /** The ID of the Pool whose metrics are aggregated in this entry. */ - poolId: string; - /** The start time of the aggregation interval covered by this entry. */ - startTime: string; - /** The end time of the aggregation interval covered by this entry. */ - endTime: string; - /** The size of virtual machines in the Pool. All VMs in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). */ - vmSize: string; - /** The total core hours used in the Pool during this aggregation interval. */ - totalCoreHours: number; -} - -/** - * The configuration for Compute Nodes in a Pool based on the Azure Virtual - * Machines infrastructure. - */ -export interface VirtualMachineConfigurationOutput { - /** A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use. */ - imageReference: ImageReferenceOutput; - /** The SKU of the Batch Compute Node agent to be provisioned on Compute Nodes in the Pool. The Batch Compute Node agent is a program that runs on each Compute Node in the Pool, and provides the command-and-control interface between the Compute Node and the Batch service. There are different implementations of the Compute Node agent, known as SKUs, for different operating systems. You must specify a Compute Node agent SKU which matches the selected Image reference. To get the list of supported Compute Node agent SKUs along with their list of verified Image references, see the 'List supported Compute Node agent SKUs' operation. */ - nodeAgentSKUId: string; - /** Windows operating system settings on the virtual machine. This property must not be specified if the imageReference property specifies a Linux OS Image. */ - windowsConfiguration?: WindowsConfigurationOutput; - /** The configuration for data disks attached to the Compute Nodes in the Pool. This property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them. This cannot be updated. Each Compute Node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the Compute Node is removed from the Pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://docs.microsoft.com/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://docs.microsoft.com/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. */ - dataDisks?: Array; - /** - * This only applies to Images that contain the Windows operating system, and - * should only be used when you hold valid on-premises licenses for the Compute - * Nodes which will be deployed. If omitted, no on-premises licensing discount is - * applied. Values are: - * - * Windows_Server - The on-premises license is for Windows - * Server. - * Windows_Client - The on-premises license is for Windows Client. - * - */ - licenseType?: string; - /** The container configuration for the Pool. If specified, setup is performed on each Compute Node in the Pool to allow Tasks to run in containers. All regular Tasks and Job manager Tasks run on this Pool must specify the containerSettings property, and all other Tasks may specify it. */ - containerConfiguration?: ContainerConfigurationOutput; - /** The disk encryption configuration for the pool. If specified, encryption is performed on each node in the pool during node provisioning. */ - diskEncryptionConfiguration?: DiskEncryptionConfigurationOutput; - /** The node placement configuration for the pool. This configuration will specify rules on how nodes in the pool will be physically allocated. */ - nodePlacementConfiguration?: BatchNodePlacementConfigurationOutput; - /** The virtual machine extension for the pool. If specified, the extensions mentioned in this configuration will be installed on each node. */ - extensions?: Array; - /** Settings for the operating system disk of the Virtual Machine. */ - osDisk?: OSDiskOutput; - /** Specifies the security profile settings for the virtual machine or virtual machine scale set. */ - securityProfile?: SecurityProfileOutput; - /** Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName} */ - serviceArtifactReference?: ServiceArtifactReferenceOutput; -} - -/** - * A reference to an Azure Virtual Machines Marketplace Image or a Azure Compute Gallery Image. - * To get the list of all Azure Marketplace Image references verified by Azure Batch, see the - * ' List Supported Images ' operation. - */ -export interface ImageReferenceOutput { - /** The publisher of the Azure Virtual Machines Marketplace Image. For example, Canonical or MicrosoftWindowsServer. */ - publisher?: string; - /** The offer type of the Azure Virtual Machines Marketplace Image. For example, UbuntuServer or WindowsServer. */ - offer?: string; - /** The SKU of the Azure Virtual Machines Marketplace Image. For example, 18.04-LTS or 2019-Datacenter. */ - sku?: string; - /** The version of the Azure Virtual Machines Marketplace Image. A value of 'latest' can be specified to select the latest version of an Image. If omitted, the default is 'latest'. */ - version?: string; - /** The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ - virtualMachineImageId?: string; - /** The specific version of the platform image or marketplace image used to create the node. This read-only field differs from 'version' only if the value specified for 'version' when the pool was created was 'latest'. */ - readonly exactVersion?: string; - /** The shared gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from shared gallery image GET call. */ - sharedGalleryImageId?: string; - /** The community gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from community gallery image GET call. */ - communityGalleryImageId?: string; -} - -/** Windows operating system settings to apply to the virtual machine. */ -export interface WindowsConfigurationOutput { - /** Whether automatic updates are enabled on the virtual machine. If omitted, the default value is true. */ - enableAutomaticUpdates?: boolean; -} - -/** - * Settings which will be used by the data disks associated to Compute Nodes in - * the Pool. When using attached data disks, you need to mount and format the - * disks from within a VM to use them. - */ -export interface DataDiskOutput { - /** The logical unit number. The logicalUnitNumber is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct logicalUnitNumber. The value must be between 0 and 63, inclusive. */ - lun: number; - /** - * The type of caching to be enabled for the data disks. The default value for caching is readwrite. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. - * - * Possible values: "none", "readonly", "readwrite" - */ - caching?: CachingTypeOutput; - /** The initial disk size in gigabytes. */ - diskSizeGB: number; - /** - * The storage Account type to be used for the data disk. If omitted, the default is "standard_lrs". - * - * Possible values: "standard_lrs", "premium_lrs", "standardssd_lrs" - */ - storageAccountType?: StorageAccountTypeOutput; -} - -/** The configuration for container-enabled Pools. */ -export interface ContainerConfigurationOutput { - /** - * The container technology to be used. - * - * Possible values: "dockerCompatible", "criCompatible" - */ - type: ContainerTypeOutput; - /** The collection of container Image names. 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[]; - /** Additional private registries from which containers can be pulled. If any Images must be downloaded from a private registry which requires credentials, then those credentials must be provided here. */ - containerRegistries?: Array; -} - -/** A private container registry. */ -export interface ContainerRegistryReferenceOutput { - /** The user name to log into the registry server. */ - username?: string; - /** The password to log into the registry server. */ - password?: string; - /** The registry URL. If omitted, the default is "docker.io". */ - registryServer?: string; - /** The reference to the user assigned identity to use to access an Azure Container Registry instead of username and password. */ - identityReference?: BatchNodeIdentityReferenceOutput; -} - -/** - * The reference to a user assigned identity associated with the Batch pool which - * a compute node will use. - */ -export interface BatchNodeIdentityReferenceOutput { - /** The ARM resource id of the user assigned identity. */ - resourceId?: string; -} - -/** - * The disk encryption configuration applied on compute nodes in the pool. - * Disk encryption configuration is not supported on Linux pool created with - * Azure Compute Gallery Image. - */ -export interface DiskEncryptionConfigurationOutput { - /** The list of disk targets Batch Service will encrypt on the compute node. The list of disk targets Batch Service will encrypt on the compute node. */ - targets?: DiskEncryptionTargetOutput[]; -} - -/** - * For regional placement, nodes in the pool will be allocated in the same region. - * For zonal placement, nodes in the pool will be spread across different zones - * with best effort balancing. - */ -export interface BatchNodePlacementConfigurationOutput { - /** - * Node placement Policy type on Batch Pools. Allocation policy used by Batch Service to provision the nodes. If not specified, Batch will use the regional policy. - * - * Possible values: "Shared", "Startup", "VfsMounts", "Task", "JobPrep", "Applications" - */ - policy?: BatchNodePlacementPolicyTypeOutput; -} - -/** The configuration for virtual machine extensions. */ -export interface VMExtensionOutput { - /** The name of the virtual machine extension. */ - name: string; - /** The name of the extension handler publisher. */ - publisher: string; - /** The type of the extension. */ - type: string; - /** The version of script handler. */ - 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. */ - protectedSettings?: Record; - /** The collection of extension names. Collection of extension names after which this extension needs to be provisioned. */ - provisionAfterExtensions?: string[]; -} - -/** Settings for the operating system disk of the compute node (VM). */ -export interface OSDiskOutput { - /** Specifies the ephemeral Disk Settings for the operating system disk used by the compute node (VM). */ - ephemeralOSDiskSettings?: DiffDiskSettingsOutput; - /** - * Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage. - * - * Possible values: "none", "readonly", "readwrite" - */ - caching?: CachingTypeOutput; - /** The initial disk size in GB when creating new OS disk. */ - diskSizeGB?: number; - /** The managed disk parameters. */ - managedDisk?: ManagedDiskOutput; - /** Specifies whether writeAccelerator should be enabled or disabled on the disk. */ - writeAcceleratorEnabled?: boolean; -} - -/** - * Specifies the ephemeral Disk Settings for the operating system disk used by the - * compute node (VM). - */ -export interface DiffDiskSettingsOutput { - /** - * Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose the location e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. - * - * Possible values: "cachedisk" - */ - placement?: DiffDiskPlacementOutput; -} - -/** The managed disk parameters. */ -export interface ManagedDiskOutput { - /** - * The storage account type for managed disk. - * - * Possible values: "standard_lrs", "premium_lrs", "standardssd_lrs" - */ - storageAccountType?: StorageAccountTypeOutput; - /** Specifies the security profile settings for the managed disk. */ - securityProfile?: VMDiskSecurityProfileOutput; -} - -/** Specifies the security profile settings for the managed disk. **Note**: It can only be set for Confidential VMs and required when using Confidential VMs. */ -export interface VMDiskSecurityProfileOutput { - /** - * Specifies the EncryptionType of the managed disk. It is set to VMGuestStateOnly for encryption of just the VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the VMGuestState blob. **Note**: It can be set for only Confidential VMs and is required when using Confidential VMs. - * - * Possible values: "NonPersistedTPM", "VMGuestStateOnly" - */ - securityEncryptionType?: SecurityEncryptionTypesOutput; -} - -/** Specifies the security profile settings for the virtual machine or virtual machine scale set. */ -export interface SecurityProfileOutput { - /** This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. For more information on encryption at host requirements, please refer to https://learn.microsoft.com/azure/virtual-machines/disk-encryption#supported-vm-sizes. */ - encryptionAtHost: boolean; - /** - * Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. - * - * Possible values: "trustedLaunch", "confidentialVM" - */ - securityType: SecurityTypesOutput; - /** Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Specifies the security settings like secure boot and vTPM used while creating the virtual machine. */ - uefiSettings: UefiSettingsOutput; -} - -/** Specifies the security settings like secure boot and vTPM used while creating the virtual machine. */ -export interface UefiSettingsOutput { - /** Specifies whether secure boot should be enabled on the virtual machine. */ - secureBootEnabled?: boolean; - /** Specifies whether vTPM should be enabled on the virtual machine. */ - vTpmEnabled?: boolean; -} - -/** - * Specifies the service artifact reference id used to set same image version - * for all virtual machines in the scale set when using 'latest' image version. - */ -export interface ServiceArtifactReferenceOutput { - /** The service artifact reference id of ServiceArtifactReference. The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName} */ - id: string; -} - -/** The network configuration for a Pool. */ -export interface NetworkConfigurationOutput { - /** The ARM resource identifier of the virtual network subnet which the Compute Nodes of the Pool will join. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes in the Pool. If the subnet doesn't have enough free IP addresses, the Pool will partially allocate Nodes and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. Only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication. Enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Also enable outbound connections to Azure Storage on port 443. For more details see: https://docs.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ - subnetId?: string; - /** - * The scope of dynamic vnet assignment. - * - * Possible values: "none", "job" - */ - dynamicVNetAssignmentScope?: DynamicVNetAssignmentScopeOutput; - /** The configuration for endpoints on Compute Nodes in the Batch Pool. */ - endpointConfiguration?: BatchPoolEndpointConfigurationOutput; - /** The Public IPAddress configuration for Compute Nodes in the Batch Pool. */ - publicIPAddressConfiguration?: PublicIpAddressConfigurationOutput; - /** Whether this pool should enable accelerated networking. 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. */ -export interface BatchPoolEndpointConfigurationOutput { - /** A list of inbound NAT Pools that can be used to address specific ports on an individual Compute Node externally. The maximum number of inbound NAT Pools per Batch Pool is 5. If the maximum number of inbound NAT Pools is exceeded the request fails with HTTP status code 400. This cannot be specified if the IPAddressProvisioningType is NoPublicIPAddresses. */ - inboundNATPools: Array; -} - -/** - * A inbound NAT Pool that can be used to address specific ports on Compute Nodes - * in a Batch Pool externally. - */ -export interface InboundNatPoolOutput { - /** The name of the endpoint. The name must be unique within a Batch Pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters. If any invalid values are provided the request fails with HTTP status code 400. */ - name: string; - /** - * The protocol of the endpoint. - * - * Possible values: "tcp", "udp" - */ - protocol: InboundEndpointProtocolOutput; - /** The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. */ - backendPort: number; - /** The first port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. */ - frontendPortRangeStart: number; - /** The last port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. */ - frontendPortRangeEnd: number; - /** A list of network security group rules that will be applied to the endpoint. The maximum number of rules that can be specified across all the endpoints on a Batch Pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400. */ - networkSecurityGroupRules?: Array; -} - -/** A network security group rule to apply to an inbound endpoint. */ -export interface NetworkSecurityGroupRuleOutput { - /** The priority for this rule. Priorities within a Pool must be unique and are evaluated in order of priority. The lower the number the higher the priority. For example, rules could be specified with order numbers of 150, 250, and 350. The rule with the order number of 150 takes precedence over the rule that has an order of 250. Allowed priorities are 150 to 4096. If any reserved or duplicate values are provided the request fails with HTTP status code 400. */ - priority: number; - /** - * The action that should be taken for a specified IP address, subnet range or tag. - * - * Possible values: "allow", "deny" - */ - access: NetworkSecurityGroupRuleAccessOutput; - /** The source address prefix or tag to match for the rule. Valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If any other values are provided the request fails with HTTP status code 400. */ - sourceAddressPrefix: string; - /** The source port ranges to match for the rule. Valid values are '*' (for all ports 0 - 65535), a specific port (i.e. 22), or a port range (i.e. 100-200). The ports must be in the range of 0 to 65535. Each entry in this collection must not overlap any other entry (either a range or an individual port). If any other values are provided the request fails with HTTP status code 400. The default value is '*'. */ - sourcePortRanges?: string[]; -} - -/** The public IP Address configuration of the networking configuration of a Pool. */ -export interface PublicIpAddressConfigurationOutput { - /** - * The provisioning type for Public IP Addresses for the Pool. The default value is BatchManaged. - * - * Possible values: "batchmanaged", "usermanaged", "nopublicipaddresses" - */ - provision?: IpAddressProvisioningTypeOutput; - /** The list of public IPs which the Batch service will use when provisioning Compute Nodes. The number of IPs specified here limits the maximum size of the Pool - 100 dedicated nodes or 100 Spot/Low-priority nodes can be allocated for each public IP. For example, a pool needing 250 dedicated VMs would need at least 3 public IPs specified. Each element of this collection is of the form: /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. */ - ipAddressIds?: string[]; -} - -/** - * Batch will retry Tasks when a recovery operation is triggered on a Node. - * Examples of recovery operations include (but are not limited to) when an - * unhealthy Node is rebooted or a Compute Node disappeared due to host failure. - * Retries due to recovery operations are independent of and are not counted - * against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal - * retry due to a recovery operation may occur. Because of this, all Tasks should - * be idempotent. This means Tasks need to tolerate being interrupted and - * restarted without causing any corruption or duplicate data. The best practice - * for long running Tasks is to use some form of checkpointing. In some cases the - * StartTask may be re-run even though the Compute Node was not rebooted. Special - * care should be taken to avoid StartTasks which create breakaway process or - * install/launch services from the StartTask working directory, as this will - * block Batch from being able to re-run the StartTask. - */ -export interface BatchStartTaskOutput { - /** The command line of the StartTask. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ - commandLine: string; - /** The settings for the container under which the StartTask runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ - containerSettings?: BatchTaskContainerSettingsOutput; - /** A list of files that the Batch service will download to the Compute Node before running the command line. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. Files listed under this element are located in the Task's working directory. */ - resourceFiles?: Array; - /** A list of environment variable settings for the StartTask. */ - environmentSettings?: Array; - /** The user identity under which the StartTask runs. If omitted, the Task runs as a non-administrative user unique to the Task. */ - userIdentity?: UserIdentityOutput; - /** The maximum number of times the Task may be retried. The Batch service retries a Task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try the Task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the Task. If the maximum retry count is -1, the Batch service retries the Task without limit, however this is not recommended for a start task or any task. The default value is 0 (no retries). */ - maxTaskRetryCount?: number; - /** Whether the Batch service should wait for the StartTask to complete successfully (that is, to exit with exit code 0) before scheduling any Tasks on the Compute Node. If true and the StartTask fails on a Node, the Batch service retries the StartTask up to its maximum retry count (maxTaskRetryCount). If the Task has still not completed successfully after all retries, then the Batch service marks the Node unusable, and will not schedule Tasks to it. This condition can be detected via the Compute Node state and failure info details. If false, the Batch service will not wait for the StartTask to complete. In this case, other Tasks can start executing on the Compute Node while the StartTask is still running; and even if the StartTask fails, new Tasks will continue to be scheduled on the Compute Node. The default is true. */ - waitForSuccess?: boolean; -} - -/** The container settings for a Task. */ -export interface BatchTaskContainerSettingsOutput { - /** Additional options to the container create command. These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service. */ - containerRunOptions?: string; - /** The Image to use to create the container in which the Task will run. This is the full Image reference, as would be specified to "docker pull". If no tag is provided as part of the Image name, the tag ":latest" is used as a default. */ - imageName: string; - /** The private registry which contains the container Image. This setting can be omitted if was already provided at Pool creation. */ - registry?: ContainerRegistryReferenceOutput; - /** - * The location of the container Task working directory. The default is 'taskWorkingDirectory'. - * - * Possible values: "taskWorkingDirectory", "containerImageDefault" - */ - workingDirectory?: ContainerWorkingDirectoryOutput; - /** The paths you want to mounted to container task. If this array is null or be not present, container task will mount entire temporary disk drive in windows (or AZ_BATCH_NODE_ROOT_DIR in Linux). It won't' mount any data paths into container if this array is set as empty. */ - containerHostBatchBindMounts?: Array; -} - -/** The entry of path and mount mode you want to mount into task container. */ -export interface ContainerHostBatchBindMountEntryOutput { - /** - * The path which be mounted to container customer can select. - * - * Possible values: "regional", "zonal" - */ - source?: ContainerHostDataPathOutput; - /** Mount this source path as read-only mode or not. Default value is false (read/write mode). For Linux, if you mount this path as a read/write mode, this does not mean that all users in container have the read/write access for the path, it depends on the access in host VM. If this path is mounted read-only, all users within the container will not be able to modify the path. */ - isReadOnly?: boolean; -} - -/** A single file or multiple files to be downloaded to a Compute Node. */ -export interface ResourceFileOutput { - /** The storage container name in the auto storage Account. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. */ - autoStorageContainerName?: string; - /** The URL of the blob container within Azure Blob Storage. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. This URL must be readable and listable from compute nodes. There are three ways to get such a URL for a container in Azure storage: include a Shared Access Signature (SAS) granting read and list permissions on the container, use a managed identity with read and list permissions, or set the ACL for the container to allow public access. */ - storageContainerUrl?: string; - /** The URL of the file to download. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. If the URL points to Azure Blob Storage, it must be readable from compute nodes. There are three ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, use a managed identity with read permission, or set the ACL for the blob or its container to allow public access. */ - httpUrl?: string; - /** The blob prefix to use when downloading blobs from an Azure Storage container. Only the blobs whose names begin with the specified prefix will be downloaded. The property is valid only when autoStorageContainerName or storageContainerUrl is used. This prefix can be a partial filename or a subdirectory. If a prefix is not specified, all the files in the container will be downloaded. */ - blobPrefix?: string; - /** The location on the Compute Node to which to download the file(s), relative to the Task's working directory. If the httpUrl property is specified, the filePath is required and describes the path which the file will be downloaded to, including the filename. Otherwise, if the autoStorageContainerName or storageContainerUrl property is specified, filePath is optional and is the directory to download the files to. In the case where filePath is used as a directory, any directory structure already associated with the input data will be retained in full and appended to the specified filePath directory. The specified relative path cannot break out of the Task's working directory (for example by using '..'). */ - filePath?: string; - /** The file permission mode attribute in octal format. This property applies only to files being downloaded to Linux Compute Nodes. It will be ignored if it is specified for a resourceFile which will be downloaded to a Windows Compute Node. If this property is not specified for a Linux Compute Node, then a default value of 0770 is applied to the file. */ - fileMode?: string; - /** The reference to the user assigned identity to use to access Azure Blob Storage specified by storageContainerUrl or httpUrl. */ - identityReference?: BatchNodeIdentityReferenceOutput; -} - -/** An environment variable to be set on a Task process. */ -export interface EnvironmentSettingOutput { - /** The name of the environment variable. */ - name: string; - /** The value of the environment variable. */ - value?: string; -} - -/** The definition of the user identity under which the Task is run. Specify either the userName or autoUser property, but not both. */ -export interface UserIdentityOutput { - /** The name of the user identity under which the Task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both. */ - username?: string; - /** The auto user under which the Task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both. */ - autoUser?: AutoUserSpecificationOutput; -} - -/** Specifies the options for the auto user that runs an Azure Batch Task. */ -export interface AutoUserSpecificationOutput { - /** - * The scope for the auto user. The default value is pool. If the pool is running Windows, a value of Task should be specified if stricter isolation between tasks is required, such as if the task mutates the registry in a way which could impact other tasks. - * - * Possible values: "task", "pool" - */ - scope?: AutoUserScopeOutput; - /** - * The elevation level of the auto user. The default value is nonAdmin. - * - * Possible values: "nonadmin", "admin" - */ - elevationLevel?: ElevationLevelOutput; -} - -/** A reference to an Package to be deployed to Compute Nodes. */ -export interface BatchApplicationPackageReferenceOutput { - /** The ID of the application to deploy. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}). */ - applicationId: string; - /** The version of the application to deploy. If omitted, the default version is deployed. If this is omitted on a Pool, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences and HTTP status code 409. If this is omitted on a Task, and no default version is specified for this application, the Task fails with a pre-processing error. */ - version?: string; -} - -/** Specifies how Tasks should be distributed across Compute Nodes. */ -export interface BatchTaskSchedulingPolicyOutput { - /** - * How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. - * - * Possible values: "spread", "pack" - */ - nodeFillType: BatchNodeFillTypeOutput; -} - -/** - * Properties used to create a user used to execute Tasks on an Azure Batch - * Compute Node. - */ -export interface UserAccountOutput { - /** The name of the user Account. Names can contain any Unicode characters up to a maximum length of 20. */ - name: string; - /** The password for the user Account. */ - password: string; - /** - * The elevation level of the user Account. The default value is nonAdmin. - * - * Possible values: "nonadmin", "admin" - */ - elevationLevel?: ElevationLevelOutput; - /** The Linux-specific user configuration for the user Account. This property is ignored if specified on a Windows Pool. If not specified, the user is created with the default options. */ - linuxUserConfiguration?: LinuxUserConfigurationOutput; - /** The Windows-specific user configuration for the user Account. This property can only be specified if the user is on a Windows Pool. If not specified and on a Windows Pool, the user is created with the default options. */ - windowsUserConfiguration?: WindowsUserConfigurationOutput; -} - -/** Properties used to create a user Account on a Linux Compute Node. */ -export interface LinuxUserConfigurationOutput { - /** The user ID of the user Account. The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the uid. */ - uid?: number; - /** The group ID for the user Account. The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the gid. */ - gid?: number; - /** The SSH private key for the user Account. The private key must not be password protected. The private key is used to automatically configure asymmetric-key based authentication for SSH between Compute Nodes in a Linux Pool when the Pool's enableInterNodeCommunication property is true (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair into the user's .ssh directory. If not specified, password-less SSH is not configured between Compute Nodes (no modification of the user's .ssh directory is done). */ - sshPrivateKey?: string; -} - -/** Properties used to create a user Account on a Windows Compute Node. */ -export interface WindowsUserConfigurationOutput { - /** - * The login mode for the user. The default is 'batch'. - * - * Possible values: "batch", "interactive" - */ - loginMode?: LoginModeOutput; -} - -/** - * The Batch service does not assign any meaning to this metadata; it is solely - * for the use of user code. - */ -export interface MetadataItemOutput { - /** The name of the metadata item. */ - name: string; - /** The value of the metadata item. */ - value: string; -} - -/** The file system to mount on each node. */ -export interface MountConfigurationOutput { - /** The Azure Storage Container to mount using blob FUSE on each node. This property is mutually exclusive with all other properties. */ - azureBlobFileSystemConfiguration?: AzureBlobFileSystemConfigurationOutput; - /** The NFS file system to mount on each node. This property is mutually exclusive with all other properties. */ - nfsMountConfiguration?: NfsMountConfigurationOutput; - /** The CIFS/SMB file system to mount on each node. This property is mutually exclusive with all other properties. */ - cifsMountConfiguration?: CifsMountConfigurationOutput; - /** The Azure File Share to mount on each node. This property is mutually exclusive with all other properties. */ - azureFileShareConfiguration?: AzureFileShareConfigurationOutput; -} - -/** Information used to connect to an Azure Storage Container using Blobfuse. */ -export interface AzureBlobFileSystemConfigurationOutput { - /** The Azure Storage Account name. */ - accountName: string; - /** The Azure Blob Storage Container name. */ - containerName: string; - /** The Azure Storage Account key. This property is mutually exclusive with both sasKey and identity; exactly one must be specified. */ - accountKey?: string; - /** The Azure Storage SAS token. This property is mutually exclusive with both accountKey and identity; exactly one must be specified. */ - sasKey?: string; - /** Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. */ - blobfuseOptions?: string; - /** The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. */ - relativeMountPath: string; - /** The reference to the user assigned identity to use to access containerName. This property is mutually exclusive with both accountKey and sasKey; exactly one must be specified. */ - identityReference?: BatchNodeIdentityReferenceOutput; -} - -/** Information used to connect to an NFS file system. */ -export interface NfsMountConfigurationOutput { - /** The URI of the file system to mount. */ - source: string; - /** The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. */ - relativeMountPath: string; - /** Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. */ - mountOptions?: string; -} - -/** Information used to connect to a CIFS file system. */ -export interface CifsMountConfigurationOutput { - /** The user to use for authentication against the CIFS file system. */ - username: string; - /** The URI of the file system to mount. */ - source: string; - /** The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. */ - relativeMountPath: string; - /** Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. */ - mountOptions?: string; - /** The password to use for authentication against the CIFS file system. */ - password: string; -} - -/** Information used to connect to an Azure Fileshare. */ -export interface AzureFileShareConfigurationOutput { - /** The Azure Storage account name. */ - accountName: string; - /** The Azure Files URL. This is of the form 'https://{account}.file.core.windows.net/'. */ - azureFileUrl: string; - /** The Azure Storage account key. */ - accountKey: string; - /** The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. */ - relativeMountPath: string; - /** Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. */ - mountOptions?: string; -} - -/** Describes an upgrade policy - automatic, manual, or rolling. */ -export interface UpgradePolicyOutput { - /** - * Specifies the mode of an upgrade to virtual machines in the scale set.

Possible values are:

**Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.

**Automatic** - All virtual machines in the scale set are automatically updated at the same time.

**Rolling** - Scale set performs updates in batches with an optional pause time in between. - * - * Possible values: "automatic", "manual", "rolling" - */ - mode: UpgradeModeOutput; - /** Configuration parameters used for performing automatic OS Upgrade. The configuration parameters used for performing automatic OS upgrade. */ - automaticOSUpgradePolicy?: AutomaticOsUpgradePolicyOutput; - /** The configuration parameters used while performing a rolling upgrade. */ - rollingUpgradePolicy?: RollingUpgradePolicyOutput; -} - -/** The configuration parameters used for performing automatic OS upgrade. */ -export interface AutomaticOsUpgradePolicyOutput { - /** Whether OS image rollback feature should be disabled. */ - disableAutomaticRollback?: boolean; - /** Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available.

If this is set to true for Windows based pools, [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/rest/api/batchservice/pool/add?tabs=HTTP#windowsconfiguration) cannot be set to true. */ - enableAutomaticOSUpgrade?: boolean; - /** Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS. */ - useRollingUpgradePolicy?: boolean; - /** Defer OS upgrades on the TVMs if they are running tasks. */ - osRollingUpgradeDeferral?: boolean; -} - -/** The configuration parameters used while performing a rolling upgrade. */ -export interface RollingUpgradePolicyOutput { - /** Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size. This field is able to be set to true or false only when using NodePlacementConfiguration as Zonal. */ - enableCrossZoneUpgrade?: boolean; - /** The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent. */ - maxBatchInstancePercent?: number; - /** The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent. */ - maxUnhealthyInstancePercent?: number; - /** The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The value of this field should be between 0 and 100, inclusive. */ - maxUnhealthyUpgradedInstancePercent?: number; - /** The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format.. */ - pauseTimeBetweenBatches?: string; - /** Upgrade all unhealthy instances in a scale set before any healthy instances. */ - prioritizeUnhealthyInstances?: boolean; - /** Rollback failed instances to previous model if the Rolling Upgrade policy is violated. */ - rollbackFailedInstancesOnPolicyBreach?: boolean; -} - -/** The result of listing the Pools in an Account. */ -export interface BatchPoolListResultOutput { - /** The list of Pools. */ - value?: Array; - /** The URL to get the next set of results. */ - "odata.nextLink"?: string; -} - -/** A Pool in the Azure Batch service. */ -export interface BatchPoolOutput { - /** A string that uniquely identifies the Pool within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). */ - readonly id?: string; - /** The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. */ - readonly displayName?: string; - /** The URL of the Pool. */ - readonly url?: string; - /** The ETag of the Pool. This is an opaque string. You can use it to detect whether the Pool has changed between requests. In particular, you can be pass the ETag when updating a Pool to specify that your changes should take effect only if nobody else has modified the Pool in the meantime. */ - readonly eTag?: string; - /** The last modified time of the Pool. This is the last time at which the Pool level data, such as the targetDedicatedNodes or enableAutoscale settings, changed. It does not factor in node-level changes such as a Compute Node changing state. */ - readonly lastModified?: string; - /** The creation time of the Pool. */ - readonly creationTime?: string; - /** - * The current state of the Pool. - * - * Possible values: "active", "deleting" - */ - readonly state?: BatchPoolStateOutput; - /** The time at which the Pool entered its current state. */ - readonly stateTransitionTime?: string; - /** - * Whether the Pool is resizing. - * - * Possible values: "steady", "resizing", "stopping" - */ - readonly allocationState?: AllocationStateOutput; - /** The time at which the Pool entered its current allocation state. */ - readonly allocationStateTransitionTime?: string; - /** The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available VM sizes, see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). */ - readonly vmSize?: string; - /** The virtual machine configuration for the Pool. This property must be specified. */ - readonly virtualMachineConfiguration?: VirtualMachineConfigurationOutput; - /** The timeout for allocation of Compute Nodes to the Pool. This is the timeout for the most recent resize operation. (The initial sizing when the Pool is created counts as a resize.) The default value is 15 minutes. */ - readonly resizeTimeout?: string; - /** A list of errors encountered while performing the last resize on the Pool. This property is set only if one or more errors occurred during the last Pool resize, and only when the Pool allocationState is Steady. */ - readonly resizeErrors?: Array; - /** The user-specified tags associated with the pool. The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. */ - readonly resourceTags?: Record; - /** The number of dedicated Compute Nodes currently in the Pool. */ - readonly currentDedicatedNodes?: number; - /** The number of Spot/Low-priority Compute Nodes currently in the Pool. Spot/Low-priority Compute Nodes which have been preempted are included in this count. */ - readonly currentLowPriorityNodes?: number; - /** The desired number of dedicated Compute Nodes in the Pool. */ - readonly targetDedicatedNodes?: number; - /** The desired number of Spot/Low-priority Compute Nodes in the Pool. */ - readonly targetLowPriorityNodes?: number; - /** Whether the Pool size should automatically adjust over time. If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula property is required and the Pool automatically resizes according to the formula. The default value is false. */ - readonly enableAutoScale?: boolean; - /** A formula for the desired number of Compute Nodes in the Pool. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true. */ - readonly autoScaleFormula?: string; - /** The time interval at which to automatically adjust the Pool size according to the autoscale formula. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true. */ - readonly autoScaleEvaluationInterval?: string; - /** The results and errors from the last execution of the autoscale formula. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true. */ - readonly autoScaleRun?: AutoScaleRunOutput; - /** Whether the Pool permits direct communication between Compute Nodes. This imposes restrictions on which Compute Nodes can be assigned to the Pool. Specifying this value can reduce the chance of the requested number of Compute Nodes to be allocated in the Pool. */ - readonly enableInterNodeCommunication?: boolean; - /** The network configuration for the Pool. */ - readonly networkConfiguration?: NetworkConfigurationOutput; - /** A Task specified to run on each Compute Node as it joins the Pool. */ - startTask?: BatchStartTaskOutput; - /** The list of Packages to be installed on each Compute Node in the Pool. Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package references on any given Pool. */ - readonly applicationPackageReferences?: Array; - /** The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. */ - readonly taskSlotsPerNode?: number; - /** How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. */ - readonly taskSchedulingPolicy?: BatchTaskSchedulingPolicyOutput; - /** The list of user Accounts to be created on each Compute Node in the Pool. */ - readonly userAccounts?: Array; - /** A list of name-value pairs associated with the Pool as metadata. */ - readonly metadata?: Array; - /** Utilization and resource usage statistics for the entire lifetime of the Pool. This property is populated only if the BatchPool was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. */ - readonly stats?: BatchPoolStatisticsOutput; - /** A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. */ - readonly mountConfiguration?: Array; - /** The identity of the Batch pool, if configured. The list of user identities associated with the Batch pool. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ - readonly identity?: BatchPoolIdentityOutput; - /** - * The desired node communication mode for the pool. If omitted, the default value is Default. - * - * Possible values: "default", "classic", "simplified" - */ - targetNodeCommunicationMode?: BatchNodeCommunicationModeOutput; - /** - * The current state of the pool communication mode. - * - * Possible values: "default", "classic", "simplified" - */ - readonly currentNodeCommunicationMode?: BatchNodeCommunicationModeOutput; - /** The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling. */ - upgradePolicy?: UpgradePolicyOutput; -} - -/** An error that occurred when resizing a Pool. */ -export interface ResizeErrorOutput { - /** An identifier for the Pool resize error. Codes are invariant and are intended to be consumed programmatically. */ - code?: string; - /** A message describing the Pool resize error, intended to be suitable for display in a user interface. */ - message?: string; - /** A list of additional error details related to the Pool resize error. */ - values?: Array; -} - -/** Represents a name-value pair. */ -export interface NameValuePairOutput { - /** The name in the name-value pair. */ - name?: string; - /** The value in the name-value pair. */ - value?: string; -} - -/** The results and errors from an execution of a Pool autoscale formula. */ -export interface AutoScaleRunOutput { - /** The time at which the autoscale formula was last evaluated. */ - timestamp: string; - /** The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form $variable=value, and variables are separated by semicolons. */ - results?: string; - /** Details of the error encountered evaluating the autoscale formula on the Pool, if the evaluation was unsuccessful. */ - error?: AutoScaleRunErrorOutput; -} - -/** An error that occurred when executing or evaluating a Pool autoscale formula. */ -export interface AutoScaleRunErrorOutput { - /** An identifier for the autoscale error. Codes are invariant and are intended to be consumed programmatically. */ - code?: string; - /** A message describing the autoscale error, intended to be suitable for display in a user interface. */ - message?: string; - /** A list of additional error details related to the autoscale error. */ - values?: Array; -} - -/** Contains utilization and resource usage statistics for the lifetime of a Pool. */ -export interface BatchPoolStatisticsOutput { - /** The URL for the statistics. */ - url: string; - /** The start time of the time range covered by the statistics. */ - startTime: string; - /** The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. */ - lastUpdateTime: string; - /** Statistics related to Pool usage, such as the amount of core-time used. */ - usageStats?: BatchPoolUsageStatisticsOutput; - /** Statistics related to resource consumption by Compute Nodes in the Pool. */ - resourceStats?: BatchPoolResourceStatisticsOutput; -} - -/** Statistics related to Pool usage information. */ -export interface BatchPoolUsageStatisticsOutput { - /** The start time of the time range covered by the statistics. */ - startTime: string; - /** The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. */ - lastUpdateTime: string; - /** The aggregated wall-clock time of the dedicated Compute Node cores being part of the Pool. */ - dedicatedCoreTime: string; -} - -/** Statistics related to resource consumption by Compute Nodes in a Pool. */ -export interface BatchPoolResourceStatisticsOutput { - /** The start time of the time range covered by the statistics. */ - startTime: string; - /** The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. */ - lastUpdateTime: string; - /** The average CPU usage across all Compute Nodes in the Pool (percentage per node). */ - avgCPUPercentage: number; - /** The average memory usage in GiB across all Compute Nodes in the Pool. */ - avgMemoryGiB: number; - /** The peak memory usage in GiB across all Compute Nodes in the Pool. */ - peakMemoryGiB: number; - /** The average used disk space in GiB across all Compute Nodes in the Pool. */ - avgDiskGiB: number; - /** The peak used disk space in GiB across all Compute Nodes in the Pool. */ - peakDiskGiB: number; - /** The total number of disk read operations across all Compute Nodes in the Pool. */ - diskReadIOps: number; - /** The total number of disk write operations across all Compute Nodes in the Pool. */ - diskWriteIOps: number; - /** The total amount of data in GiB of disk reads across all Compute Nodes in the Pool. */ - diskReadGiB: number; - /** The total amount of data in GiB of disk writes across all Compute Nodes in the Pool. */ - diskWriteGiB: number; - /** The total amount of data in GiB of network reads across all Compute Nodes in the Pool. */ - networkReadGiB: number; - /** The total amount of data in GiB of network writes across all Compute Nodes in the Pool. */ - networkWriteGiB: number; -} - -/** The identity of the Batch pool, if configured. */ -export interface BatchPoolIdentityOutput { - /** - * The identity of the Batch pool, if configured. The list of user identities associated with the Batch pool. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - * - * Possible values: "UserAssigned", "None" - */ - type: BatchPoolIdentityTypeOutput; - /** The list of user identities associated with the Batch account. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ - userAssignedIdentities?: Array; -} - -/** The user assigned Identity */ -export interface UserAssignedIdentityOutput { - /** The ARM resource id of the user assigned identity. */ - resourceId: string; - /** The client id of the user assigned identity. */ - readonly clientId?: string; - /** The principal id of the user assigned identity. */ - readonly principalId?: string; -} - -/** The result of listing the supported Virtual Machine Images. */ -export interface BatchAccountListSupportedImagesResultOutput { - /** The list of supported Virtual Machine Images. */ - value?: Array; - /** The URL to get the next set of results. */ - "odata.nextLink"?: string; -} - -/** - * A reference to the Azure Virtual Machines Marketplace Image and additional - * information about the Image. - */ -export interface BatchSupportedImageOutput { - /** The ID of the Compute Node agent SKU which the Image supports. */ - nodeAgentSKUId: string; - /** The reference to the Azure Virtual Machine's Marketplace Image. */ - imageReference: ImageReferenceOutput; - /** - * The type of operating system (e.g. Windows or Linux) of the Image. - * - * Possible values: "linux", "windows" - */ - osType: OSTypeOutput; - /** The capabilities or features which the Image supports. Not every capability of the Image is listed. Capabilities in this list are considered of special interest and are generally related to integration with other features in the Azure Batch service. */ - capabilities?: string[]; - /** The time when the Azure Batch service will stop accepting create Pool requests for the Image. */ - batchSupportEndOfLife?: string; - /** - * Whether the Azure Batch service actively verifies that the Image is compatible with the associated Compute Node agent SKU. - * - * Possible values: "verified", "unverified" - */ - verificationType: ImageVerificationTypeOutput; -} - -/** The result of listing the Compute Node counts in the Account. */ -export interface BatchPoolNodeCountsListResultOutput { - /** A list of Compute Node counts by Pool. */ - value?: Array; - /** The URL to get the next set of results. */ - "odata.nextLink"?: string; -} - -/** The number of Compute Nodes in each state for a Pool. */ -export interface BatchPoolNodeCountsOutput { - /** The ID of the Pool. */ - poolId: string; - /** The number of dedicated Compute Nodes in each state. */ - dedicated?: BatchNodeCountsOutput; - /** The number of Spot/Low-priority Compute Nodes in each state. */ - lowPriority?: BatchNodeCountsOutput; -} - -/** The number of Compute Nodes in each Compute Node state. */ -export interface BatchNodeCountsOutput { - /** The number of Compute Nodes in the creating state. */ - creating: number; - /** The number of Compute Nodes in the idle state. */ - idle: number; - /** The number of Compute Nodes in the offline state. */ - offline: number; - /** The number of Compute Nodes in the preempted state. */ - preempted: number; - /** The count of Compute Nodes in the rebooting state. */ - rebooting: number; - /** The number of Compute Nodes in the reimaging state. */ - reimaging: number; - /** The number of Compute Nodes in the running state. */ - running: number; - /** The number of Compute Nodes in the starting state. */ - starting: number; - /** The number of Compute Nodes in the startTaskFailed state. */ - startTaskFailed: number; - /** The number of Compute Nodes in the leavingPool state. */ - leavingPool: number; - /** The number of Compute Nodes in the unknown state. */ - unknown: number; - /** The number of Compute Nodes in the unusable state. */ - unusable: number; - /** The number of Compute Nodes in the waitingForStartTask state. */ - waitingForStartTask: number; - /** The number of Compute Nodes in the deallocated state. */ - deallocated: number; - /** The number of Compute Nodes in the deallocating state. */ - deallocating: number; - /** The total number of Compute Nodes. */ - total: number; - /** The number of Compute Nodes in the upgradingOS state. */ - upgradingOS: number; -} - -/** An Azure Batch Job. */ -export interface BatchJobOutput { - /** A string that uniquely identifies the Job within the Account. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). */ - readonly id?: string; - /** The display name for the Job. */ - readonly displayName?: string; - /** Whether Tasks in the Job can define dependencies on each other. The default is false. */ - readonly usesTaskDependencies?: boolean; - /** The URL of the Job. */ - readonly url?: string; - /** The ETag of the Job. This is an opaque string. You can use it to detect whether the Job has changed between requests. In particular, you can be pass the ETag when updating a Job to specify that your changes should take effect only if nobody else has modified the Job in the meantime. */ - readonly eTag?: string; - /** The last modified time of the Job. This is the last time at which the Job level data, such as the Job state or priority, changed. It does not factor in task-level changes such as adding new Tasks or Tasks changing state. */ - readonly lastModified?: string; - /** The creation time of the Job. */ - readonly creationTime?: string; - /** - * The current state of the Job. - * - * Possible values: "active", "disabling", "disabled", "enabling", "terminating", "completed", "deleting" - */ - readonly state?: BatchJobStateOutput; - /** The time at which the Job entered its current state. */ - readonly stateTransitionTime?: string; - /** - * The previous state of the Job. This property is not set if the Job is in its initial Active state. - * - * Possible values: "active", "disabling", "disabled", "enabling", "terminating", "completed", "deleting" - */ - readonly previousState?: BatchJobStateOutput; - /** The time at which the Job entered its previous state. This property is not set if the Job is in its initial Active state. */ - readonly previousStateTransitionTime?: string; - /** The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. */ - priority?: number; - /** Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. */ - allowTaskPreemption?: boolean; - /** The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. */ - maxParallelTasks?: number; - /** The execution constraints for the Job. */ - constraints?: BatchJobConstraintsOutput; - /** Details of a Job Manager Task to be launched when the Job is started. */ - readonly jobManagerTask?: BatchJobManagerTaskOutput; - /** The Job Preparation Task. The Job Preparation Task is a special Task run on each Compute Node before any other Task of the Job. */ - readonly jobPreparationTask?: BatchJobPreparationTaskOutput; - /** The Job Release Task. The Job Release Task is a special Task run at the end of the Job on each Compute Node that has run any other Task of the Job. */ - readonly jobReleaseTask?: BatchJobReleaseTaskOutput; - /** The list of common environment variable settings. These environment variables are set for all Tasks in the Job (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value. */ - readonly commonEnvironmentSettings?: Array; - /** The Pool settings associated with the Job. */ - poolInfo: BatchPoolInfoOutput; - /** - * The action the Batch service should take when all Tasks in the Job are in the completed state. The default is noaction. - * - * Possible values: "noaction", "terminatejob" - */ - onAllTasksComplete?: OnAllBatchTasksCompleteOutput; - /** - * The action the Batch service should take when any Task in the Job fails. A Task is considered to have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction. - * - * Possible values: "noaction", "performexitoptionsjobaction" - */ - readonly onTaskFailure?: OnBatchTaskFailureOutput; - /** The network configuration for the Job. */ - readonly networkConfiguration?: BatchJobNetworkConfigurationOutput; - /** A list of name-value pairs associated with the Job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. */ - metadata?: Array; - /** The execution information for the Job. */ - readonly executionInfo?: BatchJobExecutionInfoOutput; - /** Resource usage statistics for the entire lifetime of the Job. This property is populated only if the BatchJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. */ - readonly stats?: BatchJobStatisticsOutput; -} - -/** The execution constraints for a Job. */ -export interface BatchJobConstraintsOutput { - /** The maximum elapsed time that the Job may run, measured from the time the Job is created. If the Job does not complete within the time limit, the Batch service terminates it and any Tasks that are still running. In this case, the termination reason will be MaxWallClockTimeExpiry. If this property is not specified, there is no time limit on how long the Job may run. */ - maxWallClockTime?: string; - /** The maximum number of times each Task may be retried. The Batch service retries a Task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try each Task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries a Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry Tasks. If the maximum retry count is -1, the Batch service retries Tasks without limit. The default value is 0 (no retries). */ - maxTaskRetryCount?: number; -} - -/** - * Specifies details of a Job Manager Task. - * The Job Manager Task is automatically started when the Job is created. The - * Batch service tries to schedule the Job Manager Task before any other Tasks in - * the Job. When shrinking a Pool, the Batch service tries to preserve Nodes where - * Job Manager Tasks are running for as long as possible (that is, Compute Nodes - * running 'normal' Tasks are removed before Compute Nodes running Job Manager - * Tasks). When a Job Manager Task fails and needs to be restarted, the system - * tries to schedule it at the highest priority. If there are no idle Compute - * Nodes available, the system may terminate one of the running Tasks in the Pool - * and return it to the queue in order to make room for the Job Manager Task to - * restart. Note that a Job Manager Task in one Job does not have priority over - * Tasks in other Jobs. Across Jobs, only Job level priorities are observed. For - * example, if a Job Manager in a priority 0 Job needs to be restarted, it will - * not displace Tasks of a priority 1 Job. Batch will retry Tasks when a recovery - * operation is triggered on a Node. Examples of recovery operations include (but - * are not limited to) when an unhealthy Node is rebooted or a Compute Node - * disappeared due to host failure. Retries due to recovery operations are - * independent of and are not counted against the maxTaskRetryCount. Even if the - * maxTaskRetryCount is 0, an internal retry due to a recovery operation may - * occur. Because of this, all Tasks should be idempotent. This means Tasks need - * to tolerate being interrupted and restarted without causing any corruption or - * duplicate data. The best practice for long running Tasks is to use some form of - * checkpointing. - */ -export interface BatchJobManagerTaskOutput { - /** A string that uniquely identifies the Job Manager Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. */ - id: string; - /** The display name of the Job Manager Task. It need not be unique and can contain any Unicode characters up to a maximum length of 1024. */ - displayName?: string; - /** The command line of the Job Manager Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ - commandLine: string; - /** The settings for the container under which the Job Manager Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ - containerSettings?: BatchTaskContainerSettingsOutput; - /** A list of files that the Batch service will download to the Compute Node before running the command line. Files listed under this element are located in the Task's working directory. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. */ - resourceFiles?: Array; - /** A list of files that the Batch service will upload from the Compute Node after running the command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. */ - outputFiles?: Array; - /** A list of environment variable settings for the Job Manager Task. */ - environmentSettings?: Array; - /** Constraints that apply to the Job Manager Task. */ - constraints?: BatchTaskConstraintsOutput; - /** The number of scheduling slots that the Task requires to run. The default is 1. A Task can only be scheduled to run on a compute node if the node has enough free scheduling slots available. For multi-instance Tasks, this property is not supported and must not be specified. */ - requiredSlots?: number; - /** Whether completion of the Job Manager Task signifies completion of the entire Job. If true, when the Job Manager Task completes, the Batch service marks the Job as complete. If any Tasks are still running at this time (other than Job Release), those Tasks are terminated. If false, the completion of the Job Manager Task does not affect the Job status. In this case, you should either use the onAllTasksComplete attribute to terminate the Job, or have a client or user terminate the Job explicitly. An example of this is if the Job Manager creates a set of Tasks but then takes no further role in their execution. The default value is true. If you are using the onAllTasksComplete and onTaskFailure attributes to control Job lifetime, and using the Job Manager Task only to create the Tasks for the Job (not to monitor progress), then it is important to set killJobOnCompletion to false. */ - killJobOnCompletion?: boolean; - /** The user identity under which the Job Manager Task runs. If omitted, the Task runs as a non-administrative user unique to the Task. */ - userIdentity?: UserIdentityOutput; - /** Whether the Job Manager Task requires exclusive use of the Compute Node where it runs. If true, no other Tasks will run on the same Node for as long as the Job Manager is running. If false, other Tasks can run simultaneously with the Job Manager on a Compute Node. The Job Manager Task counts normally against the Compute Node's concurrent Task limit, so this is only relevant if the Compute Node allows multiple concurrent Tasks. The default value is true. */ - runExclusive?: boolean; - /** - * A list of Application Packages that the Batch service will deploy to the - * Compute Node before running the command line.Application Packages are - * downloaded and deployed to a shared directory, not the Task working - * directory. Therefore, if a referenced Application Package is already - * on the Compute Node, and is up to date, then it is not re-downloaded; - * the existing copy on the Compute Node is used. If a referenced Application - * Package cannot be installed, for example because the package has been deleted - * or because download failed, the Task fails. - */ - applicationPackageReferences?: Array; - /** The settings for an authentication token that the Task can use to perform Batch service operations. If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job. */ - authenticationTokenSettings?: AuthenticationTokenSettingsOutput; - /** Whether the Job Manager Task may run on a Spot/Low-priority Compute Node. The default value is true. */ - allowLowPriorityNode?: boolean; -} - -/** On every file uploads, Batch service writes two log files to the compute node, 'fileuploadout.txt' and 'fileuploaderr.txt'. These log files are used to learn more about a specific failure. */ -export interface OutputFileOutput { - /** A pattern indicating which file(s) to upload. Both relative and absolute paths are supported. Relative paths are relative to the Task working directory. The following wildcards are supported: * matches 0 or more characters (for example pattern abc* would match abc or abcdef), ** matches any directory, ? matches any single character, [abc] matches one character in the brackets, and [a-c] matches one character in the range. Brackets can include a negation to match any character not specified (for example [!abc] matches any character but a, b, or c). If a file name starts with "." it is ignored by default but may be matched by specifying it explicitly (for example *.gif will not match .a.gif, but .*.gif will). A simple example: **\*.txt matches any file that does not start in '.' and ends with .txt in the Task working directory or any subdirectory. If the filename contains a wildcard character it can be escaped using brackets (for example abc[*] would match a file named abc*). Note that both \ and / are treated as directory separators on Windows, but only / is on Linux. Environment variables (%var% on Windows or $var on Linux) are expanded prior to the pattern being applied. */ - filePattern: string; - /** The destination for the output file(s). */ - destination: OutputFileDestinationOutput; - /** Additional options for the upload operation, including under what conditions to perform the upload. */ - uploadOptions: OutputFileUploadConfigOutput; -} - -/** The destination to which a file should be uploaded. */ -export interface OutputFileDestinationOutput { - /** A location in Azure blob storage to which files are uploaded. */ - container?: OutputFileBlobContainerDestinationOutput; -} - -/** Specifies a file upload destination within an Azure blob storage container. */ -export interface OutputFileBlobContainerDestinationOutput { - /** The destination blob or virtual directory within the Azure Storage container. If filePattern refers to a specific file (i.e. contains no wildcards), then path is the name of the blob to which to upload that file. If filePattern contains one or more wildcards (and therefore may match multiple files), then path is the name of the blob virtual directory (which is prepended to each blob name) to which to upload the file(s). If omitted, file(s) are uploaded to the root of the container with a blob name matching their file name. */ - path?: string; - /** The URL of the container within Azure Blob Storage to which to upload the file(s). If not using a managed identity, the URL must include a Shared Access Signature (SAS) granting write permissions to the container. */ - containerUrl: string; - /** The reference to the user assigned identity to use to access Azure Blob Storage specified by containerUrl. The identity must have write access to the Azure Blob Storage container. */ - identityReference?: BatchNodeIdentityReferenceOutput; - /** A list of name-value pairs for headers to be used in uploading output files. These headers will be specified when uploading files to Azure Storage. Official document on allowed headers when uploading blobs: https://docs.microsoft.com/rest/api/storageservices/put-blob#request-headers-all-blob-types. */ - uploadHeaders?: Array; -} - -/** An HTTP header name-value pair */ -export interface HttpHeaderOutput { - /** The case-insensitive name of the header to be used while uploading output files. */ - name: string; - /** The value of the header to be used while uploading output files. */ - value?: string; -} - -/** - * Options for an output file upload operation, including under what conditions - * to perform the upload. - */ -export interface OutputFileUploadConfigOutput { - /** - * The conditions under which the Task output file or set of files should be uploaded. The default is taskcompletion. - * - * Possible values: "tasksuccess", "taskfailure", "taskcompletion" - */ - uploadCondition: OutputFileUploadConditionOutput; -} - -/** Execution constraints to apply to a Task. */ -export interface BatchTaskConstraintsOutput { - /** The maximum elapsed time that the Task may run, measured from the time the Task starts. If the Task does not complete within the time limit, the Batch service terminates it. If this is not specified, there is no time limit on how long the Task may run. */ - maxWallClockTime?: string; - /** The minimum time to retain the Task directory on the Compute Node where it ran, from the time it completes execution. After this time, the Batch service may delete the Task directory and all its contents. The default is 7 days, i.e. the Task directory will be retained for 7 days unless the Compute Node is removed or the Job is deleted. */ - retentionTime?: string; - /** The maximum number of times the Task may be retried. The Batch service retries a Task if its exit code is nonzero. Note that this value specifically controls the number of retries for the Task executable due to a nonzero exit code. The Batch service will try the Task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the Task after the first attempt. If the maximum retry count is -1, the Batch service retries the Task without limit, however this is not recommended for a start task or any task. The default value is 0 (no retries). */ - maxTaskRetryCount?: number; -} - -/** - * The settings for an authentication token that the Task can use to perform Batch - * service operations. - */ -export interface AuthenticationTokenSettingsOutput { - /** The Batch resources to which the token grants access. The authentication token grants access to a limited set of Batch service operations. Currently the only supported value for the access property is 'job', which grants access to all operations related to the Job which contains the Task. */ - access?: AccessScopeOutput[]; -} - -/** - * A Job Preparation Task to run before any Tasks of the Job on any given Compute Node. - * You can use Job Preparation to prepare a Node to run Tasks for the Job. - * Activities commonly performed in Job Preparation include: Downloading common - * resource files used by all the Tasks in the Job. The Job Preparation Task can - * download these common resource files to the shared location on the Node. - * (AZ_BATCH_NODE_ROOT_DIR\shared), or starting a local service on the Node so - * that all Tasks of that Job can communicate with it. If the Job Preparation Task - * fails (that is, exhausts its retry count before exiting with exit code 0), - * Batch will not run Tasks of this Job on the Node. The Compute Node remains - * ineligible to run Tasks of this Job until it is reimaged. The Compute Node - * remains active and can be used for other Jobs. The Job Preparation Task can run - * multiple times on the same Node. Therefore, you should write the Job - * Preparation Task to handle re-execution. If the Node is rebooted, the Job - * Preparation Task is run again on the Compute Node before scheduling any other - * Task of the Job, if rerunOnNodeRebootAfterSuccess is true or if the Job - * Preparation Task did not previously complete. If the Node is reimaged, the Job - * Preparation Task is run again before scheduling any Task of the Job. Batch will - * retry Tasks when a recovery operation is triggered on a Node. Examples of - * recovery operations include (but are not limited to) when an unhealthy Node is - * rebooted or a Compute Node disappeared due to host failure. Retries due to - * recovery operations are independent of and are not counted against the - * maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due to - * a recovery operation may occur. Because of this, all Tasks should be - * idempotent. This means Tasks need to tolerate being interrupted and restarted - * without causing any corruption or duplicate data. The best practice for long - * running Tasks is to use some form of checkpointing. - */ -export interface BatchJobPreparationTaskOutput { - /** A string that uniquely identifies the Job Preparation Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobpreparation'. No other Task in the Job can have the same ID as the Job Preparation Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobPreparationTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). */ - id?: string; - /** The command line of the Job Preparation Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ - commandLine: string; - /** The settings for the container under which the Job Preparation Task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ - containerSettings?: BatchTaskContainerSettingsOutput; - /** A list of files that the Batch service will download to the Compute Node before running the command line. Files listed under this element are located in the Task's working directory. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. */ - resourceFiles?: Array; - /** A list of environment variable settings for the Job Preparation Task. */ - environmentSettings?: Array; - /** Constraints that apply to the Job Preparation Task. */ - constraints?: BatchTaskConstraintsOutput; - /** Whether the Batch service should wait for the Job Preparation Task to complete successfully before scheduling any other Tasks of the Job on the Compute Node. A Job Preparation Task has completed successfully if it exits with exit code 0. If true and the Job Preparation Task fails on a Node, the Batch service retries the Job Preparation Task up to its maximum retry count (as specified in the constraints element). If the Task has still not completed successfully after all retries, then the Batch service will not schedule Tasks of the Job to the Node. The Node remains active and eligible to run Tasks of other Jobs. If false, the Batch service will not wait for the Job Preparation Task to complete. In this case, other Tasks of the Job can start executing on the Compute Node while the Job Preparation Task is still running; and even if the Job Preparation Task fails, new Tasks will continue to be scheduled on the Compute Node. The default value is true. */ - waitForSuccess?: boolean; - /** The user identity under which the Job Preparation Task runs. If omitted, the Task runs as a non-administrative user unique to the Task on Windows Compute Nodes, or a non-administrative user unique to the Pool on Linux Compute Nodes. */ - userIdentity?: UserIdentityOutput; - /** Whether the Batch service should rerun the Job Preparation Task after a Compute Node reboots. The Job Preparation Task is always rerun if a Compute Node is reimaged, or if the Job Preparation Task did not complete (e.g. because the reboot occurred while the Task was running). Therefore, you should always write a Job Preparation Task to be idempotent and to behave correctly if run multiple times. The default value is true. */ - rerunOnNodeRebootAfterSuccess?: boolean; -} - -/** - * A Job Release Task to run on Job completion on any Compute Node where the Job has run. - * The Job Release Task runs when the Job ends, because of one of the following: - * The user calls the Terminate Job API, or the Delete Job API while the Job is - * still active, the Job's maximum wall clock time constraint is reached, and the - * Job is still active, or the Job's Job Manager Task completed, and the Job is - * configured to terminate when the Job Manager completes. The Job Release Task - * runs on each Node where Tasks of the Job have run and the Job Preparation Task - * ran and completed. If you reimage a Node after it has run the Job Preparation - * Task, and the Job ends without any further Tasks of the Job running on that - * Node (and hence the Job Preparation Task does not re-run), then the Job Release - * Task does not run on that Compute Node. If a Node reboots while the Job Release - * Task is still running, the Job Release Task runs again when the Compute Node - * starts up. The Job is not marked as complete until all Job Release Tasks have - * completed. The Job Release Task runs in the background. It does not occupy a - * scheduling slot; that is, it does not count towards the taskSlotsPerNode limit - * specified on the Pool. - */ -export interface BatchJobReleaseTaskOutput { - /** A string that uniquely identifies the Job Release Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobrelease'. No other Task in the Job can have the same ID as the Job Release Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). */ - id?: string; - /** The command line of the Job Release Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ - commandLine: string; - /** The settings for the container under which the Job Release Task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ - containerSettings?: BatchTaskContainerSettingsOutput; - /** A list of files that the Batch service will download to the Compute Node before running the command line. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. Files listed under this element are located in the Task's working directory. */ - resourceFiles?: Array; - /** A list of environment variable settings for the Job Release Task. */ - environmentSettings?: Array; - /** The maximum elapsed time that the Job Release Task may run on a given Compute Node, measured from the time the Task starts. If the Task does not complete within the time limit, the Batch service terminates it. The default value is 15 minutes. You may not specify a timeout longer than 15 minutes. If you do, the Batch service rejects it with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). */ - maxWallClockTime?: string; - /** The minimum time to retain the Task directory for the Job Release Task on the Compute Node. After this time, the Batch service may delete the Task directory and all its contents. The default is 7 days, i.e. the Task directory will be retained for 7 days unless the Compute Node is removed or the Job is deleted. */ - retentionTime?: string; - /** The user identity under which the Job Release Task runs. If omitted, the Task runs as a non-administrative user unique to the Task. */ - userIdentity?: UserIdentityOutput; -} - -/** Specifies how a Job should be assigned to a Pool. */ -export interface BatchPoolInfoOutput { - /** The ID of an existing Pool. All the Tasks of the Job will run on the specified Pool. You must ensure that the Pool referenced by this property exists. If the Pool does not exist at the time the Batch service tries to schedule a Job, no Tasks for the Job will run until you create a Pool with that id. Note that the Batch service will not reject the Job request; it will simply not run Tasks until the Pool exists. You must specify either the Pool ID or the auto Pool specification, but not both. */ - poolId?: string; - /** Characteristics for a temporary 'auto pool'. The Batch service will create this auto Pool when the Job is submitted. If auto Pool creation fails, the Batch service moves the Job to a completed state, and the Pool creation error is set in the Job's scheduling error property. The Batch service manages the lifetime (both creation and, unless keepAlive is specified, deletion) of the auto Pool. Any user actions that affect the lifetime of the auto Pool while the Job is active will result in unexpected behavior. You must specify either the Pool ID or the auto Pool specification, but not both. */ - autoPoolSpecification?: BatchAutoPoolSpecificationOutput; -} - -/** - * Specifies characteristics for a temporary 'auto pool'. The Batch service will - * create this auto Pool when the Job is submitted. - */ -export interface BatchAutoPoolSpecificationOutput { - /** A prefix to be added to the unique identifier when a Pool is automatically created. The Batch service assigns each auto Pool a unique identifier on creation. To distinguish between Pools created for different purposes, you can specify this element to add a prefix to the ID that is assigned. The prefix can be up to 20 characters long. */ - autoPoolIdPrefix?: string; - /** - * The minimum lifetime of created auto Pools, and how multiple Jobs on a schedule are assigned to Pools. - * - * Possible values: "jobschedule", "job" - */ - poolLifetimeOption: BatchPoolLifetimeOptionOutput; - /** Whether to keep an auto Pool alive after its lifetime expires. If false, the Batch service deletes the Pool once its lifetime (as determined by the poolLifetimeOption setting) expires; that is, when the Job or Job Schedule completes. If true, the Batch service does not delete the Pool automatically. It is up to the user to delete auto Pools created with this option. */ - keepAlive?: boolean; - /** The Pool specification for the auto Pool. */ - pool?: BatchPoolSpecificationOutput; -} - -/** Specification for creating a new Pool. */ -export interface BatchPoolSpecificationOutput { - /** The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. */ - displayName?: string; - /** The size of the virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). */ - vmSize: string; - /** The virtual machine configuration for the Pool. This property must be specified. */ - virtualMachineConfiguration?: VirtualMachineConfigurationOutput; - /** The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. */ - taskSlotsPerNode?: number; - /** How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. */ - taskSchedulingPolicy?: BatchTaskSchedulingPolicyOutput; - /** The timeout for allocation of Compute Nodes to the Pool. This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service rejects the request with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). */ - resizeTimeout?: string; - /** The user-specified tags associated with the pool.The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. */ - resourceTags?: string; - /** The desired number of dedicated Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. */ - targetDedicatedNodes?: number; - /** The desired number of Spot/Low-priority Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. */ - targetLowPriorityNodes?: number; - /** Whether the Pool size should automatically adjust over time. If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula element is required. The Pool automatically resizes according to the formula. The default value is false. */ - enableAutoScale?: boolean; - /** The formula for the desired number of Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the Pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information. */ - autoScaleFormula?: string; - /** The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). */ - autoScaleEvaluationInterval?: string; - /** Whether the Pool permits direct communication between Compute Nodes. Enabling inter-node communication limits the maximum size of the Pool due to deployment restrictions on the Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The default value is false. */ - enableInterNodeCommunication?: boolean; - /** The network configuration for the Pool. */ - networkConfiguration?: NetworkConfigurationOutput; - /** A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. */ - startTask?: BatchStartTaskOutput; - /** The list of Packages to be installed on each Compute Node in the Pool. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}). Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package references on any given Pool. */ - applicationPackageReferences?: Array; - /** The list of user Accounts to be created on each Compute Node in the Pool. */ - userAccounts?: Array; - /** A list of name-value pairs associated with the Pool as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. */ - metadata?: Array; - /** A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. */ - mountConfiguration?: Array; - /** - * The desired node communication mode for the pool. If omitted, the default value is Default. - * - * Possible values: "default", "classic", "simplified" - */ - targetNodeCommunicationMode?: BatchNodeCommunicationModeOutput; - /** The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling. */ - upgradePolicy?: UpgradePolicyOutput; -} - -/** The network configuration for the Job. */ -export interface BatchJobNetworkConfigurationOutput { - /** The ARM resource identifier of the virtual network subnet which Compute Nodes running Tasks from the Job will join for the duration of the Task. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes which will run Tasks from the Job. This can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet so that Azure Batch service can schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication from the Azure Batch service. For Pools created with a Virtual Machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Port 443 is also required to be open for outbound connections for communications to Azure Storage. For more details see: https://docs.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ - subnetId: string; - /** Whether to withdraw Compute Nodes from the virtual network to DNC when the job is terminated or deleted. If true, nodes will remain joined to the virtual network to DNC. If false, nodes will automatically withdraw when the job ends. Defaults to false. */ - skipWithdrawFromVNet: boolean; -} - -/** Contains information about the execution of a Job in the Azure Batch service. */ -export interface BatchJobExecutionInfoOutput { - /** The start time of the Job. This is the time at which the Job was created. */ - startTime: string; - /** The completion time of the Job. This property is set only if the Job is in the completed state. */ - endTime?: string; - /** The ID of the Pool to which this Job is assigned. This element contains the actual Pool where the Job is assigned. When you get Job details from the service, they also contain a poolInfo element, which contains the Pool configuration data from when the Job was added or updated. That poolInfo element may also contain a poolId element. If it does, the two IDs are the same. If it does not, it means the Job ran on an auto Pool, and this property contains the ID of that auto Pool. */ - poolId?: string; - /** Details of any error encountered by the service in starting the Job. This property is not set if there was no error starting the Job. */ - schedulingError?: BatchJobSchedulingErrorOutput; - /** A string describing the reason the Job ended. This property is set only if the Job is in the completed state. If the Batch service terminates the Job, it sets the reason as follows: JMComplete - the Job Manager Task completed, and killJobOnCompletion was set to true. MaxWallClockTimeExpiry - the Job reached its maxWallClockTime constraint. TerminateJobSchedule - the Job ran as part of a schedule, and the schedule terminated. AllTasksComplete - the Job's onAllTasksComplete attribute is set to terminatejob, and all Tasks in the Job are complete. TaskFailed - the Job's onTaskFailure attribute is set to performExitOptionsJobAction, and a Task in the Job failed with an exit condition that specified a jobAction of terminatejob. Any other string is a user-defined reason specified in a call to the 'Terminate a Job' operation. */ - terminateReason?: string; -} - -/** An error encountered by the Batch service when scheduling a Job. */ -export interface BatchJobSchedulingErrorOutput { - /** - * The category of the Job scheduling error. - * - * Possible values: "usererror", "servererror" - */ - category: ErrorCategoryOutput; - /** An identifier for the Job scheduling error. Codes are invariant and are intended to be consumed programmatically. */ - code?: string; - /** A message describing the Job scheduling error, intended to be suitable for display in a user interface. */ - message?: string; - /** A list of additional error details related to the scheduling error. */ - details?: Array; -} - -/** Resource usage statistics for a Job. */ -export interface BatchJobStatisticsOutput { - /** The URL of the statistics. */ - url: string; - /** The start time of the time range covered by the statistics. */ - startTime: string; - /** The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. */ - lastUpdateTime: string; - /** The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in the Job. */ - userCPUTime: string; - /** The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in the Job. */ - kernelCPUTime: string; - /** The total wall clock time of all Tasks in the Job. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If a Task was retried, this includes the wall clock time of all the Task retries. */ - wallClockTime: string; - /** The total number of disk read operations made by all Tasks in the Job. */ - readIOps: number; - /** The total number of disk write operations made by all Tasks in the Job. */ - writeIOps: number; - /** The total amount of data in GiB read from disk by all Tasks in the Job. */ - readIOGiB: number; - /** The total amount of data in GiB written to disk by all Tasks in the Job. */ - writeIOGiB: number; - /** The total number of Tasks successfully completed in the Job during the given time range. A Task completes successfully if it returns exit code 0. */ - numSucceededTasks: number; - /** The total number of Tasks in the Job that failed during the given time range. A Task fails if it exhausts its maximum retry count without returning exit code 0. */ - numFailedTasks: number; - /** The total number of retries on all the Tasks in the Job during the given time range. */ - numTaskRetries: number; - /** The total wait time of all Tasks in the Job. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.) This value is only reported in the Account lifetime statistics; it is not included in the Job statistics. */ - waitTime: string; -} - -/** The result of listing the Jobs in an Account. */ -export interface BatchJobListResultOutput { - /** The list of Jobs. */ - value?: Array; - /** The URL to get the next set of results. */ - "odata.nextLink"?: string; -} - -/** - * The result of listing the status of the Job Preparation and Job Release Tasks - * for a Job. - */ -export interface BatchJobPreparationAndReleaseTaskStatusListResultOutput { - /** A list of Job Preparation and Job Release Task execution information. */ - value?: Array; - /** The URL to get the next set of results. */ - "odata.nextLink"?: string; -} - -/** The status of the Job Preparation and Job Release Tasks on a Compute Node. */ -export interface BatchJobPreparationAndReleaseTaskStatusOutput { - /** The ID of the Pool containing the Compute Node to which this entry refers. */ - poolId?: string; - /** The ID of the Compute Node to which this entry refers. */ - nodeId?: string; - /** The URL of the Compute Node to which this entry refers. */ - nodeUrl?: string; - /** Information about the execution status of the Job Preparation Task on this Compute Node. */ - jobPreparationTaskExecutionInfo?: BatchJobPreparationTaskExecutionInfoOutput; - /** Information about the execution status of the Job Release Task on this Compute Node. This property is set only if the Job Release Task has run on the Compute Node. */ - jobReleaseTaskExecutionInfo?: BatchJobReleaseTaskExecutionInfoOutput; -} - -/** - * Contains information about the execution of a Job Preparation Task on a Compute - * Node. - */ -export interface BatchJobPreparationTaskExecutionInfoOutput { - /** The time at which the Task started running. If the Task has been restarted or retried, this is the most recent time at which the Task started running. */ - startTime: string; - /** The time at which the Job Preparation Task completed. This property is set only if the Task is in the Completed state. */ - endTime?: string; - /** - * The current state of the Job Preparation Task on the Compute Node. - * - * Possible values: "running", "completed" - */ - state: BatchJobPreparationTaskStateOutput; - /** The root directory of the Job Preparation Task on the Compute Node. You can use this path to retrieve files created by the Task, such as log files. */ - taskRootDirectory?: string; - /** The URL to the root directory of the Job Preparation Task on the Compute Node. */ - taskRootDirectoryUrl?: string; - /** The exit code of the program specified on the Task command line. This parameter is returned only if the Task is in the completed state. The exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. Note that the exit code may also be generated by the Compute Node operating system, such as when a process is forcibly terminated. */ - exitCode?: number; - /** Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. */ - containerInfo?: BatchTaskContainerExecutionInfoOutput; - /** Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. */ - failureInfo?: BatchTaskFailureInfoOutput; - /** The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. */ - retryCount: number; - /** The most recent time at which a retry of the Job Preparation Task started running. This property is set only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. */ - lastRetryTime?: string; - /** - * The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. - * - * Possible values: "success", "failure" - */ - result?: BatchTaskExecutionResultOutput; -} - -/** Contains information about the container which a Task is executing. */ -export interface BatchTaskContainerExecutionInfoOutput { - /** The ID of the container. */ - containerId?: string; - /** The state of the container. This is the state of the container according to the Docker service. It is equivalent to the status field returned by "docker inspect". */ - state?: string; - /** Detailed error information about the container. This is the detailed error string from the Docker service, if available. It is equivalent to the error field returned by "docker inspect". */ - error?: string; -} - -/** Information about a Task failure. */ -export interface BatchTaskFailureInfoOutput { - /** - * The category of the Task error. - * - * Possible values: "usererror", "servererror" - */ - category: ErrorCategoryOutput; - /** An identifier for the Task error. Codes are invariant and are intended to be consumed programmatically. */ - code?: string; - /** A message describing the Task error, intended to be suitable for display in a user interface. */ - message?: string; - /** A list of additional details related to the error. */ - details?: Array; -} - -/** - * Contains information about the execution of a Job Release Task on a Compute - * Node. - */ -export interface BatchJobReleaseTaskExecutionInfoOutput { - /** The time at which the Task started running. If the Task has been restarted or retried, this is the most recent time at which the Task started running. */ - startTime: string; - /** The time at which the Job Release Task completed. This property is set only if the Task is in the Completed state. */ - endTime?: string; - /** - * The current state of the Job Release Task on the Compute Node. - * - * Possible values: "running", "completed" - */ - state: BatchJobReleaseTaskStateOutput; - /** The root directory of the Job Release Task on the Compute Node. You can use this path to retrieve files created by the Task, such as log files. */ - taskRootDirectory?: string; - /** The URL to the root directory of the Job Release Task on the Compute Node. */ - taskRootDirectoryUrl?: string; - /** The exit code of the program specified on the Task command line. This parameter is returned only if the Task is in the completed state. The exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. Note that the exit code may also be generated by the Compute Node operating system, such as when a process is forcibly terminated. */ - exitCode?: number; - /** Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. */ - containerInfo?: BatchTaskContainerExecutionInfoOutput; - /** Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. */ - failureInfo?: BatchTaskFailureInfoOutput; - /** - * The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. - * - * Possible values: "success", "failure" - */ - result?: BatchTaskExecutionResultOutput; -} - -/** The Task and TaskSlot counts for a Job. */ -export interface BatchTaskCountsResultOutput { - /** The number of Tasks per state. */ - taskCounts: BatchTaskCountsOutput; - /** The number of TaskSlots required by Tasks per state. */ - taskSlotCounts: BatchTaskSlotCountsOutput; -} - -/** The Task counts for a Job. */ -export interface BatchTaskCountsOutput { - /** The number of Tasks in the active state. */ - active: number; - /** The number of Tasks in the running or preparing state. */ - running: number; - /** The number of Tasks in the completed state. */ - completed: number; - /** The number of Tasks which succeeded. A Task succeeds if its result (found in the executionInfo property) is 'success'. */ - succeeded: number; - /** The number of Tasks which failed. A Task fails if its result (found in the executionInfo property) is 'failure'. */ - failed: number; -} - -/** The TaskSlot counts for a Job. */ -export interface BatchTaskSlotCountsOutput { - /** The number of TaskSlots for active Tasks. */ - active: number; - /** The number of TaskSlots for running Tasks. */ - running: number; - /** The number of TaskSlots for completed Tasks. */ - completed: number; - /** The number of TaskSlots for succeeded Tasks. */ - succeeded: number; - /** The number of TaskSlots for failed Tasks. */ - failed: number; -} - -/** - * A Job Schedule that allows recurring Jobs by specifying when to run Jobs and a - * specification used to create each Job. - */ -export interface BatchJobScheduleOutput { - /** A string that uniquely identifies the schedule within the Account. */ - readonly id?: string; - /** The display name for the schedule. */ - readonly displayName?: string; - /** The URL of the Job Schedule. */ - readonly url?: string; - /** The ETag of the Job Schedule. This is an opaque string. You can use it to detect whether the Job Schedule has changed between requests. In particular, you can be pass the ETag with an Update Job Schedule request to specify that your changes should take effect only if nobody else has modified the schedule in the meantime. */ - readonly eTag?: string; - /** The last modified time of the Job Schedule. This is the last time at which the schedule level data, such as the Job specification or recurrence information, changed. It does not factor in job-level changes such as new Jobs being created or Jobs changing state. */ - readonly lastModified?: string; - /** The creation time of the Job Schedule. */ - readonly creationTime?: string; - /** - * The current state of the Job Schedule. - * - * Possible values: "active", "completed", "disabled", "terminating", "deleting" - */ - readonly state?: BatchJobScheduleStateOutput; - /** The time at which the Job Schedule entered the current state. */ - readonly stateTransitionTime?: string; - /** - * The previous state of the Job Schedule. This property is not present if the Job Schedule is in its initial active state. - * - * Possible values: "active", "completed", "disabled", "terminating", "deleting" - */ - readonly previousState?: BatchJobScheduleStateOutput; - /** The time at which the Job Schedule entered its previous state. This property is not present if the Job Schedule is in its initial active state. */ - readonly previousStateTransitionTime?: string; - /** The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time. */ - schedule?: BatchJobScheduleConfigurationOutput; - /** The details of the Jobs to be created on this schedule. */ - jobSpecification: BatchJobSpecificationOutput; - /** Information about Jobs that have been and will be run under this schedule. */ - readonly executionInfo?: BatchJobScheduleExecutionInfoOutput; - /** A list of name-value pairs associated with the schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. */ - metadata?: Array; - /** The lifetime resource usage statistics for the Job Schedule. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. */ - readonly stats?: BatchJobScheduleStatisticsOutput; -} - -/** - * The schedule according to which Jobs will be created. All times are fixed - * respective to UTC and are not impacted by daylight saving time. - */ -export interface BatchJobScheduleConfigurationOutput { - /** The earliest time at which any Job may be created under this Job Schedule. If you do not specify a doNotRunUntil time, the schedule becomes ready to create Jobs immediately. */ - doNotRunUntil?: string; - /** A time after which no Job will be created under this Job Schedule. The schedule will move to the completed state as soon as this deadline is past and there is no active Job under this Job Schedule. If you do not specify a doNotRunAfter time, and you are creating a recurring Job Schedule, the Job Schedule will remain active until you explicitly terminate it. */ - doNotRunAfter?: string; - /** The time interval, starting from the time at which the schedule indicates a Job should be created, within which a Job must be created. If a Job is not created within the startWindow interval, then the 'opportunity' is lost; no Job will be created until the next recurrence of the schedule. If the schedule is recurring, and the startWindow is longer than the recurrence interval, then this is equivalent to an infinite startWindow, because the Job that is 'due' in one recurrenceInterval is not carried forward into the next recurrence interval. The default is infinite. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). */ - startWindow?: string; - /** The time interval between the start times of two successive Jobs under the Job Schedule. A Job Schedule can have at most one active Job under it at any given time. Because a Job Schedule can have at most one active Job under it at any given time, if it is time to create a new Job under a Job Schedule, but the previous Job is still running, the Batch service will not create the new Job until the previous Job finishes. If the previous Job does not finish within the startWindow period of the new recurrenceInterval, then no new Job will be scheduled for that interval. For recurring Jobs, you should normally specify a jobManagerTask in the jobSpecification. If you do not use jobManagerTask, you will need an external process to monitor when Jobs are created, add Tasks to the Jobs and terminate the Jobs ready for the next recurrence. The default is that the schedule does not recur: one Job is created, within the startWindow after the doNotRunUntil time, and the schedule is complete as soon as that Job finishes. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). */ - recurrenceInterval?: string; -} - -/** Specifies details of the Jobs to be created on a schedule. */ -export interface BatchJobSpecificationOutput { - /** The priority of Jobs created under this schedule. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. This priority is used as the default for all Jobs under the Job Schedule. You can update a Job's priority after it has been created using by using the update Job API. */ - priority?: number; - /** Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. */ - allowTaskPreemption?: boolean; - /** The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. */ - maxParallelTasks?: number; - /** The display name for Jobs created under this schedule. The name need not be unique and can contain any Unicode characters up to a maximum length of 1024. */ - displayName?: string; - /** Whether Tasks in the Job can define dependencies on each other. The default is false. */ - usesTaskDependencies?: boolean; - /** - * The action the Batch service should take when all Tasks in a Job created under this schedule are in the completed state. Note that if a Job contains no Tasks, then all Tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic Job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the Job properties to set onAllTasksComplete to terminatejob once you have finished adding Tasks. The default is noaction. - * - * Possible values: "noaction", "terminatejob" - */ - onAllTasksComplete?: OnAllBatchTasksCompleteOutput; - /** - * The action the Batch service should take when any Task fails in a Job created under this schedule. A Task is considered to have failed if it have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction. - * - * Possible values: "noaction", "performexitoptionsjobaction" - */ - onTaskFailure?: OnBatchTaskFailureOutput; - /** The network configuration for the Job. */ - networkConfiguration?: BatchJobNetworkConfigurationOutput; - /** The execution constraints for Jobs created under this schedule. */ - constraints?: BatchJobConstraintsOutput; - /** The details of a Job Manager Task to be launched when a Job is started under this schedule. If the Job does not specify a Job Manager Task, the user must explicitly add Tasks to the Job using the Task API. If the Job does specify a Job Manager Task, the Batch service creates the Job Manager Task when the Job is created, and will try to schedule the Job Manager Task before scheduling other Tasks in the Job. */ - jobManagerTask?: BatchJobManagerTaskOutput; - /** The Job Preparation Task for Jobs created under this schedule. If a Job has a Job Preparation Task, the Batch service will run the Job Preparation Task on a Node before starting any Tasks of that Job on that Compute Node. */ - jobPreparationTask?: BatchJobPreparationTaskOutput; - /** The Job Release Task for Jobs created under this schedule. The primary purpose of the Job Release Task is to undo changes to Nodes made by the Job Preparation Task. Example activities include deleting local files, or shutting down services that were started as part of Job preparation. A Job Release Task cannot be specified without also specifying a Job Preparation Task for the Job. The Batch service runs the Job Release Task on the Compute Nodes that have run the Job Preparation Task. */ - jobReleaseTask?: BatchJobReleaseTaskOutput; - /** A list of common environment variable settings. These environment variables are set for all Tasks in Jobs created under this schedule (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value. */ - commonEnvironmentSettings?: Array; - /** The Pool on which the Batch service runs the Tasks of Jobs created under this schedule. */ - poolInfo: BatchPoolInfoOutput; - /** A list of name-value pairs associated with each Job created under this schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. */ - metadata?: Array; -} - -/** - * Contains information about Jobs that have been and will be run under a Job - * Schedule. - */ -export interface BatchJobScheduleExecutionInfoOutput { - /** The next time at which a Job will be created under this schedule. This property is meaningful only if the schedule is in the active state when the time comes around. For example, if the schedule is disabled, no Job will be created at nextRunTime unless the Job is enabled before then. */ - nextRunTime?: string; - /** Information about the most recent Job under the Job Schedule. This property is present only if the at least one Job has run under the schedule. */ - recentJob?: RecentBatchJobOutput; - /** The time at which the schedule ended. This property is set only if the Job Schedule is in the completed state. */ - endTime?: string; -} - -/** Information about the most recent Job to run under the Job Schedule. */ -export interface RecentBatchJobOutput { - /** The ID of the Job. */ - id?: string; - /** The URL of the Job. */ - url?: string; -} - -/** Resource usage statistics for a Job Schedule. */ -export interface BatchJobScheduleStatisticsOutput { - /** The URL of the statistics. */ - url: string; - /** The start time of the time range covered by the statistics. */ - startTime: string; - /** The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. */ - lastUpdateTime: string; - /** The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in all Jobs created under the schedule. */ - userCPUTime: string; - /** The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in all Jobs created under the schedule. */ - kernelCPUTime: string; - /** The total wall clock time of all the Tasks in all the Jobs created under the schedule. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If a Task was retried, this includes the wall clock time of all the Task retries. */ - wallClockTime: string; - /** The total number of disk read operations made by all Tasks in all Jobs created under the schedule. */ - readIOps: number; - /** The total number of disk write operations made by all Tasks in all Jobs created under the schedule. */ - writeIOps: number; - /** The total gibibytes read from disk by all Tasks in all Jobs created under the schedule. */ - readIOGiB: number; - /** The total gibibytes written to disk by all Tasks in all Jobs created under the schedule. */ - writeIOGiB: number; - /** The total number of Tasks successfully completed during the given time range in Jobs created under the schedule. A Task completes successfully if it returns exit code 0. */ - numSucceededTasks: number; - /** The total number of Tasks that failed during the given time range in Jobs created under the schedule. A Task fails if it exhausts its maximum retry count without returning exit code 0. */ - numFailedTasks: number; - /** The total number of retries during the given time range on all Tasks in all Jobs created under the schedule. */ - numTaskRetries: number; - /** The total wait time of all Tasks in all Jobs created under the schedule. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.). This value is only reported in the Account lifetime statistics; it is not included in the Job statistics. */ - waitTime: string; -} - -/** The result of listing the Job Schedules in an Account. */ -export interface BatchJobScheduleListResultOutput { - /** The list of Job Schedules. */ - value?: Array; - /** The URL to get the next set of results. */ - "odata.nextLink"?: string; -} - -/** Specifies how the Batch service should respond when the Task completes. */ -export interface ExitConditionsOutput { - /** A list of individual Task exit codes and how the Batch service should respond to them. */ - exitCodes?: Array; - /** A list of Task exit code ranges and how the Batch service should respond to them. */ - exitCodeRanges?: Array; - /** How the Batch service should respond if the Task fails to start due to an error. */ - preProcessingError?: ExitOptionsOutput; - /** How the Batch service should respond if a file upload error occurs. If the Task exited with an exit code that was specified via exitCodes or exitCodeRanges, and then encountered a file upload error, then the action specified by the exit code takes precedence. */ - fileUploadError?: ExitOptionsOutput; - /** How the Batch service should respond if the Task fails with an exit condition not covered by any of the other properties. This value is used if the Task exits with any nonzero exit code not listed in the exitCodes or exitCodeRanges collection, with a pre-processing error if the preProcessingError property is not present, or with a file upload error if the fileUploadError property is not present. If you want non-default behavior on exit code 0, you must list it explicitly using the exitCodes or exitCodeRanges collection. */ - default?: ExitOptionsOutput; -} - -/** - * How the Batch service should respond if a Task exits with a particular exit - * code. - */ -export interface ExitCodeMappingOutput { - /** A process exit code. */ - code: number; - /** How the Batch service should respond if the Task exits with this exit code. */ - exitOptions: ExitOptionsOutput; -} - -/** Specifies how the Batch service responds to a particular exit condition. */ -export interface ExitOptionsOutput { - /** - * An action to take on the Job containing the Task, if the Task completes with the given exit condition and the Job's onTaskFailed property is 'performExitOptionsJobAction'. The default is none for exit code 0 and terminate for all other exit conditions. If the Job's onTaskFailed property is noaction, then specifying this property returns an error and the add Task request fails with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). - * - * Possible values: "none", "disable", "terminate" - */ - jobAction?: BatchJobActionOutput; - /** - * An action that the Batch service performs on Tasks that depend on this Task. Possible values are 'satisfy' (allowing dependent tasks to progress) and 'block' (dependent tasks continue to wait). Batch does not yet support cancellation of dependent tasks. - * - * Possible values: "satisfy", "block" - */ - dependencyAction?: DependencyActionOutput; -} - -/** - * A range of exit codes and how the Batch service should respond to exit codes - * within that range. - */ -export interface ExitCodeRangeMappingOutput { - /** The first exit code in the range. */ - start: number; - /** The last exit code in the range. */ - end: number; - /** How the Batch service should respond if the Task exits with an exit code in the range start to end (inclusive). */ - exitOptions: ExitOptionsOutput; -} - -/** - * A locality hint that can be used by the Batch service to select a Compute Node - * on which to start a Task. - */ -export interface AffinityInfoOutput { - /** An opaque string representing the location of a Compute Node or a Task that has run previously. You can pass the affinityId of a Node to indicate that this Task needs to run on that Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere. */ - affinityId: string; -} - -/** - * Multi-instance Tasks are commonly used to support MPI Tasks. In the MPI case, - * if any of the subtasks fail (for example due to exiting with a non-zero exit - * code) the entire multi-instance Task fails. The multi-instance Task is then - * terminated and retried, up to its retry limit. - */ -export interface MultiInstanceSettingsOutput { - /** The number of Compute Nodes required by the Task. If omitted, the default is 1. */ - numberOfInstances?: number; - /** The command line to run on all the Compute Nodes to enable them to coordinate when the primary runs the main Task command. A typical coordination command line launches a background service and verifies that the service is ready to process inter-node messages. */ - coordinationCommandLine: string; - /** A list of files that the Batch service will download before running the coordination command line. The difference between common resource files and Task resource files is that common resource files are downloaded for all subtasks including the primary, whereas Task resource files are downloaded only for the primary. Also note that these resource files are not downloaded to the Task working directory, but instead are downloaded to the Task root directory (one directory above the working directory). There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. */ - commonResourceFiles?: Array; -} - -/** - * Specifies any dependencies of a Task. Any Task that is explicitly specified or - * within a dependency range must complete before the dependant Task will be - * scheduled. - */ -export interface BatchTaskDependenciesOutput { - /** The list of Task IDs that this Task depends on. All Tasks in this list must complete successfully before the dependent Task can be scheduled. The taskIds collection is limited to 64000 characters total (i.e. the combined length of all Task IDs). If the taskIds collection exceeds the maximum length, the Add Task request fails with error code TaskDependencyListTooLong. In this case consider using Task ID ranges instead. */ - taskIds?: string[]; - /** The list of Task ID ranges that this Task depends on. All Tasks in all ranges must complete successfully before the dependent Task can be scheduled. */ - taskIdRanges?: Array; -} - -/** - * The start and end of the range are inclusive. For example, if a range has start - * 9 and end 12, then it represents Tasks '9', '10', '11' and '12'. - */ -export interface BatchTaskIdRangeOutput { - /** The first Task ID in the range. */ - start: number; - /** The last Task ID in the range. */ - end: number; -} - -/** The result of listing the Tasks in a Job. */ -export interface BatchTaskListResultOutput { - /** The list of Tasks. */ - value?: Array; - /** The URL to get the next set of results. */ - "odata.nextLink"?: string; -} - -/** - * Batch will retry Tasks when a recovery operation is triggered on a Node. - * Examples of recovery operations include (but are not limited to) when an - * unhealthy Node is rebooted or a Compute Node disappeared due to host failure. - * Retries due to recovery operations are independent of and are not counted - * against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal - * retry due to a recovery operation may occur. Because of this, all Tasks should - * be idempotent. This means Tasks need to tolerate being interrupted and - * restarted without causing any corruption or duplicate data. The best practice - * for long running Tasks is to use some form of checkpointing. - */ -export interface BatchTaskOutput { - /** A string that uniquely identifies the Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. */ - readonly id?: string; - /** A display name for the Task. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. */ - readonly displayName?: string; - /** The URL of the Task. */ - readonly url?: string; - /** The ETag of the Task. This is an opaque string. You can use it to detect whether the Task has changed between requests. In particular, you can be pass the ETag when updating a Task to specify that your changes should take effect only if nobody else has modified the Task in the meantime. */ - readonly eTag?: string; - /** The last modified time of the Task. */ - readonly lastModified?: string; - /** The creation time of the Task. */ - readonly creationTime?: string; - /** How the Batch service should respond when the Task completes. */ - readonly exitConditions?: ExitConditionsOutput; - /** - * The current state of the Task. - * - * Possible values: "active", "preparing", "running", "completed" - */ - readonly state?: BatchTaskStateOutput; - /** The time at which the Task entered its current state. */ - readonly stateTransitionTime?: string; - /** - * The previous state of the Task. This property is not set if the Task is in its initial Active state. - * - * Possible values: "active", "preparing", "running", "completed" - */ - readonly previousState?: BatchTaskStateOutput; - /** The time at which the Task entered its previous state. This property is not set if the Task is in its initial Active state. */ - readonly previousStateTransitionTime?: string; - /** The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ - readonly commandLine?: string; - /** The settings for the container under which the Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ - readonly containerSettings?: BatchTaskContainerSettingsOutput; - /** A list of files that the Batch service will download to the Compute Node before running the command line. For multi-instance Tasks, the resource files will only be downloaded to the Compute Node on which the primary Task is executed. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. */ - readonly resourceFiles?: Array; - /** A list of files that the Batch service will upload from the Compute Node after running the command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. */ - readonly outputFiles?: Array; - /** A list of environment variable settings for the Task. */ - readonly environmentSettings?: Array; - /** A locality hint that can be used by the Batch service to select a Compute Node on which to start the new Task. */ - readonly affinityInfo?: AffinityInfoOutput; - /** The execution constraints that apply to this Task. */ - constraints?: BatchTaskConstraintsOutput; - /** The number of scheduling slots that the Task requires to run. The default is 1. A Task can only be scheduled to run on a compute node if the node has enough free scheduling slots available. For multi-instance Tasks, this must be 1. */ - readonly requiredSlots?: number; - /** The user identity under which the Task runs. If omitted, the Task runs as a non-administrative user unique to the Task. */ - readonly userIdentity?: UserIdentityOutput; - /** Information about the execution of the Task. */ - readonly executionInfo?: BatchTaskExecutionInfoOutput; - /** Information about the Compute Node on which the Task ran. */ - readonly nodeInfo?: BatchNodeInfoOutput; - /** An object that indicates that the Task is a multi-instance Task, and contains information about how to run the multi-instance Task. */ - readonly multiInstanceSettings?: MultiInstanceSettingsOutput; - /** Resource usage statistics for the Task. */ - readonly stats?: BatchTaskStatisticsOutput; - /** The Tasks that this Task depends on. This Task will not be scheduled until all Tasks that it depends on have completed successfully. If any of those Tasks fail and exhaust their retry counts, this Task will never be scheduled. */ - readonly dependsOn?: BatchTaskDependenciesOutput; - /** A list of Packages that the Batch service will deploy to the Compute Node before running the command line. Application packages are downloaded and deployed to a shared directory, not the Task working directory. Therefore, if a referenced package is already on the Node, and is up to date, then it is not re-downloaded; the existing copy on the Compute Node is used. If a referenced Package cannot be installed, for example because the package has been deleted or because download failed, the Task fails. */ - readonly applicationPackageReferences?: Array; - /** The settings for an authentication token that the Task can use to perform Batch service operations. If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job. */ - readonly authenticationTokenSettings?: AuthenticationTokenSettingsOutput; -} - -/** Information about the execution of a Task. */ -export interface BatchTaskExecutionInfoOutput { - /** The time at which the Task started running. 'Running' corresponds to the running state, so if the Task specifies resource files or Packages, then the start time reflects the time at which the Task started downloading or deploying these. If the Task has been restarted or retried, this is the most recent time at which the Task started running. This property is present only for Tasks that are in the running or completed state. */ - startTime?: string; - /** The time at which the Task completed. This property is set only if the Task is in the Completed state. */ - endTime?: string; - /** The exit code of the program specified on the Task command line. This property is set only if the Task is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the Task (due to timeout, or user termination via the API) you may see an operating system-defined exit code. */ - exitCode?: number; - /** Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. */ - containerInfo?: BatchTaskContainerExecutionInfoOutput; - /** Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. */ - failureInfo?: BatchTaskFailureInfoOutput; - /** The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. */ - retryCount: number; - /** The most recent time at which a retry of the Task started running. This element is present only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. */ - lastRetryTime?: string; - /** The number of times the Task has been requeued by the Batch service as the result of a user request. When the user removes Compute Nodes from a Pool (by resizing/shrinking the pool) or when the Job is being disabled, the user can specify that running Tasks on the Compute Nodes be requeued for execution. This count tracks how many times the Task has been requeued for these reasons. */ - requeueCount: number; - /** The most recent time at which the Task has been requeued by the Batch service as the result of a user request. This property is set only if the requeueCount is nonzero. */ - lastRequeueTime?: string; - /** - * The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. - * - * Possible values: "success", "failure" - */ - result?: BatchTaskExecutionResultOutput; -} - -/** Information about the Compute Node on which a Task ran. */ -export interface BatchNodeInfoOutput { - /** An identifier for the Node on which the Task ran, which can be passed when adding a Task to request that the Task be scheduled on this Compute Node. */ - affinityId?: string; - /** The URL of the Compute Node on which the Task ran. */ - nodeUrl?: string; - /** The ID of the Pool on which the Task ran. */ - poolId?: string; - /** The ID of the Compute Node on which the Task ran. */ - nodeId?: string; - /** The root directory of the Task on the Compute Node. */ - taskRootDirectory?: string; - /** The URL to the root directory of the Task on the Compute Node. */ - taskRootDirectoryUrl?: string; -} - -/** Resource usage statistics for a Task. */ -export interface BatchTaskStatisticsOutput { - /** The URL of the statistics. */ - url: string; - /** The start time of the time range covered by the statistics. */ - startTime: string; - /** The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. */ - lastUpdateTime: string; - /** The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by the Task. */ - userCPUTime: string; - /** The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by the Task. */ - kernelCPUTime: string; - /** The total wall clock time of the Task. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If the Task was retried, this includes the wall clock time of all the Task retries. */ - wallClockTime: string; - /** The total number of disk read operations made by the Task. */ - readIOps: number; - /** The total number of disk write operations made by the Task. */ - writeIOps: number; - /** The total gibibytes read from disk by the Task. */ - readIOGiB: number; - /** The total gibibytes written to disk by the Task. */ - writeIOGiB: number; - /** The total wait time of the Task. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.). */ - waitTime: string; -} - -/** The result of adding a collection of Tasks to a Job. */ -export interface BatchTaskAddCollectionResultOutput { - /** The results of the add Task collection operation. */ - value?: Array; -} - -/** Result for a single Task added as part of an add Task collection operation. */ -export interface BatchTaskAddResultOutput { - /** - * The status of the add Task request. - * - * Possible values: "success", "clienterror", "servererror" - */ - status: BatchTaskAddStatusOutput; - /** The ID of the Task for which this is the result. */ - taskId: string; - /** The ETag of the Task, if the Task was successfully added. You can use this to detect whether the Task has changed between requests. In particular, you can be pass the ETag with an Update Task request to specify that your changes should take effect only if nobody else has modified the Job in the meantime. */ - eTag?: string; - /** The last modified time of the Task. */ - lastModified?: string; - /** The URL of the Task, if the Task was successfully added. */ - location?: string; - /** The error encountered while attempting to add the Task. */ - error?: BatchErrorOutput; -} - -/** The result of listing the subtasks of a Task. */ -export interface BatchTaskListSubtasksResultOutput { - /** The list of subtasks. */ - value?: Array; - /** The URL to get the next set of results. */ - "odata.nextLink"?: string; -} - -/** Information about an Azure Batch subtask. */ -export interface BatchSubtaskOutput { - /** The ID of the subtask. */ - id?: number; - /** Information about the Compute Node on which the subtask ran. */ - nodeInfo?: BatchNodeInfoOutput; - /** The time at which the subtask started running. If the subtask has been restarted or retried, this is the most recent time at which the subtask started running. */ - startTime?: string; - /** The time at which the subtask completed. This property is set only if the subtask is in the Completed state. */ - endTime?: string; - /** The exit code of the program specified on the subtask command line. This property is set only if the subtask is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the subtask (due to timeout, or user termination via the API) you may see an operating system-defined exit code. */ - exitCode?: number; - /** Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. */ - containerInfo?: BatchTaskContainerExecutionInfoOutput; - /** Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. */ - failureInfo?: BatchTaskFailureInfoOutput; - /** - * The current state of the subtask. - * - * Possible values: "preparing", "running", "completed" - */ - state?: BatchSubtaskStateOutput; - /** The time at which the subtask entered its current state. */ - stateTransitionTime?: string; - /** - * The previous state of the subtask. This property is not set if the subtask is in its initial running state. - * - * Possible values: "preparing", "running", "completed" - */ - previousState?: BatchSubtaskStateOutput; - /** The time at which the subtask entered its previous state. This property is not set if the subtask is in its initial running state. */ - previousStateTransitionTime?: string; - /** - * The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. - * - * Possible values: "success", "failure" - */ - result?: BatchTaskExecutionResultOutput; -} - -/** - * The result of listing the files on a Compute Node, or the files associated with - * a Task on a Compute Node. - */ -export interface BatchNodeFileListResultOutput { - /** The list of files. */ - value?: Array; - /** The URL to get the next set of results. */ - "odata.nextLink"?: string; -} - -/** Information about a file or directory on a Compute Node. */ -export interface BatchNodeFileOutput { - /** The file path. */ - name?: string; - /** The URL of the file. */ - url?: string; - /** Whether the object represents a directory. */ - isDirectory?: boolean; - /** The file properties. */ - properties?: FilePropertiesOutput; -} - -/** The properties of a file on a Compute Node. */ -export interface FilePropertiesOutput { - /** The file creation time. The creation time is not returned for files on Linux Compute Nodes. */ - creationTime?: string; - /** The time at which the file was last modified. */ - lastModified: string; - /** The length of the file. */ - contentLength: string; - /** The content type of the file. */ - contentType?: string; - /** The file mode attribute in octal format. The file mode is returned only for files on Linux Compute Nodes. */ - fileMode?: string; -} - -/** A Compute Node in the Batch service. */ -export interface BatchNodeOutput { - /** The ID of the Compute Node. Every Compute Node that is added to a Pool is assigned a unique ID. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the ID is reclaimed and could be reused for new Compute Nodes. */ - id?: string; - /** The URL of the Compute Node. */ - url?: string; - /** - * The current state of the Compute Node. The Spot/Low-priority Compute Node has been preempted. Tasks which were running on the Compute Node when it was preempted will be rescheduled when another Compute Node becomes available. - * - * Possible values: "idle", "rebooting", "reimaging", "running", "unusable", "creating", "starting", "waitingforstarttask", "starttaskfailed", "unknown", "leavingpool", "offline", "preempted", "upgradingos", "deallocated", "deallocating" - */ - state?: BatchNodeStateOutput; - /** - * Whether the Compute Node is available for Task scheduling. - * - * Possible values: "enabled", "disabled" - */ - schedulingState?: SchedulingStateOutput; - /** The time at which the Compute Node entered its current state. */ - stateTransitionTime?: string; - /** The last time at which the Compute Node was started. This property may not be present if the Compute Node state is unusable. */ - lastBootTime?: string; - /** The time at which this Compute Node was allocated to the Pool. This is the time when the Compute Node was initially allocated and doesn't change once set. It is not updated when the Compute Node is service healed or preempted. */ - allocationTime?: string; - /** The IP address that other Nodes can use to communicate with this Compute Node. Every Compute Node that is added to a Pool is assigned a unique IP address. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the IP address is reclaimed and could be reused for new Compute Nodes. */ - ipAddress?: string; - /** An identifier which can be passed when adding a Task to request that the Task be scheduled on this Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere. */ - affinityId?: string; - /** The size of the virtual machine hosting the Compute Node. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). */ - vmSize?: string; - /** The total number of Job Tasks completed on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. */ - totalTasksRun?: number; - /** The total number of currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. */ - runningTasksCount?: number; - /** The total number of scheduling slots used by currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. */ - runningTaskSlotsCount?: number; - /** The total number of Job Tasks which completed successfully (with exitCode 0) on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. */ - totalTasksSucceeded?: number; - /** A list of Tasks whose state has recently changed. This property is present only if at least one Task has run on this Compute Node since it was assigned to the Pool. */ - recentTasks?: Array; - /** The Task specified to run on the Compute Node as it joins the Pool. */ - startTask?: BatchStartTaskOutput; - /** Runtime information about the execution of the StartTask on the Compute Node. */ - startTaskInfo?: BatchStartTaskInfoOutput; - /** The list of errors that are currently being encountered by the Compute Node. */ - errors?: Array; - /** Whether this Compute Node is a dedicated Compute Node. If false, the Compute Node is a Spot/Low-priority Compute Node. */ - isDedicated?: boolean; - /** The endpoint configuration for the Compute Node. */ - endpointConfiguration?: BatchNodeEndpointConfigurationOutput; - /** Information about the Compute Node agent version and the time the Compute Node upgraded to a new version. */ - nodeAgentInfo?: BatchNodeAgentInfoOutput; - /** Info about the current state of the virtual machine. */ - virtualMachineInfo?: VirtualMachineInfoOutput; -} - -/** Information about a Task running on a Compute Node. */ -export interface BatchTaskInfoOutput { - /** The URL of the Task. */ - taskUrl?: string; - /** The ID of the Job to which the Task belongs. */ - jobId?: string; - /** The ID of the Task. */ - taskId?: string; - /** The ID of the subtask if the Task is a multi-instance Task. */ - subtaskId?: number; - /** - * The current state of the Task. - * - * Possible values: "active", "preparing", "running", "completed" - */ - taskState: BatchTaskStateOutput; - /** Information about the execution of the Task. */ - executionInfo?: BatchTaskExecutionInfoOutput; -} - -/** Information about a StartTask running on a Compute Node. */ -export interface BatchStartTaskInfoOutput { - /** - * The state of the StartTask on the Compute Node. - * - * Possible values: "running", "completed" - */ - state: BatchStartTaskStateOutput; - /** The time at which the StartTask started running. This value is reset every time the Task is restarted or retried (that is, this is the most recent time at which the StartTask started running). */ - startTime: string; - /** The time at which the StartTask stopped running. This is the end time of the most recent run of the StartTask, if that run has completed (even if that run failed and a retry is pending). This element is not present if the StartTask is currently running. */ - endTime?: string; - /** The exit code of the program specified on the StartTask command line. This property is set only if the StartTask is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the StartTask (due to timeout, or user termination via the API) you may see an operating system-defined exit code. */ - exitCode?: number; - /** Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. */ - containerInfo?: BatchTaskContainerExecutionInfoOutput; - /** Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. */ - failureInfo?: BatchTaskFailureInfoOutput; - /** The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. */ - retryCount: number; - /** The most recent time at which a retry of the Task started running. This element is present only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. */ - lastRetryTime?: string; - /** - * The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. - * - * Possible values: "success", "failure" - */ - result?: BatchTaskExecutionResultOutput; -} - -/** An error encountered by a Compute Node. */ -export interface BatchNodeErrorOutput { - /** An identifier for the Compute Node error. Codes are invariant and are intended to be consumed programmatically. */ - code?: string; - /** A message describing the Compute Node error, intended to be suitable for display in a user interface. */ - message?: string; - /** The list of additional error details related to the Compute Node error. */ - errorDetails?: Array; -} - -/** The endpoint configuration for the Compute Node. */ -export interface BatchNodeEndpointConfigurationOutput { - /** The list of inbound endpoints that are accessible on the Compute Node. */ - inboundEndpoints: Array; -} - -/** An inbound endpoint on a Compute Node. */ -export interface InboundEndpointOutput { - /** The name of the endpoint. */ - name: string; - /** - * The protocol of the endpoint. - * - * Possible values: "tcp", "udp" - */ - protocol: InboundEndpointProtocolOutput; - /** The public IP address of the Compute Node. */ - publicIPAddress: string; - /** The public fully qualified domain name for the Compute Node. */ - publicFQDN: string; - /** The public port number of the endpoint. */ - frontendPort: number; - /** The backend port number of the endpoint. */ - backendPort: number; -} - -/** - * The Batch Compute Node agent is a program that runs on each Compute Node in the - * Pool and provides Batch capability on the Compute Node. - */ -export interface BatchNodeAgentInfoOutput { - /** The version of the Batch Compute Node agent running on the Compute Node. This version number can be checked against the Compute Node agent release notes located at https://github.com/Azure/Batch/blob/master/changelogs/nodeagent/CHANGELOG.md. */ - version: string; - /** The time when the Compute Node agent was updated on the Compute Node. This is the most recent time that the Compute Node agent was updated to a new version. */ - lastUpdateTime: string; -} - -/** Info about the current state of the virtual machine. */ -export interface VirtualMachineInfoOutput { - /** The reference to the Azure Virtual Machine's Marketplace Image. */ - imageReference?: ImageReferenceOutput; - /** The resource ID of the Compute Node's current Virtual Machine Scale Set VM. Only defined if the Batch Account was created with its poolAllocationMode property set to 'UserSubscription'. */ - scaleSetVmResourceId?: string; -} - -/** The remote login settings for a Compute Node. */ -export interface BatchNodeRemoteLoginSettingsOutput { - /** The IP address used for remote login to the Compute Node. */ - remoteLoginIPAddress: string; - /** The port used for remote login to the Compute Node. */ - remoteLoginPort: number; -} - -/** The result of uploading Batch service log files from a specific Compute Node. */ -export interface UploadBatchServiceLogsResultOutput { - /** The virtual directory within Azure Blob Storage container to which the Batch Service log file(s) will be uploaded. The virtual directory name is part of the blob name for each log file uploaded, and it is built based poolId, nodeId and a unique identifier. */ - virtualDirectoryName: string; - /** The number of log files which will be uploaded. */ - numberOfFilesUploaded: number; -} - -/** The result of listing the Compute Nodes in a Pool. */ -export interface BatchNodeListResultOutput { - /** The list of Compute Nodes. */ - value?: Array; - /** The URL to get the next set of results. */ - "odata.nextLink"?: string; -} - -/** The configuration for virtual machine extension instance view. */ -export interface BatchNodeVMExtensionOutput { - /** The provisioning state of the virtual machine extension. */ - provisioningState?: string; - /** The virtual machine extension. */ - vmExtension?: VMExtensionOutput; - /** The vm extension instance view. */ - instanceView?: VMExtensionInstanceViewOutput; -} - -/** The vm extension instance view. */ -export interface VMExtensionInstanceViewOutput { - /** The name of the vm extension instance view. */ - name?: string; - /** The resource status information. */ - statuses?: Array; - /** The resource status information. */ - subStatuses?: Array; -} - -/** The instance view status. */ -export interface InstanceViewStatusOutput { - /** The status code. */ - code?: string; - /** The localized label for the status. */ - displayStatus?: string; - /** - * Level code. - * - * Possible values: "Error", "Info", "Warning" - */ - level?: StatusLevelTypesOutput; - /** The detailed status message. */ - message?: string; - /** The time of the status. */ - time?: string; -} - -/** The result of listing the Compute Node extensions in a Node. */ -export interface BatchNodeVMExtensionListResultOutput { - /** The list of Compute Node extensions. */ - value?: Array; - /** The URL to get the next set of results. */ - "odata.nextLink"?: string; -} - -/** Alias for CachingTypeOutput */ -export type CachingTypeOutput = string; -/** Alias for StorageAccountTypeOutput */ -export type StorageAccountTypeOutput = string; -/** Alias for ContainerTypeOutput */ -export type ContainerTypeOutput = string; -/** Alias for DiskEncryptionTargetOutput */ -export type DiskEncryptionTargetOutput = string; -/** Alias for BatchNodePlacementPolicyTypeOutput */ -export type BatchNodePlacementPolicyTypeOutput = string; -/** Alias for DiffDiskPlacementOutput */ -export type DiffDiskPlacementOutput = string; -/** Alias for SecurityEncryptionTypesOutput */ -export type SecurityEncryptionTypesOutput = string; -/** Alias for SecurityTypesOutput */ -export type SecurityTypesOutput = string; -/** Alias for DynamicVNetAssignmentScopeOutput */ -export type DynamicVNetAssignmentScopeOutput = string; -/** Alias for InboundEndpointProtocolOutput */ -export type InboundEndpointProtocolOutput = string; -/** Alias for NetworkSecurityGroupRuleAccessOutput */ -export type NetworkSecurityGroupRuleAccessOutput = string; -/** Alias for IpAddressProvisioningTypeOutput */ -export type IpAddressProvisioningTypeOutput = string; -/** Alias for ContainerWorkingDirectoryOutput */ -export type ContainerWorkingDirectoryOutput = string; -/** Alias for ContainerHostDataPathOutput */ -export type ContainerHostDataPathOutput = string; -/** Alias for AutoUserScopeOutput */ -export type AutoUserScopeOutput = string; -/** Alias for ElevationLevelOutput */ -export type ElevationLevelOutput = string; -/** Alias for BatchNodeFillTypeOutput */ -export type BatchNodeFillTypeOutput = string; -/** Alias for LoginModeOutput */ -export type LoginModeOutput = string; -/** Alias for BatchNodeCommunicationModeOutput */ -export type BatchNodeCommunicationModeOutput = string; -/** Alias for UpgradeModeOutput */ -export type UpgradeModeOutput = string; -/** Alias for BatchPoolStateOutput */ -export type BatchPoolStateOutput = string; -/** Alias for AllocationStateOutput */ -export type AllocationStateOutput = string; -/** Alias for BatchPoolIdentityTypeOutput */ -export type BatchPoolIdentityTypeOutput = string; -/** Alias for OSTypeOutput */ -export type OSTypeOutput = string; -/** Alias for ImageVerificationTypeOutput */ -export type ImageVerificationTypeOutput = string; -/** Alias for BatchJobStateOutput */ -export type BatchJobStateOutput = string; -/** Alias for OutputFileUploadConditionOutput */ -export type OutputFileUploadConditionOutput = string; -/** Alias for AccessScopeOutput */ -export type AccessScopeOutput = string; -/** Alias for BatchPoolLifetimeOptionOutput */ -export type BatchPoolLifetimeOptionOutput = string; -/** Alias for OnAllBatchTasksCompleteOutput */ -export type OnAllBatchTasksCompleteOutput = string; -/** Alias for OnBatchTaskFailureOutput */ -export type OnBatchTaskFailureOutput = string; -/** Alias for ErrorCategoryOutput */ -export type ErrorCategoryOutput = string; -/** Alias for BatchJobPreparationTaskStateOutput */ -export type BatchJobPreparationTaskStateOutput = string; -/** Alias for BatchTaskExecutionResultOutput */ -export type BatchTaskExecutionResultOutput = string; -/** Alias for BatchJobReleaseTaskStateOutput */ -export type BatchJobReleaseTaskStateOutput = string; -/** Alias for BatchJobScheduleStateOutput */ -export type BatchJobScheduleStateOutput = string; -/** Alias for BatchJobActionOutput */ -export type BatchJobActionOutput = string; -/** Alias for DependencyActionOutput */ -export type DependencyActionOutput = string; -/** Alias for BatchTaskStateOutput */ -export type BatchTaskStateOutput = string; -/** Alias for BatchTaskAddStatusOutput */ -export type BatchTaskAddStatusOutput = string; -/** Alias for BatchSubtaskStateOutput */ -export type BatchSubtaskStateOutput = string; -/** Alias for BatchNodeStateOutput */ -export type BatchNodeStateOutput = string; -/** Alias for SchedulingStateOutput */ -export type SchedulingStateOutput = string; -/** Alias for BatchStartTaskStateOutput */ -export type BatchStartTaskStateOutput = string; -/** Alias for StatusLevelTypesOutput */ -export type StatusLevelTypesOutput = string; diff --git a/sdk/batch/batch-rest/generated/paginateHelper.ts b/sdk/batch/batch-rest/generated/paginateHelper.ts deleted file mode 100644 index b2a24801c35b..000000000000 --- a/sdk/batch/batch-rest/generated/paginateHelper.ts +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { - getPagedAsyncIterator, - PagedAsyncIterableIterator, - PagedResult, -} from "@azure/core-paging"; -import { - Client, - createRestError, - PathUncheckedResponse, -} from "@azure-rest/core-client"; - -/** - * Helper type to extract the type of an array - */ -export type GetArrayType = T extends Array ? TData : never; - -/** - * The type of a custom function that defines how to get a page and a link to the next one if any. - */ -export type GetPage = ( - pageLink: string, - maxPageSize?: number, -) => Promise<{ - page: TPage; - nextPageLink?: string; -}>; - -/** - * Options for the paging helper - */ -export interface PagingOptions { - /** - * Custom function to extract pagination details for crating the PagedAsyncIterableIterator - */ - customGetPage?: GetPage[]>; -} - -/** - * Helper type to infer the Type of the paged elements from the response type - * This type is generated based on the swagger information for x-ms-pageable - * specifically on the itemName property which indicates the property of the response - * where the page items are found. The default value is `value`. - * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter - */ -export type PaginateReturn = TResult extends { - body: { value?: infer TPage }; -} - ? GetArrayType - : Array; - -/** - * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension - * @param client - Client to use for sending the next page requests - * @param initialResponse - Initial response containing the nextLink and current page of elements - * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results - * @returns - PagedAsyncIterableIterator to iterate the elements - */ -export function paginate( - client: Client, - initialResponse: TResponse, - options: PagingOptions = {}, -): PagedAsyncIterableIterator> { - // Extract element type from initial response - type TElement = PaginateReturn; - let firstRun = true; - // We need to check the response for success before trying to inspect it looking for - // the properties to use for nextLink and itemName - checkPagingRequest(initialResponse); - const { itemName, nextLinkName } = getPaginationProperties(initialResponse); - const { customGetPage } = options; - const pagedResult: PagedResult = { - firstPageLink: "", - getPage: - typeof customGetPage === "function" - ? customGetPage - : async (pageLink: string) => { - const result = firstRun - ? initialResponse - : await client.pathUnchecked(pageLink).get(); - firstRun = false; - checkPagingRequest(result); - const nextLink = getNextLink(result.body, nextLinkName); - const values = getElements(result.body, itemName); - return { - page: values, - nextPageLink: nextLink, - }; - }, - }; - - return getPagedAsyncIterator(pagedResult); -} - -/** - * Gets for the value of nextLink in the body - */ -function getNextLink(body: unknown, nextLinkName?: string): string | undefined { - if (!nextLinkName) { - return undefined; - } - - const nextLink = (body as Record)[nextLinkName]; - - if (typeof nextLink !== "string" && typeof nextLink !== "undefined") { - throw new Error( - `Body Property ${nextLinkName} should be a string or undefined`, - ); - } - - return nextLink; -} - -/** - * Gets the elements of the current request in the body. - */ -function getElements(body: unknown, itemName: string): T[] { - const value = (body as Record)[itemName] as T[]; - - // value has to be an array according to the x-ms-pageable extension. - // The fact that this must be an array is used above to calculate the - // type of elements in the page in PaginateReturn - if (!Array.isArray(value)) { - throw new Error( - `Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`, - ); - } - - return value ?? []; -} - -/** - * Checks if a request failed - */ -function checkPagingRequest(response: PathUncheckedResponse): void { - const Http2xxStatusCodes = [ - "200", - "201", - "202", - "203", - "204", - "205", - "206", - "207", - "208", - "226", - ]; - if (!Http2xxStatusCodes.includes(response.status)) { - throw createRestError( - `Pagination failed with unexpected statusCode ${response.status}`, - response, - ); - } -} - -/** - * Extracts the itemName and nextLinkName from the initial response to use them for pagination - */ -function getPaginationProperties(initialResponse: PathUncheckedResponse) { - // Build a set with the passed custom nextLinkNames - const nextLinkNames = new Set(["nextLink", "odata.nextLink"]); - - // Build a set with the passed custom set of itemNames - const itemNames = new Set(["value"]); - - let nextLinkName: string | undefined; - let itemName: string | undefined; - - for (const name of nextLinkNames) { - const nextLink = (initialResponse.body as Record)[ - name - ] as string; - if (nextLink) { - nextLinkName = name; - break; - } - } - - for (const name of itemNames) { - const item = (initialResponse.body as Record)[ - name - ] as string; - if (item) { - itemName = name; - break; - } - } - - if (!itemName) { - throw new Error( - `Couldn't paginate response\n Body doesn't contain an array property with name: ${[ - ...itemNames, - ].join(" OR ")}`, - ); - } - - return { itemName, nextLinkName }; -} diff --git a/sdk/batch/batch-rest/generated/parameters.ts b/sdk/batch/batch-rest/generated/parameters.ts deleted file mode 100644 index 3567b1bf5c96..000000000000 --- a/sdk/batch/batch-rest/generated/parameters.ts +++ /dev/null @@ -1,3659 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { RawHttpHeadersInput } from "@azure/core-rest-pipeline"; -import { RequestParameters } from "@azure-rest/core-client"; -import { - BatchPoolCreateContent, - BatchPoolUpdateContent, - BatchPoolEnableAutoScaleContent, - BatchPoolEvaluateAutoScaleContent, - BatchPoolResizeContent, - BatchPoolReplaceContent, - BatchNodeRemoveContent, - BatchJobUpdateContent, - BatchJob, - BatchJobDisableContent, - BatchJobTerminateContent, - BatchJobCreateContent, - BatchJobScheduleUpdateContent, - BatchJobSchedule, - BatchJobScheduleCreateContent, - BatchTaskCreateContent, - BatchTaskGroup, - BatchTask, - BatchNodeUserCreateContent, - BatchNodeUserUpdateContent, - BatchNodeRebootContent, - BatchNodeDeallocateContent, - BatchNodeReimageContent, - BatchNodeDisableSchedulingContent, - UploadBatchServiceLogsContent, -} from "./models.js"; - -export interface ListApplicationsHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ListApplicationsQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** - * The maximum number of items to return in the response. A maximum of 1000 - * applications can be returned. - */ - maxresults?: number; -} - -export interface ListApplicationsQueryParam { - queryParameters?: ListApplicationsQueryParamProperties; -} - -export interface ListApplicationsHeaderParam { - headers?: RawHttpHeadersInput & ListApplicationsHeaders; -} - -export type ListApplicationsParameters = ListApplicationsQueryParam & - ListApplicationsHeaderParam & - RequestParameters; - -export interface GetApplicationHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface GetApplicationQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface GetApplicationQueryParam { - queryParameters?: GetApplicationQueryParamProperties; -} - -export interface GetApplicationHeaderParam { - headers?: RawHttpHeadersInput & GetApplicationHeaders; -} - -export type GetApplicationParameters = GetApplicationQueryParam & - GetApplicationHeaderParam & - RequestParameters; - -export interface ListPoolUsageMetricsHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ListPoolUsageMetricsQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** - * The maximum number of items to return in the response. A maximum of 1000 - * applications can be returned. - */ - maxresults?: number; - /** - * The earliest time from which to include metrics. This must be at least two and - * a half hours before the current time. If not specified this defaults to the - * start time of the last aggregation interval currently available. - */ - startTime?: Date | string; - /** - * The latest time from which to include metrics. This must be at least two hours - * before the current time. If not specified this defaults to the end time of the - * last aggregation interval currently available. - */ - endtime?: Date | string; - /** - * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. - */ - $filter?: string; -} - -export interface ListPoolUsageMetricsQueryParam { - queryParameters?: ListPoolUsageMetricsQueryParamProperties; -} - -export interface ListPoolUsageMetricsHeaderParam { - headers?: RawHttpHeadersInput & ListPoolUsageMetricsHeaders; -} - -export type ListPoolUsageMetricsParameters = ListPoolUsageMetricsQueryParam & - ListPoolUsageMetricsHeaderParam & - RequestParameters; - -export interface CreatePoolHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface CreatePoolBodyParam { - /** The Pool to be created. */ - body: BatchPoolCreateContent; -} - -export interface CreatePoolQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface CreatePoolQueryParam { - queryParameters?: CreatePoolQueryParamProperties; -} - -export interface CreatePoolHeaderParam { - headers?: RawHttpHeadersInput & CreatePoolHeaders; -} - -export interface CreatePoolMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type CreatePoolParameters = CreatePoolQueryParam & - CreatePoolHeaderParam & - CreatePoolMediaTypesParam & - CreatePoolBodyParam & - RequestParameters; - -export interface ListPoolsHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ListPoolsQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** - * The maximum number of items to return in the response. A maximum of 1000 - * applications can be returned. - */ - maxresults?: number; - /** - * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-pools. - */ - $filter?: string; - /** An OData $select clause. */ - $select?: string[]; - /** An OData $expand clause. */ - $expand?: string[]; -} - -export interface ListPoolsQueryParam { - queryParameters?: ListPoolsQueryParamProperties; -} - -export interface ListPoolsHeaderParam { - headers?: RawHttpHeadersInput & ListPoolsHeaders; -} - -export type ListPoolsParameters = ListPoolsQueryParam & - ListPoolsHeaderParam & - RequestParameters; - -export interface DeletePoolHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface DeletePoolQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface DeletePoolQueryParam { - queryParameters?: DeletePoolQueryParamProperties; -} - -export interface DeletePoolHeaderParam { - headers?: RawHttpHeadersInput & DeletePoolHeaders; -} - -export type DeletePoolParameters = DeletePoolQueryParam & - DeletePoolHeaderParam & - RequestParameters; - -export interface PoolExistsHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface PoolExistsQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface PoolExistsQueryParam { - queryParameters?: PoolExistsQueryParamProperties; -} - -export interface PoolExistsHeaderParam { - headers?: RawHttpHeadersInput & PoolExistsHeaders; -} - -export type PoolExistsParameters = PoolExistsQueryParam & - PoolExistsHeaderParam & - RequestParameters; - -export interface GetPoolHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface GetPoolQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** An OData $select clause. */ - $select?: string[]; - /** An OData $expand clause. */ - $expand?: string[]; -} - -export interface GetPoolQueryParam { - queryParameters?: GetPoolQueryParamProperties; -} - -export interface GetPoolHeaderParam { - headers?: RawHttpHeadersInput & GetPoolHeaders; -} - -export type GetPoolParameters = GetPoolQueryParam & - GetPoolHeaderParam & - RequestParameters; - -export interface UpdatePoolHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface UpdatePoolBodyParam { - /** The pool properties to update. */ - body: BatchPoolUpdateContent; -} - -export interface UpdatePoolQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface UpdatePoolQueryParam { - queryParameters?: UpdatePoolQueryParamProperties; -} - -export interface UpdatePoolHeaderParam { - headers?: RawHttpHeadersInput & UpdatePoolHeaders; -} - -export interface UpdatePoolMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type UpdatePoolParameters = UpdatePoolQueryParam & - UpdatePoolHeaderParam & - UpdatePoolMediaTypesParam & - UpdatePoolBodyParam & - RequestParameters; - -export interface DisablePoolAutoScaleHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface DisablePoolAutoScaleQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface DisablePoolAutoScaleQueryParam { - queryParameters?: DisablePoolAutoScaleQueryParamProperties; -} - -export interface DisablePoolAutoScaleHeaderParam { - headers?: RawHttpHeadersInput & DisablePoolAutoScaleHeaders; -} - -export type DisablePoolAutoScaleParameters = DisablePoolAutoScaleQueryParam & - DisablePoolAutoScaleHeaderParam & - RequestParameters; - -export interface EnablePoolAutoScaleHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface EnablePoolAutoScaleBodyParam { - /** The options to use for enabling automatic scaling. */ - body: BatchPoolEnableAutoScaleContent; -} - -export interface EnablePoolAutoScaleQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface EnablePoolAutoScaleQueryParam { - queryParameters?: EnablePoolAutoScaleQueryParamProperties; -} - -export interface EnablePoolAutoScaleHeaderParam { - headers?: RawHttpHeadersInput & EnablePoolAutoScaleHeaders; -} - -export interface EnablePoolAutoScaleMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type EnablePoolAutoScaleParameters = EnablePoolAutoScaleQueryParam & - EnablePoolAutoScaleHeaderParam & - EnablePoolAutoScaleMediaTypesParam & - EnablePoolAutoScaleBodyParam & - RequestParameters; - -export interface EvaluatePoolAutoScaleHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface EvaluatePoolAutoScaleBodyParam { - /** The options to use for evaluating the automatic scaling formula. */ - body: BatchPoolEvaluateAutoScaleContent; -} - -export interface EvaluatePoolAutoScaleQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface EvaluatePoolAutoScaleQueryParam { - queryParameters?: EvaluatePoolAutoScaleQueryParamProperties; -} - -export interface EvaluatePoolAutoScaleHeaderParam { - headers?: RawHttpHeadersInput & EvaluatePoolAutoScaleHeaders; -} - -export interface EvaluatePoolAutoScaleMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type EvaluatePoolAutoScaleParameters = EvaluatePoolAutoScaleQueryParam & - EvaluatePoolAutoScaleHeaderParam & - EvaluatePoolAutoScaleMediaTypesParam & - EvaluatePoolAutoScaleBodyParam & - RequestParameters; - -export interface ResizePoolHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface ResizePoolBodyParam { - /** The options to use for resizing the pool. */ - body: BatchPoolResizeContent; -} - -export interface ResizePoolQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface ResizePoolQueryParam { - queryParameters?: ResizePoolQueryParamProperties; -} - -export interface ResizePoolHeaderParam { - headers?: RawHttpHeadersInput & ResizePoolHeaders; -} - -export interface ResizePoolMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type ResizePoolParameters = ResizePoolQueryParam & - ResizePoolHeaderParam & - ResizePoolMediaTypesParam & - ResizePoolBodyParam & - RequestParameters; - -export interface StopPoolResizeHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface StopPoolResizeQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface StopPoolResizeQueryParam { - queryParameters?: StopPoolResizeQueryParamProperties; -} - -export interface StopPoolResizeHeaderParam { - headers?: RawHttpHeadersInput & StopPoolResizeHeaders; -} - -export type StopPoolResizeParameters = StopPoolResizeQueryParam & - StopPoolResizeHeaderParam & - RequestParameters; - -export interface ReplacePoolPropertiesHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ReplacePoolPropertiesBodyParam { - /** The options to use for replacing properties on the pool. */ - body: BatchPoolReplaceContent; -} - -export interface ReplacePoolPropertiesQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface ReplacePoolPropertiesQueryParam { - queryParameters?: ReplacePoolPropertiesQueryParamProperties; -} - -export interface ReplacePoolPropertiesHeaderParam { - headers?: RawHttpHeadersInput & ReplacePoolPropertiesHeaders; -} - -export interface ReplacePoolPropertiesMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type ReplacePoolPropertiesParameters = ReplacePoolPropertiesQueryParam & - ReplacePoolPropertiesHeaderParam & - ReplacePoolPropertiesMediaTypesParam & - ReplacePoolPropertiesBodyParam & - RequestParameters; - -export interface RemoveNodesHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface RemoveNodesBodyParam { - /** The options to use for removing the node. */ - body: BatchNodeRemoveContent; -} - -export interface RemoveNodesQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface RemoveNodesQueryParam { - queryParameters?: RemoveNodesQueryParamProperties; -} - -export interface RemoveNodesHeaderParam { - headers?: RawHttpHeadersInput & RemoveNodesHeaders; -} - -export interface RemoveNodesMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type RemoveNodesParameters = RemoveNodesQueryParam & - RemoveNodesHeaderParam & - RemoveNodesMediaTypesParam & - RemoveNodesBodyParam & - RequestParameters; - -export interface ListSupportedImagesHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ListSupportedImagesQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** - * The maximum number of items to return in the response. A maximum of 1000 - * applications can be returned. - */ - maxresults?: number; - /** - * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-support-images. - */ - $filter?: string; -} - -export interface ListSupportedImagesQueryParam { - queryParameters?: ListSupportedImagesQueryParamProperties; -} - -export interface ListSupportedImagesHeaderParam { - headers?: RawHttpHeadersInput & ListSupportedImagesHeaders; -} - -export type ListSupportedImagesParameters = ListSupportedImagesQueryParam & - ListSupportedImagesHeaderParam & - RequestParameters; - -export interface ListPoolNodeCountsHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ListPoolNodeCountsQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** - * The maximum number of items to return in the response. A maximum of 1000 - * applications can be returned. - */ - maxresults?: number; - /** - * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-support-images. - */ - $filter?: string; -} - -export interface ListPoolNodeCountsQueryParam { - queryParameters?: ListPoolNodeCountsQueryParamProperties; -} - -export interface ListPoolNodeCountsHeaderParam { - headers?: RawHttpHeadersInput & ListPoolNodeCountsHeaders; -} - -export type ListPoolNodeCountsParameters = ListPoolNodeCountsQueryParam & - ListPoolNodeCountsHeaderParam & - RequestParameters; - -export interface DeleteJobHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface DeleteJobQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** If true, the server will delete the Job even if the corresponding nodes have not fully processed the deletion. The default value is false. */ - force?: boolean; -} - -export interface DeleteJobQueryParam { - queryParameters?: DeleteJobQueryParamProperties; -} - -export interface DeleteJobHeaderParam { - headers?: RawHttpHeadersInput & DeleteJobHeaders; -} - -export type DeleteJobParameters = DeleteJobQueryParam & - DeleteJobHeaderParam & - RequestParameters; - -export interface GetJobHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface GetJobQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** An OData $select clause. */ - $select?: string[]; - /** An OData $expand clause. */ - $expand?: string[]; -} - -export interface GetJobQueryParam { - queryParameters?: GetJobQueryParamProperties; -} - -export interface GetJobHeaderParam { - headers?: RawHttpHeadersInput & GetJobHeaders; -} - -export type GetJobParameters = GetJobQueryParam & - GetJobHeaderParam & - RequestParameters; - -export interface UpdateJobHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface UpdateJobBodyParam { - /** The options to use for updating the Job. */ - body: BatchJobUpdateContent; -} - -export interface UpdateJobQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface UpdateJobQueryParam { - queryParameters?: UpdateJobQueryParamProperties; -} - -export interface UpdateJobHeaderParam { - headers?: RawHttpHeadersInput & UpdateJobHeaders; -} - -export interface UpdateJobMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type UpdateJobParameters = UpdateJobQueryParam & - UpdateJobHeaderParam & - UpdateJobMediaTypesParam & - UpdateJobBodyParam & - RequestParameters; - -export interface ReplaceJobHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface ReplaceJobBodyParam { - /** A job with updated properties */ - body: BatchJob; -} - -export interface ReplaceJobQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface ReplaceJobQueryParam { - queryParameters?: ReplaceJobQueryParamProperties; -} - -export interface ReplaceJobHeaderParam { - headers?: RawHttpHeadersInput & ReplaceJobHeaders; -} - -export interface ReplaceJobMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type ReplaceJobParameters = ReplaceJobQueryParam & - ReplaceJobHeaderParam & - ReplaceJobMediaTypesParam & - ReplaceJobBodyParam & - RequestParameters; - -export interface DisableJobHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface DisableJobBodyParam { - /** The options to use for disabling the Job. */ - body: BatchJobDisableContent; -} - -export interface DisableJobQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface DisableJobQueryParam { - queryParameters?: DisableJobQueryParamProperties; -} - -export interface DisableJobHeaderParam { - headers?: RawHttpHeadersInput & DisableJobHeaders; -} - -export interface DisableJobMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type DisableJobParameters = DisableJobQueryParam & - DisableJobHeaderParam & - DisableJobMediaTypesParam & - DisableJobBodyParam & - RequestParameters; - -export interface EnableJobHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface EnableJobQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface EnableJobQueryParam { - queryParameters?: EnableJobQueryParamProperties; -} - -export interface EnableJobHeaderParam { - headers?: RawHttpHeadersInput & EnableJobHeaders; -} - -export type EnableJobParameters = EnableJobQueryParam & - EnableJobHeaderParam & - RequestParameters; - -export interface TerminateJobHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface TerminateJobBodyParam { - /** The options to use for terminating the Job. */ - body?: BatchJobTerminateContent; -} - -export interface TerminateJobQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** If true, the server will terminate the Job even if the corresponding nodes have not fully processed the termination. The default value is false. */ - force?: boolean; -} - -export interface TerminateJobQueryParam { - queryParameters?: TerminateJobQueryParamProperties; -} - -export interface TerminateJobHeaderParam { - headers?: RawHttpHeadersInput & TerminateJobHeaders; -} - -export interface TerminateJobMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type TerminateJobParameters = TerminateJobQueryParam & - TerminateJobHeaderParam & - TerminateJobMediaTypesParam & - TerminateJobBodyParam & - RequestParameters; - -export interface CreateJobHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface CreateJobBodyParam { - /** The Job to be created. */ - body: BatchJobCreateContent; -} - -export interface CreateJobQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface CreateJobQueryParam { - queryParameters?: CreateJobQueryParamProperties; -} - -export interface CreateJobHeaderParam { - headers?: RawHttpHeadersInput & CreateJobHeaders; -} - -export interface CreateJobMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type CreateJobParameters = CreateJobQueryParam & - CreateJobHeaderParam & - CreateJobMediaTypesParam & - CreateJobBodyParam & - RequestParameters; - -export interface ListJobsHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ListJobsQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** - * The maximum number of items to return in the response. A maximum of 1000 - * applications can be returned. - */ - maxresults?: number; - /** - * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-jobs. - */ - $filter?: string; - /** An OData $select clause. */ - $select?: string[]; - /** An OData $expand clause. */ - $expand?: string[]; -} - -export interface ListJobsQueryParam { - queryParameters?: ListJobsQueryParamProperties; -} - -export interface ListJobsHeaderParam { - headers?: RawHttpHeadersInput & ListJobsHeaders; -} - -export type ListJobsParameters = ListJobsQueryParam & - ListJobsHeaderParam & - RequestParameters; - -export interface ListJobsFromScheduleHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ListJobsFromScheduleQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** - * The maximum number of items to return in the response. A maximum of 1000 - * applications can be returned. - */ - maxresults?: number; - /** - * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. - */ - $filter?: string; - /** An OData $select clause. */ - $select?: string[]; - /** An OData $expand clause. */ - $expand?: string[]; -} - -export interface ListJobsFromScheduleQueryParam { - queryParameters?: ListJobsFromScheduleQueryParamProperties; -} - -export interface ListJobsFromScheduleHeaderParam { - headers?: RawHttpHeadersInput & ListJobsFromScheduleHeaders; -} - -export type ListJobsFromScheduleParameters = ListJobsFromScheduleQueryParam & - ListJobsFromScheduleHeaderParam & - RequestParameters; - -export interface ListJobPreparationAndReleaseTaskStatusHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ListJobPreparationAndReleaseTaskStatusQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** - * The maximum number of items to return in the response. A maximum of 1000 - * applications can be returned. - */ - maxresults?: number; - /** - * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. - */ - $filter?: string; - /** An OData $select clause. */ - $select?: string[]; -} - -export interface ListJobPreparationAndReleaseTaskStatusQueryParam { - queryParameters?: ListJobPreparationAndReleaseTaskStatusQueryParamProperties; -} - -export interface ListJobPreparationAndReleaseTaskStatusHeaderParam { - headers?: RawHttpHeadersInput & ListJobPreparationAndReleaseTaskStatusHeaders; -} - -export type ListJobPreparationAndReleaseTaskStatusParameters = - ListJobPreparationAndReleaseTaskStatusQueryParam & - ListJobPreparationAndReleaseTaskStatusHeaderParam & - RequestParameters; - -export interface GetJobTaskCountsHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface GetJobTaskCountsQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface GetJobTaskCountsQueryParam { - queryParameters?: GetJobTaskCountsQueryParamProperties; -} - -export interface GetJobTaskCountsHeaderParam { - headers?: RawHttpHeadersInput & GetJobTaskCountsHeaders; -} - -export type GetJobTaskCountsParameters = GetJobTaskCountsQueryParam & - GetJobTaskCountsHeaderParam & - RequestParameters; - -export interface JobScheduleExistsHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface JobScheduleExistsQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface JobScheduleExistsQueryParam { - queryParameters?: JobScheduleExistsQueryParamProperties; -} - -export interface JobScheduleExistsHeaderParam { - headers?: RawHttpHeadersInput & JobScheduleExistsHeaders; -} - -export type JobScheduleExistsParameters = JobScheduleExistsQueryParam & - JobScheduleExistsHeaderParam & - RequestParameters; - -export interface DeleteJobScheduleHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface DeleteJobScheduleQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** If true, the server will delete the JobSchedule even if the corresponding nodes have not fully processed the deletion. The default value is false. */ - force?: boolean; -} - -export interface DeleteJobScheduleQueryParam { - queryParameters?: DeleteJobScheduleQueryParamProperties; -} - -export interface DeleteJobScheduleHeaderParam { - headers?: RawHttpHeadersInput & DeleteJobScheduleHeaders; -} - -export type DeleteJobScheduleParameters = DeleteJobScheduleQueryParam & - DeleteJobScheduleHeaderParam & - RequestParameters; - -export interface GetJobScheduleHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface GetJobScheduleQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** An OData $select clause. */ - $select?: string[]; - /** An OData $expand clause. */ - $expand?: string[]; -} - -export interface GetJobScheduleQueryParam { - queryParameters?: GetJobScheduleQueryParamProperties; -} - -export interface GetJobScheduleHeaderParam { - headers?: RawHttpHeadersInput & GetJobScheduleHeaders; -} - -export type GetJobScheduleParameters = GetJobScheduleQueryParam & - GetJobScheduleHeaderParam & - RequestParameters; - -export interface UpdateJobScheduleHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface UpdateJobScheduleBodyParam { - /** The options to use for updating the Job Schedule. */ - body: BatchJobScheduleUpdateContent; -} - -export interface UpdateJobScheduleQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface UpdateJobScheduleQueryParam { - queryParameters?: UpdateJobScheduleQueryParamProperties; -} - -export interface UpdateJobScheduleHeaderParam { - headers?: RawHttpHeadersInput & UpdateJobScheduleHeaders; -} - -export interface UpdateJobScheduleMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type UpdateJobScheduleParameters = UpdateJobScheduleQueryParam & - UpdateJobScheduleHeaderParam & - UpdateJobScheduleMediaTypesParam & - UpdateJobScheduleBodyParam & - RequestParameters; - -export interface ReplaceJobScheduleHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface ReplaceJobScheduleBodyParam { - /** A Job Schedule with updated properties */ - body: BatchJobSchedule; -} - -export interface ReplaceJobScheduleQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface ReplaceJobScheduleQueryParam { - queryParameters?: ReplaceJobScheduleQueryParamProperties; -} - -export interface ReplaceJobScheduleHeaderParam { - headers?: RawHttpHeadersInput & ReplaceJobScheduleHeaders; -} - -export interface ReplaceJobScheduleMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type ReplaceJobScheduleParameters = ReplaceJobScheduleQueryParam & - ReplaceJobScheduleHeaderParam & - ReplaceJobScheduleMediaTypesParam & - ReplaceJobScheduleBodyParam & - RequestParameters; - -export interface DisableJobScheduleHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface DisableJobScheduleQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface DisableJobScheduleQueryParam { - queryParameters?: DisableJobScheduleQueryParamProperties; -} - -export interface DisableJobScheduleHeaderParam { - headers?: RawHttpHeadersInput & DisableJobScheduleHeaders; -} - -export type DisableJobScheduleParameters = DisableJobScheduleQueryParam & - DisableJobScheduleHeaderParam & - RequestParameters; - -export interface EnableJobScheduleHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface EnableJobScheduleQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface EnableJobScheduleQueryParam { - queryParameters?: EnableJobScheduleQueryParamProperties; -} - -export interface EnableJobScheduleHeaderParam { - headers?: RawHttpHeadersInput & EnableJobScheduleHeaders; -} - -export type EnableJobScheduleParameters = EnableJobScheduleQueryParam & - EnableJobScheduleHeaderParam & - RequestParameters; - -export interface TerminateJobScheduleHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface TerminateJobScheduleQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** If true, the server will terminate the JobSchedule even if the corresponding nodes have not fully processed the termination. The default value is false. */ - force?: boolean; -} - -export interface TerminateJobScheduleQueryParam { - queryParameters?: TerminateJobScheduleQueryParamProperties; -} - -export interface TerminateJobScheduleHeaderParam { - headers?: RawHttpHeadersInput & TerminateJobScheduleHeaders; -} - -export type TerminateJobScheduleParameters = TerminateJobScheduleQueryParam & - TerminateJobScheduleHeaderParam & - RequestParameters; - -export interface CreateJobScheduleHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface CreateJobScheduleBodyParam { - /** The Job Schedule to be created. */ - body: BatchJobScheduleCreateContent; -} - -export interface CreateJobScheduleQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface CreateJobScheduleQueryParam { - queryParameters?: CreateJobScheduleQueryParamProperties; -} - -export interface CreateJobScheduleHeaderParam { - headers?: RawHttpHeadersInput & CreateJobScheduleHeaders; -} - -export interface CreateJobScheduleMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type CreateJobScheduleParameters = CreateJobScheduleQueryParam & - CreateJobScheduleHeaderParam & - CreateJobScheduleMediaTypesParam & - CreateJobScheduleBodyParam & - RequestParameters; - -export interface ListJobSchedulesHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ListJobSchedulesQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** - * The maximum number of items to return in the response. A maximum of 1000 - * applications can be returned. - */ - maxresults?: number; - /** - * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. - */ - $filter?: string; - /** An OData $select clause. */ - $select?: string[]; - /** An OData $expand clause. */ - $expand?: string[]; -} - -export interface ListJobSchedulesQueryParam { - queryParameters?: ListJobSchedulesQueryParamProperties; -} - -export interface ListJobSchedulesHeaderParam { - headers?: RawHttpHeadersInput & ListJobSchedulesHeaders; -} - -export type ListJobSchedulesParameters = ListJobSchedulesQueryParam & - ListJobSchedulesHeaderParam & - RequestParameters; - -export interface CreateTaskHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface CreateTaskBodyParam { - /** The Task to be created. */ - body: BatchTaskCreateContent; -} - -export interface CreateTaskQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface CreateTaskQueryParam { - queryParameters?: CreateTaskQueryParamProperties; -} - -export interface CreateTaskHeaderParam { - headers?: RawHttpHeadersInput & CreateTaskHeaders; -} - -export interface CreateTaskMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type CreateTaskParameters = CreateTaskQueryParam & - CreateTaskHeaderParam & - CreateTaskMediaTypesParam & - CreateTaskBodyParam & - RequestParameters; - -export interface ListTasksHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ListTasksQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** - * The maximum number of items to return in the response. A maximum of 1000 - * applications can be returned. - */ - maxresults?: number; - /** - * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-tasks. - */ - $filter?: string; - /** An OData $select clause. */ - $select?: string[]; - /** An OData $expand clause. */ - $expand?: string[]; -} - -export interface ListTasksQueryParam { - queryParameters?: ListTasksQueryParamProperties; -} - -export interface ListTasksHeaderParam { - headers?: RawHttpHeadersInput & ListTasksHeaders; -} - -export type ListTasksParameters = ListTasksQueryParam & - ListTasksHeaderParam & - RequestParameters; - -export interface CreateTaskCollectionHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface CreateTaskCollectionBodyParam { - /** The Tasks to be added. */ - body: BatchTaskGroup; -} - -export interface CreateTaskCollectionQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface CreateTaskCollectionQueryParam { - queryParameters?: CreateTaskCollectionQueryParamProperties; -} - -export interface CreateTaskCollectionHeaderParam { - headers?: RawHttpHeadersInput & CreateTaskCollectionHeaders; -} - -export interface CreateTaskCollectionMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type CreateTaskCollectionParameters = CreateTaskCollectionQueryParam & - CreateTaskCollectionHeaderParam & - CreateTaskCollectionMediaTypesParam & - CreateTaskCollectionBodyParam & - RequestParameters; - -export interface DeleteTaskHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface DeleteTaskQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface DeleteTaskQueryParam { - queryParameters?: DeleteTaskQueryParamProperties; -} - -export interface DeleteTaskHeaderParam { - headers?: RawHttpHeadersInput & DeleteTaskHeaders; -} - -export type DeleteTaskParameters = DeleteTaskQueryParam & - DeleteTaskHeaderParam & - RequestParameters; - -export interface GetTaskHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface GetTaskQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** An OData $select clause. */ - $select?: string[]; - /** An OData $expand clause. */ - $expand?: string[]; -} - -export interface GetTaskQueryParam { - queryParameters?: GetTaskQueryParamProperties; -} - -export interface GetTaskHeaderParam { - headers?: RawHttpHeadersInput & GetTaskHeaders; -} - -export type GetTaskParameters = GetTaskQueryParam & - GetTaskHeaderParam & - RequestParameters; - -export interface ReplaceTaskHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface ReplaceTaskBodyParam { - /** The Task to update. */ - body: BatchTask; -} - -export interface ReplaceTaskQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface ReplaceTaskQueryParam { - queryParameters?: ReplaceTaskQueryParamProperties; -} - -export interface ReplaceTaskHeaderParam { - headers?: RawHttpHeadersInput & ReplaceTaskHeaders; -} - -export interface ReplaceTaskMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type ReplaceTaskParameters = ReplaceTaskQueryParam & - ReplaceTaskHeaderParam & - ReplaceTaskMediaTypesParam & - ReplaceTaskBodyParam & - RequestParameters; - -export interface ListSubTasksHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ListSubTasksQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** An OData $select clause. */ - $select?: string[]; -} - -export interface ListSubTasksQueryParam { - queryParameters?: ListSubTasksQueryParamProperties; -} - -export interface ListSubTasksHeaderParam { - headers?: RawHttpHeadersInput & ListSubTasksHeaders; -} - -export type ListSubTasksParameters = ListSubTasksQueryParam & - ListSubTasksHeaderParam & - RequestParameters; - -export interface TerminateTaskHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface TerminateTaskQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface TerminateTaskQueryParam { - queryParameters?: TerminateTaskQueryParamProperties; -} - -export interface TerminateTaskHeaderParam { - headers?: RawHttpHeadersInput & TerminateTaskHeaders; -} - -export type TerminateTaskParameters = TerminateTaskQueryParam & - TerminateTaskHeaderParam & - RequestParameters; - -export interface ReactivateTaskHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service exactly matches the value specified by the client. - */ - "If-Match"?: string; - /** - * An ETag value associated with the version of the resource known to the client. - * The operation will be performed only if the resource's current ETag on the - * service does not match the value specified by the client. - */ - "If-None-Match"?: string; -} - -export interface ReactivateTaskQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface ReactivateTaskQueryParam { - queryParameters?: ReactivateTaskQueryParamProperties; -} - -export interface ReactivateTaskHeaderParam { - headers?: RawHttpHeadersInput & ReactivateTaskHeaders; -} - -export type ReactivateTaskParameters = ReactivateTaskQueryParam & - ReactivateTaskHeaderParam & - RequestParameters; - -export interface DeleteTaskFileHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface DeleteTaskFileQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** - * Whether to delete children of a directory. If the filePath parameter represents - * a directory instead of a file, you can set recursive to true to delete the - * directory and all of the files and subdirectories in it. If recursive is false - * then the directory must be empty or deletion will fail. - */ - recursive?: boolean; -} - -export interface DeleteTaskFileQueryParam { - queryParameters?: DeleteTaskFileQueryParamProperties; -} - -export interface DeleteTaskFileHeaderParam { - headers?: RawHttpHeadersInput & DeleteTaskFileHeaders; -} - -export type DeleteTaskFileParameters = DeleteTaskFileQueryParam & - DeleteTaskFileHeaderParam & - RequestParameters; - -export interface GetTaskFileHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * The byte range to be retrieved. The default is to retrieve the entire file. The - * format is bytes=startRange-endRange. - */ - "ocp-range"?: string; -} - -export interface GetTaskFileQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface GetTaskFileQueryParam { - queryParameters?: GetTaskFileQueryParamProperties; -} - -export interface GetTaskFileHeaderParam { - headers?: RawHttpHeadersInput & GetTaskFileHeaders; -} - -export type GetTaskFileParameters = GetTaskFileQueryParam & - GetTaskFileHeaderParam & - RequestParameters; - -export interface GetTaskFilePropertiesHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; -} - -export interface GetTaskFilePropertiesQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface GetTaskFilePropertiesQueryParam { - queryParameters?: GetTaskFilePropertiesQueryParamProperties; -} - -export interface GetTaskFilePropertiesHeaderParam { - headers?: RawHttpHeadersInput & GetTaskFilePropertiesHeaders; -} - -export type GetTaskFilePropertiesParameters = GetTaskFilePropertiesQueryParam & - GetTaskFilePropertiesHeaderParam & - RequestParameters; - -export interface ListTaskFilesHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ListTaskFilesQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** - * The maximum number of items to return in the response. A maximum of 1000 - * applications can be returned. - */ - maxresults?: number; - /** - * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-task-files. - */ - $filter?: string; - /** - * Whether to list children of the Task directory. This parameter can be used in - * combination with the filter parameter to list specific type of files. - */ - recursive?: boolean; -} - -export interface ListTaskFilesQueryParam { - queryParameters?: ListTaskFilesQueryParamProperties; -} - -export interface ListTaskFilesHeaderParam { - headers?: RawHttpHeadersInput & ListTaskFilesHeaders; -} - -export type ListTaskFilesParameters = ListTaskFilesQueryParam & - ListTaskFilesHeaderParam & - RequestParameters; - -export interface CreateNodeUserHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface CreateNodeUserBodyParam { - /** The options to use for creating the user. */ - body: BatchNodeUserCreateContent; -} - -export interface CreateNodeUserQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface CreateNodeUserQueryParam { - queryParameters?: CreateNodeUserQueryParamProperties; -} - -export interface CreateNodeUserHeaderParam { - headers?: RawHttpHeadersInput & CreateNodeUserHeaders; -} - -export interface CreateNodeUserMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type CreateNodeUserParameters = CreateNodeUserQueryParam & - CreateNodeUserHeaderParam & - CreateNodeUserMediaTypesParam & - CreateNodeUserBodyParam & - RequestParameters; - -export interface DeleteNodeUserHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface DeleteNodeUserQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface DeleteNodeUserQueryParam { - queryParameters?: DeleteNodeUserQueryParamProperties; -} - -export interface DeleteNodeUserHeaderParam { - headers?: RawHttpHeadersInput & DeleteNodeUserHeaders; -} - -export type DeleteNodeUserParameters = DeleteNodeUserQueryParam & - DeleteNodeUserHeaderParam & - RequestParameters; - -export interface ReplaceNodeUserHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ReplaceNodeUserBodyParam { - /** The options to use for updating the user. */ - body: BatchNodeUserUpdateContent; -} - -export interface ReplaceNodeUserQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface ReplaceNodeUserQueryParam { - queryParameters?: ReplaceNodeUserQueryParamProperties; -} - -export interface ReplaceNodeUserHeaderParam { - headers?: RawHttpHeadersInput & ReplaceNodeUserHeaders; -} - -export interface ReplaceNodeUserMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type ReplaceNodeUserParameters = ReplaceNodeUserQueryParam & - ReplaceNodeUserHeaderParam & - ReplaceNodeUserMediaTypesParam & - ReplaceNodeUserBodyParam & - RequestParameters; - -export interface GetNodeHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface GetNodeQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** An OData $select clause. */ - $select?: string[]; -} - -export interface GetNodeQueryParam { - queryParameters?: GetNodeQueryParamProperties; -} - -export interface GetNodeHeaderParam { - headers?: RawHttpHeadersInput & GetNodeHeaders; -} - -export type GetNodeParameters = GetNodeQueryParam & - GetNodeHeaderParam & - RequestParameters; - -export interface RebootNodeHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface RebootNodeBodyParam { - /** The options to use for rebooting the Compute Node. */ - body?: BatchNodeRebootContent; -} - -export interface RebootNodeQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface RebootNodeQueryParam { - queryParameters?: RebootNodeQueryParamProperties; -} - -export interface RebootNodeHeaderParam { - headers?: RawHttpHeadersInput & RebootNodeHeaders; -} - -export interface RebootNodeMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type RebootNodeParameters = RebootNodeQueryParam & - RebootNodeHeaderParam & - RebootNodeMediaTypesParam & - RebootNodeBodyParam & - RequestParameters; - -export interface StartNodeHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface StartNodeQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface StartNodeQueryParam { - queryParameters?: StartNodeQueryParamProperties; -} - -export interface StartNodeHeaderParam { - headers?: RawHttpHeadersInput & StartNodeHeaders; -} - -export type StartNodeParameters = StartNodeQueryParam & - StartNodeHeaderParam & - RequestParameters; - -export interface DeallocateNodeHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface DeallocateNodeBodyParam { - /** The options to use for deallocating the Compute Node. */ - body?: BatchNodeDeallocateContent; -} - -export interface DeallocateNodeQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface DeallocateNodeQueryParam { - queryParameters?: DeallocateNodeQueryParamProperties; -} - -export interface DeallocateNodeHeaderParam { - headers?: RawHttpHeadersInput & DeallocateNodeHeaders; -} - -export interface DeallocateNodeMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type DeallocateNodeParameters = DeallocateNodeQueryParam & - DeallocateNodeHeaderParam & - DeallocateNodeMediaTypesParam & - DeallocateNodeBodyParam & - RequestParameters; - -export interface ReimageNodeHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ReimageNodeBodyParam { - /** The options to use for reimaging the Compute Node. */ - body?: BatchNodeReimageContent; -} - -export interface ReimageNodeQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface ReimageNodeQueryParam { - queryParameters?: ReimageNodeQueryParamProperties; -} - -export interface ReimageNodeHeaderParam { - headers?: RawHttpHeadersInput & ReimageNodeHeaders; -} - -export interface ReimageNodeMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type ReimageNodeParameters = ReimageNodeQueryParam & - ReimageNodeHeaderParam & - ReimageNodeMediaTypesParam & - ReimageNodeBodyParam & - RequestParameters; - -export interface DisableNodeSchedulingHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface DisableNodeSchedulingBodyParam { - /** The options to use for disabling scheduling on the Compute Node. */ - body?: BatchNodeDisableSchedulingContent; -} - -export interface DisableNodeSchedulingQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface DisableNodeSchedulingQueryParam { - queryParameters?: DisableNodeSchedulingQueryParamProperties; -} - -export interface DisableNodeSchedulingHeaderParam { - headers?: RawHttpHeadersInput & DisableNodeSchedulingHeaders; -} - -export interface DisableNodeSchedulingMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type DisableNodeSchedulingParameters = DisableNodeSchedulingQueryParam & - DisableNodeSchedulingHeaderParam & - DisableNodeSchedulingMediaTypesParam & - DisableNodeSchedulingBodyParam & - RequestParameters; - -export interface EnableNodeSchedulingHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface EnableNodeSchedulingQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface EnableNodeSchedulingQueryParam { - queryParameters?: EnableNodeSchedulingQueryParamProperties; -} - -export interface EnableNodeSchedulingHeaderParam { - headers?: RawHttpHeadersInput & EnableNodeSchedulingHeaders; -} - -export type EnableNodeSchedulingParameters = EnableNodeSchedulingQueryParam & - EnableNodeSchedulingHeaderParam & - RequestParameters; - -export interface GetNodeRemoteLoginSettingsHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface GetNodeRemoteLoginSettingsQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface GetNodeRemoteLoginSettingsQueryParam { - queryParameters?: GetNodeRemoteLoginSettingsQueryParamProperties; -} - -export interface GetNodeRemoteLoginSettingsHeaderParam { - headers?: RawHttpHeadersInput & GetNodeRemoteLoginSettingsHeaders; -} - -export type GetNodeRemoteLoginSettingsParameters = - GetNodeRemoteLoginSettingsQueryParam & - GetNodeRemoteLoginSettingsHeaderParam & - RequestParameters; - -export interface UploadNodeLogsHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface UploadNodeLogsBodyParam { - /** The Azure Batch service log files upload options. */ - body: UploadBatchServiceLogsContent; -} - -export interface UploadNodeLogsQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface UploadNodeLogsQueryParam { - queryParameters?: UploadNodeLogsQueryParamProperties; -} - -export interface UploadNodeLogsHeaderParam { - headers?: RawHttpHeadersInput & UploadNodeLogsHeaders; -} - -export interface UploadNodeLogsMediaTypesParam { - /** Type of content */ - contentType: "application/json; odata=minimalmetadata"; -} - -export type UploadNodeLogsParameters = UploadNodeLogsQueryParam & - UploadNodeLogsHeaderParam & - UploadNodeLogsMediaTypesParam & - UploadNodeLogsBodyParam & - RequestParameters; - -export interface ListNodesHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ListNodesQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** - * The maximum number of items to return in the response. A maximum of 1000 - * applications can be returned. - */ - maxresults?: number; - /** - * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. - */ - $filter?: string; - /** An OData $select clause. */ - $select?: string[]; -} - -export interface ListNodesQueryParam { - queryParameters?: ListNodesQueryParamProperties; -} - -export interface ListNodesHeaderParam { - headers?: RawHttpHeadersInput & ListNodesHeaders; -} - -export type ListNodesParameters = ListNodesQueryParam & - ListNodesHeaderParam & - RequestParameters; - -export interface GetNodeExtensionHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface GetNodeExtensionQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** An OData $select clause. */ - $select?: string[]; -} - -export interface GetNodeExtensionQueryParam { - queryParameters?: GetNodeExtensionQueryParamProperties; -} - -export interface GetNodeExtensionHeaderParam { - headers?: RawHttpHeadersInput & GetNodeExtensionHeaders; -} - -export type GetNodeExtensionParameters = GetNodeExtensionQueryParam & - GetNodeExtensionHeaderParam & - RequestParameters; - -export interface ListNodeExtensionsHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ListNodeExtensionsQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** - * The maximum number of items to return in the response. A maximum of 1000 - * applications can be returned. - */ - maxresults?: number; - /** An OData $select clause. */ - $select?: string[]; -} - -export interface ListNodeExtensionsQueryParam { - queryParameters?: ListNodeExtensionsQueryParamProperties; -} - -export interface ListNodeExtensionsHeaderParam { - headers?: RawHttpHeadersInput & ListNodeExtensionsHeaders; -} - -export type ListNodeExtensionsParameters = ListNodeExtensionsQueryParam & - ListNodeExtensionsHeaderParam & - RequestParameters; - -export interface DeleteNodeFileHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface DeleteNodeFileQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** - * Whether to delete children of a directory. If the filePath parameter represents - * a directory instead of a file, you can set recursive to true to delete the - * directory and all of the files and subdirectories in it. If recursive is false - * then the directory must be empty or deletion will fail. - */ - recursive?: boolean; -} - -export interface DeleteNodeFileQueryParam { - queryParameters?: DeleteNodeFileQueryParamProperties; -} - -export interface DeleteNodeFileHeaderParam { - headers?: RawHttpHeadersInput & DeleteNodeFileHeaders; -} - -export type DeleteNodeFileParameters = DeleteNodeFileQueryParam & - DeleteNodeFileHeaderParam & - RequestParameters; - -export interface GetNodeFileHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; - /** - * The byte range to be retrieved. The default is to retrieve the entire file. The - * format is bytes=startRange-endRange. - */ - "ocp-range"?: string; -} - -export interface GetNodeFileQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface GetNodeFileQueryParam { - queryParameters?: GetNodeFileQueryParamProperties; -} - -export interface GetNodeFileHeaderParam { - headers?: RawHttpHeadersInput & GetNodeFileHeaders; -} - -export type GetNodeFileParameters = GetNodeFileQueryParam & - GetNodeFileHeaderParam & - RequestParameters; - -export interface GetNodeFilePropertiesHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * been modified since the specified time. - */ - "If-Modified-Since"?: string; - /** - * A timestamp indicating the last modified time of the resource known to the - * client. The operation will be performed only if the resource on the service has - * not been modified since the specified time. - */ - "If-Unmodified-Since"?: string; -} - -export interface GetNodeFilePropertiesQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; -} - -export interface GetNodeFilePropertiesQueryParam { - queryParameters?: GetNodeFilePropertiesQueryParamProperties; -} - -export interface GetNodeFilePropertiesHeaderParam { - headers?: RawHttpHeadersInput & GetNodeFilePropertiesHeaders; -} - -export type GetNodeFilePropertiesParameters = GetNodeFilePropertiesQueryParam & - GetNodeFilePropertiesHeaderParam & - RequestParameters; - -export interface ListNodeFilesHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id"?: string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id"?: boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date"?: string; -} - -export interface ListNodeFilesQueryParamProperties { - /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ - timeOut?: number; - /** - * The maximum number of items to return in the response. A maximum of 1000 - * applications can be returned. - */ - maxresults?: number; - /** - * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. - */ - $filter?: string; - /** Whether to list children of a directory. */ - recursive?: boolean; -} - -export interface ListNodeFilesQueryParam { - queryParameters?: ListNodeFilesQueryParamProperties; -} - -export interface ListNodeFilesHeaderParam { - headers?: RawHttpHeadersInput & ListNodeFilesHeaders; -} - -export type ListNodeFilesParameters = ListNodeFilesQueryParam & - ListNodeFilesHeaderParam & - RequestParameters; diff --git a/sdk/batch/batch-rest/generated/responses.ts b/sdk/batch/batch-rest/generated/responses.ts deleted file mode 100644 index 7647899ac994..000000000000 --- a/sdk/batch/batch-rest/generated/responses.ts +++ /dev/null @@ -1,1745 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { RawHttpHeaders } from "@azure/core-rest-pipeline"; -import { HttpResponse } from "@azure-rest/core-client"; -import { - BatchApplicationListResultOutput, - BatchErrorOutput, - BatchApplicationOutput, - BatchPoolListUsageMetricsResultOutput, - BatchPoolListResultOutput, - BatchPoolOutput, - AutoScaleRunOutput, - BatchAccountListSupportedImagesResultOutput, - BatchPoolNodeCountsListResultOutput, - BatchJobOutput, - BatchJobListResultOutput, - BatchJobPreparationAndReleaseTaskStatusListResultOutput, - BatchTaskCountsResultOutput, - BatchJobScheduleOutput, - BatchJobScheduleListResultOutput, - BatchTaskListResultOutput, - BatchTaskAddCollectionResultOutput, - BatchTaskOutput, - BatchTaskListSubtasksResultOutput, - BatchNodeFileListResultOutput, - BatchNodeOutput, - BatchNodeRemoteLoginSettingsOutput, - UploadBatchServiceLogsResultOutput, - BatchNodeListResultOutput, - BatchNodeVMExtensionOutput, - BatchNodeVMExtensionListResultOutput, -} from "./outputModels.js"; - -export interface ListApplications200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ListApplications200Response extends HttpResponse { - status: "200"; - body: BatchApplicationListResultOutput; - headers: RawHttpHeaders & ListApplications200Headers; -} - -export interface ListApplicationsDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface GetApplication200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface GetApplication200Response extends HttpResponse { - status: "200"; - body: BatchApplicationOutput; - headers: RawHttpHeaders & GetApplication200Headers; -} - -export interface GetApplicationDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ListPoolUsageMetrics200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ListPoolUsageMetrics200Response extends HttpResponse { - status: "200"; - body: BatchPoolListUsageMetricsResultOutput; - headers: RawHttpHeaders & ListPoolUsageMetrics200Headers; -} - -export interface ListPoolUsageMetricsDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface CreatePool201Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded and a new resource has been created as a result. */ -export interface CreatePool201Response extends HttpResponse { - status: "201"; - headers: RawHttpHeaders & CreatePool201Headers; -} - -export interface CreatePoolDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ListPools200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ListPools200Response extends HttpResponse { - status: "200"; - body: BatchPoolListResultOutput; - headers: RawHttpHeaders & ListPools200Headers; -} - -export interface ListPoolsDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface DeletePool202Headers { - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has been accepted for processing, but processing has not yet completed. */ -export interface DeletePool202Response extends HttpResponse { - status: "202"; - headers: RawHttpHeaders & DeletePool202Headers; -} - -export interface DeletePoolDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface PoolExists200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface PoolExists200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & PoolExists200Headers; -} - -/** The server cannot find the requested resource. */ -export interface PoolExists404Response extends HttpResponse { - status: "404"; -} - -export interface PoolExistsDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface GetPool200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface GetPool200Response extends HttpResponse { - status: "200"; - body: BatchPoolOutput; - headers: RawHttpHeaders & GetPool200Headers; -} - -export interface GetPoolDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface UpdatePool200Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface UpdatePool200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & UpdatePool200Headers; -} - -export interface UpdatePoolDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface DisablePoolAutoScale200Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface DisablePoolAutoScale200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & DisablePoolAutoScale200Headers; -} - -export interface DisablePoolAutoScaleDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface EnablePoolAutoScale200Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface EnablePoolAutoScale200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & EnablePoolAutoScale200Headers; -} - -export interface EnablePoolAutoScaleDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface EvaluatePoolAutoScale200Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface EvaluatePoolAutoScale200Response extends HttpResponse { - status: "200"; - body: AutoScaleRunOutput; - headers: RawHttpHeaders & EvaluatePoolAutoScale200Headers; -} - -export interface EvaluatePoolAutoScaleDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ResizePool202Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has been accepted for processing, but processing has not yet completed. */ -export interface ResizePool202Response extends HttpResponse { - status: "202"; - headers: RawHttpHeaders & ResizePool202Headers; -} - -export interface ResizePoolDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface StopPoolResize202Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has been accepted for processing, but processing has not yet completed. */ -export interface StopPoolResize202Response extends HttpResponse { - status: "202"; - headers: RawHttpHeaders & StopPoolResize202Headers; -} - -export interface StopPoolResizeDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ReplacePoolProperties204Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** There is no content to send for this request, but the headers may be useful. */ -export interface ReplacePoolProperties204Response extends HttpResponse { - status: "204"; - headers: RawHttpHeaders & ReplacePoolProperties204Headers; -} - -export interface ReplacePoolPropertiesDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface RemoveNodes202Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has been accepted for processing, but processing has not yet completed. */ -export interface RemoveNodes202Response extends HttpResponse { - status: "202"; - headers: RawHttpHeaders & RemoveNodes202Headers; -} - -export interface RemoveNodesDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ListSupportedImages200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ListSupportedImages200Response extends HttpResponse { - status: "200"; - body: BatchAccountListSupportedImagesResultOutput; - headers: RawHttpHeaders & ListSupportedImages200Headers; -} - -export interface ListSupportedImagesDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ListPoolNodeCounts200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ListPoolNodeCounts200Response extends HttpResponse { - status: "200"; - body: BatchPoolNodeCountsListResultOutput; - headers: RawHttpHeaders & ListPoolNodeCounts200Headers; -} - -export interface ListPoolNodeCountsDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface DeleteJob202Headers { - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has been accepted for processing, but processing has not yet completed. */ -export interface DeleteJob202Response extends HttpResponse { - status: "202"; - headers: RawHttpHeaders & DeleteJob202Headers; -} - -export interface DeleteJobDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface GetJob200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface GetJob200Response extends HttpResponse { - status: "200"; - body: BatchJobOutput; - headers: RawHttpHeaders & GetJob200Headers; -} - -export interface GetJobDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface UpdateJob200Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface UpdateJob200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & UpdateJob200Headers; -} - -export interface UpdateJobDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ReplaceJob200Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ReplaceJob200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & ReplaceJob200Headers; -} - -export interface ReplaceJobDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface DisableJob202Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has been accepted for processing, but processing has not yet completed. */ -export interface DisableJob202Response extends HttpResponse { - status: "202"; - headers: RawHttpHeaders & DisableJob202Headers; -} - -export interface DisableJobDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface EnableJob202Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has been accepted for processing, but processing has not yet completed. */ -export interface EnableJob202Response extends HttpResponse { - status: "202"; - headers: RawHttpHeaders & EnableJob202Headers; -} - -export interface EnableJobDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface TerminateJob202Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has been accepted for processing, but processing has not yet completed. */ -export interface TerminateJob202Response extends HttpResponse { - status: "202"; - headers: RawHttpHeaders & TerminateJob202Headers; -} - -export interface TerminateJobDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface CreateJob201Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded and a new resource has been created as a result. */ -export interface CreateJob201Response extends HttpResponse { - status: "201"; - headers: RawHttpHeaders & CreateJob201Headers; -} - -export interface CreateJobDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ListJobs200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ListJobs200Response extends HttpResponse { - status: "200"; - body: BatchJobListResultOutput; - headers: RawHttpHeaders & ListJobs200Headers; -} - -export interface ListJobsDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ListJobsFromSchedule200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ListJobsFromSchedule200Response extends HttpResponse { - status: "200"; - body: BatchJobListResultOutput; - headers: RawHttpHeaders & ListJobsFromSchedule200Headers; -} - -export interface ListJobsFromScheduleDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ListJobPreparationAndReleaseTaskStatus200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ListJobPreparationAndReleaseTaskStatus200Response - extends HttpResponse { - status: "200"; - body: BatchJobPreparationAndReleaseTaskStatusListResultOutput; - headers: RawHttpHeaders & ListJobPreparationAndReleaseTaskStatus200Headers; -} - -export interface ListJobPreparationAndReleaseTaskStatusDefaultResponse - extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface GetJobTaskCounts200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface GetJobTaskCounts200Response extends HttpResponse { - status: "200"; - body: BatchTaskCountsResultOutput; - headers: RawHttpHeaders & GetJobTaskCounts200Headers; -} - -export interface GetJobTaskCountsDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface JobScheduleExists200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface JobScheduleExists200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & JobScheduleExists200Headers; -} - -/** The server cannot find the requested resource. */ -export interface JobScheduleExists404Response extends HttpResponse { - status: "404"; -} - -export interface JobScheduleExistsDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface DeleteJobSchedule202Headers { - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has been accepted for processing, but processing has not yet completed. */ -export interface DeleteJobSchedule202Response extends HttpResponse { - status: "202"; - headers: RawHttpHeaders & DeleteJobSchedule202Headers; -} - -export interface DeleteJobScheduleDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface GetJobSchedule200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface GetJobSchedule200Response extends HttpResponse { - status: "200"; - body: BatchJobScheduleOutput; - headers: RawHttpHeaders & GetJobSchedule200Headers; -} - -export interface GetJobScheduleDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface UpdateJobSchedule200Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface UpdateJobSchedule200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & UpdateJobSchedule200Headers; -} - -export interface UpdateJobScheduleDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ReplaceJobSchedule200Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ReplaceJobSchedule200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & ReplaceJobSchedule200Headers; -} - -export interface ReplaceJobScheduleDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface DisableJobSchedule204Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** There is no content to send for this request, but the headers may be useful. */ -export interface DisableJobSchedule204Response extends HttpResponse { - status: "204"; - headers: RawHttpHeaders & DisableJobSchedule204Headers; -} - -export interface DisableJobScheduleDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface EnableJobSchedule204Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** There is no content to send for this request, but the headers may be useful. */ -export interface EnableJobSchedule204Response extends HttpResponse { - status: "204"; - headers: RawHttpHeaders & EnableJobSchedule204Headers; -} - -export interface EnableJobScheduleDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface TerminateJobSchedule202Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has been accepted for processing, but processing has not yet completed. */ -export interface TerminateJobSchedule202Response extends HttpResponse { - status: "202"; - headers: RawHttpHeaders & TerminateJobSchedule202Headers; -} - -export interface TerminateJobScheduleDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface CreateJobSchedule201Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded and a new resource has been created as a result. */ -export interface CreateJobSchedule201Response extends HttpResponse { - status: "201"; - headers: RawHttpHeaders & CreateJobSchedule201Headers; -} - -export interface CreateJobScheduleDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ListJobSchedules200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ListJobSchedules200Response extends HttpResponse { - status: "200"; - body: BatchJobScheduleListResultOutput; - headers: RawHttpHeaders & ListJobSchedules200Headers; -} - -export interface ListJobSchedulesDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface CreateTask201Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded and a new resource has been created as a result. */ -export interface CreateTask201Response extends HttpResponse { - status: "201"; - headers: RawHttpHeaders & CreateTask201Headers; -} - -export interface CreateTaskDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ListTasks200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ListTasks200Response extends HttpResponse { - status: "200"; - body: BatchTaskListResultOutput; - headers: RawHttpHeaders & ListTasks200Headers; -} - -export interface ListTasksDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface CreateTaskCollection200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface CreateTaskCollection200Response extends HttpResponse { - status: "200"; - body: BatchTaskAddCollectionResultOutput; - headers: RawHttpHeaders & CreateTaskCollection200Headers; -} - -export interface CreateTaskCollectionDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface DeleteTask200Headers { - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface DeleteTask200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & DeleteTask200Headers; -} - -export interface DeleteTaskDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface GetTask200Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface GetTask200Response extends HttpResponse { - status: "200"; - body: BatchTaskOutput; - headers: RawHttpHeaders & GetTask200Headers; -} - -export interface GetTaskDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ReplaceTask200Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ReplaceTask200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & ReplaceTask200Headers; -} - -export interface ReplaceTaskDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ListSubTasks200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ListSubTasks200Response extends HttpResponse { - status: "200"; - body: BatchTaskListSubtasksResultOutput; - headers: RawHttpHeaders & ListSubTasks200Headers; -} - -export interface ListSubTasksDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface TerminateTask204Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** There is no content to send for this request, but the headers may be useful. */ -export interface TerminateTask204Response extends HttpResponse { - status: "204"; - headers: RawHttpHeaders & TerminateTask204Headers; -} - -export interface TerminateTaskDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ReactivateTask204Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** There is no content to send for this request, but the headers may be useful. */ -export interface ReactivateTask204Response extends HttpResponse { - status: "204"; - headers: RawHttpHeaders & ReactivateTask204Headers; -} - -export interface ReactivateTaskDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface DeleteTaskFile200Headers { - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface DeleteTaskFile200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & DeleteTaskFile200Headers; -} - -export interface DeleteTaskFileDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface GetTaskFile200Headers { - /** The length of the file. */ - "content-length": string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** Whether the object represents a directory. */ - "ocp-batch-file-isdirectory": boolean; - /** The file mode attribute in octal format. */ - "ocp-batch-file-mode": string; - /** The URL of the file. */ - "ocp-batch-file-url": string; - /** The file creation time. */ - "ocp-creation-time"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; - /** Type of content */ - "content-type": "application/octet-stream"; -} - -/** The request has succeeded. */ -export interface GetTaskFile200Response extends HttpResponse { - status: "200"; - /** Value may contain any sequence of octets */ - body: Uint8Array; - headers: RawHttpHeaders & GetTaskFile200Headers; -} - -export interface GetTaskFileDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface GetTaskFileProperties200Headers { - /** The length of the file. */ - "content-length": string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** Whether the object represents a directory. */ - "ocp-batch-file-isdirectory": boolean; - /** The file mode attribute in octal format. */ - "ocp-batch-file-mode": string; - /** The URL of the file. */ - "ocp-batch-file-url": string; - /** The file creation time. */ - "ocp-creation-time"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface GetTaskFileProperties200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & GetTaskFileProperties200Headers; -} - -export interface GetTaskFilePropertiesDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ListTaskFiles200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ListTaskFiles200Response extends HttpResponse { - status: "200"; - body: BatchNodeFileListResultOutput; - headers: RawHttpHeaders & ListTaskFiles200Headers; -} - -export interface ListTaskFilesDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface CreateNodeUser201Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded and a new resource has been created as a result. */ -export interface CreateNodeUser201Response extends HttpResponse { - status: "201"; - headers: RawHttpHeaders & CreateNodeUser201Headers; -} - -export interface CreateNodeUserDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface DeleteNodeUser200Headers { - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface DeleteNodeUser200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & DeleteNodeUser200Headers; -} - -export interface DeleteNodeUserDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ReplaceNodeUser200Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ReplaceNodeUser200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & ReplaceNodeUser200Headers; -} - -export interface ReplaceNodeUserDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface GetNode200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface GetNode200Response extends HttpResponse { - status: "200"; - body: BatchNodeOutput; - headers: RawHttpHeaders & GetNode200Headers; -} - -export interface GetNodeDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface RebootNode202Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has been accepted for processing, but processing has not yet completed. */ -export interface RebootNode202Response extends HttpResponse { - status: "202"; - headers: RawHttpHeaders & RebootNode202Headers; -} - -export interface RebootNodeDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface StartNode202Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has been accepted for processing, but processing has not yet completed. */ -export interface StartNode202Response extends HttpResponse { - status: "202"; - headers: RawHttpHeaders & StartNode202Headers; -} - -export interface StartNodeDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface DeallocateNode202Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has been accepted for processing, but processing has not yet completed. */ -export interface DeallocateNode202Response extends HttpResponse { - status: "202"; - headers: RawHttpHeaders & DeallocateNode202Headers; -} - -export interface DeallocateNodeDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ReimageNode202Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has been accepted for processing, but processing has not yet completed. */ -export interface ReimageNode202Response extends HttpResponse { - status: "202"; - headers: RawHttpHeaders & ReimageNode202Headers; -} - -export interface ReimageNodeDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface DisableNodeScheduling200Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface DisableNodeScheduling200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & DisableNodeScheduling200Headers; -} - -export interface DisableNodeSchedulingDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface EnableNodeScheduling200Headers { - /** The OData ID of the resource to which the request applied. */ - dataserviceid: string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface EnableNodeScheduling200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & EnableNodeScheduling200Headers; -} - -export interface EnableNodeSchedulingDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface GetNodeRemoteLoginSettings200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface GetNodeRemoteLoginSettings200Response extends HttpResponse { - status: "200"; - body: BatchNodeRemoteLoginSettingsOutput; - headers: RawHttpHeaders & GetNodeRemoteLoginSettings200Headers; -} - -export interface GetNodeRemoteLoginSettingsDefaultResponse - extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface UploadNodeLogs200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface UploadNodeLogs200Response extends HttpResponse { - status: "200"; - body: UploadBatchServiceLogsResultOutput; - headers: RawHttpHeaders & UploadNodeLogs200Headers; -} - -export interface UploadNodeLogsDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ListNodes200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ListNodes200Response extends HttpResponse { - status: "200"; - body: BatchNodeListResultOutput; - headers: RawHttpHeaders & ListNodes200Headers; -} - -export interface ListNodesDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface GetNodeExtension200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface GetNodeExtension200Response extends HttpResponse { - status: "200"; - body: BatchNodeVMExtensionOutput; - headers: RawHttpHeaders & GetNodeExtension200Headers; -} - -export interface GetNodeExtensionDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ListNodeExtensions200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ListNodeExtensions200Response extends HttpResponse { - status: "200"; - body: BatchNodeVMExtensionListResultOutput; - headers: RawHttpHeaders & ListNodeExtensions200Headers; -} - -export interface ListNodeExtensionsDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface DeleteNodeFile200Headers { - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface DeleteNodeFile200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & DeleteNodeFile200Headers; -} - -export interface DeleteNodeFileDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface GetNodeFile200Headers { - /** The length of the file. */ - "content-length": string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** Whether the object represents a directory. */ - "ocp-batch-file-isdirectory": boolean; - /** The file mode attribute in octal format. */ - "ocp-batch-file-mode": string; - /** The URL of the file. */ - "ocp-batch-file-url": string; - /** The file creation time. */ - "ocp-creation-time"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; - /** Type of content */ - "content-type": "application/octet-stream"; -} - -/** The request has succeeded. */ -export interface GetNodeFile200Response extends HttpResponse { - status: "200"; - /** Value may contain any sequence of octets */ - body: Uint8Array; - headers: RawHttpHeaders & GetNodeFile200Headers; -} - -export interface GetNodeFileDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface GetNodeFileProperties200Headers { - /** The length of the file. */ - "content-length": string; - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** Whether the object represents a directory. */ - "ocp-batch-file-isdirectory": boolean; - /** The file mode attribute in octal format. */ - "ocp-batch-file-mode": string; - /** The URL of the file. */ - "ocp-batch-file-url": string; - /** The file creation time. */ - "ocp-creation-time"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface GetNodeFileProperties200Response extends HttpResponse { - status: "200"; - headers: RawHttpHeaders & GetNodeFileProperties200Headers; -} - -export interface GetNodeFilePropertiesDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} - -export interface ListNodeFiles200Headers { - /** The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. */ - etag?: string; - /** The time at which the resource was last modified. */ - "last-modified"?: string; - /** The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true. */ - "client-request-id"?: string; - /** A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in. */ - "request-id"?: string; -} - -/** The request has succeeded. */ -export interface ListNodeFiles200Response extends HttpResponse { - status: "200"; - body: BatchNodeFileListResultOutput; - headers: RawHttpHeaders & ListNodeFiles200Headers; -} - -export interface ListNodeFilesDefaultResponse extends HttpResponse { - status: string; - body: BatchErrorOutput; -} diff --git a/sdk/batch/batch-rest/package.json b/sdk/batch/batch-rest/package.json index c88a6305ca66..8e4b02a2928d 100644 --- a/sdk/batch/batch-rest/package.json +++ b/sdk/batch/batch-rest/package.json @@ -1,6 +1,6 @@ { "name": "@azure-rest/batch", - "version": "1.0.0-beta.2", + "version": "1.0.0", "description": "Batch Service Rest Level Client", "engines": { "node": ">=18.0.0" @@ -8,7 +8,6 @@ "sideEffects": false, "autoPublish": false, "tshy": { - "project": "./tsconfig.src.json", "exports": { "./package.json": "./package.json", ".": "./src/index.ts" @@ -37,7 +36,9 @@ "files": [ "dist", "README.md", - "LICENSE" + "LICENSE", + "review/*", + "CHANGELOG.md" ], "sdk-type": "client", "repository": "github:Azure/azure-sdk-for-js", @@ -45,67 +46,61 @@ "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/batch/batch-rest/README.md", - "prettier": "./node_modules/@azure/eslint-plugin-azure-sdk/prettier.json", + "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", "//metadata": { "constantPaths": [ { "path": "src/batchClient.ts", - "prefix": "package-version" + "prefix": "userAgentInfo" } ] }, - "//sampleConfiguration": { - "productName": "Azure Batch provides Cloud-scale job scheduling and compute management.", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true - }, "dependencies": { "@azure-rest/core-client": "^2.3.1", - "@azure/core-auth": "^1.9.0", - "@azure/core-paging": "^1.6.2", - "@azure/core-rest-pipeline": "^1.18.0", - "@azure/logger": "^1.1.4", - "tslib": "^2.8.1" + "@azure/core-auth": "^1.6.0", + "@azure/core-rest-pipeline": "^1.5.0", + "@azure/logger": "^1.0.0", + "tslib": "^2.6.2" }, "devDependencies": { - "@azure-tools/test-credential": "^2.0.0", - "@azure-tools/test-recorder": "^4.1.0", - "@azure/core-util": "^1.0.0", - "@azure/dev-tool": "^1.0.0", - "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/identity": "^4.5.0", - "@types/node": "^18.0.0", - "@vitest/browser": "^2.1.6", - "@vitest/coverage-istanbul": "^2.1.6", "dotenv": "^16.0.0", + "@microsoft/api-extractor": "^7.40.3", + "@types/node": "^18.0.0", "eslint": "^9.9.0", - "moment": "^2.30.1", - "playwright": "^1.41.2", "typescript": "~5.6.2", - "vitest": "^2.1.6" + "@azure/identity": "^4.2.1", + "@vitest/browser": "^2.0.5", + "@vitest/coverage-istanbul": "^2.0.5", + "playwright": "^1.41.2", + "vitest": "^2.0.5", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.0.0", + "@azure/dev-tool": "^1.0.0", + "@azure/eslint-plugin-azure-sdk": "^3.0.0" }, "scripts": { - "build": "npm run clean && dev-tool run build-package && npm run extract-api", - "build:samples": "echo skipped", - "build:test": "echo skipped", - "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm dist-test temp types *.tgz *.log", - "execute:samples": "echo skipped", + "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "extract-api": "dev-tool run vendored rimraf review && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", - "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"", - "generate:client": "echo skipped", - "integration-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser", - "integration-test:node": "dev-tool run test:vitest --esm", + "pack": "npm pack 2>&1", "lint": "eslint package.json api-extractor.json src test", "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]", - "pack": "npm pack 2>&1", - "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "npm run build:test && dev-tool run test:vitest --browser", + "unit-test:node": "dev-tool run test:vitest", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "build:samples": "echo skipped", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "execute:samples": "echo skipped", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "generate:client": "echo skipped", "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node", - "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser", - "unit-test:node": "dev-tool run test:vitest", + "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", "update-snippets": "echo skipped" }, "exports": { @@ -130,6 +125,5 @@ } }, "main": "./dist/commonjs/index.js", - "types": "./dist/commonjs/index.d.ts", - "module": "./dist/esm/index.js" -} + "types": "./dist/commonjs/index.d.ts" +} \ No newline at end of file diff --git a/sdk/batch/batch-rest/review/batch.api.md b/sdk/batch/batch-rest/review/batch.api.md index faf259b419ff..0bdf5a190375 100644 --- a/sdk/batch/batch-rest/review/batch.api.md +++ b/sdk/batch/batch-rest/review/batch.api.md @@ -4,18 +4,15 @@ ```ts -import { AzureNamedKeyCredential } from '@azure/core-auth'; -import type { Client } from '@azure-rest/core-client'; -import type { ClientOptions } from '@azure-rest/core-client'; -import type { HttpResponse } from '@azure-rest/core-client'; -import type { PagedAsyncIterableIterator } from '@azure/core-paging'; -import type { PathUncheckedResponse } from '@azure-rest/core-client'; -import type { PipelinePolicy } from '@azure/core-rest-pipeline'; -import type { RawHttpHeaders } from '@azure/core-rest-pipeline'; -import type { RawHttpHeadersInput } from '@azure/core-rest-pipeline'; -import type { RequestParameters } from '@azure-rest/core-client'; -import type { StreamableMethod } from '@azure-rest/core-client'; -import type { TokenCredential } from '@azure/core-auth'; +import { Client } from '@azure-rest/core-client'; +import { ClientOptions } from '@azure-rest/core-client'; +import { HttpResponse } from '@azure-rest/core-client'; +import { PathUncheckedResponse } from '@azure-rest/core-client'; +import { RawHttpHeaders } from '@azure/core-rest-pipeline'; +import { RawHttpHeadersInput } from '@azure/core-rest-pipeline'; +import { RequestParameters } from '@azure-rest/core-client'; +import { StreamableMethod } from '@azure-rest/core-client'; +import { TokenCredential } from '@azure/core-auth'; // @public export type AccessScope = string; @@ -1635,11 +1632,8 @@ export type ContainerWorkingDirectory = string; // @public export type ContainerWorkingDirectoryOutput = string; -// @public (undocumented) -export function createBatchSharedKeyCredentialsPolicy(credentials: AzureNamedKeyCredential): PipelinePolicy; - // @public -function createClient(endpointParam: string, credentials: TokenCredential | AzureNamedKeyCredential, { apiVersion, ...options }?: BatchClientOptions): BatchClient; +function createClient(endpointParam: string, credentials: TokenCredential, { apiVersion, ...options }?: BatchClientOptions): BatchClient; export default createClient; // @public (undocumented) @@ -3310,6 +3304,20 @@ export interface GetApplicationQueryParamProperties { // @public export type GetArrayType = T extends Array ? TData : never; +// @public +export interface GetJob$expandQueryParam { + explode: false; + style: "form"; + value: string[]; +} + +// @public +export interface GetJob$selectQueryParam { + explode: false; + style: "form"; + value: string[]; +} + // @public (undocumented) export interface GetJob200Headers { "client-request-id"?: string; @@ -3364,11 +3372,25 @@ export interface GetJobQueryParam { // @public (undocumented) export interface GetJobQueryParamProperties { - $expand?: string[]; - $select?: string[]; + $expand?: string[] | GetJob$expandQueryParam; + $select?: string[] | GetJob$selectQueryParam; timeOut?: number; } +// @public +export interface GetJobSchedule$expandQueryParam { + explode: false; + style: "form"; + value: string[]; +} + +// @public +export interface GetJobSchedule$selectQueryParam { + explode: false; + style: "form"; + value: string[]; +} + // @public (undocumented) export interface GetJobSchedule200Headers { "client-request-id"?: string; @@ -3423,8 +3445,8 @@ export interface GetJobScheduleQueryParam { // @public (undocumented) export interface GetJobScheduleQueryParamProperties { - $expand?: string[]; - $select?: string[]; + $expand?: string[] | GetJobSchedule$expandQueryParam; + $select?: string[] | GetJobSchedule$selectQueryParam; timeOut?: number; } @@ -3486,6 +3508,13 @@ export interface GetJobTaskCountsQueryParamProperties { timeOut?: number; } +// @public +export interface GetNode$selectQueryParam { + explode: false; + style: "form"; + value: string[]; +} + // @public (undocumented) export interface GetNode { get(options?: GetNodeParameters): StreamableMethod; @@ -3517,6 +3546,13 @@ export interface GetNodeDefaultResponse extends HttpResponse { status: string; } +// @public +export interface GetNodeExtension$selectQueryParam { + explode: false; + style: "form"; + value: string[]; +} + // @public (undocumented) export interface GetNodeExtension { get(options?: GetNodeExtensionParameters): StreamableMethod; @@ -3572,7 +3608,7 @@ export interface GetNodeExtensionQueryParam { // @public (undocumented) export interface GetNodeExtensionQueryParamProperties { - $select?: string[]; + $select?: string[] | GetNodeExtension$selectQueryParam; timeOut?: number; } @@ -3719,7 +3755,7 @@ export interface GetNodeQueryParam { // @public (undocumented) export interface GetNodeQueryParamProperties { - $select?: string[]; + $select?: string[] | GetNode$selectQueryParam; timeOut?: number; } @@ -3782,11 +3818,25 @@ export interface GetNodeRemoteLoginSettingsQueryParamProperties { } // @public -export type GetPage = (pageLink: string, maxPageSize?: number) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; +// @public +export interface GetPool$expandQueryParam { + explode: false; + style: "form"; + value: string[]; +} + +// @public +export interface GetPool$selectQueryParam { + explode: false; + style: "form"; + value: string[]; +} + // @public (undocumented) export interface GetPool200Headers { "client-request-id"?: string; @@ -3841,11 +3891,25 @@ export interface GetPoolQueryParam { // @public (undocumented) export interface GetPoolQueryParamProperties { - $expand?: string[]; - $select?: string[]; + $expand?: string[] | GetPool$expandQueryParam; + $select?: string[] | GetPool$selectQueryParam; timeOut?: number; } +// @public +export interface GetTask$expandQueryParam { + explode: false; + style: "form"; + value: string[]; +} + +// @public +export interface GetTask$selectQueryParam { + explode: false; + style: "form"; + value: string[]; +} + // @public (undocumented) export interface GetTask200Headers { "client-request-id"?: string; @@ -4020,8 +4084,8 @@ export interface GetTaskQueryParam { // @public (undocumented) export interface GetTaskQueryParamProperties { - $expand?: string[]; - $select?: string[]; + $expand?: string[] | GetTask$expandQueryParam; + $select?: string[] | GetTask$selectQueryParam; timeOut?: number; } @@ -4473,6 +4537,13 @@ export interface ListApplicationsQueryParamProperties { timeOut?: number; } +// @public +export interface ListJobPreparationAndReleaseTaskStatus$selectQueryParam { + explode: false; + style: "form"; + value: string[]; +} + // @public (undocumented) export interface ListJobPreparationAndReleaseTaskStatus { get(options?: ListJobPreparationAndReleaseTaskStatusParameters): StreamableMethod; @@ -4529,11 +4600,25 @@ export interface ListJobPreparationAndReleaseTaskStatusQueryParam { // @public (undocumented) export interface ListJobPreparationAndReleaseTaskStatusQueryParamProperties { $filter?: string; - $select?: string[]; + $select?: string[] | ListJobPreparationAndReleaseTaskStatus$selectQueryParam; maxresults?: number; timeOut?: number; } +// @public +export interface ListJobs$expandQueryParam { + explode: false; + style: "form"; + value: string[]; +} + +// @public +export interface ListJobs$selectQueryParam { + explode: false; + style: "form"; + value: string[]; +} + // @public (undocumented) export interface ListJobs200Headers { "client-request-id"?: string; @@ -4552,6 +4637,20 @@ export interface ListJobs200Response extends HttpResponse { status: "200"; } +// @public +export interface ListJobSchedules$expandQueryParam { + explode: false; + style: "form"; + value: string[]; +} + +// @public +export interface ListJobSchedules$selectQueryParam { + explode: false; + style: "form"; + value: string[]; +} + // @public (undocumented) export interface ListJobSchedules200Headers { "client-request-id"?: string; @@ -4602,9 +4701,9 @@ export interface ListJobSchedulesQueryParam { // @public (undocumented) export interface ListJobSchedulesQueryParamProperties { - $expand?: string[]; + $expand?: string[] | ListJobSchedules$expandQueryParam; $filter?: string; - $select?: string[]; + $select?: string[] | ListJobSchedules$selectQueryParam; maxresults?: number; timeOut?: number; } @@ -4617,6 +4716,20 @@ export interface ListJobsDefaultResponse extends HttpResponse { status: string; } +// @public +export interface ListJobsFromSchedule$expandQueryParam { + explode: false; + style: "form"; + value: string[]; +} + +// @public +export interface ListJobsFromSchedule$selectQueryParam { + explode: false; + style: "form"; + value: string[]; +} + // @public (undocumented) export interface ListJobsFromSchedule { get(options?: ListJobsFromScheduleParameters): StreamableMethod; @@ -4672,9 +4785,9 @@ export interface ListJobsFromScheduleQueryParam { // @public (undocumented) export interface ListJobsFromScheduleQueryParamProperties { - $expand?: string[]; + $expand?: string[] | ListJobsFromSchedule$expandQueryParam; $filter?: string; - $select?: string[]; + $select?: string[] | ListJobsFromSchedule$selectQueryParam; maxresults?: number; timeOut?: number; } @@ -4703,13 +4816,20 @@ export interface ListJobsQueryParam { // @public (undocumented) export interface ListJobsQueryParamProperties { - $expand?: string[]; + $expand?: string[] | ListJobs$expandQueryParam; $filter?: string; - $select?: string[]; + $select?: string[] | ListJobs$selectQueryParam; maxresults?: number; timeOut?: number; } +// @public +export interface ListNodeExtensions$selectQueryParam { + explode: false; + style: "form"; + value: string[]; +} + // @public (undocumented) export interface ListNodeExtensions { get(options?: ListNodeExtensionsParameters): StreamableMethod; @@ -4765,7 +4885,7 @@ export interface ListNodeExtensionsQueryParam { // @public (undocumented) export interface ListNodeExtensionsQueryParamProperties { - $select?: string[]; + $select?: string[] | ListNodeExtensions$selectQueryParam; maxresults?: number; timeOut?: number; } @@ -4831,6 +4951,13 @@ export interface ListNodeFilesQueryParamProperties { timeOut?: number; } +// @public +export interface ListNodes$selectQueryParam { + explode: false; + style: "form"; + value: string[]; +} + // @public (undocumented) export interface ListNodes { get(options?: ListNodesParameters): StreamableMethod; @@ -4887,7 +5014,7 @@ export interface ListNodesQueryParam { // @public (undocumented) export interface ListNodesQueryParamProperties { $filter?: string; - $select?: string[]; + $select?: string[] | ListNodes$selectQueryParam; maxresults?: number; timeOut?: number; } @@ -4952,6 +5079,20 @@ export interface ListPoolNodeCountsQueryParamProperties { timeOut?: number; } +// @public +export interface ListPools$expandQueryParam { + explode: false; + style: "form"; + value: string[]; +} + +// @public +export interface ListPools$selectQueryParam { + explode: false; + style: "form"; + value: string[]; +} + // @public (undocumented) export interface ListPools200Headers { "client-request-id"?: string; @@ -5002,9 +5143,9 @@ export interface ListPoolsQueryParam { // @public (undocumented) export interface ListPoolsQueryParamProperties { - $expand?: string[]; + $expand?: string[] | ListPools$expandQueryParam; $filter?: string; - $select?: string[]; + $select?: string[] | ListPools$selectQueryParam; maxresults?: number; timeOut?: number; } @@ -5071,6 +5212,13 @@ export interface ListPoolUsageMetricsQueryParamProperties { timeOut?: number; } +// @public +export interface ListSubTasks$selectQueryParam { + explode: false; + style: "form"; + value: string[]; +} + // @public (undocumented) export interface ListSubTasks { get(options?: ListSubTasksParameters): StreamableMethod; @@ -5126,7 +5274,7 @@ export interface ListSubTasksQueryParam { // @public (undocumented) export interface ListSubTasksQueryParamProperties { - $select?: string[]; + $select?: string[] | ListSubTasks$selectQueryParam; timeOut?: number; } @@ -5251,6 +5399,20 @@ export interface ListTaskFilesQueryParamProperties { timeOut?: number; } +// @public +export interface ListTasks$expandQueryParam { + explode: false; + style: "form"; + value: string[]; +} + +// @public +export interface ListTasks$selectQueryParam { + explode: false; + style: "form"; + value: string[]; +} + // @public (undocumented) export interface ListTasks200Headers { "client-request-id"?: string; @@ -5301,9 +5463,9 @@ export interface ListTasksQueryParam { // @public (undocumented) export interface ListTasksQueryParamProperties { - $expand?: string[]; + $expand?: string[] | ListTasks$expandQueryParam; $filter?: string; - $select?: string[]; + $select?: string[] | ListTasks$selectQueryParam; maxresults?: number; timeOut?: number; } @@ -5523,6 +5685,18 @@ export interface OutputFileUploadConfigOutput { uploadCondition: OutputFileUploadConditionOutput; } +// @public +export interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator; + next(): Promise>; +} + +// @public +export interface PageSettings { + continuationToken?: string; +} + // @public export function paginate(client: Client, initialResponse: TResponse, options?: PagingOptions): PagedAsyncIterableIterator>; diff --git a/sdk/batch/batch-rest/sample.env b/sdk/batch/batch-rest/sample.env deleted file mode 100644 index 47cccb3cf4cb..000000000000 --- a/sdk/batch/batch-rest/sample.env +++ /dev/null @@ -1,3 +0,0 @@ -# Environment variable to use in the samples. - -BATCH_ACCOUNT_ENDPOINT= diff --git a/sdk/batch/batch-rest/samples-dev/quick-start.ts b/sdk/batch/batch-rest/samples-dev/quick-start.ts deleted file mode 100644 index df193acee16a..000000000000 --- a/sdk/batch/batch-rest/samples-dev/quick-start.ts +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * @summary Azure Batch quickstart sample - */ - -import type { - BatchClient, - CreateJobParameters, - CreatePoolParameters, - CreateTaskParameters, -} from "@azure-rest/batch"; -import createClient, { isUnexpected, paginate } from "@azure-rest/batch"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -const batchAccountEndpoint = process.env["BATCH_ACCOUNT_ENDPOINT"] || ""; -const poolName = "samplepool"; -const jobId = "samplejob2"; - -async function main(): Promise { - const credentials = new DefaultAzureCredential(); - const client = createClient(batchAccountEndpoint, credentials); - - await createPool(client); - - await createJob(client); - - await submitTasks(client); - - await listTasks(client); - - await waitForTasks(client); - - await cleanup(client); -} - -async function createPool(client: BatchClient): Promise { - const poolParams: CreatePoolParameters = { - body: { - id: poolName, - vmSize: "Standard_D1_v2", - virtualMachineConfiguration: { - nodeAgentSKUId: "batch.node.windows amd64", - imageReference: { - publisher: "microsoftwindowsserver", - offer: "windowsserver", - sku: "2022-datacenter", - }, - }, - networkConfiguration: { - enableAcceleratedNetworking: true, - }, - targetDedicatedNodes: 1, - }, - contentType: "application/json; odata=minimalmetadata", - }; - const result = await client.path("/pools").post(poolParams); - if (isUnexpected(result)) { - console.log(result.body); - throw new Error(`Failed to create pool: ${result.body.message}`); - } - console.log(`Pool ${poolName} created`); -} - -async function createJob(client: BatchClient): Promise { - const jobAddParam: CreateJobParameters = { - body: { - id: jobId, - poolInfo: { poolId: poolName }, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const result = await client.path("/jobs").post(jobAddParam); - if (isUnexpected(result)) { - throw new Error(`Failed to create job: ${result.body.message}`); - } - console.log(`Job ${jobId} created`); -} - -async function submitTasks(client: BatchClient): Promise { - for (let i = 1; i < 6; i++) { - const addTaskParam: CreateTaskParameters = { - body: { - id: `task${i}`, - commandLine: `cmd /c echo task-${i} > result.txt`, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const addTaskResult = await client.path("/jobs/{jobId}/tasks", jobId).post(addTaskParam); - if (isUnexpected(addTaskResult)) { - throw new Error(`Failed to add task ${i}: ${addTaskResult.body.message}`); - } - console.log(`Task ${i} added`); - } -} - -async function listTasks(client: BatchClient): Promise { - const result = await client - .path("/jobs/{jobId}/tasks", jobId) - .get({ queryParameters: { maxresults: 1 } }); - if (isUnexpected(result)) { - throw new Error(`Failed to list tasks: ${result.body.message}`); - } - console.log("Tasks first result:", result.body.value?.length); - const taskAsyncIterator = paginate(client, result); - - for await (const task of taskAsyncIterator) { - console.log(`- ${task.id}, state: ${task.state}`); - } -} - -async function waitForTasks(client: BatchClient): Promise { - console.log("Waiting for tasks to complete"); - while (true) { - const result = await client - .path("/jobs/{jobId}/tasks", jobId) - .get({ queryParameters: { maxresults: 1 } }); - if (isUnexpected(result)) { - throw new Error(`Failed to list tasks: ${result.body.message}`); - } - const taskAsyncIterator = paginate(client, result); - let isAllCompleted = true; - for await (const task of taskAsyncIterator) { - if (task.state !== "completed") { - console.log(`- ${task.id}, state: ${task.state}`); - isAllCompleted = false; - break; - } - } - if (isAllCompleted) { - console.log("All tasks completed"); - break; - } - await new Promise((resolve) => setTimeout(resolve, 5000)); - } -} - -async function cleanup(client: BatchClient): Promise { - const result = await client.path("/pools/{poolId}", poolName).delete(); - if (isUnexpected(result)) { - throw new Error(`Failed to delete pool: ${result.body.message}`); - } - console.log(`Pool ${poolName} deleted`); -} - -main().catch(console.error); diff --git a/sdk/batch/batch-rest/samples/v1-beta/javascript/README.md b/sdk/batch/batch-rest/samples/v1-beta/javascript/README.md deleted file mode 100644 index 1a9e0da58a2b..000000000000 --- a/sdk/batch/batch-rest/samples/v1-beta/javascript/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# Azure Batch provides Cloud-scale job scheduling and compute management. client library samples for JavaScript (Beta) - -These sample programs show how to use the JavaScript client libraries for Azure Batch provides Cloud-scale job scheduling and compute management. in some common scenarios. - -| **File Name** | **Description** | -| ----------------------------- | ----------------------------- | -| [quick-start.js][quick-start] | Azure Batch quickstart sample | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node quick-start.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx dev-tool run vendored cross-env BATCH_ACCOUNT_ENDPOINT="" node quick-start.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[quick-start]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/batch/batch-rest/samples/v1-beta/javascript/quick-start.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/batch -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/batch/batch-rest/README.md diff --git a/sdk/batch/batch-rest/samples/v1-beta/javascript/package.json b/sdk/batch/batch-rest/samples/v1-beta/javascript/package.json deleted file mode 100644 index dfd4c24d77c2..000000000000 --- a/sdk/batch/batch-rest/samples/v1-beta/javascript/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "@azure-samples/batch-js-beta", - "private": true, - "version": "1.0.0", - "description": "Azure Batch provides Cloud-scale job scheduling and compute management. client library samples for JavaScript (Beta)", - "engines": { - "node": ">=18.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/batch/batch-rest" - }, - "keywords": [ - "node", - "azure", - "cloud", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/batch/batch-rest", - "dependencies": { - "@azure-rest/batch": "next", - "dotenv": "latest", - "@azure/identity": "^4.0.1" - } -} diff --git a/sdk/batch/batch-rest/samples/v1-beta/javascript/quick-start.js b/sdk/batch/batch-rest/samples/v1-beta/javascript/quick-start.js deleted file mode 100644 index 58419a9544a3..000000000000 --- a/sdk/batch/batch-rest/samples/v1-beta/javascript/quick-start.js +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * @summary Azure Batch quickstart sample - */ - -const createClient = require("@azure-rest/batch").default, - { isUnexpected, paginate } = require("@azure-rest/batch"); -const { DefaultAzureCredential } = require("@azure/identity"); - -// Load the .env file if it exists -// eslint-disable-next-line import/no-extraneous-dependencies -require("dotenv").config(); - -const batchAccountEndpoint = process.env["BATCH_ACCOUNT_ENDPOINT"] || ""; -const poolName = "samplepool"; -const jobId = "samplejob2"; - -async function main() { - const credentials = new DefaultAzureCredential(); - const client = createClient(batchAccountEndpoint, credentials); - - await createPool(client); - - await createJob(client); - - await submitTasks(client); - - await listTasks(client); - - await waitForTasks(client); - - await cleanup(client); -} - -async function createPool(client) { - const poolParams = { - body: { - id: poolName, - vmSize: "Standard_D1_v2", - virtualMachineConfiguration: { - nodeAgentSKUId: "batch.node.windows amd64", - imageReference: { - publisher: "microsoftwindowsserver", - offer: "windowsserver", - sku: "2022-datacenter", - }, - }, - networkConfiguration: { - enableAcceleratedNetworking: true, - }, - targetDedicatedNodes: 1, - }, - contentType: "application/json; odata=minimalmetadata", - }; - const result = await client.path("/pools").post(poolParams); - if (isUnexpected(result)) { - console.log(result.body); - throw new Error(`Failed to create pool: ${result.body.message}`); - } - console.log(`Pool ${poolName} created`); -} - -async function createJob(client) { - const jobAddParam = { - body: { - id: jobId, - poolInfo: { poolId: poolName }, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const result = await client.path("/jobs").post(jobAddParam); - if (isUnexpected(result)) { - throw new Error(`Failed to create job: ${result.body.message}`); - } - console.log(`Job ${jobId} created`); -} - -async function submitTasks(client) { - for (let i = 1; i < 6; i++) { - const addTaskParam = { - body: { - id: `task${i}`, - commandLine: `cmd /c echo task-${i} > result.txt`, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const addTaskResult = await client.path("/jobs/{jobId}/tasks", jobId).post(addTaskParam); - if (isUnexpected(addTaskResult)) { - throw new Error(`Failed to add task ${i}: ${addTaskResult.body.message}`); - } - console.log(`Task ${i} added`); - } -} - -async function listTasks(client) { - const result = await client - .path("/jobs/{jobId}/tasks", jobId) - .get({ queryParameters: { maxresults: 1 } }); - if (isUnexpected(result)) { - throw new Error(`Failed to list tasks: ${result.body.message}`); - } - console.log("Tasks first result:", result.body.value?.length); - const taskAsyncIterator = paginate(client, result); - - for await (const task of taskAsyncIterator) { - console.log(`- ${task.id}, state: ${task.state}`); - } -} - -async function waitForTasks(client) { - console.log("Waiting for tasks to complete"); - while (true) { - const result = await client - .path("/jobs/{jobId}/tasks", jobId) - .get({ queryParameters: { maxresults: 1 } }); - if (isUnexpected(result)) { - throw new Error(`Failed to list tasks: ${result.body.message}`); - } - const taskAsyncIterator = paginate(client, result); - let isAllCompleted = true; - for await (const task of taskAsyncIterator) { - if (task.state !== "completed") { - console.log(`- ${task.id}, state: ${task.state}`); - isAllCompleted = false; - break; - } - } - if (isAllCompleted) { - console.log("All tasks completed"); - break; - } - await new Promise((resolve) => setTimeout(resolve, 5000)); - } -} - -async function cleanup(client) { - const result = await client.path("/pools/{poolId}", poolName).delete(); - if (isUnexpected(result)) { - throw new Error(`Failed to delete pool: ${result.body.message}`); - } - console.log(`Pool ${poolName} deleted`); -} - -main().catch(console.error); diff --git a/sdk/batch/batch-rest/samples/v1-beta/javascript/sample.env b/sdk/batch/batch-rest/samples/v1-beta/javascript/sample.env deleted file mode 100644 index 47cccb3cf4cb..000000000000 --- a/sdk/batch/batch-rest/samples/v1-beta/javascript/sample.env +++ /dev/null @@ -1,3 +0,0 @@ -# Environment variable to use in the samples. - -BATCH_ACCOUNT_ENDPOINT= diff --git a/sdk/batch/batch-rest/samples/v1-beta/typescript/README.md b/sdk/batch/batch-rest/samples/v1-beta/typescript/README.md deleted file mode 100644 index 40d23d3521dd..000000000000 --- a/sdk/batch/batch-rest/samples/v1-beta/typescript/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# Azure Batch provides Cloud-scale job scheduling and compute management. client library samples for TypeScript (Beta) - -These sample programs show how to use the TypeScript client libraries for Azure Batch provides Cloud-scale job scheduling and compute management. in some common scenarios. - -| **File Name** | **Description** | -| ----------------------------- | ----------------------------- | -| [quick-start.ts][quick-start] | Azure Batch quickstart sample | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/quick-start.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx dev-tool run vendored cross-env BATCH_ACCOUNT_ENDPOINT="" node dist/quick-start.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[quick-start]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/batch/batch-rest/samples/v1-beta/typescript/src/quick-start.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/batch -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/batch/batch-rest/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/batch/batch-rest/samples/v1-beta/typescript/package.json b/sdk/batch/batch-rest/samples/v1-beta/typescript/package.json deleted file mode 100644 index dea4c898a680..000000000000 --- a/sdk/batch/batch-rest/samples/v1-beta/typescript/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@azure-samples/batch-ts-beta", - "private": true, - "version": "1.0.0", - "description": "Azure Batch provides Cloud-scale job scheduling and compute management. client library samples for TypeScript (Beta)", - "engines": { - "node": ">=18.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/batch/batch-rest" - }, - "keywords": [ - "node", - "azure", - "cloud", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/batch/batch-rest", - "dependencies": { - "@azure-rest/batch": "next", - "dotenv": "latest", - "@azure/identity": "^4.0.1" - }, - "devDependencies": { - "@types/node": "^18.0.0", - "typescript": "~5.6.2", - "rimraf": "latest" - } -} diff --git a/sdk/batch/batch-rest/samples/v1-beta/typescript/sample.env b/sdk/batch/batch-rest/samples/v1-beta/typescript/sample.env deleted file mode 100644 index 47cccb3cf4cb..000000000000 --- a/sdk/batch/batch-rest/samples/v1-beta/typescript/sample.env +++ /dev/null @@ -1,3 +0,0 @@ -# Environment variable to use in the samples. - -BATCH_ACCOUNT_ENDPOINT= diff --git a/sdk/batch/batch-rest/samples/v1-beta/typescript/src/quick-start.ts b/sdk/batch/batch-rest/samples/v1-beta/typescript/src/quick-start.ts deleted file mode 100644 index 2f98782f9046..000000000000 --- a/sdk/batch/batch-rest/samples/v1-beta/typescript/src/quick-start.ts +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * @summary Azure Batch quickstart sample - */ - -import createClient, { - BatchClient, - CreateJobParameters, - CreatePoolParameters, - CreateTaskParameters, - isUnexpected, - paginate, -} from "@azure-rest/batch"; -import { DefaultAzureCredential } from "@azure/identity"; - -// Load the .env file if it exists -// eslint-disable-next-line import/no-extraneous-dependencies -import * as dotenv from "dotenv"; -dotenv.config(); - -const batchAccountEndpoint = process.env["BATCH_ACCOUNT_ENDPOINT"] || ""; -const poolName = "samplepool"; -const jobId = "samplejob2"; - -async function main() { - const credentials = new DefaultAzureCredential(); - const client = createClient(batchAccountEndpoint, credentials); - - await createPool(client); - - await createJob(client); - - await submitTasks(client); - - await listTasks(client); - - await waitForTasks(client); - - await cleanup(client); -} - -async function createPool(client: BatchClient) { - const poolParams: CreatePoolParameters = { - body: { - id: poolName, - vmSize: "Standard_D1_v2", - virtualMachineConfiguration: { - nodeAgentSKUId: "batch.node.windows amd64", - imageReference: { - publisher: "microsoftwindowsserver", - offer: "windowsserver", - sku: "2022-datacenter", - }, - }, - networkConfiguration: { - enableAcceleratedNetworking: true, - }, - targetDedicatedNodes: 1, - }, - contentType: "application/json; odata=minimalmetadata", - }; - const result = await client.path("/pools").post(poolParams); - if (isUnexpected(result)) { - console.log(result.body); - throw new Error(`Failed to create pool: ${result.body.message}`); - } - console.log(`Pool ${poolName} created`); -} - -async function createJob(client: BatchClient) { - const jobAddParam: CreateJobParameters = { - body: { - id: jobId, - poolInfo: { poolId: poolName }, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const result = await client.path("/jobs").post(jobAddParam); - if (isUnexpected(result)) { - throw new Error(`Failed to create job: ${result.body.message}`); - } - console.log(`Job ${jobId} created`); -} - -async function submitTasks(client: BatchClient) { - for (let i = 1; i < 6; i++) { - const addTaskParam: CreateTaskParameters = { - body: { - id: `task${i}`, - commandLine: `cmd /c echo task-${i} > result.txt`, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const addTaskResult = await client.path("/jobs/{jobId}/tasks", jobId).post(addTaskParam); - if (isUnexpected(addTaskResult)) { - throw new Error(`Failed to add task ${i}: ${addTaskResult.body.message}`); - } - console.log(`Task ${i} added`); - } -} - -async function listTasks(client: BatchClient) { - const result = await client - .path("/jobs/{jobId}/tasks", jobId) - .get({ queryParameters: { maxresults: 1 } }); - if (isUnexpected(result)) { - throw new Error(`Failed to list tasks: ${result.body.message}`); - } - console.log("Tasks first result:", result.body.value?.length); - const taskAsyncIterator = paginate(client, result); - - for await (const task of taskAsyncIterator) { - console.log(`- ${task.id}, state: ${task.state}`); - } -} - -async function waitForTasks(client: BatchClient) { - console.log("Waiting for tasks to complete"); - while (true) { - const result = await client - .path("/jobs/{jobId}/tasks", jobId) - .get({ queryParameters: { maxresults: 1 } }); - if (isUnexpected(result)) { - throw new Error(`Failed to list tasks: ${result.body.message}`); - } - const taskAsyncIterator = paginate(client, result); - let isAllCompleted = true; - for await (const task of taskAsyncIterator) { - if (task.state !== "completed") { - console.log(`- ${task.id}, state: ${task.state}`); - isAllCompleted = false; - break; - } - } - if (isAllCompleted) { - console.log("All tasks completed"); - break; - } - await new Promise((resolve) => setTimeout(resolve, 5000)); - } -} - -async function cleanup(client: BatchClient) { - const result = await client.path("/pools/{poolId}", poolName).delete(); - if (isUnexpected(result)) { - throw new Error(`Failed to delete pool: ${result.body.message}`); - } - console.log(`Pool ${poolName} deleted`); -} - -main().catch(console.error); diff --git a/sdk/batch/batch-rest/samples/v1-beta/typescript/tsconfig.json b/sdk/batch/batch-rest/samples/v1-beta/typescript/tsconfig.json deleted file mode 100644 index 984eed535aa8..000000000000 --- a/sdk/batch/batch-rest/samples/v1-beta/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**/*.ts" - ] -} diff --git a/sdk/batch/batch-rest/src/batchClient.ts b/sdk/batch/batch-rest/src/batchClient.ts index 9beda7aeecb4..a9c83a85ea36 100644 --- a/sdk/batch/batch-rest/src/batchClient.ts +++ b/sdk/batch/batch-rest/src/batchClient.ts @@ -1,14 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { ClientOptions } from "@azure-rest/core-client"; -import { getClient } from "@azure-rest/core-client"; +import { getClient, ClientOptions } from "@azure-rest/core-client"; import { logger } from "./logger.js"; -import type { TokenCredential, AzureNamedKeyCredential } from "@azure/core-auth"; -import { isTokenCredential } from "@azure/core-auth"; -import type { BatchClient } from "./clientDefinitions.js"; -import { createBatchSharedKeyCredentialsPolicy } from "./credentials/batchSharedKeyCredentials.js"; -import { createReplacePoolPropertiesPolicy } from "./replacePoolPropertiesPolicy.js"; +import { TokenCredential } from "@azure/core-auth"; +import { BatchClient } from "./clientDefinitions.js"; /** The optional parameters for the client */ export interface BatchClientOptions extends ClientOptions { @@ -24,11 +20,11 @@ export interface BatchClientOptions extends ClientOptions { */ export default function createClient( endpointParam: string, - credentials: TokenCredential | AzureNamedKeyCredential, + credentials: TokenCredential, { apiVersion = "2024-07-01.20.0", ...options }: BatchClientOptions = {}, ): BatchClient { const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}`; - const userAgentInfo = `azsdk-js-batch-rest/1.0.0-beta.2`; + const userAgentInfo = `azsdk-js-batch-rest/1.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` @@ -43,50 +39,33 @@ export default function createClient( }, telemetryOptions: { clientRequestIdHeaderName: - options.telemetryOptions?.clientRequestIdHeaderName ?? "client-request-id", + options.telemetryOptions?.clientRequestIdHeaderName ?? + "client-request-id", }, credentials: { - scopes: options.credentials?.scopes ?? ["https://batch.core.windows.net//.default"], + scopes: options.credentials?.scopes ?? [ + "https://batch.core.windows.net//.default", + ], }, - additionalPolicies: [ - ...(options?.additionalPolicies ?? []), - // TODO: remove after service remove certificate feature completely - { - policy: createReplacePoolPropertiesPolicy(), - position: "perCall", - }, - ], }; + const client = getClient(endpointUrl, credentials, options) as BatchClient; - const addClientApiVersionPolicy = (client: BatchClient): BatchClient => { - client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); - client.pipeline.addPolicy({ - name: "ClientApiVersionPolicy", - sendRequest: (req, next) => { - // Use the apiVersion defined in request url directly - // Append one if there is no apiVersion and we have one at client options - const url = new URL(req.url); - if (!url.searchParams.get("api-version") && apiVersion) { - req.url = `${req.url}${ - Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" - }api-version=${apiVersion}`; - } + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + client.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && apiVersion) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } - return next(req); - }, - }); - return client; - }; + return next(req); + }, + }); - // Customization for BatchClient, shouldn't be overwritten by codegen - if (isTokenCredential(credentials)) { - const client = getClient(endpointUrl, credentials, options) as BatchClient; - return addClientApiVersionPolicy(client); - } - // If the credentials are not a TokenCredential, we need to add a policy to handle the shared key auth. - const client = getClient(endpointUrl, options) as BatchClient; - const authPolicy = createBatchSharedKeyCredentialsPolicy(credentials); - addClientApiVersionPolicy(client); - client.pipeline.addPolicy(authPolicy); return client; } diff --git a/sdk/batch/batch-rest/src/clientDefinitions.ts b/sdk/batch/batch-rest/src/clientDefinitions.ts index 96a3ec35e164..4a122daf2aba 100644 --- a/sdk/batch/batch-rest/src/clientDefinitions.ts +++ b/sdk/batch/batch-rest/src/clientDefinitions.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { +import { ListApplicationsParameters, GetApplicationParameters, ListPoolUsageMetricsParameters, @@ -75,7 +75,7 @@ import type { GetNodeFilePropertiesParameters, ListNodeFilesParameters, } from "./parameters.js"; -import type { +import { ListApplications200Response, ListApplicationsDefaultResponse, GetApplication200Response, @@ -223,7 +223,7 @@ import type { ListNodeFiles200Response, ListNodeFilesDefaultResponse, } from "./responses.js"; -import type { Client, StreamableMethod } from "@azure-rest/core-client"; +import { Client, StreamableMethod } from "@azure-rest/core-client"; export interface ListApplications { /** @@ -235,7 +235,9 @@ export interface ListApplications { */ get( options?: ListApplicationsParameters, - ): StreamableMethod; + ): StreamableMethod< + ListApplications200Response | ListApplicationsDefaultResponse + >; } export interface GetApplication { @@ -248,7 +250,9 @@ export interface GetApplication { */ get( options?: GetApplicationParameters, - ): StreamableMethod; + ): StreamableMethod< + GetApplication200Response | GetApplicationDefaultResponse + >; } export interface ListPoolUsageMetrics { @@ -262,7 +266,9 @@ export interface ListPoolUsageMetrics { */ get( options?: ListPoolUsageMetricsParameters, - ): StreamableMethod; + ): StreamableMethod< + ListPoolUsageMetrics200Response | ListPoolUsageMetricsDefaultResponse + >; } export interface CreatePool { @@ -301,9 +307,13 @@ export interface DeletePool { /** Gets basic properties of a Pool. */ head( options?: PoolExistsParameters, - ): StreamableMethod; + ): StreamableMethod< + PoolExists200Response | PoolExists404Response | PoolExistsDefaultResponse + >; /** Gets information about the specified Pool. */ - get(options?: GetPoolParameters): StreamableMethod; + get( + options?: GetPoolParameters, + ): StreamableMethod; /** * This only replaces the Pool properties specified in the request. For example, * if the Pool has a StartTask associated with it, and a request does not specify @@ -318,7 +328,9 @@ export interface DisablePoolAutoScale { /** Disables automatic scaling for a Pool. */ post( options?: DisablePoolAutoScaleParameters, - ): StreamableMethod; + ): StreamableMethod< + DisablePoolAutoScale200Response | DisablePoolAutoScaleDefaultResponse + >; } export interface EnablePoolAutoScale { @@ -332,7 +344,9 @@ export interface EnablePoolAutoScale { */ post( options: EnablePoolAutoScaleParameters, - ): StreamableMethod; + ): StreamableMethod< + EnablePoolAutoScale200Response | EnablePoolAutoScaleDefaultResponse + >; } export interface EvaluatePoolAutoScale { @@ -343,7 +357,9 @@ export interface EvaluatePoolAutoScale { */ post( options: EvaluatePoolAutoScaleParameters, - ): StreamableMethod; + ): StreamableMethod< + EvaluatePoolAutoScale200Response | EvaluatePoolAutoScaleDefaultResponse + >; } export interface ResizePool { @@ -373,7 +389,9 @@ export interface StopPoolResize { */ post( options?: StopPoolResizeParameters, - ): StreamableMethod; + ): StreamableMethod< + StopPoolResize202Response | StopPoolResizeDefaultResponse + >; } export interface ReplacePoolProperties { @@ -384,7 +402,9 @@ export interface ReplacePoolProperties { */ post( options: ReplacePoolPropertiesParameters, - ): StreamableMethod; + ): StreamableMethod< + ReplacePoolProperties204Response | ReplacePoolPropertiesDefaultResponse + >; } export interface RemoveNodes { @@ -402,7 +422,9 @@ export interface ListSupportedImages { /** Lists all Virtual Machine Images supported by the Azure Batch service. */ get( options?: ListSupportedImagesParameters, - ): StreamableMethod; + ): StreamableMethod< + ListSupportedImages200Response | ListSupportedImagesDefaultResponse + >; } export interface ListPoolNodeCounts { @@ -413,7 +435,9 @@ export interface ListPoolNodeCounts { */ get( options?: ListPoolNodeCountsParameters, - ): StreamableMethod; + ): StreamableMethod< + ListPoolNodeCounts200Response | ListPoolNodeCountsDefaultResponse + >; } export interface DeleteJob { @@ -431,7 +455,9 @@ export interface DeleteJob { options?: DeleteJobParameters, ): StreamableMethod; /** Gets information about the specified Job. */ - get(options?: GetJobParameters): StreamableMethod; + get( + options?: GetJobParameters, + ): StreamableMethod; /** * This replaces only the Job properties specified in the request. For example, if * the Job has constraints, and a request does not specify the constraints @@ -519,7 +545,9 @@ export interface ListJobsFromSchedule { /** Lists the Jobs that have been created under the specified Job Schedule. */ get( options?: ListJobsFromScheduleParameters, - ): StreamableMethod; + ): StreamableMethod< + ListJobsFromSchedule200Response | ListJobsFromScheduleDefaultResponse + >; } export interface ListJobPreparationAndReleaseTaskStatus { @@ -548,7 +576,9 @@ export interface GetJobTaskCounts { */ get( options?: GetJobTaskCountsParameters, - ): StreamableMethod; + ): StreamableMethod< + GetJobTaskCounts200Response | GetJobTaskCountsDefaultResponse + >; } export interface JobScheduleExists { @@ -556,7 +586,9 @@ export interface JobScheduleExists { head( options?: JobScheduleExistsParameters, ): StreamableMethod< - JobScheduleExists200Response | JobScheduleExists404Response | JobScheduleExistsDefaultResponse + | JobScheduleExists200Response + | JobScheduleExists404Response + | JobScheduleExistsDefaultResponse >; /** * When you delete a Job Schedule, this also deletes all Jobs and Tasks under that @@ -567,11 +599,15 @@ export interface JobScheduleExists { */ delete( options?: DeleteJobScheduleParameters, - ): StreamableMethod; + ): StreamableMethod< + DeleteJobSchedule202Response | DeleteJobScheduleDefaultResponse + >; /** Gets information about the specified Job Schedule. */ get( options?: GetJobScheduleParameters, - ): StreamableMethod; + ): StreamableMethod< + GetJobSchedule200Response | GetJobScheduleDefaultResponse + >; /** * This replaces only the Job Schedule properties specified in the request. For * example, if the schedule property is not specified with this request, then the @@ -581,7 +617,9 @@ export interface JobScheduleExists { */ patch( options: UpdateJobScheduleParameters, - ): StreamableMethod; + ): StreamableMethod< + UpdateJobSchedule200Response | UpdateJobScheduleDefaultResponse + >; /** * This fully replaces all the updatable properties of the Job Schedule. For * example, if the schedule property is not specified with this request, then the @@ -591,39 +629,51 @@ export interface JobScheduleExists { */ put( options: ReplaceJobScheduleParameters, - ): StreamableMethod; + ): StreamableMethod< + ReplaceJobSchedule200Response | ReplaceJobScheduleDefaultResponse + >; } export interface DisableJobSchedule { /** No new Jobs will be created until the Job Schedule is enabled again. */ post( options?: DisableJobScheduleParameters, - ): StreamableMethod; + ): StreamableMethod< + DisableJobSchedule204Response | DisableJobScheduleDefaultResponse + >; } export interface EnableJobSchedule { /** Enables a Job Schedule. */ post( options?: EnableJobScheduleParameters, - ): StreamableMethod; + ): StreamableMethod< + EnableJobSchedule204Response | EnableJobScheduleDefaultResponse + >; } export interface TerminateJobSchedule { /** Terminates a Job Schedule. */ post( options?: TerminateJobScheduleParameters, - ): StreamableMethod; + ): StreamableMethod< + TerminateJobSchedule202Response | TerminateJobScheduleDefaultResponse + >; } export interface CreateJobSchedule { /** Creates a Job Schedule to the specified Account. */ post( options: CreateJobScheduleParameters, - ): StreamableMethod; + ): StreamableMethod< + CreateJobSchedule201Response | CreateJobScheduleDefaultResponse + >; /** Lists all of the Job Schedules in the specified Account. */ get( options?: ListJobSchedulesParameters, - ): StreamableMethod; + ): StreamableMethod< + ListJobSchedules200Response | ListJobSchedulesDefaultResponse + >; } export interface CreateTask { @@ -664,7 +714,9 @@ export interface CreateTaskCollection { */ post( options: CreateTaskCollectionParameters, - ): StreamableMethod; + ): StreamableMethod< + CreateTaskCollection200Response | CreateTaskCollectionDefaultResponse + >; } export interface DeleteTask { @@ -683,7 +735,9 @@ export interface DeleteTask { * nodeInfo refer to the primary Task. Use the list subtasks API to retrieve * information about subtasks. */ - get(options?: GetTaskParameters): StreamableMethod; + get( + options?: GetTaskParameters, + ): StreamableMethod; /** Updates the properties of the specified Task. */ put( options: ReplaceTaskParameters, @@ -720,14 +774,18 @@ export interface ReactivateTask { */ post( options?: ReactivateTaskParameters, - ): StreamableMethod; + ): StreamableMethod< + ReactivateTask204Response | ReactivateTaskDefaultResponse + >; } export interface DeleteTaskFile { /** Deletes the specified Task file from the Compute Node where the Task ran. */ delete( options?: DeleteTaskFileParameters, - ): StreamableMethod; + ): StreamableMethod< + DeleteTaskFile200Response | DeleteTaskFileDefaultResponse + >; /** Returns the content of the specified Task file. */ get( options?: GetTaskFileParameters, @@ -735,7 +793,9 @@ export interface DeleteTaskFile { /** Gets the properties of the specified Task file. */ head( options?: GetTaskFilePropertiesParameters, - ): StreamableMethod; + ): StreamableMethod< + GetTaskFileProperties200Response | GetTaskFilePropertiesDefaultResponse + >; } export interface ListTaskFiles { @@ -752,7 +812,9 @@ export interface CreateNodeUser { */ post( options: CreateNodeUserParameters, - ): StreamableMethod; + ): StreamableMethod< + CreateNodeUser201Response | CreateNodeUserDefaultResponse + >; } export interface DeleteNodeUser { @@ -762,7 +824,9 @@ export interface DeleteNodeUser { */ delete( options?: DeleteNodeUserParameters, - ): StreamableMethod; + ): StreamableMethod< + DeleteNodeUser200Response | DeleteNodeUserDefaultResponse + >; /** * This operation replaces of all the updatable properties of the Account. For * example, if the expiryTime element is not specified, the current value is @@ -771,12 +835,16 @@ export interface DeleteNodeUser { */ put( options: ReplaceNodeUserParameters, - ): StreamableMethod; + ): StreamableMethod< + ReplaceNodeUser200Response | ReplaceNodeUserDefaultResponse + >; } export interface GetNode { /** Gets information about the specified Compute Node. */ - get(options?: GetNodeParameters): StreamableMethod; + get( + options?: GetNodeParameters, + ): StreamableMethod; } export interface RebootNode { @@ -797,7 +865,9 @@ export interface DeallocateNode { /** You can deallocate a Compute Node only if it is in an idle or running state. */ post( options: DeallocateNodeParameters, - ): StreamableMethod; + ): StreamableMethod< + DeallocateNode202Response | DeallocateNodeDefaultResponse + >; } export interface ReimageNode { @@ -818,7 +888,9 @@ export interface DisableNodeScheduling { */ post( options: DisableNodeSchedulingParameters, - ): StreamableMethod; + ): StreamableMethod< + DisableNodeScheduling200Response | DisableNodeSchedulingDefaultResponse + >; } export interface EnableNodeScheduling { @@ -828,7 +900,9 @@ export interface EnableNodeScheduling { */ post( options?: EnableNodeSchedulingParameters, - ): StreamableMethod; + ): StreamableMethod< + EnableNodeScheduling200Response | EnableNodeSchedulingDefaultResponse + >; } export interface GetNodeRemoteLoginSettings { @@ -839,7 +913,8 @@ export interface GetNodeRemoteLoginSettings { get( options?: GetNodeRemoteLoginSettingsParameters, ): StreamableMethod< - GetNodeRemoteLoginSettings200Response | GetNodeRemoteLoginSettingsDefaultResponse + | GetNodeRemoteLoginSettings200Response + | GetNodeRemoteLoginSettingsDefaultResponse >; } @@ -852,7 +927,9 @@ export interface UploadNodeLogs { */ post( options: UploadNodeLogsParameters, - ): StreamableMethod; + ): StreamableMethod< + UploadNodeLogs200Response | UploadNodeLogsDefaultResponse + >; } export interface ListNodes { @@ -866,21 +943,27 @@ export interface GetNodeExtension { /** Gets information about the specified Compute Node Extension. */ get( options?: GetNodeExtensionParameters, - ): StreamableMethod; + ): StreamableMethod< + GetNodeExtension200Response | GetNodeExtensionDefaultResponse + >; } export interface ListNodeExtensions { /** Lists the Compute Nodes Extensions in the specified Pool. */ get( options?: ListNodeExtensionsParameters, - ): StreamableMethod; + ): StreamableMethod< + ListNodeExtensions200Response | ListNodeExtensionsDefaultResponse + >; } export interface DeleteNodeFile { /** Deletes the specified file from the Compute Node. */ delete( options?: DeleteNodeFileParameters, - ): StreamableMethod; + ): StreamableMethod< + DeleteNodeFile200Response | DeleteNodeFileDefaultResponse + >; /** Returns the content of the specified Compute Node file. */ get( options?: GetNodeFileParameters, @@ -888,7 +971,9 @@ export interface DeleteNodeFile { /** Gets the properties of the specified Compute Node file. */ head( options?: GetNodeFilePropertiesParameters, - ): StreamableMethod; + ): StreamableMethod< + GetNodeFileProperties200Response | GetNodeFilePropertiesDefaultResponse + >; } export interface ListNodeFiles { @@ -902,7 +987,10 @@ export interface Routes { /** Resource for '/applications' has methods for the following verbs: get */ (path: "/applications"): ListApplications; /** Resource for '/applications/\{applicationId\}' has methods for the following verbs: get */ - (path: "/applications/{applicationId}", applicationId: string): GetApplication; + ( + path: "/applications/{applicationId}", + applicationId: string, + ): GetApplication; /** Resource for '/poolusagemetrics' has methods for the following verbs: get */ (path: "/poolusagemetrics"): ListPoolUsageMetrics; /** Resource for '/pools' has methods for the following verbs: post, get */ @@ -910,17 +998,29 @@ export interface Routes { /** Resource for '/pools/\{poolId\}' has methods for the following verbs: delete, head, get, patch */ (path: "/pools/{poolId}", poolId: string): DeletePool; /** Resource for '/pools/\{poolId\}/disableautoscale' has methods for the following verbs: post */ - (path: "/pools/{poolId}/disableautoscale", poolId: string): DisablePoolAutoScale; + ( + path: "/pools/{poolId}/disableautoscale", + poolId: string, + ): DisablePoolAutoScale; /** Resource for '/pools/\{poolId\}/enableautoscale' has methods for the following verbs: post */ - (path: "/pools/{poolId}/enableautoscale", poolId: string): EnablePoolAutoScale; + ( + path: "/pools/{poolId}/enableautoscale", + poolId: string, + ): EnablePoolAutoScale; /** Resource for '/pools/\{poolId\}/evaluateautoscale' has methods for the following verbs: post */ - (path: "/pools/{poolId}/evaluateautoscale", poolId: string): EvaluatePoolAutoScale; + ( + path: "/pools/{poolId}/evaluateautoscale", + poolId: string, + ): EvaluatePoolAutoScale; /** Resource for '/pools/\{poolId\}/resize' has methods for the following verbs: post */ (path: "/pools/{poolId}/resize", poolId: string): ResizePool; /** Resource for '/pools/\{poolId\}/stopresize' has methods for the following verbs: post */ (path: "/pools/{poolId}/stopresize", poolId: string): StopPoolResize; /** Resource for '/pools/\{poolId\}/updateproperties' has methods for the following verbs: post */ - (path: "/pools/{poolId}/updateproperties", poolId: string): ReplacePoolProperties; + ( + path: "/pools/{poolId}/updateproperties", + poolId: string, + ): ReplacePoolProperties; /** Resource for '/pools/\{poolId\}/removenodes' has methods for the following verbs: post */ (path: "/pools/{poolId}/removenodes", poolId: string): RemoveNodes; /** Resource for '/supportedimages' has methods for the following verbs: get */ @@ -938,7 +1038,10 @@ export interface Routes { /** Resource for '/jobs' has methods for the following verbs: post, get */ (path: "/jobs"): CreateJob; /** Resource for '/jobschedules/\{jobScheduleId\}/jobs' has methods for the following verbs: get */ - (path: "/jobschedules/{jobScheduleId}/jobs", jobScheduleId: string): ListJobsFromSchedule; + ( + path: "/jobschedules/{jobScheduleId}/jobs", + jobScheduleId: string, + ): ListJobsFromSchedule; /** Resource for '/jobs/\{jobId\}/jobpreparationandreleasetaskstatus' has methods for the following verbs: get */ ( path: "/jobs/{jobId}/jobpreparationandreleasetaskstatus", @@ -947,27 +1050,58 @@ export interface Routes { /** Resource for '/jobs/\{jobId\}/taskcounts' has methods for the following verbs: get */ (path: "/jobs/{jobId}/taskcounts", jobId: string): GetJobTaskCounts; /** Resource for '/jobschedules/\{jobScheduleId\}' has methods for the following verbs: head, delete, get, patch, put */ - (path: "/jobschedules/{jobScheduleId}", jobScheduleId: string): JobScheduleExists; + ( + path: "/jobschedules/{jobScheduleId}", + jobScheduleId: string, + ): JobScheduleExists; /** Resource for '/jobschedules/\{jobScheduleId\}/disable' has methods for the following verbs: post */ - (path: "/jobschedules/{jobScheduleId}/disable", jobScheduleId: string): DisableJobSchedule; + ( + path: "/jobschedules/{jobScheduleId}/disable", + jobScheduleId: string, + ): DisableJobSchedule; /** Resource for '/jobschedules/\{jobScheduleId\}/enable' has methods for the following verbs: post */ - (path: "/jobschedules/{jobScheduleId}/enable", jobScheduleId: string): EnableJobSchedule; + ( + path: "/jobschedules/{jobScheduleId}/enable", + jobScheduleId: string, + ): EnableJobSchedule; /** Resource for '/jobschedules/\{jobScheduleId\}/terminate' has methods for the following verbs: post */ - (path: "/jobschedules/{jobScheduleId}/terminate", jobScheduleId: string): TerminateJobSchedule; + ( + path: "/jobschedules/{jobScheduleId}/terminate", + jobScheduleId: string, + ): TerminateJobSchedule; /** Resource for '/jobschedules' has methods for the following verbs: post, get */ (path: "/jobschedules"): CreateJobSchedule; /** Resource for '/jobs/\{jobId\}/tasks' has methods for the following verbs: post, get */ (path: "/jobs/{jobId}/tasks", jobId: string): CreateTask; /** Resource for '/jobs/\{jobId\}/addtaskcollection' has methods for the following verbs: post */ - (path: "/jobs/{jobId}/addtaskcollection", jobId: string): CreateTaskCollection; + ( + path: "/jobs/{jobId}/addtaskcollection", + jobId: string, + ): CreateTaskCollection; /** Resource for '/jobs/\{jobId\}/tasks/\{taskId\}' has methods for the following verbs: delete, get, put */ - (path: "/jobs/{jobId}/tasks/{taskId}", jobId: string, taskId: string): DeleteTask; + ( + path: "/jobs/{jobId}/tasks/{taskId}", + jobId: string, + taskId: string, + ): DeleteTask; /** Resource for '/jobs/\{jobId\}/tasks/\{taskId\}/subtasksinfo' has methods for the following verbs: get */ - (path: "/jobs/{jobId}/tasks/{taskId}/subtasksinfo", jobId: string, taskId: string): ListSubTasks; + ( + path: "/jobs/{jobId}/tasks/{taskId}/subtasksinfo", + jobId: string, + taskId: string, + ): ListSubTasks; /** Resource for '/jobs/\{jobId\}/tasks/\{taskId\}/terminate' has methods for the following verbs: post */ - (path: "/jobs/{jobId}/tasks/{taskId}/terminate", jobId: string, taskId: string): TerminateTask; + ( + path: "/jobs/{jobId}/tasks/{taskId}/terminate", + jobId: string, + taskId: string, + ): TerminateTask; /** Resource for '/jobs/\{jobId\}/tasks/\{taskId\}/reactivate' has methods for the following verbs: post */ - (path: "/jobs/{jobId}/tasks/{taskId}/reactivate", jobId: string, taskId: string): ReactivateTask; + ( + path: "/jobs/{jobId}/tasks/{taskId}/reactivate", + jobId: string, + taskId: string, + ): ReactivateTask; /** Resource for '/jobs/\{jobId\}/tasks/\{taskId\}/files/\{filePath\}' has methods for the following verbs: delete, get, head */ ( path: "/jobs/{jobId}/tasks/{taskId}/files/{filePath}", @@ -976,9 +1110,17 @@ export interface Routes { filePath: string, ): DeleteTaskFile; /** Resource for '/jobs/\{jobId\}/tasks/\{taskId\}/files' has methods for the following verbs: get */ - (path: "/jobs/{jobId}/tasks/{taskId}/files", jobId: string, taskId: string): ListTaskFiles; + ( + path: "/jobs/{jobId}/tasks/{taskId}/files", + jobId: string, + taskId: string, + ): ListTaskFiles; /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/users' has methods for the following verbs: post */ - (path: "/pools/{poolId}/nodes/{nodeId}/users", poolId: string, nodeId: string): CreateNodeUser; + ( + path: "/pools/{poolId}/nodes/{nodeId}/users", + poolId: string, + nodeId: string, + ): CreateNodeUser; /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/users/\{userName\}' has methods for the following verbs: delete, put */ ( path: "/pools/{poolId}/nodes/{nodeId}/users/{userName}", @@ -987,11 +1129,23 @@ export interface Routes { userName: string, ): DeleteNodeUser; /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}' has methods for the following verbs: get */ - (path: "/pools/{poolId}/nodes/{nodeId}", poolId: string, nodeId: string): GetNode; + ( + path: "/pools/{poolId}/nodes/{nodeId}", + poolId: string, + nodeId: string, + ): GetNode; /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/reboot' has methods for the following verbs: post */ - (path: "/pools/{poolId}/nodes/{nodeId}/reboot", poolId: string, nodeId: string): RebootNode; + ( + path: "/pools/{poolId}/nodes/{nodeId}/reboot", + poolId: string, + nodeId: string, + ): RebootNode; /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/start' has methods for the following verbs: post */ - (path: "/pools/{poolId}/nodes/{nodeId}/start", poolId: string, nodeId: string): StartNode; + ( + path: "/pools/{poolId}/nodes/{nodeId}/start", + poolId: string, + nodeId: string, + ): StartNode; /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/deallocate' has methods for the following verbs: post */ ( path: "/pools/{poolId}/nodes/{nodeId}/deallocate", @@ -999,7 +1153,11 @@ export interface Routes { nodeId: string, ): DeallocateNode; /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/reimage' has methods for the following verbs: post */ - (path: "/pools/{poolId}/nodes/{nodeId}/reimage", poolId: string, nodeId: string): ReimageNode; + ( + path: "/pools/{poolId}/nodes/{nodeId}/reimage", + poolId: string, + nodeId: string, + ): ReimageNode; /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/disablescheduling' has methods for the following verbs: post */ ( path: "/pools/{poolId}/nodes/{nodeId}/disablescheduling", @@ -1047,7 +1205,11 @@ export interface Routes { filePath: string, ): DeleteNodeFile; /** Resource for '/pools/\{poolId\}/nodes/\{nodeId\}/files' has methods for the following verbs: get */ - (path: "/pools/{poolId}/nodes/{nodeId}/files", poolId: string, nodeId: string): ListNodeFiles; + ( + path: "/pools/{poolId}/nodes/{nodeId}/files", + poolId: string, + nodeId: string, + ): ListNodeFiles; } export type BatchClient = Client & { diff --git a/sdk/batch/batch-rest/src/credentials/batchSharedKeyCredentials-browser.mts b/sdk/batch/batch-rest/src/credentials/batchSharedKeyCredentials-browser.mts deleted file mode 100644 index c7aaa62a5424..000000000000 --- a/sdk/batch/batch-rest/src/credentials/batchSharedKeyCredentials-browser.mts +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { type AzureNamedKeyCredential } from "@azure/core-auth"; - -export function createBatchSharedKeyCredentialsPolicy( - // eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters - _: AzureNamedKeyCredential, -): never { - throw new Error("BatchSharedKeyCredentialsPolicy is not supported in browser environment"); -} diff --git a/sdk/batch/batch-rest/src/credentials/batchSharedKeyCredentials-react-native.mts b/sdk/batch/batch-rest/src/credentials/batchSharedKeyCredentials-react-native.mts deleted file mode 100644 index 64c86f094c36..000000000000 --- a/sdk/batch/batch-rest/src/credentials/batchSharedKeyCredentials-react-native.mts +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { type AzureNamedKeyCredential } from "@azure/core-auth"; - -export function createBatchSharedKeyCredentialsPolicy( - // eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters - _: AzureNamedKeyCredential, -): never { - throw new Error("BatchSharedKeyCredentialsPolicy is not supported in react native environment"); -} diff --git a/sdk/batch/batch-rest/src/credentials/batchSharedKeyCredentials.ts b/sdk/batch/batch-rest/src/credentials/batchSharedKeyCredentials.ts deleted file mode 100644 index ed9a60bebc41..000000000000 --- a/sdk/batch/batch-rest/src/credentials/batchSharedKeyCredentials.ts +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { type AzureNamedKeyCredential } from "@azure/core-auth"; -import type { HttpHeaders, HttpMethods, PipelinePolicy } from "@azure/core-rest-pipeline"; -import { createHmac } from "crypto"; - -export function createBatchSharedKeyCredentialsPolicy( - // eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters - credentials: AzureNamedKeyCredential, -): PipelinePolicy { - return { - name: "BatchSharedKeyCredentialsPolicy", - async sendRequest(request, next) { - const accountName = credentials.name; - const accountKey = Buffer.from(credentials.key, "base64"); - - const ocpDate = request.headers.get("ocp-date"); - if (!ocpDate) { - request.headers.set("ocp-date", new Date().toUTCString()); - } - - let stringToSign = - `${request.method}\n` + - getHeaderToAppend(request.headers, "Content-Encoding") + - getHeaderToAppend(request.headers, "Content-Language") + - getContentLengthToAppend(request.headers, request.method, request.body) + - getHeaderToAppend(request.headers, "Content-MD5") + - getHeaderToAppend(request.headers, "Content-Type") + - getHeaderToAppend(request.headers, "Date") + - getHeaderToAppend(request.headers, "If-Modified-Since") + - getHeaderToAppend(request.headers, "If-Match") + - getHeaderToAppend(request.headers, "If-None-Match") + - getHeaderToAppend(request.headers, "If-Unmodified-Since") + - getHeaderToAppend(request.headers, "Range"); - - // Add canonicalized headers - stringToSign += getCanonicalizedHeaders(request.headers); - - // Add canonicalized resource - stringToSign += getCanonicalizedResource(request.url, accountName); - - // Signed with sha256 - const signature = createHmac("sha256", accountKey) - .update(stringToSign, "utf8") - .digest("base64"); - - request.headers.set("Authorization", `SharedKey ${accountName}:${signature}`); - return next(request); - }, - }; -} - -/** - * Get header value, if header without value, append a newline - * @param headers - The pipeline headers object. - * @param headerName - The header name - * @returns The header value - */ -function getHeaderToAppend(headers: HttpHeaders, headerName: string): string { - return (headers.get(headerName) ?? "") + "\n"; -} - -/** - * Get content length - * @param headers - The pipeline headers object. - * @param method - The HTTP method - * @param body - The request body - * @returns The content length - */ -function getContentLengthToAppend(headers: HttpHeaders, method: HttpMethods, body?: any): string { - const contentLength = headers.get("Content-Length"); - - if (contentLength) { - return contentLength + "\n"; - } - - if (body) { - return Buffer.byteLength(body) + "\n"; - } - - // For POST verb, add 0 content-length - if (method === "POST") { - return "0\n"; - } - - return "\n"; -} -/** - * Constructs the Canonicalized Headers string. - * To construct the CanonicalizedHeaders portion of the signature string, - * follow these steps: 1. Retrieve all headers for the resource that begin - * with ocp-, including the ocp-date header. 2. Convert each HTTP header - * name to lowercase. 3. Sort the headers lexicographically by header name, - * in ascending order. Each header may appear only once in the - * string. 4. Unfold the string by replacing any breaking white space with a - * single space. 5. Trim any white space around the colon in the header. 6. - * Finally, append a new line character to each canonicalized header in the - * resulting list. Construct the CanonicalizedHeaders string by - * concatenating all headers in this list into a single string. - * - * @param headers - The pipeline headers object. - * @returns The canonicalized headers. - */ -function getCanonicalizedHeaders(headers: HttpHeaders): string { - let canonicalizedHeaders = ""; - const canonicalizedHeadersArray = []; - - for (const [key] of headers) { - const lowerCaseKey = key.toLocaleLowerCase(); - if (lowerCaseKey.startsWith("ocp-")) { - canonicalizedHeadersArray.push(lowerCaseKey); - } - } - - canonicalizedHeadersArray.sort(); - for (const currentHeader of canonicalizedHeadersArray) { - const headerValue = headers.get(currentHeader); - if (headerValue) { - canonicalizedHeaders += currentHeader.toLowerCase() + ":" + headerValue + "\n"; - } - } - return canonicalizedHeaders; -} - -/** - * Retrieves the header's canonicalized resource string. - * @param url - The URL of the resource. - * @param accountName - The batch account name. - * @returns The canonicalized resource string. - */ -function getCanonicalizedResource(url: string, accountName: string): string { - let path = "/"; - const urlstring = new URL(url); - if (urlstring.pathname) { - path = urlstring.pathname; - } - - let canonicalizedResource = "/" + accountName + path; - - const queryString = urlstring.searchParams; - const sortedQueryString = [...queryString.entries()].sort(); - for (const [key, value] of sortedQueryString) { - canonicalizedResource += `\n${key}:${value}`; - } - return canonicalizedResource; -} diff --git a/sdk/batch/batch-rest/src/index.ts b/sdk/batch/batch-rest/src/index.ts index 74425d2147b2..00fd811e00c7 100644 --- a/sdk/batch/batch-rest/src/index.ts +++ b/sdk/batch/batch-rest/src/index.ts @@ -11,6 +11,5 @@ export * from "./isUnexpected.js"; export * from "./models.js"; export * from "./outputModels.js"; export * from "./paginateHelper.js"; -export * from "./credentials/batchSharedKeyCredentials.js"; export default BatchClient; diff --git a/sdk/batch/batch-rest/src/isUnexpected.ts b/sdk/batch/batch-rest/src/isUnexpected.ts index 9164146a47ed..d58bf659df98 100644 --- a/sdk/batch/batch-rest/src/isUnexpected.ts +++ b/sdk/batch/batch-rest/src/isUnexpected.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { +import { ListApplications200Response, ListApplicationsDefaultResponse, GetApplication200Response, @@ -232,7 +232,9 @@ export function isUnexpected( response: GetApplication200Response | GetApplicationDefaultResponse, ): response is GetApplicationDefaultResponse; export function isUnexpected( - response: ListPoolUsageMetrics200Response | ListPoolUsageMetricsDefaultResponse, + response: + | ListPoolUsageMetrics200Response + | ListPoolUsageMetricsDefaultResponse, ): response is ListPoolUsageMetricsDefaultResponse; export function isUnexpected( response: CreatePool201Response | CreatePoolDefaultResponse, @@ -244,7 +246,10 @@ export function isUnexpected( response: DeletePool202Response | DeletePoolDefaultResponse, ): response is DeletePoolDefaultResponse; export function isUnexpected( - response: PoolExists200Response | PoolExists404Response | PoolExistsDefaultResponse, + response: + | PoolExists200Response + | PoolExists404Response + | PoolExistsDefaultResponse, ): response is PoolExistsDefaultResponse; export function isUnexpected( response: GetPool200Response | GetPoolDefaultResponse, @@ -253,13 +258,17 @@ export function isUnexpected( response: UpdatePool200Response | UpdatePoolDefaultResponse, ): response is UpdatePoolDefaultResponse; export function isUnexpected( - response: DisablePoolAutoScale200Response | DisablePoolAutoScaleDefaultResponse, + response: + | DisablePoolAutoScale200Response + | DisablePoolAutoScaleDefaultResponse, ): response is DisablePoolAutoScaleDefaultResponse; export function isUnexpected( response: EnablePoolAutoScale200Response | EnablePoolAutoScaleDefaultResponse, ): response is EnablePoolAutoScaleDefaultResponse; export function isUnexpected( - response: EvaluatePoolAutoScale200Response | EvaluatePoolAutoScaleDefaultResponse, + response: + | EvaluatePoolAutoScale200Response + | EvaluatePoolAutoScaleDefaultResponse, ): response is EvaluatePoolAutoScaleDefaultResponse; export function isUnexpected( response: ResizePool202Response | ResizePoolDefaultResponse, @@ -268,7 +277,9 @@ export function isUnexpected( response: StopPoolResize202Response | StopPoolResizeDefaultResponse, ): response is StopPoolResizeDefaultResponse; export function isUnexpected( - response: ReplacePoolProperties204Response | ReplacePoolPropertiesDefaultResponse, + response: + | ReplacePoolProperties204Response + | ReplacePoolPropertiesDefaultResponse, ): response is ReplacePoolPropertiesDefaultResponse; export function isUnexpected( response: RemoveNodes202Response | RemoveNodesDefaultResponse, @@ -307,7 +318,9 @@ export function isUnexpected( response: ListJobs200Response | ListJobsDefaultResponse, ): response is ListJobsDefaultResponse; export function isUnexpected( - response: ListJobsFromSchedule200Response | ListJobsFromScheduleDefaultResponse, + response: + | ListJobsFromSchedule200Response + | ListJobsFromScheduleDefaultResponse, ): response is ListJobsFromScheduleDefaultResponse; export function isUnexpected( response: @@ -342,7 +355,9 @@ export function isUnexpected( response: EnableJobSchedule204Response | EnableJobScheduleDefaultResponse, ): response is EnableJobScheduleDefaultResponse; export function isUnexpected( - response: TerminateJobSchedule202Response | TerminateJobScheduleDefaultResponse, + response: + | TerminateJobSchedule202Response + | TerminateJobScheduleDefaultResponse, ): response is TerminateJobScheduleDefaultResponse; export function isUnexpected( response: CreateJobSchedule201Response | CreateJobScheduleDefaultResponse, @@ -357,7 +372,9 @@ export function isUnexpected( response: ListTasks200Response | ListTasksDefaultResponse, ): response is ListTasksDefaultResponse; export function isUnexpected( - response: CreateTaskCollection200Response | CreateTaskCollectionDefaultResponse, + response: + | CreateTaskCollection200Response + | CreateTaskCollectionDefaultResponse, ): response is CreateTaskCollectionDefaultResponse; export function isUnexpected( response: DeleteTask200Response | DeleteTaskDefaultResponse, @@ -384,7 +401,9 @@ export function isUnexpected( response: GetTaskFile200Response | GetTaskFileDefaultResponse, ): response is GetTaskFileDefaultResponse; export function isUnexpected( - response: GetTaskFileProperties200Response | GetTaskFilePropertiesDefaultResponse, + response: + | GetTaskFileProperties200Response + | GetTaskFilePropertiesDefaultResponse, ): response is GetTaskFilePropertiesDefaultResponse; export function isUnexpected( response: ListTaskFiles200Response | ListTaskFilesDefaultResponse, @@ -414,13 +433,19 @@ export function isUnexpected( response: ReimageNode202Response | ReimageNodeDefaultResponse, ): response is ReimageNodeDefaultResponse; export function isUnexpected( - response: DisableNodeScheduling200Response | DisableNodeSchedulingDefaultResponse, + response: + | DisableNodeScheduling200Response + | DisableNodeSchedulingDefaultResponse, ): response is DisableNodeSchedulingDefaultResponse; export function isUnexpected( - response: EnableNodeScheduling200Response | EnableNodeSchedulingDefaultResponse, + response: + | EnableNodeScheduling200Response + | EnableNodeSchedulingDefaultResponse, ): response is EnableNodeSchedulingDefaultResponse; export function isUnexpected( - response: GetNodeRemoteLoginSettings200Response | GetNodeRemoteLoginSettingsDefaultResponse, + response: + | GetNodeRemoteLoginSettings200Response + | GetNodeRemoteLoginSettingsDefaultResponse, ): response is GetNodeRemoteLoginSettingsDefaultResponse; export function isUnexpected( response: UploadNodeLogs200Response | UploadNodeLogsDefaultResponse, @@ -441,7 +466,9 @@ export function isUnexpected( response: GetNodeFile200Response | GetNodeFileDefaultResponse, ): response is GetNodeFileDefaultResponse; export function isUnexpected( - response: GetNodeFileProperties200Response | GetNodeFilePropertiesDefaultResponse, + response: + | GetNodeFileProperties200Response + | GetNodeFilePropertiesDefaultResponse, ): response is GetNodeFilePropertiesDefaultResponse; export function isUnexpected( response: ListNodeFiles200Response | ListNodeFilesDefaultResponse, @@ -699,17 +726,24 @@ function getParametrizedPathSuccess(method: string, path: string): string[] { // track if we have found a match to return the values found. let found = true; - for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) { - if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) { + for ( + let i = candidateParts.length - 1, j = pathParts.length - 1; + i >= 1 && j >= 1; + i--, j-- + ) { + if ( + candidateParts[i]?.startsWith("{") && + candidateParts[i]?.indexOf("}") !== -1 + ) { const start = candidateParts[i]!.indexOf("}") + 1, end = candidateParts[i]?.length; // If the current part of the candidate is a "template" part // Try to use the suffix of pattern to match the path // {guid} ==> $ // {guid}:export ==> :export$ - const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test( - pathParts[j] || "", - ); + const isMatched = new RegExp( + `${candidateParts[i]?.slice(start, end)}`, + ).test(pathParts[j] || ""); if (!isMatched) { found = false; diff --git a/sdk/batch/batch-rest/src/models.ts b/sdk/batch/batch-rest/src/models.ts index 8f910053f15c..96ea1ef697bd 100644 --- a/sdk/batch/batch-rest/src/models.ts +++ b/sdk/batch/batch-rest/src/models.ts @@ -64,7 +64,7 @@ export interface VirtualMachineConfiguration { nodeAgentSKUId: string; /** Windows operating system settings on the virtual machine. This property must not be specified if the imageReference property specifies a Linux OS Image. */ windowsConfiguration?: WindowsConfiguration; - /** The configuration for data disks attached to the Compute Nodes in the Pool. This property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them. This cannot be updated. Each Compute Node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the Compute Node is removed from the Pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://docs.microsoft.com/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://docs.microsoft.com/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. */ + /** The configuration for data disks attached to the Compute Nodes in the Pool. This property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them. This cannot be updated. Each Compute Node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the Compute Node is removed from the Pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://learn.microsoft.com/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://learn.microsoft.com/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. */ dataDisks?: Array; /** * This only applies to Images that contain the Windows operating system, and @@ -108,7 +108,7 @@ export interface ImageReference { sku?: string; /** The version of the Azure Virtual Machines Marketplace Image. A value of 'latest' can be specified to select the latest version of an Image. If omitted, the default is 'latest'. */ version?: string; - /** The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ + /** The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://learn.microsoft.com/azure/batch/nodes-and-pools#virtual-network-vnet-and-firewall-configuration. */ virtualMachineImageId?: string; /** The shared gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from shared gallery image GET call. */ sharedGalleryImageId?: string; @@ -200,7 +200,7 @@ export interface BatchNodePlacementConfiguration { /** * Node placement Policy type on Batch Pools. Allocation policy used by Batch Service to provision the nodes. If not specified, Batch will use the regional policy. * - * Possible values: "Shared", "Startup", "VfsMounts", "Task", "JobPrep", "Applications" + * Possible values: "regional", "zonal" */ policy?: BatchNodePlacementPolicyType; } @@ -251,7 +251,7 @@ export interface OSDisk { */ export interface DiffDiskSettings { /** - * Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose the location e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. + * Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose the location e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at https://learn.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at https://learn.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. * * Possible values: "cachedisk" */ @@ -313,7 +313,7 @@ export interface ServiceArtifactReference { /** The network configuration for a Pool. */ export interface NetworkConfiguration { - /** The ARM resource identifier of the virtual network subnet which the Compute Nodes of the Pool will join. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes in the Pool. If the subnet doesn't have enough free IP addresses, the Pool will partially allocate Nodes and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. Only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication. Enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Also enable outbound connections to Azure Storage on port 443. For more details see: https://docs.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ + /** The ARM resource identifier of the virtual network subnet which the Compute Nodes of the Pool will join. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes in the Pool. If the subnet doesn't have enough free IP addresses, the Pool will partially allocate Nodes and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. Only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication, including ports 29876 and 29877. Also enable outbound connections to Azure Storage on port 443. For more details see: https://learn.microsoft.com/azure/batch/nodes-and-pools#virtual-network-vnet-and-firewall-configuration */ subnetId?: string; /** * The scope of dynamic vnet assignment. @@ -348,7 +348,7 @@ export interface InboundNatPool { * Possible values: "tcp", "udp" */ protocol: InboundEndpointProtocol; - /** The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. */ + /** The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable values are between 1 and 65535 except for 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. */ backendPort: number; /** The first port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. */ frontendPortRangeStart: number; @@ -402,7 +402,7 @@ export interface PublicIpAddressConfiguration { * block Batch from being able to re-run the StartTask. */ export interface BatchStartTask { - /** The command line of the StartTask. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ + /** The command line of the StartTask. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ commandLine: string; /** The settings for the container under which the StartTask runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ containerSettings?: BatchTaskContainerSettings; @@ -441,7 +441,7 @@ export interface ContainerHostBatchBindMountEntry { /** * The path which be mounted to container customer can select. * - * Possible values: "regional", "zonal" + * Possible values: "Shared", "Startup", "VfsMounts", "Task", "JobPrep", "Applications" */ source?: ContainerHostDataPath; /** Mount this source path as read-only mode or not. Default value is false (read/write mode). For Linux, if you mount this path as a read/write mode, this does not mean that all users in container have the read/write access for the path, it depends on the access in host VM. If this path is mounted read-only, all users within the container will not be able to modify the path. */ @@ -692,7 +692,7 @@ export interface NameValuePair { export interface BatchPoolUpdateContent { /** The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. This field can be updated only when the pool is empty. */ displayName?: string; - /** The size of virtual machines in the Pool. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes).

This field can be updated only when the pool is empty. */ + /** The size of virtual machines in the Pool. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes).

This field can be updated only when the pool is empty. */ vmSize?: string; /** Whether the Pool permits direct communication between Compute Nodes. Enabling inter-node communication limits the maximum size of the Pool due to deployment restrictions on the Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The default value is false.

This field can be updated only when the pool is empty. */ enableInterNodeCommunication?: boolean; @@ -846,7 +846,7 @@ export interface BatchJobManagerTask { id: string; /** The display name of the Job Manager Task. It need not be unique and can contain any Unicode characters up to a maximum length of 1024. */ displayName?: string; - /** The command line of the Job Manager Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ + /** The command line of the Job Manager Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ commandLine: string; /** The settings for the container under which the Job Manager Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ containerSettings?: BatchTaskContainerSettings; @@ -907,7 +907,7 @@ export interface OutputFileBlobContainerDestination { containerUrl: string; /** The reference to the user assigned identity to use to access Azure Blob Storage specified by containerUrl. The identity must have write access to the Azure Blob Storage container. */ identityReference?: BatchNodeIdentityReference; - /** A list of name-value pairs for headers to be used in uploading output files. These headers will be specified when uploading files to Azure Storage. Official document on allowed headers when uploading blobs: https://docs.microsoft.com/rest/api/storageservices/put-blob#request-headers-all-blob-types. */ + /** A list of name-value pairs for headers to be used in uploading output files. These headers will be specified when uploading files to Azure Storage. Official document on allowed headers when uploading blobs: https://learn.microsoft.com/rest/api/storageservices/put-blob#request-headers-all-blob-types. */ uploadHeaders?: Array; } @@ -982,7 +982,7 @@ export interface AuthenticationTokenSettings { export interface BatchJobPreparationTask { /** A string that uniquely identifies the Job Preparation Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobpreparation'. No other Task in the Job can have the same ID as the Job Preparation Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobPreparationTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). */ id?: string; - /** The command line of the Job Preparation Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ + /** The command line of the Job Preparation Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ commandLine: string; /** The settings for the container under which the Job Preparation Task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ containerSettings?: BatchTaskContainerSettings; @@ -1021,7 +1021,7 @@ export interface BatchJobPreparationTask { export interface BatchJobReleaseTask { /** A string that uniquely identifies the Job Release Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobrelease'. No other Task in the Job can have the same ID as the Job Release Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). */ id?: string; - /** The command line of the Job Release Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ + /** The command line of the Job Release Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ commandLine: string; /** The settings for the container under which the Job Release Task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ containerSettings?: BatchTaskContainerSettings; @@ -1068,7 +1068,7 @@ export interface BatchAutoPoolSpecification { export interface BatchPoolSpecification { /** The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. */ displayName?: string; - /** The size of the virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). */ + /** The size of the virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes). */ vmSize: string; /** The virtual machine configuration for the Pool. This property must be specified. */ virtualMachineConfiguration?: VirtualMachineConfiguration; @@ -1116,7 +1116,7 @@ export interface BatchPoolSpecification { /** The network configuration for the Job. */ export interface BatchJobNetworkConfiguration { - /** The ARM resource identifier of the virtual network subnet which Compute Nodes running Tasks from the Job will join for the duration of the Task. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes which will run Tasks from the Job. This can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet so that Azure Batch service can schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication from the Azure Batch service. For Pools created with a Virtual Machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Port 443 is also required to be open for outbound connections for communications to Azure Storage. For more details see: https://docs.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ + /** The ARM resource identifier of the virtual network subnet which Compute Nodes running Tasks from the Job will join for the duration of the Task. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes which will run Tasks from the Job. This can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet so that Azure Batch service can schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication from the Azure Batch service. For Pools created with a Virtual Machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Port 443 is also required to be open for outbound connections for communications to Azure Storage. For more details see: https://learn.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ subnetId: string; /** Whether to withdraw Compute Nodes from the virtual network to DNC when the job is terminated or deleted. If true, nodes will remain joined to the virtual network to DNC. If false, nodes will automatically withdraw when the job ends. Defaults to false. */ skipWithdrawFromVNet: boolean; @@ -1449,7 +1449,7 @@ export interface BatchTaskCreateContent { displayName?: string; /** How the Batch service should respond when the Task completes. */ exitConditions?: ExitConditions; - /** The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). */ + /** The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). */ commandLine: string; /** The settings for the container under which the Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ containerSettings?: BatchTaskContainerSettings; diff --git a/sdk/batch/batch-rest/src/outputModels.ts b/sdk/batch/batch-rest/src/outputModels.ts index 44f19538a936..f806ef7fbed4 100644 --- a/sdk/batch/batch-rest/src/outputModels.ts +++ b/sdk/batch/batch-rest/src/outputModels.ts @@ -61,7 +61,7 @@ export interface BatchPoolUsageMetricsOutput { startTime: string; /** The end time of the aggregation interval covered by this entry. */ endTime: string; - /** The size of virtual machines in the Pool. All VMs in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). */ + /** The size of virtual machines in the Pool. All VMs in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes). */ vmSize: string; /** The total core hours used in the Pool during this aggregation interval. */ totalCoreHours: number; @@ -78,7 +78,7 @@ export interface VirtualMachineConfigurationOutput { nodeAgentSKUId: string; /** Windows operating system settings on the virtual machine. This property must not be specified if the imageReference property specifies a Linux OS Image. */ windowsConfiguration?: WindowsConfigurationOutput; - /** The configuration for data disks attached to the Compute Nodes in the Pool. This property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them. This cannot be updated. Each Compute Node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the Compute Node is removed from the Pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://docs.microsoft.com/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://docs.microsoft.com/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. */ + /** The configuration for data disks attached to the Compute Nodes in the Pool. This property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them. This cannot be updated. Each Compute Node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the Compute Node is removed from the Pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://learn.microsoft.com/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://learn.microsoft.com/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. */ dataDisks?: Array; /** * This only applies to Images that contain the Windows operating system, and @@ -122,7 +122,7 @@ export interface ImageReferenceOutput { sku?: string; /** The version of the Azure Virtual Machines Marketplace Image. A value of 'latest' can be specified to select the latest version of an Image. If omitted, the default is 'latest'. */ version?: string; - /** The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ + /** The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://learn.microsoft.com/azure/batch/nodes-and-pools#virtual-network-vnet-and-firewall-configuration. */ virtualMachineImageId?: string; /** The specific version of the platform image or marketplace image used to create the node. This read-only field differs from 'version' only if the value specified for 'version' when the pool was created was 'latest'. */ readonly exactVersion?: string; @@ -216,7 +216,7 @@ export interface BatchNodePlacementConfigurationOutput { /** * Node placement Policy type on Batch Pools. Allocation policy used by Batch Service to provision the nodes. If not specified, Batch will use the regional policy. * - * Possible values: "Shared", "Startup", "VfsMounts", "Task", "JobPrep", "Applications" + * Possible values: "regional", "zonal" */ policy?: BatchNodePlacementPolicyTypeOutput; } @@ -267,7 +267,7 @@ export interface OSDiskOutput { */ export interface DiffDiskSettingsOutput { /** - * Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose the location e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. + * Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose the location e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at https://learn.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at https://learn.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. * * Possible values: "cachedisk" */ @@ -329,7 +329,7 @@ export interface ServiceArtifactReferenceOutput { /** The network configuration for a Pool. */ export interface NetworkConfigurationOutput { - /** The ARM resource identifier of the virtual network subnet which the Compute Nodes of the Pool will join. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes in the Pool. If the subnet doesn't have enough free IP addresses, the Pool will partially allocate Nodes and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. Only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication. Enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Also enable outbound connections to Azure Storage on port 443. For more details see: https://docs.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ + /** The ARM resource identifier of the virtual network subnet which the Compute Nodes of the Pool will join. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes in the Pool. If the subnet doesn't have enough free IP addresses, the Pool will partially allocate Nodes and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. Only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication, including ports 29876 and 29877. Also enable outbound connections to Azure Storage on port 443. For more details see: https://learn.microsoft.com/azure/batch/nodes-and-pools#virtual-network-vnet-and-firewall-configuration */ subnetId?: string; /** * The scope of dynamic vnet assignment. @@ -364,7 +364,7 @@ export interface InboundNatPoolOutput { * Possible values: "tcp", "udp" */ protocol: InboundEndpointProtocolOutput; - /** The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. */ + /** The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable values are between 1 and 65535 except for 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. */ backendPort: number; /** The first port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. */ frontendPortRangeStart: number; @@ -418,7 +418,7 @@ export interface PublicIpAddressConfigurationOutput { * block Batch from being able to re-run the StartTask. */ export interface BatchStartTaskOutput { - /** The command line of the StartTask. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ + /** The command line of the StartTask. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ commandLine: string; /** The settings for the container under which the StartTask runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ containerSettings?: BatchTaskContainerSettingsOutput; @@ -457,7 +457,7 @@ export interface ContainerHostBatchBindMountEntryOutput { /** * The path which be mounted to container customer can select. * - * Possible values: "regional", "zonal" + * Possible values: "Shared", "Startup", "VfsMounts", "Task", "JobPrep", "Applications" */ source?: ContainerHostDataPathOutput; /** Mount this source path as read-only mode or not. Default value is false (read/write mode). For Linux, if you mount this path as a read/write mode, this does not mean that all users in container have the read/write access for the path, it depends on the access in host VM. If this path is mounted read-only, all users within the container will not be able to modify the path. */ @@ -1113,7 +1113,7 @@ export interface BatchJobManagerTaskOutput { id: string; /** The display name of the Job Manager Task. It need not be unique and can contain any Unicode characters up to a maximum length of 1024. */ displayName?: string; - /** The command line of the Job Manager Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ + /** The command line of the Job Manager Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ commandLine: string; /** The settings for the container under which the Job Manager Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ containerSettings?: BatchTaskContainerSettingsOutput; @@ -1174,7 +1174,7 @@ export interface OutputFileBlobContainerDestinationOutput { containerUrl: string; /** The reference to the user assigned identity to use to access Azure Blob Storage specified by containerUrl. The identity must have write access to the Azure Blob Storage container. */ identityReference?: BatchNodeIdentityReferenceOutput; - /** A list of name-value pairs for headers to be used in uploading output files. These headers will be specified when uploading files to Azure Storage. Official document on allowed headers when uploading blobs: https://docs.microsoft.com/rest/api/storageservices/put-blob#request-headers-all-blob-types. */ + /** A list of name-value pairs for headers to be used in uploading output files. These headers will be specified when uploading files to Azure Storage. Official document on allowed headers when uploading blobs: https://learn.microsoft.com/rest/api/storageservices/put-blob#request-headers-all-blob-types. */ uploadHeaders?: Array; } @@ -1249,7 +1249,7 @@ export interface AuthenticationTokenSettingsOutput { export interface BatchJobPreparationTaskOutput { /** A string that uniquely identifies the Job Preparation Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobpreparation'. No other Task in the Job can have the same ID as the Job Preparation Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobPreparationTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). */ id?: string; - /** The command line of the Job Preparation Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ + /** The command line of the Job Preparation Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ commandLine: string; /** The settings for the container under which the Job Preparation Task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ containerSettings?: BatchTaskContainerSettingsOutput; @@ -1288,7 +1288,7 @@ export interface BatchJobPreparationTaskOutput { export interface BatchJobReleaseTaskOutput { /** A string that uniquely identifies the Job Release Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobrelease'. No other Task in the Job can have the same ID as the Job Release Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). */ id?: string; - /** The command line of the Job Release Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ + /** The command line of the Job Release Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ commandLine: string; /** The settings for the container under which the Job Release Task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ containerSettings?: BatchTaskContainerSettingsOutput; @@ -1335,7 +1335,7 @@ export interface BatchAutoPoolSpecificationOutput { export interface BatchPoolSpecificationOutput { /** The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. */ displayName?: string; - /** The size of the virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). */ + /** The size of the virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes). */ vmSize: string; /** The virtual machine configuration for the Pool. This property must be specified. */ virtualMachineConfiguration?: VirtualMachineConfigurationOutput; @@ -1383,7 +1383,7 @@ export interface BatchPoolSpecificationOutput { /** The network configuration for the Job. */ export interface BatchJobNetworkConfigurationOutput { - /** The ARM resource identifier of the virtual network subnet which Compute Nodes running Tasks from the Job will join for the duration of the Task. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes which will run Tasks from the Job. This can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet so that Azure Batch service can schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication from the Azure Batch service. For Pools created with a Virtual Machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Port 443 is also required to be open for outbound connections for communications to Azure Storage. For more details see: https://docs.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ + /** The ARM resource identifier of the virtual network subnet which Compute Nodes running Tasks from the Job will join for the duration of the Task. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes which will run Tasks from the Job. This can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet so that Azure Batch service can schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication from the Azure Batch service. For Pools created with a Virtual Machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Port 443 is also required to be open for outbound connections for communications to Azure Storage. For more details see: https://learn.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ subnetId: string; /** Whether to withdraw Compute Nodes from the virtual network to DNC when the job is terminated or deleted. If true, nodes will remain joined to the virtual network to DNC. If false, nodes will automatically withdraw when the job ends. Defaults to false. */ skipWithdrawFromVNet: boolean; @@ -1930,7 +1930,7 @@ export interface BatchTaskOutput { readonly previousState?: BatchTaskStateOutput; /** The time at which the Task entered its previous state. This property is not set if the Task is in its initial Active state. */ readonly previousStateTransitionTime?: string; - /** The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ + /** The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). */ readonly commandLine?: string; /** The settings for the container under which the Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. */ readonly containerSettings?: BatchTaskContainerSettingsOutput; @@ -2173,7 +2173,7 @@ export interface BatchNodeOutput { ipAddress?: string; /** An identifier which can be passed when adding a Task to request that the Task be scheduled on this Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere. */ affinityId?: string; - /** The size of the virtual machine hosting the Compute Node. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). */ + /** The size of the virtual machine hosting the Compute Node. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes). */ vmSize?: string; /** The total number of Job Tasks completed on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. */ totalTasksRun?: number; diff --git a/sdk/batch/batch-rest/src/paginateHelper.ts b/sdk/batch/batch-rest/src/paginateHelper.ts index a2182df24e56..6e53aead9153 100644 --- a/sdk/batch/batch-rest/src/paginateHelper.ts +++ b/sdk/batch/batch-rest/src/paginateHelper.ts @@ -1,10 +1,162 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PagedAsyncIterableIterator, PagedResult } from "@azure/core-paging"; -import { getPagedAsyncIterator } from "@azure/core-paging"; -import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; -import { createRestError } from "@azure-rest/core-client"; +import { + Client, + createRestError, + PathUncheckedResponse, +} from "@azure-rest/core-client"; + +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, + TLink = string, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator( + pagedResult, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + (((settings?: PageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken as unknown as TLink | undefined, + }); + }) as unknown as ( + settings?: TPageSettings, + ) => AsyncIterableIterator), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + const firstVal = await pages.next(); + // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is + if (!Array.isArray(firstVal.value)) { + // can extract elements from this page + const { toElements } = pagedResult; + if (toElements) { + yield* toElements(firstVal.value) as TElement[]; + for await (const page of pages) { + yield* toElements(page) as TElement[]; + } + } else { + yield firstVal.value; + // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case + yield* pages as unknown as AsyncIterableIterator; + } + } else { + yield* firstVal.value; + for await (const page of pages) { + // pages is of type `AsyncIterableIterator` so `page` is of type `TPage`. In this branch, + // it must be the case that `TPage = TElement[]` + yield* page as unknown as TElement[]; + } + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: TLink; + } = {}, +): AsyncIterableIterator { + const { pageLink } = options; + let response = await pagedResult.getPage( + pageLink ?? pagedResult.firstPageLink, + ); + if (!response) { + return; + } + yield response.page; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + yield response.page; + } +} + +/** + * An interface that tracks the settings for paged iteration + */ +export interface PageSettings { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +} + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator< + TElement, + TPage, + TPageSettings + >; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator; +} + +/** + * An interface that describes how to communicate with the service. + */ +interface PagedResult { + /** + * Link to the first page of results. + */ + firstPageLink: TLink; + /** + * A method that returns a page of results. + */ + getPage: ( + pageLink: TLink, + ) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => unknown[]; +} /** * Helper type to extract the type of an array @@ -14,10 +166,7 @@ export type GetArrayType = T extends Array ? TData : never; /** * The type of a custom function that defines how to get a page and a link to the next one if any. */ -export type GetPage = ( - pageLink: string, - maxPageSize?: number, -) => Promise<{ +export type GetPage = (pageLink: string) => Promise<{ page: TPage; nextPageLink?: string; }>; @@ -71,7 +220,9 @@ export function paginate( typeof customGetPage === "function" ? customGetPage : async (pageLink: string) => { - const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get(); + const result = firstRun + ? initialResponse + : await client.pathUnchecked(pageLink).get(); firstRun = false; checkPagingRequest(result); const nextLink = getNextLink(result.body, nextLinkName); @@ -97,7 +248,9 @@ function getNextLink(body: unknown, nextLinkName?: string): string | undefined { const nextLink = (body as Record)[nextLinkName]; if (typeof nextLink !== "string" && typeof nextLink !== "undefined") { - throw new Error(`Body Property ${nextLinkName} should be a string or undefined`); + throw new Error( + `Body Property ${nextLinkName} should be a string or undefined`, + ); } return nextLink; @@ -125,7 +278,18 @@ function getElements(body: unknown, itemName: string): T[] { * Checks if a request failed */ function checkPagingRequest(response: PathUncheckedResponse): void { - const Http2xxStatusCodes = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226"]; + const Http2xxStatusCodes = [ + "200", + "201", + "202", + "203", + "204", + "205", + "206", + "207", + "208", + "226", + ]; if (!Http2xxStatusCodes.includes(response.status)) { throw createRestError( `Pagination failed with unexpected statusCode ${response.status}`, @@ -137,10 +301,7 @@ function checkPagingRequest(response: PathUncheckedResponse): void { /** * Extracts the itemName and nextLinkName from the initial response to use them for pagination */ -function getPaginationProperties(initialResponse: PathUncheckedResponse): { - itemName: string; - nextLinkName: string | undefined; -} { +function getPaginationProperties(initialResponse: PathUncheckedResponse) { // Build a set with the passed custom nextLinkNames const nextLinkNames = new Set(["nextLink", "odata.nextLink"]); @@ -151,7 +312,9 @@ function getPaginationProperties(initialResponse: PathUncheckedResponse): { let itemName: string | undefined; for (const name of nextLinkNames) { - const nextLink = (initialResponse.body as Record)[name] as string; + const nextLink = (initialResponse.body as Record)[ + name + ] as string; if (nextLink) { nextLinkName = name; break; @@ -159,7 +322,9 @@ function getPaginationProperties(initialResponse: PathUncheckedResponse): { } for (const name of itemNames) { - const item = (initialResponse.body as Record)[name] as string; + const item = (initialResponse.body as Record)[ + name + ] as string; if (item) { itemName = name; break; diff --git a/sdk/batch/batch-rest/src/parameters.ts b/sdk/batch/batch-rest/src/parameters.ts index 07685300cf5c..97c677929ca7 100644 --- a/sdk/batch/batch-rest/src/parameters.ts +++ b/sdk/batch/batch-rest/src/parameters.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { RawHttpHeadersInput } from "@azure/core-rest-pipeline"; -import type { RequestParameters } from "@azure-rest/core-client"; -import type { +import { RawHttpHeadersInput } from "@azure/core-rest-pipeline"; +import { RequestParameters } from "@azure-rest/core-client"; +import { BatchPoolCreateContent, BatchPoolUpdateContent, BatchPoolEnableAutoScaleContent, @@ -140,7 +140,7 @@ export interface ListPoolUsageMetricsQueryParamProperties { endtime?: Date | string; /** * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. + * https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. */ $filter?: string; } @@ -218,6 +218,26 @@ export interface ListPoolsHeaders { "ocp-date"?: string; } +/** This is the wrapper object for the parameter `$select` with explode set to false and style set to form. */ +export interface ListPools$selectQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + +/** This is the wrapper object for the parameter `$expand` with explode set to false and style set to form. */ +export interface ListPools$expandQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + export interface ListPoolsQueryParamProperties { /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ timeOut?: number; @@ -228,13 +248,13 @@ export interface ListPoolsQueryParamProperties { maxresults?: number; /** * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-pools. + * https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-pools. */ $filter?: string; /** An OData $select clause. */ - $select?: string[]; + $select?: string[] | ListPools$selectQueryParam; /** An OData $expand clause. */ - $expand?: string[]; + $expand?: string[] | ListPools$expandQueryParam; } export interface ListPoolsQueryParam { @@ -245,7 +265,9 @@ export interface ListPoolsHeaderParam { headers?: RawHttpHeadersInput & ListPoolsHeaders; } -export type ListPoolsParameters = ListPoolsQueryParam & ListPoolsHeaderParam & RequestParameters; +export type ListPoolsParameters = ListPoolsQueryParam & + ListPoolsHeaderParam & + RequestParameters; export interface DeletePoolHeaders { /** @@ -300,7 +322,9 @@ export interface DeletePoolHeaderParam { headers?: RawHttpHeadersInput & DeletePoolHeaders; } -export type DeletePoolParameters = DeletePoolQueryParam & DeletePoolHeaderParam & RequestParameters; +export type DeletePoolParameters = DeletePoolQueryParam & + DeletePoolHeaderParam & + RequestParameters; export interface PoolExistsHeaders { /** @@ -355,7 +379,9 @@ export interface PoolExistsHeaderParam { headers?: RawHttpHeadersInput & PoolExistsHeaders; } -export type PoolExistsParameters = PoolExistsQueryParam & PoolExistsHeaderParam & RequestParameters; +export type PoolExistsParameters = PoolExistsQueryParam & + PoolExistsHeaderParam & + RequestParameters; export interface GetPoolHeaders { /** @@ -397,13 +423,33 @@ export interface GetPoolHeaders { "If-None-Match"?: string; } +/** This is the wrapper object for the parameter `$select` with explode set to false and style set to form. */ +export interface GetPool$selectQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + +/** This is the wrapper object for the parameter `$expand` with explode set to false and style set to form. */ +export interface GetPool$expandQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + export interface GetPoolQueryParamProperties { /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ timeOut?: number; /** An OData $select clause. */ - $select?: string[]; + $select?: string[] | GetPool$selectQueryParam; /** An OData $expand clause. */ - $expand?: string[]; + $expand?: string[] | GetPool$expandQueryParam; } export interface GetPoolQueryParam { @@ -414,7 +460,9 @@ export interface GetPoolHeaderParam { headers?: RawHttpHeadersInput & GetPoolHeaders; } -export type GetPoolParameters = GetPoolQueryParam & GetPoolHeaderParam & RequestParameters; +export type GetPoolParameters = GetPoolQueryParam & + GetPoolHeaderParam & + RequestParameters; export interface UpdatePoolHeaders { /** @@ -898,7 +946,7 @@ export interface ListSupportedImagesQueryParamProperties { maxresults?: number; /** * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-support-images. + * https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-support-images. */ $filter?: string; } @@ -941,7 +989,7 @@ export interface ListPoolNodeCountsQueryParamProperties { maxresults?: number; /** * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-support-images. + * https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-support-images. */ $filter?: string; } @@ -1013,7 +1061,9 @@ export interface DeleteJobHeaderParam { headers?: RawHttpHeadersInput & DeleteJobHeaders; } -export type DeleteJobParameters = DeleteJobQueryParam & DeleteJobHeaderParam & RequestParameters; +export type DeleteJobParameters = DeleteJobQueryParam & + DeleteJobHeaderParam & + RequestParameters; export interface GetJobHeaders { /** @@ -1055,13 +1105,33 @@ export interface GetJobHeaders { "If-None-Match"?: string; } +/** This is the wrapper object for the parameter `$select` with explode set to false and style set to form. */ +export interface GetJob$selectQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + +/** This is the wrapper object for the parameter `$expand` with explode set to false and style set to form. */ +export interface GetJob$expandQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + export interface GetJobQueryParamProperties { /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ timeOut?: number; /** An OData $select clause. */ - $select?: string[]; + $select?: string[] | GetJob$selectQueryParam; /** An OData $expand clause. */ - $expand?: string[]; + $expand?: string[] | GetJob$expandQueryParam; } export interface GetJobQueryParam { @@ -1072,7 +1142,9 @@ export interface GetJobHeaderParam { headers?: RawHttpHeadersInput & GetJobHeaders; } -export type GetJobParameters = GetJobQueryParam & GetJobHeaderParam & RequestParameters; +export type GetJobParameters = GetJobQueryParam & + GetJobHeaderParam & + RequestParameters; export interface UpdateJobHeaders { /** @@ -1334,7 +1406,9 @@ export interface EnableJobHeaderParam { headers?: RawHttpHeadersInput & EnableJobHeaders; } -export type EnableJobParameters = EnableJobQueryParam & EnableJobHeaderParam & RequestParameters; +export type EnableJobParameters = EnableJobQueryParam & + EnableJobHeaderParam & + RequestParameters; export interface TerminateJobHeaders { /** @@ -1468,6 +1542,26 @@ export interface ListJobsHeaders { "ocp-date"?: string; } +/** This is the wrapper object for the parameter `$select` with explode set to false and style set to form. */ +export interface ListJobs$selectQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + +/** This is the wrapper object for the parameter `$expand` with explode set to false and style set to form. */ +export interface ListJobs$expandQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + export interface ListJobsQueryParamProperties { /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ timeOut?: number; @@ -1478,13 +1572,13 @@ export interface ListJobsQueryParamProperties { maxresults?: number; /** * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-jobs. + * https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-jobs. */ $filter?: string; /** An OData $select clause. */ - $select?: string[]; + $select?: string[] | ListJobs$selectQueryParam; /** An OData $expand clause. */ - $expand?: string[]; + $expand?: string[] | ListJobs$expandQueryParam; } export interface ListJobsQueryParam { @@ -1495,7 +1589,9 @@ export interface ListJobsHeaderParam { headers?: RawHttpHeadersInput & ListJobsHeaders; } -export type ListJobsParameters = ListJobsQueryParam & ListJobsHeaderParam & RequestParameters; +export type ListJobsParameters = ListJobsQueryParam & + ListJobsHeaderParam & + RequestParameters; export interface ListJobsFromScheduleHeaders { /** @@ -1513,6 +1609,26 @@ export interface ListJobsFromScheduleHeaders { "ocp-date"?: string; } +/** This is the wrapper object for the parameter `$select` with explode set to false and style set to form. */ +export interface ListJobsFromSchedule$selectQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + +/** This is the wrapper object for the parameter `$expand` with explode set to false and style set to form. */ +export interface ListJobsFromSchedule$expandQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + export interface ListJobsFromScheduleQueryParamProperties { /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ timeOut?: number; @@ -1523,13 +1639,13 @@ export interface ListJobsFromScheduleQueryParamProperties { maxresults?: number; /** * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. + * https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. */ $filter?: string; /** An OData $select clause. */ - $select?: string[]; + $select?: string[] | ListJobsFromSchedule$selectQueryParam; /** An OData $expand clause. */ - $expand?: string[]; + $expand?: string[] | ListJobsFromSchedule$expandQueryParam; } export interface ListJobsFromScheduleQueryParam { @@ -1560,6 +1676,16 @@ export interface ListJobPreparationAndReleaseTaskStatusHeaders { "ocp-date"?: string; } +/** This is the wrapper object for the parameter `$select` with explode set to false and style set to form. */ +export interface ListJobPreparationAndReleaseTaskStatus$selectQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + export interface ListJobPreparationAndReleaseTaskStatusQueryParamProperties { /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ timeOut?: number; @@ -1570,11 +1696,11 @@ export interface ListJobPreparationAndReleaseTaskStatusQueryParamProperties { maxresults?: number; /** * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. + * https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. */ $filter?: string; /** An OData $select clause. */ - $select?: string[]; + $select?: string[] | ListJobPreparationAndReleaseTaskStatus$selectQueryParam; } export interface ListJobPreparationAndReleaseTaskStatusQueryParam { @@ -1779,13 +1905,33 @@ export interface GetJobScheduleHeaders { "If-None-Match"?: string; } +/** This is the wrapper object for the parameter `$select` with explode set to false and style set to form. */ +export interface GetJobSchedule$selectQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + +/** This is the wrapper object for the parameter `$expand` with explode set to false and style set to form. */ +export interface GetJobSchedule$expandQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + export interface GetJobScheduleQueryParamProperties { /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ timeOut?: number; /** An OData $select clause. */ - $select?: string[]; + $select?: string[] | GetJobSchedule$selectQueryParam; /** An OData $expand clause. */ - $expand?: string[]; + $expand?: string[] | GetJobSchedule$expandQueryParam; } export interface GetJobScheduleQueryParam { @@ -2172,6 +2318,26 @@ export interface ListJobSchedulesHeaders { "ocp-date"?: string; } +/** This is the wrapper object for the parameter `$select` with explode set to false and style set to form. */ +export interface ListJobSchedules$selectQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + +/** This is the wrapper object for the parameter `$expand` with explode set to false and style set to form. */ +export interface ListJobSchedules$expandQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + export interface ListJobSchedulesQueryParamProperties { /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ timeOut?: number; @@ -2182,13 +2348,13 @@ export interface ListJobSchedulesQueryParamProperties { maxresults?: number; /** * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. + * https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. */ $filter?: string; /** An OData $select clause. */ - $select?: string[]; + $select?: string[] | ListJobSchedules$selectQueryParam; /** An OData $expand clause. */ - $expand?: string[]; + $expand?: string[] | ListJobSchedules$expandQueryParam; } export interface ListJobSchedulesQueryParam { @@ -2264,6 +2430,26 @@ export interface ListTasksHeaders { "ocp-date"?: string; } +/** This is the wrapper object for the parameter `$select` with explode set to false and style set to form. */ +export interface ListTasks$selectQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + +/** This is the wrapper object for the parameter `$expand` with explode set to false and style set to form. */ +export interface ListTasks$expandQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + export interface ListTasksQueryParamProperties { /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ timeOut?: number; @@ -2274,13 +2460,13 @@ export interface ListTasksQueryParamProperties { maxresults?: number; /** * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-tasks. + * https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-tasks. */ $filter?: string; /** An OData $select clause. */ - $select?: string[]; + $select?: string[] | ListTasks$selectQueryParam; /** An OData $expand clause. */ - $expand?: string[]; + $expand?: string[] | ListTasks$expandQueryParam; } export interface ListTasksQueryParam { @@ -2291,7 +2477,9 @@ export interface ListTasksHeaderParam { headers?: RawHttpHeadersInput & ListTasksHeaders; } -export type ListTasksParameters = ListTasksQueryParam & ListTasksHeaderParam & RequestParameters; +export type ListTasksParameters = ListTasksQueryParam & + ListTasksHeaderParam & + RequestParameters; export interface CreateTaskCollectionHeaders { /** @@ -2391,7 +2579,9 @@ export interface DeleteTaskHeaderParam { headers?: RawHttpHeadersInput & DeleteTaskHeaders; } -export type DeleteTaskParameters = DeleteTaskQueryParam & DeleteTaskHeaderParam & RequestParameters; +export type DeleteTaskParameters = DeleteTaskQueryParam & + DeleteTaskHeaderParam & + RequestParameters; export interface GetTaskHeaders { /** @@ -2433,13 +2623,33 @@ export interface GetTaskHeaders { "If-None-Match"?: string; } +/** This is the wrapper object for the parameter `$select` with explode set to false and style set to form. */ +export interface GetTask$selectQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + +/** This is the wrapper object for the parameter `$expand` with explode set to false and style set to form. */ +export interface GetTask$expandQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + export interface GetTaskQueryParamProperties { /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ timeOut?: number; /** An OData $select clause. */ - $select?: string[]; + $select?: string[] | GetTask$selectQueryParam; /** An OData $expand clause. */ - $expand?: string[]; + $expand?: string[] | GetTask$expandQueryParam; } export interface GetTaskQueryParam { @@ -2450,7 +2660,9 @@ export interface GetTaskHeaderParam { headers?: RawHttpHeadersInput & GetTaskHeaders; } -export type GetTaskParameters = GetTaskQueryParam & GetTaskHeaderParam & RequestParameters; +export type GetTaskParameters = GetTaskQueryParam & + GetTaskHeaderParam & + RequestParameters; export interface ReplaceTaskHeaders { /** @@ -2537,11 +2749,21 @@ export interface ListSubTasksHeaders { "ocp-date"?: string; } +/** This is the wrapper object for the parameter `$select` with explode set to false and style set to form. */ +export interface ListSubTasks$selectQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + export interface ListSubTasksQueryParamProperties { /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ timeOut?: number; /** An OData $select clause. */ - $select?: string[]; + $select?: string[] | ListSubTasks$selectQueryParam; } export interface ListSubTasksQueryParam { @@ -2831,7 +3053,7 @@ export interface ListTaskFilesQueryParamProperties { maxresults?: number; /** * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-task-files. + * https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-task-files. */ $filter?: string; /** @@ -2992,11 +3214,21 @@ export interface GetNodeHeaders { "ocp-date"?: string; } +/** This is the wrapper object for the parameter `$select` with explode set to false and style set to form. */ +export interface GetNode$selectQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + export interface GetNodeQueryParamProperties { /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ timeOut?: number; /** An OData $select clause. */ - $select?: string[]; + $select?: string[] | GetNode$selectQueryParam; } export interface GetNodeQueryParam { @@ -3007,7 +3239,9 @@ export interface GetNodeHeaderParam { headers?: RawHttpHeadersInput & GetNodeHeaders; } -export type GetNodeParameters = GetNodeQueryParam & GetNodeHeaderParam & RequestParameters; +export type GetNodeParameters = GetNodeQueryParam & + GetNodeHeaderParam & + RequestParameters; export interface RebootNodeHeaders { /** @@ -3083,7 +3317,9 @@ export interface StartNodeHeaderParam { headers?: RawHttpHeadersInput & StartNodeHeaders; } -export type StartNodeParameters = StartNodeQueryParam & StartNodeHeaderParam & RequestParameters; +export type StartNodeParameters = StartNodeQueryParam & + StartNodeHeaderParam & + RequestParameters; export interface DeallocateNodeHeaders { /** @@ -3282,9 +3518,10 @@ export interface GetNodeRemoteLoginSettingsHeaderParam { headers?: RawHttpHeadersInput & GetNodeRemoteLoginSettingsHeaders; } -export type GetNodeRemoteLoginSettingsParameters = GetNodeRemoteLoginSettingsQueryParam & - GetNodeRemoteLoginSettingsHeaderParam & - RequestParameters; +export type GetNodeRemoteLoginSettingsParameters = + GetNodeRemoteLoginSettingsQueryParam & + GetNodeRemoteLoginSettingsHeaderParam & + RequestParameters; export interface UploadNodeLogsHeaders { /** @@ -3347,6 +3584,16 @@ export interface ListNodesHeaders { "ocp-date"?: string; } +/** This is the wrapper object for the parameter `$select` with explode set to false and style set to form. */ +export interface ListNodes$selectQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + export interface ListNodesQueryParamProperties { /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ timeOut?: number; @@ -3357,11 +3604,11 @@ export interface ListNodesQueryParamProperties { maxresults?: number; /** * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. + * https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. */ $filter?: string; /** An OData $select clause. */ - $select?: string[]; + $select?: string[] | ListNodes$selectQueryParam; } export interface ListNodesQueryParam { @@ -3372,7 +3619,9 @@ export interface ListNodesHeaderParam { headers?: RawHttpHeadersInput & ListNodesHeaders; } -export type ListNodesParameters = ListNodesQueryParam & ListNodesHeaderParam & RequestParameters; +export type ListNodesParameters = ListNodesQueryParam & + ListNodesHeaderParam & + RequestParameters; export interface GetNodeExtensionHeaders { /** @@ -3390,11 +3639,21 @@ export interface GetNodeExtensionHeaders { "ocp-date"?: string; } +/** This is the wrapper object for the parameter `$select` with explode set to false and style set to form. */ +export interface GetNodeExtension$selectQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + export interface GetNodeExtensionQueryParamProperties { /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ timeOut?: number; /** An OData $select clause. */ - $select?: string[]; + $select?: string[] | GetNodeExtension$selectQueryParam; } export interface GetNodeExtensionQueryParam { @@ -3425,6 +3684,16 @@ export interface ListNodeExtensionsHeaders { "ocp-date"?: string; } +/** This is the wrapper object for the parameter `$select` with explode set to false and style set to form. */ +export interface ListNodeExtensions$selectQueryParam { + /** Value of the parameter */ + value: string[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + export interface ListNodeExtensionsQueryParamProperties { /** The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". */ timeOut?: number; @@ -3434,7 +3703,7 @@ export interface ListNodeExtensionsQueryParamProperties { */ maxresults?: number; /** An OData $select clause. */ - $select?: string[]; + $select?: string[] | ListNodeExtensions$selectQueryParam; } export interface ListNodeExtensionsQueryParam { @@ -3610,7 +3879,7 @@ export interface ListNodeFilesQueryParamProperties { maxresults?: number; /** * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. + * https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. */ $filter?: string; /** Whether to list children of a directory. */ diff --git a/sdk/batch/batch-rest/src/replacePoolPropertiesPolicy.ts b/sdk/batch/batch-rest/src/replacePoolPropertiesPolicy.ts deleted file mode 100644 index d2af66ed1d07..000000000000 --- a/sdk/batch/batch-rest/src/replacePoolPropertiesPolicy.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { PipelinePolicy } from "@azure/core-rest-pipeline"; -// import { AzureLogger } from "@azure/logger"; - -/** - * KLUGE: Create a new `PipelinePolicy` to add a empty list for the - * `certificateReferences` property in the request body, as it's required - * in our API and the cerficate related features are removed from our TypeSpec - * and the generated code. In the future, this policy should be removed after - * the Batch service side removes the requirement of this property. - * - */ -export function createReplacePoolPropertiesPolicy(): PipelinePolicy { - return { - name: "ReplacePoolPropertiesPolicy", - async sendRequest(request, next) { - if ( - request.url.match(/\/pools\/[^/]+\/updateproperties/) && - request.method === "POST" && - request.body - ) { - try { - const body = JSON.parse(request.body as string); - body.certificateReferences = []; - request.body = JSON.stringify(body); - // console.log("matched", request.body); - } catch (e) { - // Ignore the error - } - } - return next(request); - }, - }; -} diff --git a/sdk/batch/batch-rest/src/responses.ts b/sdk/batch/batch-rest/src/responses.ts index 0b915e2f9c44..7647899ac994 100644 --- a/sdk/batch/batch-rest/src/responses.ts +++ b/sdk/batch/batch-rest/src/responses.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { RawHttpHeaders } from "@azure/core-rest-pipeline"; -import type { HttpResponse } from "@azure-rest/core-client"; -import type { +import { RawHttpHeaders } from "@azure/core-rest-pipeline"; +import { HttpResponse } from "@azure-rest/core-client"; +import { BatchApplicationListResultOutput, BatchErrorOutput, BatchApplicationOutput, @@ -698,13 +698,15 @@ export interface ListJobPreparationAndReleaseTaskStatus200Headers { } /** The request has succeeded. */ -export interface ListJobPreparationAndReleaseTaskStatus200Response extends HttpResponse { +export interface ListJobPreparationAndReleaseTaskStatus200Response + extends HttpResponse { status: "200"; body: BatchJobPreparationAndReleaseTaskStatusListResultOutput; headers: RawHttpHeaders & ListJobPreparationAndReleaseTaskStatus200Headers; } -export interface ListJobPreparationAndReleaseTaskStatusDefaultResponse extends HttpResponse { +export interface ListJobPreparationAndReleaseTaskStatusDefaultResponse + extends HttpResponse { status: string; body: BatchErrorOutput; } @@ -1535,7 +1537,8 @@ export interface GetNodeRemoteLoginSettings200Response extends HttpResponse { headers: RawHttpHeaders & GetNodeRemoteLoginSettings200Headers; } -export interface GetNodeRemoteLoginSettingsDefaultResponse extends HttpResponse { +export interface GetNodeRemoteLoginSettingsDefaultResponse + extends HttpResponse { status: string; body: BatchErrorOutput; } diff --git a/sdk/batch/batch-rest/test/browser/batchSharedKeyCredentials.spec.ts b/sdk/batch/batch-rest/test/browser/batchSharedKeyCredentials.spec.ts deleted file mode 100644 index abfe939cf210..000000000000 --- a/sdk/batch/batch-rest/test/browser/batchSharedKeyCredentials.spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { createBatchSharedKeyCredentialsPolicy } from "../../src/credentials/batchSharedKeyCredentials.js"; -import { AzureNamedKeyCredential } from "@azure/core-auth"; -import { describe, expect, it } from "vitest"; - -describe("createBatchSharedKeyCredentialsPolicy", () => { - it("should throw error in browser environment", () => { - expect(() => - createBatchSharedKeyCredentialsPolicy(new AzureNamedKeyCredential("name", "key")), - ).toThrowError("BatchSharedKeyCredentialsPolicy is not supported in browser environment"); - }); -}); diff --git a/sdk/batch/batch-rest/test/computeNodes.spec.ts b/sdk/batch/batch-rest/test/computeNodes.spec.ts deleted file mode 100644 index 2975f1b2f0b0..000000000000 --- a/sdk/batch/batch-rest/test/computeNodes.spec.ts +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; -import { isPlaybackMode } from "@azure-tools/test-recorder"; -import { createBatchClient, createRecorder } from "./utils/recordedClient.js"; -import type { - BatchClient, - CreatePoolParameters, - CreateNodeUserParameters, - ReplaceNodeUserParameters, - UploadBatchServiceLogsContent, - UploadNodeLogsParameters, -} from "../src/index.js"; -import { isUnexpected, type ListNodes200Response, type BatchNodeOutput } from "../src/index.js"; -import { fakeTestPasswordPlaceholder1 } from "./utils/fakeTestSecrets.js"; -import { getResourceName, waitForNotNull } from "./utils/helpers.js"; -import { describe, it, beforeAll, afterAll, beforeEach, afterEach, assert } from "vitest"; - -const BASIC_POOL = getResourceName("Pool-Basic"); -const BASIC_POOL_NUM_VMS = 4; -const TEST_USER = "JSSDKTestUser"; - -describe("Compute node operations", async () => { - let recorder: Recorder; - let batchClient: BatchClient; - let computeNodes: string[]; - - /** - * Provision helper resources needed for testing jobs - */ - beforeAll(async function () { - if (!isPlaybackMode()) { - batchClient = createBatchClient(); - - const poolParams: CreatePoolParameters = { - body: { - id: BASIC_POOL, - vmSize: "Standard_D1_v2", - virtualMachineConfiguration: { - nodeAgentSKUId: "batch.node.windows amd64", - imageReference: { - publisher: "microsoftwindowsserver", - offer: "windowsserver", - sku: "2022-datacenter", - }, - }, - targetDedicatedNodes: BASIC_POOL_NUM_VMS, - // Ensures there's a compute node file we can reference later - startTask: { commandLine: "cmd /c echo hello > hello.txt" }, - // Sets up pool user we can reference later - userAccounts: [ - { - name: "nonAdminUser", - // Recorder sanitizer options will replace password with fakeTestPasswordPlaceholder1 - password: isPlaybackMode() ? fakeTestPasswordPlaceholder1 : "user_1account_password2", - elevationLevel: "nonadmin", - }, - ], - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const poolPostResult = await batchClient.path("/pools").post(poolParams); - if (isUnexpected(poolPostResult)) { - assert.fail(`Received unexpected status code from creating pool: ${poolPostResult.status} - Unable to provision resource needed for Job Testing. - Response Body: ${poolPostResult.body.message}`); - } - } - }); - - /** - * Unprovision helper resources after all tests ran - */ - afterAll(async function () { - if (!isPlaybackMode()) { - batchClient = createBatchClient(); - - const poolDeleteResponse = await batchClient.path("/pools/{poolId}", BASIC_POOL).delete(); - if (isUnexpected(poolDeleteResponse)) { - assert.fail(`Received unexpected status code from deleting pool: ${poolDeleteResponse.status}.Pool Resource Leaked. - Respose Body: ${poolDeleteResponse.body.message}`); - } - } - }); - - beforeEach(async function (ctx: VitestTestContext) { - recorder = await createRecorder(ctx); - batchClient = createBatchClient(recorder); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("should list compute nodes successfully", async () => { - const poolId = recorder.variable("BASIC_POOL", BASIC_POOL); - - const getListNodesResult = async (): Promise => { - const res = await batchClient.path("/pools/{poolId}/nodes", poolId).get(); - if (isUnexpected(res)) { - assert.fail(`Received unexpected status code from getting pool: ${res.status} - Response Body: ${res.body.message}`); - } - if ( - (res.body.value?.length ?? 0) > 0 && - res.body.value!.filter((node) => - ["starting", "waitingforstarttask", "creating"].includes(node.state!), - ).length === 0 - ) { - return res; - } - return null; - }; - - const listNodesResult = await waitForNotNull(getListNodesResult); - const nodeList = listNodesResult.body.value!; - computeNodes = nodeList.map(function (x) { - return x.id!; - }); - assert.equal(nodeList[0].state, "idle"); - assert.equal(nodeList[0].schedulingState, "enabled"); - assert.isTrue(nodeList[0].isDedicated); - assert.equal(listNodesResult.body.value?.length, BASIC_POOL_NUM_VMS); - }); - - it("should get a compute node reference", async () => { - const getNodeResult = await batchClient - .path( - "/pools/{poolId}/nodes/{nodeId}", - recorder.variable("BASIC_POOL", BASIC_POOL), - computeNodes[0], - ) - .get(); - if (isUnexpected(getNodeResult)) { - assert.fail(`Received unexpected status code from getting compute node: ${getNodeResult.status} - Response Body: ${getNodeResult.body.message}`); - } - - assert.equal(getNodeResult.status, "200"); - assert.equal(getNodeResult.body.id, computeNodes[0]); - assert.equal(getNodeResult.body.state, "idle"); - assert.equal(getNodeResult.body.schedulingState, "enabled"); - }); - - it("should add a user to a compute node successfully", async () => { - const addUserOptions: CreateNodeUserParameters = { - body: { - name: TEST_USER, - isAdmin: false, - password: isPlaybackMode() ? fakeTestPasswordPlaceholder1 : "user_1account_password2", - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const addUserResult = await batchClient - .path( - "/pools/{poolId}/nodes/{nodeId}/users", - recorder.variable("BASIC_POOL", BASIC_POOL), - computeNodes[0], - ) - .post(addUserOptions); - assert.equal(addUserResult.status, "201"); - }); - - it("should update a compute node user successfully", async () => { - const updateUserOptions: ReplaceNodeUserParameters = { - body: { - password: isPlaybackMode() ? fakeTestPasswordPlaceholder1 : "user_1account_password2", - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const updateUserResult = await batchClient - .path( - "/pools/{poolId}/nodes/{nodeId}/users/{userName}", - recorder.variable("BASIC_POOL", BASIC_POOL), - computeNodes[0], - TEST_USER, - ) - .put(updateUserOptions); - assert.equal(updateUserResult.status, "200"); - }); - - it("should delete a compute node user successfully", async () => { - const updateUserResult = await batchClient - .path( - "/pools/{poolId}/nodes/{nodeId}/users/{userName}", - recorder.variable("BASIC_POOL", BASIC_POOL), - computeNodes[0], - TEST_USER, - ) - .delete(); - assert.equal(updateUserResult.status, "200"); - }); - - it("should disable scheduling on a compute node successfully", async () => { - const disableSchedulingResult = await batchClient - .path( - "/pools/{poolId}/nodes/{nodeId}/disablescheduling", - recorder.variable("BASIC_POOL", BASIC_POOL), - computeNodes[1], - ) - .post({ contentType: "application/json; odata=minimalmetadata" }); - assert.equal(disableSchedulingResult.status, "200"); - }); - - it("should enable scheduling on a compute node successfully", async () => { - const enableSchedulingResult = await batchClient - .path( - "/pools/{poolId}/nodes/{nodeId}/enablescheduling", - recorder.variable("BASIC_POOL", BASIC_POOL), - computeNodes[1], - ) - .post({ contentType: "application/json; odata=minimalmetadata" }); - assert.equal(enableSchedulingResult.status, "200"); - }); - - it("should reboot a compute node successfully", async () => { - const rebootNodeResult = await batchClient - .path( - "/pools/{poolId}/nodes/{nodeId}/reboot", - recorder.variable("BASIC_POOL", BASIC_POOL), - computeNodes[0], - ) - .post({ contentType: "application/json; odata=minimalmetadata" }); - assert.equal(rebootNodeResult.status, "202"); - }); - - it("should reimage a compute node successfully", async () => { - const reimageNodeResult = await batchClient - .path( - "/pools/{poolId}/nodes/{nodeId}/reimage", - recorder.variable("BASIC_POOL", BASIC_POOL), - computeNodes[1], - ) - .post({ contentType: "application/json; odata=minimalmetadata" }); - assert.equal(reimageNodeResult.status, "202"); - }); - - it("should upload pool node logs at paas pool", async () => { - const container = "https://teststorage.blob.core.windows.net/fakecontainer"; - const config: UploadBatchServiceLogsContent = { - containerUrl: container, - startTime: new Date("2018-02-25T00:00:00.000Z"), - }; - - const uploadLogBody: UploadNodeLogsParameters = { - body: config, - contentType: "application/json; odata=minimalmetadata", - }; - - const uploadLogResult = await batchClient - .path( - "/pools/{poolId}/nodes/{nodeId}/uploadbatchservicelogs", - recorder.variable("BASIC_POOL", BASIC_POOL), - computeNodes[2], - ) - .post(uploadLogBody); - if (isUnexpected(uploadLogResult)) { - assert.fail(`Received unexpected status code from uploading log to compute node: ${uploadLogResult.status} - Response Body: ${uploadLogResult.body.message}`); - } - - assert.isAtLeast(uploadLogResult.body.numberOfFilesUploaded, 1); - }); - - it("should deallocate and then start a compute node successfully", async () => { - const poolId = recorder.variable("BASIC_POOL", BASIC_POOL); - const nodeId = computeNodes[3]; - - const deallocateNodeResult = await batchClient - .path("/pools/{poolId}/nodes/{nodeId}/deallocate", poolId, nodeId) - .post({ contentType: "application/json; odata=minimalmetadata" }); - assert.equal(deallocateNodeResult.status, "202"); - - const checkIfDeallocated = async (): Promise => { - const nodes = await batchClient.path("/pools/{poolId}/nodes", poolId).get(); - if (isUnexpected(nodes)) { - assert.fail(`Received unexpected status code from listing nodes: ${nodes.status} - Response Body: ${nodes.body.message}`); - } - const node = nodes.body.value?.find((n) => n.id === nodeId); - if (node?.state === "deallocated") { - return node; - } - return null; - }; - - await waitForNotNull(checkIfDeallocated); - - const startNodeResult = await batchClient - .path("/pools/{poolId}/nodes/{nodeId}/start", poolId, nodeId) - .post({ contentType: "application/json; odata=minimalmetadata" }); - assert.equal(startNodeResult.status, "202"); - }); -}); diff --git a/sdk/batch/batch-rest/test/jobSchedules.spec.ts b/sdk/batch/batch-rest/test/jobSchedules.spec.ts deleted file mode 100644 index 047c73cc16fd..000000000000 --- a/sdk/batch/batch-rest/test/jobSchedules.spec.ts +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { Recorder } from "@azure-tools/test-recorder"; -import { isPlaybackMode } from "@azure-tools/test-recorder"; -import { createBatchClient, createRecorder } from "./utils/recordedClient.js"; -import type { - BatchJobSchedule, - CreateJobScheduleParameters, - BatchClient, - CreatePoolParameters, -} from "../src/index.js"; -import { isUnexpected } from "../src/index.js"; -import { fakeTestPasswordPlaceholder1 } from "./utils/fakeTestSecrets.js"; -import { getResourceName } from "./utils/helpers.js"; -import moment from "moment"; -import { describe, it, beforeAll, afterAll, beforeEach, afterEach, assert } from "vitest"; - -const BASIC_POOL = getResourceName("Pool-Basic"); -const JOB_SCHEDULE = getResourceName("JobSchedule-Basic"); -const JOB_SCHEDULE_DISPLAY = "JobSchedule-1"; - -describe("Job Schedule Operations Test", () => { - let recorder: Recorder; - let batchClient: BatchClient; - - /** - * Provision helper resources needed for testing jobs - */ - beforeAll(async () => { - if (!isPlaybackMode()) { - batchClient = createBatchClient(); - - const poolParams: CreatePoolParameters = { - body: { - id: BASIC_POOL, - vmSize: "Standard_D1_v2", - virtualMachineConfiguration: { - nodeAgentSKUId: "batch.node.windows amd64", - imageReference: { - publisher: "microsoftwindowsserver", - offer: "windowsserver", - sku: "2022-datacenter", - }, - }, - targetDedicatedNodes: 4, - // Ensures there's a compute node file we can reference later - startTask: { commandLine: "cmd /c echo hello > hello.txt" }, - // Sets up pool user we can reference later - userAccounts: [ - { - name: "nonAdminUser", - password: isPlaybackMode() ? fakeTestPasswordPlaceholder1 : "user_1account_password2", // Recorder sanitizer options will replace password with fakeTestPasswordPlaceholder1 - elevationLevel: "nonadmin", - }, - ], - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const poolPostResult = await batchClient.path("/pools").post(poolParams); - if (isUnexpected(poolPostResult)) { - assert.fail(`Received unexpected status code from creating pool: ${poolPostResult.status} - Unable to provision resource needed for job schedule Testing. - Response Body: ${poolPostResult.body.message}`); - } - } - }); - - /** - * Unprovision helper resources after all tests ran - */ - afterAll(async () => { - if (!isPlaybackMode()) { - batchClient = createBatchClient(); - - const poolId = recorder.variable("BASIC_POOL", BASIC_POOL); - const poolDeleteResponse = await batchClient.path("/pools/{poolId}", poolId).delete(); - if (isUnexpected(poolDeleteResponse)) { - assert.fail(`Received unexpected status code from deleting pool: ${poolDeleteResponse.status}.Pool Resource Leaked. - Respose Body: ${poolDeleteResponse.body.message}`); - } - } - }); - - beforeEach(async (ctx) => { - recorder = await createRecorder(ctx); - batchClient = createBatchClient(recorder); - }); - - afterEach(async () => { - await recorder.stop(); - }); - - it("should create a job schedule successfully", async () => { - const options: CreateJobScheduleParameters = { - body: { - id: recorder.variable("JOB_SCHEDULE", JOB_SCHEDULE), - jobSpecification: { - poolInfo: { poolId: recorder.variable("BASIC_POOL", BASIC_POOL) }, - displayName: JOB_SCHEDULE_DISPLAY, - }, - schedule: { - doNotRunAfter: new Date( - recorder.variable("JOB_SCHEDULE_RUN_DATE", moment().add(1, "days").toISOString()), - ), - recurrenceInterval: moment.duration({ minutes: 2 }).toISOString(), - }, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const postScheduleResult = await batchClient.path("/jobschedules").post(options); - - if (isUnexpected(postScheduleResult)) { - assert.fail(`Received unexpected status code from creating job schedule: ${postScheduleResult.status} - Response Body: ${postScheduleResult.body.message}`); - } - }); - - it("should list job schedules successfully", async () => { - const jobScheduleListResult = await batchClient.path("/jobschedules").get(); - if (isUnexpected(jobScheduleListResult)) { - assert.fail(`Received unexpected status code from listing job schedules: ${jobScheduleListResult.status} - Response Body: ${jobScheduleListResult.body.message}`); - } - - assert.isAtLeast(jobScheduleListResult.body.value?.length || 0, 1); - }); - - it("should list jobs from job schedule successfully", async () => { - const jobListResult = await batchClient - .path("/jobschedules/{jobScheduleId}/jobs", recorder.variable("JOB_SCHEDULE", JOB_SCHEDULE)) - .get(); - if (isUnexpected(jobListResult)) { - assert.fail(`Received unexpected status code from listing jobs under job schedule: ${jobListResult.status} - Response Body: ${jobListResult.body.message}`); - } - - assert.equal(jobListResult.body.value?.length || 0, 1); - }); - - it("should check if a job schedule exists successfully", async () => { - const getJobScheduleResult = await batchClient - .path("/jobschedules/{jobScheduleId}", recorder.variable("JOB_SCHEDULE", JOB_SCHEDULE)) - .get(); - assert.equal(getJobScheduleResult.status, "200"); - }); - - it("should get a job schedule reference successfully", async () => { - const jobScheduleId = recorder.variable("JOB_SCHEDULE", JOB_SCHEDULE); - const getJobScheduleResult = await batchClient - .path("/jobschedules/{jobScheduleId}", jobScheduleId) - .get(); - - if (isUnexpected(getJobScheduleResult)) { - assert.fail(`Received unexpected status code from getting job schedule reference: ${getJobScheduleResult.status} - Response Body: ${getJobScheduleResult.body.message}`); - } - - assert.equal(getJobScheduleResult.body.id, jobScheduleId); - assert.equal(getJobScheduleResult.body.state, "active"); - assert.equal(getJobScheduleResult.body.jobSpecification?.displayName, JOB_SCHEDULE_DISPLAY); - }); - - it("should update a job schedule successfully", async () => { - const updateScheduleOptions: BatchJobSchedule = { - schedule: { recurrenceInterval: moment.duration({ hours: 6 }).toISOString() }, - jobSpecification: { poolInfo: { poolId: recorder.variable("BASIC_POOL", BASIC_POOL) } }, - }; - - const updateScheduleResult = await batchClient - .path("/jobschedules/{jobScheduleId}", recorder.variable("JOB_SCHEDULE", JOB_SCHEDULE)) - .put({ - body: updateScheduleOptions, - contentType: "application/json; odata=minimalmetadata", - }); - - assert.equal(updateScheduleResult.status, "200"); - }); - - it("should patch a job schedule successfully", async () => { - const patchScheduleOptions = { - schedule: { - recurrenceInterval: moment.duration({ hours: 3 }).toISOString(), - startWindow: moment.duration({ hours: 1 }).toISOString(), - }, - }; - - const patchScheduleResult = await batchClient - .path("/jobschedules/{jobScheduleId}", recorder.variable("JOB_SCHEDULE", JOB_SCHEDULE)) - .patch({ - body: patchScheduleOptions, - contentType: "application/json; odata=minimalmetadata", - }); - - assert.equal(patchScheduleResult.status, "200"); - }); - - it("should disable a job schedule successfully", async () => { - const disableScheduleResult = await batchClient - .path( - "/jobschedules/{jobScheduleId}/disable", - recorder.variable("JOB_SCHEDULE", JOB_SCHEDULE), - ) - .post({ contentType: "application/json; odata=minimalmetadata" }); - assert.equal(disableScheduleResult.status, "204"); - }); - - it("should enable a job schedule successfully", async () => { - const enableScheduleResult = await batchClient - .path("/jobschedules/{jobScheduleId}/enable", recorder.variable("JOB_SCHEDULE", JOB_SCHEDULE)) - .post({ contentType: "application/json; odata=minimalmetadata" }); - assert.equal(enableScheduleResult.status, "204"); - }); - - it("should terminate a job schedule successfully", async () => { - const terminateScheduleResult = await batchClient - .path( - "/jobschedules/{jobScheduleId}/terminate", - recorder.variable("JOB_SCHEDULE", JOB_SCHEDULE), - ) - .post({ contentType: "application/json; odata=minimalmetadata" }); - assert.equal(terminateScheduleResult.status, "202"); - }); - - it("should delete a job schedule successfully", async () => { - const deleteJobScheduleResult = await batchClient - .path("/jobschedules/{jobScheduleId}", recorder.variable("JOB_SCHEDULE", JOB_SCHEDULE)) - .delete(); - assert.equal(deleteJobScheduleResult.status, "202"); - }); -}); diff --git a/sdk/batch/batch-rest/test/jobs.spec.ts b/sdk/batch/batch-rest/test/jobs.spec.ts deleted file mode 100644 index 75f32efbd14d..000000000000 --- a/sdk/batch/batch-rest/test/jobs.spec.ts +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; -import { isPlaybackMode } from "@azure-tools/test-recorder"; -import { createBatchClient, createRecorder } from "./utils/recordedClient.js"; -import type { - BatchClient, - BatchJobCreateContent, - CreateJobParameters, - CreatePoolParameters, - UpdateJobParameters, -} from "../src/index.js"; -import { isUnexpected } from "../src/index.js"; -import { fakeTestPasswordPlaceholder1 } from "./utils/fakeTestSecrets.js"; -import { getResourceName } from "./utils/helpers.js"; -import { describe, it, beforeAll, afterAll, beforeEach, afterEach, assert } from "vitest"; - -const BASIC_POOL = getResourceName("Pool-Basic"); -const JOB_NAME = getResourceName("Job-Basic"); -const JOB_PRIORITY = 600; - -describe("Job Operations Test", () => { - let recorder: Recorder; - let batchClient: BatchClient; - - /** - * Provision helper resources needed for testing jobs - */ - beforeAll(async function () { - if (!isPlaybackMode()) { - batchClient = createBatchClient(); - - const poolParams: CreatePoolParameters = { - body: { - id: BASIC_POOL, - vmSize: "Standard_D1_v2", - virtualMachineConfiguration: { - nodeAgentSKUId: "batch.node.windows amd64", - imageReference: { - publisher: "microsoftwindowsserver", - offer: "windowsserver", - sku: "2022-datacenter", - }, - }, - targetDedicatedNodes: 4, - // Ensures there's a compute node file we can reference later - startTask: { commandLine: "cmd /c echo hello > hello.txt" }, - // Sets up pool user we can reference later - userAccounts: [ - { - name: "nonAdminUser", - password: isPlaybackMode() ? fakeTestPasswordPlaceholder1 : "user_1account_password2", // Recorder sanitizer options will replace password with fakeTestPasswordPlaceholder1 - elevationLevel: "nonadmin", - }, - ], - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const poolPostResult = await batchClient.path("/pools").post(poolParams); - if (isUnexpected(poolPostResult)) { - console.dir(poolPostResult, { depth: null }); - assert.fail(`Received unexpected status code from creating pool: ${poolPostResult.status} - Unable to provision resource needed for Job Testing. - Response Body: ${poolPostResult.body}`); - } - } - }); - - /** - * Unprovision helper resources after all tests ran - */ - afterAll(async function () { - if (!isPlaybackMode()) { - batchClient = createBatchClient(); - - const poolDeleteResponse = await batchClient.path("/pools/{poolId}", BASIC_POOL).delete(); - if (isUnexpected(poolDeleteResponse)) { - assert.fail(`Received unexpected status code from deleting pool: ${poolDeleteResponse.status}.Pool Resource Leaked. - Respose Body: ${poolDeleteResponse.body.message}`); - } - } - }); - - beforeEach(async function (ctx: VitestTestContext) { - recorder = await createRecorder(ctx); - batchClient = createBatchClient(recorder); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("should create a job successfully", async () => { - const jobId = recorder.variable("JOB_NAME", JOB_NAME); - const poolId = recorder.variable("BASIC_POOL", BASIC_POOL); - const jobAddParam: CreateJobParameters = { - body: { - id: jobId, - poolInfo: { poolId: poolId }, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const jobAddResult = await batchClient.path("/jobs").post(jobAddParam); - if (isUnexpected(jobAddResult)) { - assert.fail(`Received unexpected status code from creating job: ${jobAddResult.status} - Response Body: ${jobAddResult.body.message}`); - } - - const getJobResult = await batchClient.path("/jobs/{jobId}", jobId).get(); - - if (isUnexpected(getJobResult)) { - assert.fail(`Received unexpected status code from getting job reference: ${getJobResult.status} - Response Body: ${getJobResult.body.message}`); - } - - assert.equal(getJobResult.body.state, "active"); - assert.equal(getJobResult.body.poolInfo?.poolId, poolId); - assert.equal(getJobResult.body.allowTaskPreemption, false); - }); - - it("should update a job successfully", async () => { - const options: BatchJobCreateContent = { - id: recorder.variable("JOB_NAME", JOB_NAME), - priority: 500, - constraints: { maxTaskRetryCount: 3 }, - poolInfo: { poolId: recorder.variable("BASIC_POOL", BASIC_POOL) }, - }; - - const jobPutParams: CreateJobParameters = { - body: options, - contentType: "application/json; odata=minimalmetadata", - }; - - const updateJobResult = await batchClient - .path("/jobs/{jobId}", recorder.variable("JOB_NAME", JOB_NAME)) - .put(jobPutParams); - assert.equal(updateJobResult.status, "200"); - }); - - it("should patch a job successfully", async () => { - const options = { - priority: JOB_PRIORITY, - constraints: { maxTaskRetryCount: 3 }, - poolInfo: { poolId: recorder.variable("BASIC_POOL", BASIC_POOL) }, - }; - - const jobPatchParams: UpdateJobParameters = { - body: options, - contentType: "application/json; odata=minimalmetadata", - }; - const patchJobResult = await batchClient - .path("/jobs/{jobId}", recorder.variable("JOB_NAME", JOB_NAME)) - .patch(jobPatchParams); - assert.equal(patchJobResult.status, "200"); - }); - - it("should get a job reference successfully", async () => { - const jobId = recorder.variable("JOB_NAME", JOB_NAME); - const jobGetResult = await batchClient.path("/jobs/{jobId}", jobId).get(); - - if (isUnexpected(jobGetResult)) { - assert.fail(`Received unexpected status code from getting job reference: ${jobGetResult.status} - Response Body: ${jobGetResult.body.message}`); - } - - assert.equal(jobGetResult.body.id, jobId); - assert.equal(jobGetResult.body.state, "active"); - assert.equal(jobGetResult.body.priority, JOB_PRIORITY); - assert.equal(jobGetResult.body.poolInfo!.poolId, recorder.variable("BASIC_POOL", BASIC_POOL)); - }); - - it("should list jobs successfully", async () => { - const listJobsResult = await batchClient.path("/jobs").get(); - - if (isUnexpected(listJobsResult)) { - assert.fail(`Received unexpected status code from listing jobs: ${listJobsResult.status} - Response Body: ${listJobsResult.body.message}`); - } - - assert.isAtLeast(listJobsResult.body.value?.length ?? 0, 1); - }); - - it("should fail to job prep+release status", async () => { - // TODO Wrap code around try/catch and try throwing exception from error response body - const getJobPrepResult = await batchClient - .path( - "/jobs/{jobId}/jobpreparationandreleasetaskstatus", - recorder.variable("JOB_NAME", JOB_NAME), - ) - .get(); - if (!isUnexpected(getJobPrepResult)) { - assert.fail("Expected error response to return"); - } - }); - - it("should disable a job successfully", async () => { - const disableJobResult = await batchClient - .path("/jobs/{jobId}/disable", recorder.variable("JOB_NAME", JOB_NAME)) - .post({ - body: { disableTasks: "requeue" }, - contentType: "application/json; odata=minimalmetadata", - }); - - assert.equal(disableJobResult.status, "202"); - }); - - it("should enable a job successfully", async () => { - const enableJobResult = await batchClient - .path("/jobs/{jobId}/enable", recorder.variable("JOB_NAME", JOB_NAME)) - .post({ contentType: "application/json; odata=minimalmetadata" }); - - assert.equal(enableJobResult.status, "202"); - }); - - it("should terminate a job successfully", async () => { - const terminateJobResult = await batchClient - .path("/jobs/{jobId}/terminate", recorder.variable("JOB_NAME", JOB_NAME)) - .post({ - contentType: "application/json; odata=minimalmetadata", - queryParameters: { - force: true, - }, - }); - - assert.equal(terminateJobResult.status, "202"); - }); - - // it("should get all job statistics successfully", async () => { - // const getJobStatsResult = await batchClient.path("/joblife").get(); - // if (isUnexpected(getJobStatsResult)) { - // assert.fail(`Received unexpected status code from getting job lifetime stats: ${getJobStatsResult.status} - // Response Body: ${getJobStatsResult.body.message}`); - // } - - // assert.isDefined(getJobStatsResult.body.userCPUTime); - // assert.isDefined(getJobStatsResult.body.kernelCPUTime); - // }); - - it("should delete a job successfully", async function () { - const jobId = recorder.variable("JOB_NAME", JOB_NAME); - const deleteJobResult = await batchClient.path("/jobs/{jobId}", jobId).delete({ - queryParameters: { force: true }, - }); - assert.equal(deleteJobResult.status, "202"); - }); -}); diff --git a/sdk/batch/batch-rest/test/poolScaling.spec.ts b/sdk/batch/batch-rest/test/poolScaling.spec.ts deleted file mode 100644 index 4660bd978f24..000000000000 --- a/sdk/batch/batch-rest/test/poolScaling.spec.ts +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; -import { isPlaybackMode } from "@azure-tools/test-recorder"; -import { createBatchClient, createRecorder } from "./utils/recordedClient.js"; -import type { - BatchClient, - CreatePoolParameters, - EnablePoolAutoScaleParameters, - EvaluatePoolAutoScaleParameters, -} from "../src/index.js"; -import { isUnexpected, type GetPool200Response } from "../src/index.js"; -import { fakeTestPasswordPlaceholder1 } from "./utils/fakeTestSecrets.js"; -import { getResourceName, waitForNotNull } from "./utils/helpers.js"; -import moment from "moment"; -import { describe, it, beforeAll, afterAll, beforeEach, afterEach, assert } from "vitest"; - -const BASIC_POOL = getResourceName("Pool-Basic"); -// const JOB_NAME = getResourceName("Job-Basic"); -// const JOB_PRIORITY = 600; - -describe("Autoscale operations", async () => { - let recorder: Recorder; - let batchClient: BatchClient; - - /** - * Provision helper resources needed for testing jobs - */ - beforeAll(async function () { - if (!isPlaybackMode()) { - batchClient = createBatchClient(); - - const poolParams: CreatePoolParameters = { - body: { - id: BASIC_POOL, - vmSize: "Standard_D1_v2", - virtualMachineConfiguration: { - nodeAgentSKUId: "batch.node.windows amd64", - imageReference: { - publisher: "microsoftwindowsserver", - offer: "windowsserver", - sku: "2022-datacenter", - }, - }, - targetDedicatedNodes: 4, - // Ensures there's a compute node file we can reference later - startTask: { commandLine: "cmd /c echo hello > hello.txt" }, - // Sets up pool user we can reference later - userAccounts: [ - { - name: "nonAdminUser", - password: isPlaybackMode() ? fakeTestPasswordPlaceholder1 : "user_1account_password2", // Recorder sanitizer options will replace password with fakeTestPasswordPlaceholder1 - elevationLevel: "nonadmin", - }, - ], - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const poolPostResult = await batchClient.path("/pools").post(poolParams); - if (isUnexpected(poolPostResult)) { - assert.fail(`Received unexpected status code from creating pool: ${poolPostResult.status} - Unable to provision resource needed for Job Testing. - Response Body: ${poolPostResult.body.message}`); - } - const getSteadyPool = async (): Promise => { - const getPoolResult = await batchClient.path("/pools/{poolId}", BASIC_POOL).get(); - if (isUnexpected(getPoolResult)) { - assert.fail(`Received unexpected status code from getting pool: ${getPoolResult.status} - Unable to provision resource needed for Job Testing. - Response Body: ${getPoolResult.body.message}`); - } - if (getPoolResult.body.allocationState === "steady") { - return getPoolResult; - } - return null; - }; - await waitForNotNull(getSteadyPool); - } - }); - - /** - * Unprovision helper resources after all tests ran - */ - afterAll(async function () { - if (!isPlaybackMode()) { - batchClient = createBatchClient(); - - const poolDeleteResponse = await batchClient.path("/pools/{poolId}", BASIC_POOL).delete(); - if (isUnexpected(poolDeleteResponse)) { - assert.fail(`Received unexpected status code from deleting pool: ${poolDeleteResponse.status}.Pool Resource Leaked. - Respose Body: ${poolDeleteResponse.body.message}`); - } - } - }); - - beforeEach(async function (ctx: VitestTestContext) { - recorder = await createRecorder(ctx); - batchClient = createBatchClient(recorder); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("should enable autoscale successfully", async () => { - const poolEnableAutoScaleParams: EnablePoolAutoScaleParameters = { - body: { - autoScaleFormula: "$TargetDedicatedNodes=2", - autoScaleEvaluationInterval: moment.duration({ minutes: 6 }).toISOString(), - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const autoScaleResult = await batchClient - .path("/pools/{poolId}/enableautoscale", recorder.variable("BASIC_POOL", BASIC_POOL)) - .post(poolEnableAutoScaleParams); - assert.equal(autoScaleResult.status, "200"); - }); - - it("should evaluate pool autoscale successfully", async () => { - const poolEvaluateAutoScaleParams: EvaluatePoolAutoScaleParameters = { - body: { - autoScaleFormula: "$TargetDedicatedNodes=3", - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const evaluateAutoScaleResult = await batchClient - .path("/pools/{poolId}/evaluateautoscale", recorder.variable("BASIC_POOL", BASIC_POOL)) - .post(poolEvaluateAutoScaleParams); - - if (isUnexpected(evaluateAutoScaleResult)) { - assert.fail(`Received unexpected status code from evaluating pool autoscale: ${evaluateAutoScaleResult.status} - Response Body: ${evaluateAutoScaleResult.body.message}`); - } - - assert.isUndefined(evaluateAutoScaleResult.body.error); - assert.equal( - evaluateAutoScaleResult.body.results, - "$TargetDedicatedNodes=3;$TargetLowPriorityNodes=0;$NodeDeallocationOption=requeue", - ); - }); - - it("should fail to evaluate invalid autoscale formula", async () => { - const poolEvaluateAutoScaleParams: EvaluatePoolAutoScaleParameters = { - body: { - autoScaleFormula: "$something_useless", - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const evaluateAutoScaleResult = await batchClient - .path("/pools/{poolId}/evaluateautoscale", recorder.variable("BASIC_POOL", BASIC_POOL)) - .post(poolEvaluateAutoScaleParams); - - if (isUnexpected(evaluateAutoScaleResult)) { - assert.fail(`Received unexpected status code from evaluating pool autoscale: ${evaluateAutoScaleResult.status} - Response Body: ${evaluateAutoScaleResult.body.message}`); - } - - assert.isDefined(evaluateAutoScaleResult.body.error); - assert.equal(evaluateAutoScaleResult.body.error?.code, "AutoScalingFormulaEvaluationError"); - - assert.equal( - evaluateAutoScaleResult.body.results, - "$TargetDedicatedNodes=2;$TargetLowPriorityNodes=0;$NodeDeallocationOption=requeue", - ); - }); - - it("should disable autoscale successfully", async () => { - const disableAutoscaleResult = await batchClient - .path("/pools/{poolId}/disableautoscale", recorder.variable("BASIC_POOL", BASIC_POOL)) - .post({ contentType: "application/json; odata=minimalmetadata" }); - assert.equal(disableAutoscaleResult.status, "200"); - }); -}); diff --git a/sdk/batch/batch-rest/test/pools.spec.ts b/sdk/batch/batch-rest/test/pools.spec.ts deleted file mode 100644 index 47bc81da08e8..000000000000 --- a/sdk/batch/batch-rest/test/pools.spec.ts +++ /dev/null @@ -1,766 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/* eslint-disable no-unused-expressions */ - -import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; -import { isPlaybackMode } from "@azure-tools/test-recorder"; -import { createBatchClient, createRecorder } from "./utils/recordedClient.js"; -import type { - BatchClient, - BatchPoolResizeContent, - BatchPoolUpdateContent, - CreatePoolParameters, - GetPoolParameters, - ListPoolsParameters, - ReplacePoolPropertiesParameters, - ResizePoolParameters, -} from "../src/index.js"; -import { - isUnexpected, - paginate, - type GetPool200Response, - type BatchPoolNodeCountsOutput, -} from "../src/index.js"; -import { fakeTestPasswordPlaceholder1 } from "./utils/fakeTestSecrets.js"; -import { wait } from "./utils/wait.js"; -import { getResourceName, POLLING_INTERVAL, waitForNotNull } from "./utils/helpers.js"; -import { describe, it, beforeEach, afterEach, assert, expect } from "vitest"; -import { waitForNodesToStart } from "./utils/pool.js"; - -const BASIC_POOL = getResourceName("Pool-Basic"); -const VMSIZE_D1 = "Standard_D1_v2"; -const VMSIZE_A1 = "Standard_A1_v2"; -const VMSIZE_D2s = "Standard_D2s_v3"; -const BASIC_POOL_NUM_VMS = 4; -const DISK_POOL = getResourceName("Pool-Datadisk"); -const ENDPOINT_POOL = getResourceName("Pool-Endpoint"); -const TEST_POOL3 = getResourceName("Pool-3"); -const SECURITY_PROFILE_POOL = getResourceName("Pool-SecurityProfile"); -const AUTO_OS_UPGRADE_POOL = getResourceName("Pool-AutoOSUpgrade"); -const CVM_POOL = getResourceName("Pool-Confidential"); - -describe("Pool Operations Test", () => { - let recorder: Recorder; - let batchClient: BatchClient; - - const nonAdminPoolUser: string = "nonAdminUser"; - - /** - * Provision helper resources needed for testing pools - */ - - beforeEach(async function (ctx: VitestTestContext) { - recorder = await createRecorder(ctx); - batchClient = createBatchClient(recorder); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("Create Batch Pool successfully", async function () { - // Use assert to test your assumptions - - const poolParams: CreatePoolParameters = { - body: { - id: recorder.variable("BASIC_POOL", BASIC_POOL), - vmSize: VMSIZE_D1, - virtualMachineConfiguration: { - nodeAgentSKUId: "batch.node.windows amd64", - imageReference: { - publisher: "microsoftwindowsserver", - offer: "windowsserver", - sku: "2022-datacenter", - }, - extensions: [ - { - name: "batchextension1", - type: "GenevaMonitoring", - publisher: "Microsoft.Azure.Geneva", - typeHandlerVersion: "2.0", - autoUpgradeMinorVersion: true, - enableAutomaticUpgrade: true, - }, - ], - }, - networkConfiguration: { - enableAcceleratedNetworking: true, - }, - targetDedicatedNodes: BASIC_POOL_NUM_VMS, - // Ensures there's a compute node file we can reference later - startTask: { commandLine: "cmd /c echo hello > hello.txt" }, - // Sets up pool user we can reference later - userAccounts: [ - { - name: nonAdminPoolUser, - password: isPlaybackMode() ? fakeTestPasswordPlaceholder1 : "user_1account_password2", // Recorder sanitizer options will replace password with fakeTestPasswordPlaceholder1 - elevationLevel: "nonadmin", - }, - ], - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const result = await batchClient.path("/pools").post(poolParams); - assert.equal(result.status, "201"); - - if (!isPlaybackMode()) await wait(20000); - }); - - it("should patch pool parameters successfully", async () => { - const options: BatchPoolUpdateContent = { - metadata: [ - { - name: "foo2", - value: "bar2", - }, - ], - }; - - const poolId = recorder.variable("BASIC_POOL", BASIC_POOL); - - const patchResult = await batchClient - .path("/pools/{poolId}", poolId) - .patch({ body: options, contentType: "application/json; odata=minimalmetadata" }); - assert.equal(patchResult.status, "200"); - - const getResult = await batchClient.path("/pools/{poolId}", poolId).get(); - if (isUnexpected(getResult)) { - assert.fail(`Received unexpected status code from getting pool: ${getResult.status} - Response Body: ${getResult.body.message}`); - } - - assert.equal(getResult.body.id, poolId); - assert.equal(getResult.body.state, "active"); - - for (let index = 0; index < options.metadata!.length; index++) { - assert.equal(getResult.body.metadata![index].name, options.metadata![index].name); - assert.equal(getResult.body.metadata![index].value, options.metadata![index].value); - } - }); - - it("should get a pool reference successfully", async () => { - const poolId = recorder.variable("BASIC_POOL", BASIC_POOL); - - const getSteadyPool = async (): Promise => { - const res = await batchClient.path("/pools/{poolId}", poolId).get(); - if (isUnexpected(res)) { - assert.fail(`Received unexpected status code from getting pool: ${res.status} - Response Body: ${res.body.message}`); - } - if (res.body.allocationState === "steady") { - return res; - } - return null; - }; - - const getResult = await waitForNotNull(getSteadyPool); - const metadata = getResult.body.metadata![0]; - - assert.equal(getResult.body.id, poolId); - assert.equal(getResult.body.state, "active"); - assert.equal(getResult.body.allocationState, "steady"); - assert.isDefined(getResult.body.virtualMachineConfiguration); - assert.equal( - getResult.body.virtualMachineConfiguration!.imageReference!.sku, - "2022-datacenter", - ); - assert.equal(getResult.body.vmSize?.toLowerCase(), VMSIZE_D1.toLowerCase()); - assert.equal(getResult.body.targetDedicatedNodes, BASIC_POOL_NUM_VMS); - assert.isFalse(getResult.body.enableAutoScale); - - assert.equal(metadata.name, "foo2"); - assert.equal(metadata.value, "bar2"); - - assert.isDefined(getResult.body.startTask); - assert.equal(getResult.body.startTask!.commandLine, "cmd /c echo hello > hello.txt"); - - assert.lengthOf(getResult.body.userAccounts!, 1); - assert.equal(getResult.body.userAccounts![0].name, nonAdminPoolUser); - assert.equal(getResult.body.userAccounts![0].elevationLevel, "nonadmin"); - expect(getResult.body.networkConfiguration?.enableAcceleratedNetworking).to.be.true; - expect(getResult.body.virtualMachineConfiguration?.extensions?.[0].enableAutomaticUpgrade).to.be - .true; - expect(getResult.body.virtualMachineConfiguration?.extensions?.[0].name).to.equal( - "batchextension1", - ); - }); - - it("should update pool parameters successfully", async function () { - const updateOptions: ReplacePoolPropertiesParameters = { - body: { - metadata: [{ name: "foo", value: "bar" }], - applicationPackageReferences: [], - // Ensures the start task isn't cleared - startTask: { commandLine: "cmd /c echo hello > hello.txt" }, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const poolId = recorder.variable("BASIC_POOL", BASIC_POOL); - - const updateResult = await batchClient - .path("/pools/{poolId}/updateproperties", poolId) - .post(updateOptions); - assert.equal(updateResult.status, "204"); - - const getResult = await batchClient.path("/pools/{poolId}", poolId).get(); - if (isUnexpected(getResult)) { - assert.fail(`Received unexpected status code from getting pool: ${getResult.status} - Response Body: ${getResult.body.message}`); - } - - const metadata = getResult.body.metadata!; - assert.equal(metadata[0].name, "foo"); - assert.equal(metadata[0].value, "bar"); - }); - - it("should get a pool reference with odata successfully", async () => { - const getOptions: GetPoolParameters = { - queryParameters: { - $select: ["id", "state"], - $expand: ["stats"], - }, - }; - - const poolId = recorder.variable("BASIC_POOL", BASIC_POOL); - - const getResult = await batchClient.path("/pools/{poolId}", poolId).get(getOptions); - if (isUnexpected(getResult)) { - assert.fail(`Received unexpected status code from getting pool: ${getResult.status} - Response Body: ${getResult.body.message}`); - } - - assert.equal(getResult.body.id, poolId); - assert.equal(getResult.body.state, "active"); - assert.isUndefined(getResult.body.allocationState); - assert.isUndefined(getResult.body.vmSize); - }); - - it("should list pools without filters", async () => { - const listPoolResult = await batchClient.path("/pools").get(); - assert.equal(listPoolResult.status, "200"); - - if (isUnexpected(listPoolResult)) { - assert.fail(`Received unexpected status code from listing pools: ${listPoolResult.status} - Response Body: ${listPoolResult.body.message}`); - } - - assert.isAtLeast(listPoolResult.body.value?.length ?? 0, 1); - }); - - it("should list a maximum number of pools", async () => { - const listOptions = { queryParameters: { maxresults: 1 } }; - const listPoolResult = await batchClient.path("/pools").get(listOptions); - - if (isUnexpected(listPoolResult)) { - assert.fail(`Received unexpected status code from listing pools: ${listPoolResult.status} - Response Body: ${listPoolResult.body.message}`); - } - - assert.isAtLeast( - listPoolResult.body.value?.length ?? 0, - listOptions.queryParameters.maxresults, - ); - }); - - it("should fail to list pools with invalid max", async () => { - const listOptions = { queryParameters: { maxresults: -5 } }; - const listPoolResult = await batchClient.path("/pools").get(listOptions); - - if (!isUnexpected(listPoolResult)) { - assert.fail(`Received successful list pool result when expected an error reply`); - } - - expect(listPoolResult.body.code).to.equal("InvalidQueryParameterValue"); - expect(listPoolResult.body.values?.[0].value).to.equal("maxresults"); - expect(listPoolResult.body.values?.[1].value).to.equal("-5"); - expect(listPoolResult.body.values?.[2].value).to.equal("MaxResults cannot be less than 1"); - }); - - it("should list pools according to filter", async () => { - const poolId = recorder.variable("BASIC_POOL", BASIC_POOL); - - const listOptions: ListPoolsParameters = { - queryParameters: { - $filter: `startswith(id,'${poolId}')`, - $select: ["id", "state"], - $expand: ["stats"], - }, - }; - - const listPoolsResult = await batchClient.path("/pools").get(listOptions); - if (isUnexpected(listPoolsResult)) { - assert.fail(`Received unexpected status code from listing pools: ${listPoolsResult.status} - Response Body: ${listPoolsResult.body.message}`); - } - - assert.lengthOf(listPoolsResult.body.value!, 1); - assert.equal(listPoolsResult.body.value![0].id, poolId); - assert.equal(listPoolsResult.body.value![0].state, "active"); - assert.isUndefined(listPoolsResult.body.value![0].allocationState); - assert.isUndefined(listPoolsResult.body.value![0].vmSize); - }); - - it("should check that pool exists successfully", async () => { - const poolExistsResult = await batchClient - .path("/pools/{poolId}", recorder.variable("BASIC_POOL", BASIC_POOL)) - .head(); - assert.equal(poolExistsResult.status, "200"); - }); - - it("should add a pool with a Data Disk", async () => { - const poolParams: CreatePoolParameters = { - body: { - id: recorder.variable("DISK_POOL", DISK_POOL), - vmSize: VMSIZE_A1, - virtualMachineConfiguration: { - imageReference: { - publisher: "Canonical", - offer: "UbuntuServer", - sku: "18.04-LTS", - }, - nodeAgentSKUId: "batch.node.ubuntu 18.04", - dataDisks: [ - { - lun: 1, - diskSizeGB: 50, - }, - ], - }, - targetDedicatedNodes: 0, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const result = await batchClient.path("/pools").post(poolParams); - assert.equal(result.status, "201"); - - await wait(POLLING_INTERVAL); - - const getResult = await batchClient.path("/pools/{poolId}", poolParams.body.id!).get(); - if (isUnexpected(getResult)) { - assert.fail(`Received unexpected status code from getting pool: ${getResult.status} - Response Body: ${getResult.body.message}`); - } - - assert.equal(getResult.body.virtualMachineConfiguration!.dataDisks![0].lun, 1); - assert.equal(getResult.body.virtualMachineConfiguration!.dataDisks![0].diskSizeGB, 50); - - await batchClient.path("/pools/{poolId}", poolParams.body.id!).delete(); - }); - - it("should add a pool with inbound endpoint configuration successfully", async () => { - const pool: CreatePoolParameters = { - body: { - id: recorder.variable("ENDPOINT_POOL", ENDPOINT_POOL), - vmSize: VMSIZE_A1, - userAccounts: [ - { - name: nonAdminPoolUser, - password: isPlaybackMode() ? fakeTestPasswordPlaceholder1 : "user_1account_password2", - elevationLevel: "nonadmin", - }, - ], - networkConfiguration: { - endpointConfiguration: { - inboundNATPools: [ - { - name: "TestEndpointConfig", - protocol: "udp", - backendPort: 64444, - frontendPortRangeStart: 60000, - frontendPortRangeEnd: 61000, - networkSecurityGroupRules: [ - { - priority: 150, - access: "allow", - sourceAddressPrefix: "*", - }, - ], - }, - { - name: "ssh", - protocol: "tcp", - backendPort: 22, - frontendPortRangeStart: 15000, - frontendPortRangeEnd: 15100, - }, - ], - }, - }, - virtualMachineConfiguration: { - nodeAgentSKUId: "batch.node.ubuntu 22.04", - imageReference: { - publisher: "Canonical", - offer: "0001-com-ubuntu-server-jammy", - sku: "22_04-lts", - }, - }, - targetDedicatedNodes: 1, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const addResult = await batchClient.path("/pools").post(pool); - assert.equal(addResult.status, "201"); - }); - - it("should get the details of a pool with endpoint configuration successfully", async () => { - const poolId = recorder.variable("ENDPOINT_POOL", ENDPOINT_POOL); - - const nodeList = await waitForNodesToStart(poolId, batchClient); - - assert.lengthOf(nodeList, 1); - assert.isDefined(nodeList[0].endpointConfiguration); - assert.lengthOf(nodeList[0].endpointConfiguration!.inboundEndpoints, 2); - assert.equal( - nodeList[0].endpointConfiguration!.inboundEndpoints[0].name, - "TestEndpointConfig.0", - ); - assert.equal(nodeList[0].endpointConfiguration!.inboundEndpoints[0].protocol, "udp"); - }); - - it("should get pool node counts successfully", async () => { - // let poolList = []; - const poolId = recorder.variable("ENDPOINT_POOL", ENDPOINT_POOL); - - const listNodeCounts = async (): Promise => { - const poolList = []; - const listNodeCountResult = await batchClient.path("/nodecounts").get(); - if (isUnexpected(listNodeCountResult)) { - assert.fail(`Received unexpected status code from list compute nodes: ${listNodeCountResult.status} - Response Body: ${listNodeCountResult.body.message}`); - } - - const paginateResponse = paginate(batchClient, listNodeCountResult); - for await (const pool of paginateResponse) { - poolList.push(pool); - } - - if (poolList.length > 0) { - const endpointPool = poolList.filter((pool) => pool.poolId === poolId); - if (endpointPool.length > 0 && endpointPool[0].dedicated!.idle > 0) { - return endpointPool; - } - } - return null; - }; - const nodeList = await waitForNotNull(listNodeCounts, 60 * 1000); - - const endpointPoolObj = nodeList.filter((pool) => pool.poolId === poolId); - assert.isAbove(endpointPoolObj.length, 0, `Pool with Pool Id ${poolId} not found`); - assert.equal(endpointPoolObj[0].dedicated!.idle, 1); - assert.equal(endpointPoolObj[0].lowPriority!.total, 0); - }); - - it("should get a remote login settings successfully", async () => { - const poolId = recorder.variable("ENDPOINT_POOL", ENDPOINT_POOL); - - const nodeList = await waitForNodesToStart(poolId, batchClient); - - const node = nodeList[0]; - if (!node.id) { - assert.fail("Node id is not defined in the node object"); - } - - const res = await batchClient - .path("/pools/{poolId}/nodes/{nodeId}/remoteloginsettings", poolId, node.id) - .get(); - - if (isUnexpected(res)) { - assert.fail(`Received unexpected status code from getting remote login settings: ${res.status} - Response Body: ${res.body.message}`); - } - expect(res.body.remoteLoginIPAddress).to.be.a("string"); - expect(res.body.remoteLoginPort).to.be.a("number"); - }); - - it("should create a second pool successfully", async () => { - const poolAddParams: CreatePoolParameters = { - body: { - id: recorder.variable("TEST_POOL3", TEST_POOL3), - vmSize: VMSIZE_A1, - virtualMachineConfiguration: { - nodeAgentSKUId: "batch.node.windows amd64", - imageReference: { - publisher: "microsoftwindowsserver", - offer: "windowsserver", - sku: "2022-datacenter", - }, - }, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const addPoolResult = await batchClient.path("/pools").post(poolAddParams); - assert.equal(addPoolResult.status, "201"); - }); - - it("should start pool resizing successfully", async () => { - const poolId = recorder.variable("TEST_POOL3", TEST_POOL3); - const getSteadyPool = async (): Promise => { - const res = await batchClient.path("/pools/{poolId}", poolId).get(); - if (isUnexpected(res)) { - assert.fail(`Received unexpected status code from getting pool: ${res.status} - Response Body: ${res.body.message}`); - } - if (res.body.allocationState === "steady") { - return res; - } - return null; - }; - await waitForNotNull(getSteadyPool); - - const options: BatchPoolResizeContent = { - targetDedicatedNodes: 3, - targetLowPriorityNodes: 2, - }; - const poolResizeParams: ResizePoolParameters = { - body: options, - contentType: "application/json; odata=minimalmetadata", - }; - - const poolResizeResult = await batchClient - .path("/pools/{poolId}/resize", poolId) - .post(poolResizeParams); - assert.equal(poolResizeResult.status, "202"); - }); - - it("should stop pool resizing successfully", async () => { - const stopPoolResizeResult = await batchClient - .path("/pools/{poolId}/stopresize", recorder.variable("TEST_POOL3", TEST_POOL3)) - .post({ contentType: "application/json; odata=minimalmetadata" }); - assert.equal(stopPoolResizeResult.status, "202"); - }); - - it("should list pools usage metrics", async () => { - const listPoolUsageResult = await batchClient.path("/poolusagemetrics").get(); - if (isUnexpected(listPoolUsageResult)) { - assert.fail(`Received unexpected status code from getting pool usage metrics: ${listPoolUsageResult.status} - Response Body: ${listPoolUsageResult.body.message}`); - } - - assert.isAtLeast(listPoolUsageResult.body?.value?.length ?? 0, 0); // No pool activity during this test - }); - - it("should delete a pool successfully", async function () { - const deleteResult = await batchClient - .path("/pools/{poolId}", recorder.variable("BASIC_POOL", BASIC_POOL)) - .delete(); - assert.equal(deleteResult.status, "202"); - }); - - it("should delete a second pool successfully", async function () { - const deleteResult = await batchClient - .path("/pools/{poolId}", recorder.variable("ENDPOINT_POOL", ENDPOINT_POOL)) - .delete(); - assert.equal(deleteResult.status, "202"); - }); - - it("should delete a third pool successfully", async function () { - const deleteResult = await batchClient - .path("/pools/{poolId}", recorder.variable("TEST_POOL3", TEST_POOL3)) - .delete(); - assert.equal(deleteResult.status, "202"); - }); - - it("should create a pool with SecurityProfile & OS Disk", async () => { - const poolId = recorder.variable("SECURITY_PROFILE_POOL", SECURITY_PROFILE_POOL); - const poolParams: CreatePoolParameters = { - body: { - id: recorder.variable("SECURITY_PROFILE_POOL", SECURITY_PROFILE_POOL), - vmSize: VMSIZE_D2s, - virtualMachineConfiguration: { - imageReference: { - publisher: "Canonical", - offer: "0001-com-ubuntu-server-jammy", - sku: "22_04-lts", - }, - nodeAgentSKUId: "batch.node.ubuntu 22.04", - securityProfile: { - securityType: "trustedLaunch", - encryptionAtHost: true, - uefiSettings: { - secureBootEnabled: true, - vTpmEnabled: true, - }, - }, - osDisk: { - caching: "readwrite", - managedDisk: { - storageAccountType: "standard_lrs", - }, - diskSizeGB: 50, - writeAcceleratorEnabled: true, - }, - }, - targetDedicatedNodes: 0, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const result = await batchClient.path("/pools").post(poolParams); - - if (isUnexpected(result)) { - assert.fail(`Received unexpected status code from creating pool: ${result.status}`); - } - - try { - const res = await batchClient.path("/pools/{poolId}", poolId).get(); - - if (isUnexpected(res)) { - assert.fail(`Received unexpected status code from getting pool: ${res.status}`); - } - const securityProfile = res.body.virtualMachineConfiguration!.securityProfile!; - assert.equal(securityProfile.securityType?.toLocaleLowerCase(), "trustedlaunch"); - assert.equal(securityProfile.encryptionAtHost, true); - assert.equal(securityProfile.uefiSettings!.secureBootEnabled, true); - assert.equal(securityProfile.uefiSettings!.vTpmEnabled, true); - - const osDisk = res.body.virtualMachineConfiguration!.osDisk!; - assert.equal(osDisk.caching?.toLocaleLowerCase(), "readwrite"); - assert.equal(osDisk.managedDisk!.storageAccountType?.toLocaleLowerCase(), "standard_lrs"); - assert.equal(osDisk.diskSizeGB, 50); - assert.equal(osDisk.writeAcceleratorEnabled, true); - } finally { - await batchClient.path("/pools/{poolId}", poolId).delete(); - } - }); - - it("should create a pool with Auto OS Upgrade", async () => { - const poolId = recorder.variable("AUTO_OS_UPGRADE_POOL", AUTO_OS_UPGRADE_POOL); - const poolParams: CreatePoolParameters = { - body: { - id: poolId, - vmSize: VMSIZE_D2s, - virtualMachineConfiguration: { - imageReference: { - publisher: "Canonical", - offer: "0001-com-ubuntu-server-jammy", - sku: "22_04-lts", - }, - nodeAgentSKUId: "batch.node.ubuntu 22.04", - nodePlacementConfiguration: { - policy: "zonal", - }, - }, - upgradePolicy: { - mode: "automatic", - automaticOSUpgradePolicy: { - disableAutomaticRollback: true, - enableAutomaticOSUpgrade: true, - useRollingUpgradePolicy: true, - osRollingUpgradeDeferral: true, - }, - rollingUpgradePolicy: { - enableCrossZoneUpgrade: true, - maxBatchInstancePercent: 20, - maxUnhealthyInstancePercent: 20, - maxUnhealthyUpgradedInstancePercent: 20, - pauseTimeBetweenBatches: "PT0S", - prioritizeUnhealthyInstances: false, - rollbackFailedInstancesOnPolicyBreach: false, - }, - }, - targetDedicatedNodes: 0, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const result = await batchClient.path("/pools").post(poolParams); - - if (isUnexpected(result)) { - assert.fail(`Received unexpected status code from creating pool: ${result.status}`); - } - - try { - const res = await batchClient.path("/pools/{poolId}", poolId).get(); - - if (isUnexpected(res)) { - assert.fail(`Received unexpected status code from getting pool: ${res.status}`); - } - const upgradePolicy = res.body.upgradePolicy!; - assert.equal(upgradePolicy.mode, "automatic"); - assert.deepEqual(upgradePolicy.automaticOSUpgradePolicy!, { - disableAutomaticRollback: true, - enableAutomaticOSUpgrade: true, - useRollingUpgradePolicy: true, - osRollingUpgradeDeferral: true, - }); - assert.deepEqual(upgradePolicy.rollingUpgradePolicy!, { - enableCrossZoneUpgrade: true, - maxBatchInstancePercent: 20, - maxUnhealthyInstancePercent: 20, - maxUnhealthyUpgradedInstancePercent: 20, - pauseTimeBetweenBatches: "PT0S", - prioritizeUnhealthyInstances: false, - rollbackFailedInstancesOnPolicyBreach: false, - }); - } finally { - await batchClient.path("/pools/{poolId}", poolId).delete(); - } - }); - - it("should create a pool with confidential VM", async () => { - const poolId = recorder.variable("CVM_POOL", CVM_POOL); - const poolParams: CreatePoolParameters = { - body: { - id: poolId, - vmSize: VMSIZE_D2s, - virtualMachineConfiguration: { - imageReference: { - publisher: "Canonical", - offer: "0001-com-ubuntu-server-jammy", - sku: "22_04-lts", - }, - nodeAgentSKUId: "batch.node.ubuntu 22.04", - securityProfile: { - securityType: "confidentialVM", - encryptionAtHost: true, - uefiSettings: { - secureBootEnabled: true, - vTpmEnabled: true, - }, - }, - osDisk: { - managedDisk: { - securityProfile: { - securityEncryptionType: "VMGuestStateOnly", - }, - }, - }, - }, - targetDedicatedNodes: 0, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const result = await batchClient.path("/pools").post(poolParams); - - if (isUnexpected(result)) { - assert.fail(`Received unexpected status code from creating pool: ${result.status}`); - } - - try { - const res = await batchClient.path("/pools/{poolId}", poolId).get(); - - if (isUnexpected(res)) { - assert.fail(`Received unexpected status code from getting pool: ${res.status}`); - } - const securityProfile = res.body.virtualMachineConfiguration!.securityProfile!; - assert.equal(securityProfile.securityType?.toLocaleLowerCase(), "confidentialvm"); - assert.equal(securityProfile.encryptionAtHost, true); - assert.equal(securityProfile.uefiSettings!.secureBootEnabled, true); - assert.equal(securityProfile.uefiSettings!.vTpmEnabled, true); - - const osDisk = res.body.virtualMachineConfiguration!.osDisk!; - assert.equal( - osDisk.managedDisk!.securityProfile!.securityEncryptionType?.toLocaleLowerCase(), - "vmgueststateonly", - ); - } finally { - await batchClient.path("/pools/{poolId}", poolId).delete(); - } - }); -}); diff --git a/sdk/batch/batch-rest/test/public/sampleTest.spec.ts b/sdk/batch/batch-rest/test/public/sampleTest.spec.ts new file mode 100644 index 000000000000..d4919ac91ac5 --- /dev/null +++ b/sdk/batch/batch-rest/test/public/sampleTest.spec.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createRecorder } from "./utils/recordedClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("My test", () => { + // let recorder: Recorder; + + beforeEach(async function () { + // recorder = await createRecorder(this); + }); + + afterEach(async function () { + // await recorder.stop(); + }); + + it("sample test", async function () { + assert.equal(1, 1); + }); +}); diff --git a/sdk/batch/batch-rest/test/public/utils/recordedClient.ts b/sdk/batch/batch-rest/test/public/utils/recordedClient.ts new file mode 100644 index 000000000000..6e425fdcfdf9 --- /dev/null +++ b/sdk/batch/batch-rest/test/public/utils/recordedClient.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + Recorder, + RecorderStartOptions, + VitestTestContext, +} from "@azure-tools/test-recorder"; + +const replaceableVariables: Record = { + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderEnvSetup: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +/** + * creates the recorder and reads the environment variables from the `.env` file. + * Should be called first in the test suite to make sure environment variables are + * read before they are being used. + */ +export async function createRecorder( + context: VitestTestContext, +): Promise { + const recorder = new Recorder(context); + await recorder.start(recorderEnvSetup); + return recorder; +} diff --git a/sdk/batch/batch-rest/test/tasks.spec.ts b/sdk/batch/batch-rest/test/tasks.spec.ts deleted file mode 100644 index 72d841c3cf3b..000000000000 --- a/sdk/batch/batch-rest/test/tasks.spec.ts +++ /dev/null @@ -1,530 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { Recorder, VitestTestContext } from "@azure-tools/test-recorder"; -import { isPlaybackMode } from "@azure-tools/test-recorder"; -import { createBatchClient, createRecorder } from "./utils/recordedClient.js"; -import type { - BatchClient, - BatchTask, - CreateJobParameters, - CreatePoolParameters, - CreateTaskParameters, -} from "../src/index.js"; -import { isUnexpected, paginate, type GetTask200Response } from "../src/index.js"; -import { fakeTestPasswordPlaceholder1 } from "./utils/fakeTestSecrets.js"; -import { getResourceName, waitForNotNull } from "./utils/helpers.js"; -import { describe, it, beforeAll, afterAll, beforeEach, afterEach, assert } from "vitest"; - -const BASIC_POOL = getResourceName("Pool-Basic"); -const JOB_NAME = getResourceName("Job-Basic"); -const TASK_NAME = `${JOB_NAME}-task1`; -const TASK2_NAME = `${JOB_NAME}-task2`; -const TASK_UPDATE_OPTIONS: BatchTask = { - constraints: { maxTaskRetryCount: 3 }, -}; -const NON_ADMIN_POOL_USER = "nonAdminUser"; - -describe("Task Operations Test", () => { - let recorder: Recorder; - let batchClient: BatchClient; - - /** - * Provision helper resources needed for testing Batch tasks - */ - beforeAll(async function () { - if (!isPlaybackMode()) { - batchClient = createBatchClient(); - - const poolParams: CreatePoolParameters = { - body: { - id: BASIC_POOL, - vmSize: "Standard_D1_v2", - virtualMachineConfiguration: { - nodeAgentSKUId: "batch.node.windows amd64", - imageReference: { - publisher: "microsoftwindowsserver", - offer: "windowsserver", - sku: "2022-datacenter", - }, - }, - targetDedicatedNodes: 4, - // Ensures there's a compute node file we can reference later - startTask: { commandLine: "cmd /c echo hello > hello.txt" }, - // Sets up pool user we can reference later - userAccounts: [ - { - name: NON_ADMIN_POOL_USER, - password: isPlaybackMode() ? fakeTestPasswordPlaceholder1 : "user_1account_password2", // Recorder sanitizer options will replace password with fakeTestPasswordPlaceholder1 - elevationLevel: "nonadmin", - }, - ], - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const poolPostResult = await batchClient.path("/pools").post(poolParams); - if (isUnexpected(poolPostResult)) { - assert.fail(`Received unexpected status code from creating pool: ${poolPostResult.status} - Unable to provision resource needed for Task Testing. - Response Body: ${poolPostResult.body.message}`); - } - - const jobAddParam: CreateJobParameters = { - body: { - id: JOB_NAME, - poolInfo: { poolId: BASIC_POOL }, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const jobAddResult = await batchClient.path("/jobs").post(jobAddParam); - if (isUnexpected(jobAddResult)) { - assert.fail(`Received unexpected status code from creating job: ${jobAddResult.status} - Unable to provision resources needed for Task Testing. - Response Body: ${jobAddResult.body.message}`); - } - } - }); - - /** - * Unprovision helper resources after all tests ran - */ - afterAll(async function () { - if (!isPlaybackMode()) { - type resourceDeleteErr = { id: string; error: any }; - const failedDeletedResources: resourceDeleteErr[] = []; - batchClient = createBatchClient(); - - const poolDeleteResponse = await batchClient.path("/pools/{poolId}", BASIC_POOL).delete(); - if (isUnexpected(poolDeleteResponse)) { - failedDeletedResources.push({ id: BASIC_POOL, error: poolDeleteResponse.body.message }); - } - - const JobDelete202Response = await batchClient.path("/jobs/{jobId}", JOB_NAME).delete(); - if (isUnexpected(JobDelete202Response)) { - failedDeletedResources.push({ id: JOB_NAME, error: JobDelete202Response.body.message }); - } - - if (failedDeletedResources.length > 0) { - console.log( - "Failed to unprovision helper resources for Task Test. The following resources may be leaked:", - ); - failedDeletedResources.forEach((resource) => - console.log(`Failed to delete ${resource.id} Error Response: ${resource.error}`), - ); - } - } - }); - - beforeEach(async function (ctx: VitestTestContext) { - recorder = await createRecorder(ctx); - batchClient = createBatchClient(recorder); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("should create a task with container settings successfully", async () => { - const jobId = recorder.variable("JOB_NAME", JOB_NAME); - - const taskSettings = { - id: "taskWithContainerSettings", - commandLine: "cat /etc/centos-release", - containerSettings: { imageName: "centos" }, - }; - - const addTaskResult = await batchClient - .path("/jobs/{jobId}/tasks", jobId) - .post({ body: taskSettings, contentType: "application/json; odata=minimalmetadata" }); - assert.equal(addTaskResult.status, "201"); - - const getTaskResult = await batchClient - .path("/jobs/{jobId}/tasks/{taskId}", jobId, taskSettings.id) - .get(); - if (isUnexpected(getTaskResult)) { - assert.fail(`Received unexpected status code from getting task: ${getTaskResult.status} - Response Body: ${getTaskResult.body.message}`); - } - - assert.equal( - getTaskResult.body.containerSettings?.imageName, - taskSettings.containerSettings.imageName, - ); - assert.equal(getTaskResult.body.commandLine, taskSettings.commandLine); - - await batchClient.path("/jobs/{jobId}/tasks/{taskId}", jobId, taskSettings.id).delete(); - }); - - it("should create a task with exit conditions successfully", async () => { - const jobId = "JobWithAutoComplete"; - const taskId = "TaskWithAutoComplete"; - const jobAddParams: CreateJobParameters = { - body: { - id: jobId, - poolInfo: { - poolId: "dummypool", - }, - onAllTasksComplete: "noaction", - onTaskFailure: "performexitoptionsjobaction", - usesTaskDependencies: true, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const jobAddResult = await batchClient.path("/jobs").post(jobAddParams); - assert.equal(jobAddResult.status, "201"); - - const taskSettings = { - id: taskId, - commandLine: "echo Hello World", - exitConditions: { - default: { - jobAction: "terminate", - dependencyAction: "satisfy", - }, - exitCodes: [ - { - code: 1, - exitOptions: { - jobAction: "none", - dependencyAction: "block", - }, - }, - ], - }, - }; - - const taskAddResult = await batchClient - .path("/jobs/{jobId}/tasks", jobId) - .post({ body: taskSettings, contentType: "application/json; odata=minimalmetadata" }); - assert.equal(taskAddResult.status, "201"); - - const getTaskResult = await batchClient - .path("/jobs/{jobId}/tasks/{taskId}", jobId, taskId) - .get(); - if (isUnexpected(getTaskResult)) { - assert.fail(`Received unexpected status code from getting task: ${getTaskResult.status} - Response Body: ${getTaskResult.body.message}`); - } - - assert.equal(getTaskResult.body.exitConditions!.default!.jobAction, "terminate"); - assert.equal(getTaskResult.body.exitConditions!.default!.dependencyAction, "satisfy"); - assert.equal(getTaskResult.body.exitConditions!.exitCodes![0].code, 1); - assert.equal(getTaskResult.body.exitConditions!.exitCodes![0].exitOptions.jobAction, "none"); - assert.equal( - getTaskResult.body.exitConditions!.exitCodes![0].exitOptions.dependencyAction, - "block", - ); - - const deleteJobResult = await batchClient.path("/jobs/{jobId}", jobId).delete(); - if (isUnexpected(deleteJobResult)) { - assert.fail(`Failed to delete ${jobId}. Error Response: ${deleteJobResult.body.message}`); - } - }); - - it("should create a task successfully", async () => { - const taskAddParams: CreateTaskParameters = { - body: { - id: recorder.variable("TASK_NAME", TASK_NAME), - commandLine: "cmd /c echo hello > taskHello.txt", - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const addTaskResult = await batchClient - .path("/jobs/{jobId}/tasks", recorder.variable("JOB_NAME", JOB_NAME)) - .post(taskAddParams); - assert.equal(addTaskResult.status, "201"); - }); - - it("should terminate a task successfully", async () => { - const terminateTaskResult = await batchClient - .path( - "/jobs/{jobId}/tasks/{taskId}/terminate", - recorder.variable("JOB_NAME", JOB_NAME), - recorder.variable("TASK_NAME", TASK_NAME), - ) - .post({ contentType: "application/json; odata=minimalmetadata" }); - assert.equal(terminateTaskResult.status, "204"); - }); - - it("should create a second task with output files successfully", async () => { - const jobId = recorder.variable("JOB_NAME", JOB_NAME); - const taskId = recorder.variable("TASK2_NAME", TASK2_NAME); - - const container = "https://teststorage.blob.core.windows.net/batch-sdk-test?se=REDACTED"; - const outputs = [ - { - filePattern: "../stdout.txt", - destination: { - container: { - containerUrl: container, - path: "taskLogs/output.txt", - uploadHeaders: [ - { name: "x-ms-blob-content-type", value: "text/plain" }, - { name: "x-ms-blob-content-language", value: "en-US" }, - ], - }, - }, - uploadOptions: { uploadCondition: "taskCompletion" }, - }, - { - filePattern: "../stderr.txt", - destination: { - container: { containerUrl: container, path: "taskLogs/error.txt" }, - }, - uploadOptions: { uploadCondition: "taskFailure" }, - }, - ]; - - const taskAddParams: CreateTaskParameters = { - body: { - id: taskId, - commandLine: "cmd /c echo hello world", - outputFiles: outputs, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const addTaskResult = await batchClient.path("/jobs/{jobId}/tasks", jobId).post(taskAddParams); - assert.equal(addTaskResult.status, "201"); - - const getTaskResult = await batchClient - .path("/jobs/{jobId}/tasks/{taskId}", jobId, taskId) - .get(); - if (isUnexpected(getTaskResult)) { - assert.fail(`Received unexpected status code from getting task: ${getTaskResult.status} - Response Body: ${getTaskResult.body.message}`); - } - - const batchTaskOutput = getTaskResult.body; - assert.isDefined(batchTaskOutput.outputFiles); - assert.equal(batchTaskOutput!.outputFiles![0].filePattern, outputs[0].filePattern); - assert.equal( - batchTaskOutput!.outputFiles![0].destination.container?.containerUrl, - outputs[0].destination.container.containerUrl, - ); - assert.equal(batchTaskOutput!.outputFiles![1].filePattern, outputs[1].filePattern); - assert.equal( - batchTaskOutput!.outputFiles![1].destination.container?.containerUrl, - outputs[1].destination.container.containerUrl, - ); - }); - - it("should reactivate a task successfully", async () => { - const reactivateTaskResult = await batchClient - .path( - "/jobs/{jobId}/tasks/{taskId}/reactivate", - recorder.variable("JOB_NAME", JOB_NAME), - recorder.variable("TASK_NAME", TASK_NAME), - ) - .post({ contentType: "application/json; odata=minimalmetadata" }); - assert.equal(reactivateTaskResult.status, "204"); - }); - - it("should update a task successfully", async () => { - const updateTaskResult = await batchClient - .path( - "/jobs/{jobId}/tasks/{taskId}", - recorder.variable("JOB_NAME", JOB_NAME), - recorder.variable("TASK_NAME", TASK_NAME), - ) - .put({ - body: TASK_UPDATE_OPTIONS, - contentType: "application/json; odata=minimalmetadata", - }); - - assert.equal(updateTaskResult.status, "200"); - }); - - it("should list all tasks successfully", async () => { - const listTasksResult = await batchClient - .path("/jobs/{jobId}/tasks", recorder.variable("JOB_NAME", JOB_NAME)) - .get(); - if (isUnexpected(listTasksResult)) { - assert.fail(`Received unexpected status code from listing tasks: ${listTasksResult.status} - Response Body: ${listTasksResult.body.message}`); - } - - const paginateResponse = paginate(batchClient, listTasksResult); - let taskCounter = 0; - - for await (const _item of paginateResponse) { - ++taskCounter; - } - - assert.equal(taskCounter, 2); - }); - - it("should get task reference successfully", async () => { - const taskId = recorder.variable("TASK_NAME", TASK_NAME); - const getTaskResult = await batchClient - .path("/jobs/{jobId}/tasks/{taskId}", recorder.variable("JOB_NAME", JOB_NAME), taskId) - .get(); - if (isUnexpected(getTaskResult)) { - assert.fail(`Received unexpected status code from getting task: ${getTaskResult.status} - Response Body: ${getTaskResult.body.message}`); - } - - assert.equal(getTaskResult.body.id, taskId); - assert.equal( - getTaskResult.body.constraints?.maxTaskRetryCount, - TASK_UPDATE_OPTIONS!.constraints!.maxTaskRetryCount, - ); - }); - - it("should add a task with an application package reference successfully", async () => { - const jobId = recorder.variable("JOB_NAME", JOB_NAME); - const taskAddParams: CreateTaskParameters = { - body: { - id: "Task-AppPackage", - commandLine: "cmd /c echo hello world", - applicationPackageReferences: [ - { - applicationId: "REDACTED", - }, - ], - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const taskAddResult = await batchClient.path("/jobs/{jobId}/tasks", jobId).post(taskAddParams); - assert.equal(taskAddResult.status, "201"); - - const getTaskResult = await batchClient - .path("/jobs/{jobId}/tasks/{taskId}", jobId, taskAddParams.body.id!) - .get(); - if (isUnexpected(getTaskResult)) { - assert.fail(`Received unexpected status code from getting task: ${getTaskResult.status} - Response Body: ${getTaskResult.body.message}`); - } - - assert.isDefined(getTaskResult.body.applicationPackageReferences); - assert.equal( - getTaskResult.body.applicationPackageReferences![0].applicationId.toLowerCase(), - taskAddParams.body.applicationPackageReferences![0].applicationId.toLowerCase(), - ); - }); - - it("should create a task with authentication token settings successfully", async () => { - const jobId = recorder.variable("JOB_NAME", JOB_NAME); - const taskId = "TaskWithAuthTokenSettings"; - const taskAddParams: CreateTaskParameters = { - body: { - id: taskId, - commandLine: "cmd /c echo Hello World", - authenticationTokenSettings: { - access: ["job"], - }, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const taskAddResult = await batchClient.path("/jobs/{jobId}/tasks", jobId).post(taskAddParams); - assert.equal(taskAddResult.status, "201"); - - const getTaskResult = await batchClient - .path("/jobs/{jobId}/tasks/{taskId}", jobId, taskAddParams.body.id!) - .get(); - if (isUnexpected(getTaskResult)) { - assert.fail(`Received unexpected status code from getting task: ${getTaskResult.status} - Response Body: ${getTaskResult.body.message}`); - } - - const taskOutput = getTaskResult.body; - assert.isDefined(taskOutput.authenticationTokenSettings); - assert.isDefined(taskOutput.authenticationTokenSettings!.access); - assert.lengthOf(taskOutput.authenticationTokenSettings!.access!, 1); - assert.equal(taskOutput.authenticationTokenSettings!.access![0], "job"); - }); - - it("should create a task with a user identity successfully", async () => { - const jobId = recorder.variable("JOB_NAME", JOB_NAME); - const taskId = "TaskWithUserIdentity"; - const taskAddParams: CreateTaskParameters = { - body: { - id: taskId, - // This command should return a non-zero exit code for a non-admin user - commandLine: "cmd /c net session >nul 2>&1", - userIdentity: { - username: NON_ADMIN_POOL_USER, - }, - }, - contentType: "application/json; odata=minimalmetadata", - }; - - const taskAddResult = await batchClient.path("/jobs/{jobId}/tasks", jobId).post(taskAddParams); - assert.equal(taskAddResult.status, "201"); - - const getExecutedTask = async (): Promise => { - const getTaskResult = await batchClient - .path("/jobs/{jobId}/tasks/{taskId}", jobId, taskAddParams.body.id!) - .get(); - if (isUnexpected(getTaskResult)) { - assert.fail(`Received unexpected status code from getting task: ${getTaskResult.status} - Response Body: ${getTaskResult.body.message}`); - } - if ( - getTaskResult.body.executionInfo !== undefined && - getTaskResult.body.executionInfo.result !== undefined - ) { - return getTaskResult; - } - return null; - }; - - const taskRes = await waitForNotNull(getExecutedTask); - - assert.isDefined(taskRes.body.userIdentity); - assert.equal(taskRes.body.userIdentity!.username, NON_ADMIN_POOL_USER); - assert.isDefined(taskRes.body.executionInfo); - assert.equal(taskRes.body.executionInfo!.result, "failure"); - assert.notEqual(taskRes.body.executionInfo!.exitCode, 0); - }); - - it("should count tasks sucessfully", async () => { - const getTaskCountsResult = await batchClient - .path("/jobs/{jobId}/taskcounts", recorder.variable("JOB_NAME", JOB_NAME)) - .get(); - if (isUnexpected(getTaskCountsResult)) { - assert.fail(`Received unexpected status code from getting task counts: ${getTaskCountsResult.status} - Unable to provision resource needed for Task Testing. - Response Body: ${getTaskCountsResult.body.message}`); - } - - assert.isDefined(getTaskCountsResult.body.taskCounts.active); - assert.isDefined(getTaskCountsResult.body.taskCounts.completed); - assert.isAtLeast(getTaskCountsResult.body.taskCounts.completed, 1); - }); - - // TODO: Need to test with actual subtasks - // it("should list sub tasks successfully", async () => { - // const result = await client.task.listSubtasks(JOB_NAME, TASK_NAME); - - // assert.equal(result._response.status, 200); - // }); - - it("should delete a task successfully", async () => { - const deleteTaskResult = await batchClient - .path( - "/jobs/{jobId}/tasks/{taskId}", - recorder.variable("JOB_NAME", JOB_NAME), - recorder.variable("TASK_NAME", TASK_NAME), - ) - .delete(); - assert.equal(deleteTaskResult.status, "200"); - }); - - it("should delete second task successfully", async () => { - const deleteTaskResult = await batchClient - .path( - "/jobs/{jobId}/tasks/{taskId}", - recorder.variable("JOB_NAME", JOB_NAME), - recorder.variable("TASK2_NAME", TASK2_NAME), - ) - .delete(); - assert.equal(deleteTaskResult.status, "200"); - }); -}); diff --git a/sdk/batch/batch-rest/test/utils/env-browser.mts b/sdk/batch/batch-rest/test/utils/env-browser.mts deleted file mode 100644 index fc36ab244fad..000000000000 --- a/sdk/batch/batch-rest/test/utils/env-browser.mts +++ /dev/null @@ -1,2 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. diff --git a/sdk/batch/batch-rest/test/utils/env.ts b/sdk/batch/batch-rest/test/utils/env.ts deleted file mode 100644 index 866412f4082d..000000000000 --- a/sdk/batch/batch-rest/test/utils/env.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import * as dotenv from "dotenv"; - -dotenv.config(); diff --git a/sdk/batch/batch-rest/test/utils/envTokenCredential.ts b/sdk/batch/batch-rest/test/utils/envTokenCredential.ts deleted file mode 100644 index 7c74f2f2ca63..000000000000 --- a/sdk/batch/batch-rest/test/utils/envTokenCredential.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TokenCredential } from "@azure/identity"; - -/** - * A TokenCredential implementation that gets the token from the environment variable - * It's only used in browser live tests. - */ -export class EnvTokenCredential implements TokenCredential { - private token: string; - - constructor() { - const token = process.env["AZURE_BATCH_ACCESS_TOKEN"]; - if (!token) { - throw new Error("AZURE_BATCH_ACCESS_TOKEN must be set"); - } - this.token = token; - } - - async getToken(): Promise<{ token: string; expiresOnTimestamp: number }> { - return { token: this.token, expiresOnTimestamp: Date.now() + 60 * 60 * 24 }; - } -} diff --git a/sdk/batch/batch-rest/test/utils/fakeTestSecrets.ts b/sdk/batch/batch-rest/test/utils/fakeTestSecrets.ts deleted file mode 100644 index 5b90d984dbfa..000000000000 --- a/sdk/batch/batch-rest/test/utils/fakeTestSecrets.ts +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Centralized location for test/fake secrets so that suppressions -// are easier to maintain properly -export const fakeTestPasswordPlaceholder1 = "fakePasswordValue"; -export const fakeTestPasswordPlaceholder2 = "kt#_gahr!@aGERDXA"; -export const fakeTestPasswordPlaceholder3 = "liilef#$DdRGSa_ewkjh"; -export const fakeTestCertData = - "MIIGMQIBAzCCBe0GCSqGSIb3DQEHAaCCBd4EggXaMIIF1jCCA8AGCSqGSIb3DQEHAaCCA7EEggOtMIIDqTCCA6UGCyqGSIb3DQEMCgECoIICtjCCArIwHAYKKoZIhvcNAQwBAzAOBAhyd3xCtln3iQICB9AEggKQhe5P10V9iV1BsDlwWT561Yu2hVq3JT8ae/ebx1ZR/gMApVereDKkS9Zg4vFyssusHebbK5pDpU8vfAqle0TM4m7wGsRj453ZorSPUfMpHvQnAOn+2pEpWdMThU7xvZ6DVpwhDOQk9166z+KnKdHGuJKh4haMT7Rw/6xZ1rsBt2423cwTrQVMQyACrEkianpuujubKltN99qRoFAxhQcnYE2KlYKw7lRcExq6mDSYAyk5xJZ1ZFdLj6MAryZroQit/0g5eyhoNEKwWbi8px5j71pRTf7yjN+deMGQKwbGl+3OgaL1UZ5fCjypbVL60kpIBxLZwIJ7p3jJ+q9pbq9zSdzshPYor5lxyUfXqaso/0/91ayNoBzg4hQGh618PhFI6RMGjwkzhB9xk74iweJ9HQyIHf8yx2RCSI22JuCMitPMWSGvOszhbNx3AEDLuiiAOHg391mprEtKZguOIr9LrJwem/YmcHbwyz5YAbZmiseKPkllfC7dafFfCFEkj6R2oegIsZo0pEKYisAXBqT0g+6/jGwuhlZcBo0f7UIZm88iA3MrJCjlXEgV5OcQdoWj+hq0lKEdnhtCKr03AIfukN6+4vjjarZeW1bs0swq0l3XFf5RHa11otshMS4mpewshB9iO9MuKWpRxuxeng4PlKZ/zuBqmPeUrjJ9454oK35Pq+dghfemt7AUpBH/KycDNIZgfdEWUZrRKBGnc519C+RTqxyt5hWL18nJk4LvSd3QKlJ1iyJxClhhb/NWEzPqNdyA5cxen+2T9bd/EqJ2KzRv5/BPVwTQkHH9W/TZElFyvFfOFIW2+03RKbVGw72Mr/0xKZ+awAnEfoU+SL/2Gj2m6PHkqFX2sOCi/tN9EA4xgdswEwYJKoZIhvcNAQkVMQYEBAEAAAAwXQYJKwYBBAGCNxEBMVAeTgBNAGkAYwByAG8AcwBvAGYAdAAgAFMAdAByAG8AbgBnACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjBlBgkqhkiG9w0BCRQxWB5WAFAAdgBrAFQAbQBwADoANABjAGUANgAwADQAZABhAC0AMAA2ADgAMQAtADQANAAxADUALQBhADIAYwBhAC0ANQA3ADcAMwAwADgAZQA2AGQAOQBhAGMwggIOBgkqhkiG9w0BBwGgggH/BIIB+zCCAfcwggHzBgsqhkiG9w0BDAoBA6CCAcswggHHBgoqhkiG9w0BCRYBoIIBtwSCAbMwggGvMIIBXaADAgECAhAdka3aTQsIsUphgIXGUmeRMAkGBSsOAwIdBQAwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3kwHhcNMTYwMTAxMDcwMDAwWhcNMTgwMTAxMDcwMDAwWjASMRAwDgYDVQQDEwdub2Rlc2RrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC5fhcxbJHxxBEIDzVOMc56s04U6k4GPY7yMR1m+rBGVRiAyV4RjY6U936dqXHCVD36ps2Q0Z+OeEgyCInkIyVeB1EwXcToOcyeS2YcUb0vRWZDouC3tuFdHwiK1Ed5iW/LksmXDotyV7kpqzaPhOFiMtBuMEwNJcPge9k17hRgRQIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAHl2M97QbpzdnwO5HoRBsiEExOcLTNg+GKCr7HUsbzfvrUivw+JLL7qjHAIc5phnK+F5bQ8HKe0L9YXBSKl+fvwxFTATBgkqhkiG9w0BCRUxBgQEAQAAADA7MB8wBwYFKw4DAhoEFGVtyGMqiBd32fGpzlGZQoRM6UQwBBTI0YHFFqTS4Go8CoLgswn29EiuUQICB9A="; -export const fakeAzureBatchAccount = "batch_account"; -export const fakeAzureBatchEndpoint = "https://endpoint"; diff --git a/sdk/batch/batch-rest/test/utils/helpers.ts b/sdk/batch/batch-rest/test/utils/helpers.ts deleted file mode 100644 index 91dd6895eb2a..000000000000 --- a/sdk/batch/batch-rest/test/utils/helpers.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { isPlaybackMode } from "@azure-tools/test-recorder"; -import { wait } from "./wait.js"; - -const RESOURCE_PREFIX = "JSSDKTest"; - -export function getResourceName(type: string): string { - const _SUFFIX = Math.random().toString(16).slice(2, 6); - return `${RESOURCE_PREFIX}-${type}-${_SUFFIX}`; -} - -export const POLLING_INTERVAL = isPlaybackMode() ? 1 : 15000; - -export const LONG_TEST_TIMEOUT = 1000000; - -export async function waitForNotNull( - fn: () => Promise, - pollingInterval: number = POLLING_INTERVAL, -): Promise> { - let result: T | null = null; - const startTime = Date.now(); - while ((result = await fn()) == null) { - if (Date.now() - startTime > LONG_TEST_TIMEOUT) { - throw new Error("waitFor timed out"); - } - await wait(isPlaybackMode() ? 1 : pollingInterval); - } - return result; -} diff --git a/sdk/batch/batch-rest/test/utils/pool.ts b/sdk/batch/batch-rest/test/utils/pool.ts deleted file mode 100644 index f147e244e655..000000000000 --- a/sdk/batch/batch-rest/test/utils/pool.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { assert } from "vitest"; -import type { BatchClient } from "../../src/clientDefinitions.js"; -import { isUnexpected } from "../../src/isUnexpected.js"; -import { paginate } from "../../src/paginateHelper.js"; -import { waitForNotNull } from "./helpers.js"; -import type { BatchNodeOutput } from "../../src/outputModels.js"; - -export function waitForNodesToStart( - poolId: string, - batchClient: BatchClient, -): Promise { - const listNodes = async (): Promise => { - const listResult = await batchClient.path("/pools/{poolId}/nodes", poolId).get(); - if (isUnexpected(listResult)) { - assert.fail(`Received unexpected status code from list compute nodes: ${listResult.status} - Response Body: ${listResult.body.message}`); - } - - const paginateResponse = paginate(batchClient, listResult); - const nodeList = []; - for await (const node of paginateResponse) { - nodeList.push(node); - } - if (nodeList.length > 0) { - return nodeList; - } - return null; - }; - - return waitForNotNull(listNodes); -} diff --git a/sdk/batch/batch-rest/test/utils/recordedClient.ts b/sdk/batch/batch-rest/test/utils/recordedClient.ts deleted file mode 100644 index d9a56a4fb11f..000000000000 --- a/sdk/batch/batch-rest/test/utils/recordedClient.ts +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { RecorderStartOptions, TestInfo } from "@azure-tools/test-recorder"; -import { Recorder, env, isPlaybackMode } from "@azure-tools/test-recorder"; -import type { ClientOptions } from "@azure-rest/core-client"; -import type { BatchClient } from "../../src/index.js"; -import BatchServiceClient from "../../src/index.js"; -import { - fakeTestPasswordPlaceholder1, - fakeAzureBatchAccount, - fakeAzureBatchEndpoint, -} from "./fakeTestSecrets.js"; - -import { isNodeLike } from "@azure/core-util"; -import { NoOpCredential } from "@azure-tools/test-credential"; -import { AzureNamedKeyCredential } from "@azure/core-auth"; -import { EnvTokenCredential } from "./envTokenCredential.js"; - -const recorderEnvSetup: RecorderStartOptions = { - envSetupForPlayback: { - AZURE_BATCH_ENDPOINT: fakeAzureBatchEndpoint, - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - AZURE_BATCH_ACCOUNT: fakeAzureBatchAccount, - AZURE_BATCH_ACCESS_KEY: "api_key", - }, - // see https://github.com/Azure/azure-sdk-tools/blob/main/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/SanitizerDictionary.cs - removeCentralSanitizers: ["AZSDK3430", "AZSDK3479", "AZSDK3402", "AZSDK3493", "AZSDK4001"], - sanitizerOptions: { - bodyKeySanitizers: [ - { - jsonPath: "$.userAccounts[0].password", - value: fakeTestPasswordPlaceholder1, - }, - { - jsonPath: "$.password", - value: fakeTestPasswordPlaceholder1, - }, - ], - generalSanitizers: [ - { - regex: true, - target: `https://${fakeAzureBatchAccount}(.*)batch.azure.com`, - value: fakeAzureBatchEndpoint, - }, - ], - }, -}; - -/** - * creates the recorder and reads the environment variables from the `.env` file. - * Should be called first in the test suite to make sure environment variables are - * read before they are being used. - */ -export async function createRecorder(ctx: TestInfo): Promise { - const recorder = new Recorder(ctx); - await recorder.setMatcher("CustomDefaultMatcher", { - excludedHeaders: ["client-request-id", "ocp-date", "accept-encoding"], - }); - await recorder.start(recorderEnvSetup); - return recorder; -} - -export function createBatchClient(recorder?: Recorder, options: ClientOptions = {}): BatchClient { - const credential = isPlaybackMode() - ? new NoOpCredential() - : isNodeLike - ? new AzureNamedKeyCredential(env.AZURE_BATCH_ACCOUNT!, env.AZURE_BATCH_ACCESS_KEY!) - : new EnvTokenCredential(); - - if (!isPlaybackMode() && !env.AZURE_BATCH_ENDPOINT) { - throw Error("AZURE_BATCH_ENDPOINT env variable should be set in live mode"); - } - - return BatchServiceClient( - env.AZURE_BATCH_ENDPOINT! || "https://dummy.eastus.batch.azure.com", - credential, - recorder ? recorder.configureClientOptions({ ...options }) : options, - ); -} diff --git a/sdk/batch/batch-rest/test/utils/wait.ts b/sdk/batch/batch-rest/test/utils/wait.ts deleted file mode 100644 index a28989dc274d..000000000000 --- a/sdk/batch/batch-rest/test/utils/wait.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -export const wait = (ms: number): Promise => { - return new Promise((resolve) => { - setTimeout(() => { - resolve(); - }, ms); - }); -}; diff --git a/sdk/batch/batch-rest/tsconfig.browser.config.json b/sdk/batch/batch-rest/tsconfig.browser.config.json index 75871518e3a0..091177fcb991 100644 --- a/sdk/batch/batch-rest/tsconfig.browser.config.json +++ b/sdk/batch/batch-rest/tsconfig.browser.config.json @@ -1,3 +1,10 @@ { - "extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"] + "extends": "./.tshy/build.json", + "include": ["src/**/*.ts", "src/**/*.mts", "test/**/*.spec.ts"], + "exclude": ["test/**/node/**/*.ts"], + "compilerOptions": { + "outDir": "./dist-test/browser", + "rootDir": ".", + "skipLibCheck": true + } } diff --git a/sdk/batch/batch-rest/tsconfig.json b/sdk/batch/batch-rest/tsconfig.json index 273d9078a24a..71858ab903e4 100644 --- a/sdk/batch/batch-rest/tsconfig.json +++ b/sdk/batch/batch-rest/tsconfig.json @@ -1,7 +1,16 @@ { - "references": [ - { "path": "./tsconfig.src.json" }, - { "path": "./tsconfig.samples.json" }, - { "path": "./tsconfig.test.json" } + "extends": "../../../tsconfig", + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "rootDir": ".", + "skipLibCheck": true + }, + "include": [ + "src/**/*.ts", + "src/**/*.mts", + "src/**/*.cts", + "test/**/*.ts", + "test/**/*.ts" ] -} +} \ No newline at end of file diff --git a/sdk/batch/batch-rest/tsconfig.samples.json b/sdk/batch/batch-rest/tsconfig.samples.json deleted file mode 100644 index 5f4cd89a557f..000000000000 --- a/sdk/batch/batch-rest/tsconfig.samples.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../../tsconfig.samples.base.json", - "compilerOptions": { - "paths": { - "@azure-rest/batch": ["./dist/esm"] - } - } -} diff --git a/sdk/batch/batch-rest/tsconfig.src.json b/sdk/batch/batch-rest/tsconfig.src.json deleted file mode 100644 index bae70752dd38..000000000000 --- a/sdk/batch/batch-rest/tsconfig.src.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../../tsconfig.lib.json" -} diff --git a/sdk/batch/batch-rest/tsconfig.test.json b/sdk/batch/batch-rest/tsconfig.test.json deleted file mode 100644 index 290ca214aebc..000000000000 --- a/sdk/batch/batch-rest/tsconfig.test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"] -} diff --git a/sdk/batch/batch-rest/tsp-location.yaml b/sdk/batch/batch-rest/tsp-location.yaml index c4d5e0296846..ed87b3e6867b 100644 --- a/sdk/batch/batch-rest/tsp-location.yaml +++ b/sdk/batch/batch-rest/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/batch/Azure.Batch -commit: 191c76349cdbc840567a9f1b2cbae50fd57bc1b9 -repo: Azure/azure-rest-api-specs -additionalDirectories: +commit: ce46dc3e04b0bc3a7b04d9c715c1107186978a5c +repo: /mnt/vss/_work/1/s/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/batch/batch-rest/vitest.browser.config.ts b/sdk/batch/batch-rest/vitest.browser.config.ts index f82c9609c760..da68c1d231aa 100644 --- a/sdk/batch/batch-rest/vitest.browser.config.ts +++ b/sdk/batch/batch-rest/vitest.browser.config.ts @@ -1,16 +1,38 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { defineConfig, mergeConfig } from "vitest/config"; -import viteConfig from "../../../vitest.browser.shared.config.ts"; +import { defineConfig } from "vitest/config"; +import { relativeRecordingsPath } from "@azure-tools/test-recorder"; -export default mergeConfig( - viteConfig, - defineConfig({ - test: { - include: ["dist-test/browser/test/**/*.spec.js"], - hookTimeout: 500000, - testTImeout: 500000, +process.env.RECORDINGS_RELATIVE_PATH = relativeRecordingsPath(); + +export default defineConfig({ + define: { + "process.env": process.env, + }, + test: { + reporters: ["basic", "junit"], + outputFile: { + junit: "test-results.browser.xml", + }, + browser: { + enabled: true, + headless: true, + name: "chromium", + provider: "playwright", + }, + fakeTimers: { + toFake: ["setTimeout", "Date"], + }, + watch: false, + include: ["dist-test/browser/**/*.spec.js"], + coverage: { + include: ["dist-test/browser/**/*.spec.js"], + provider: "istanbul", + reporter: ["text", "json", "html"], + reportsDirectory: "coverage-browser", }, - }), -); + testTimeout: 1200000, + hookTimeout: 1200000, + }, +}); diff --git a/sdk/batch/batch-rest/vitest.config.ts b/sdk/batch/batch-rest/vitest.config.ts index 56010cbbda7d..2cf5d0e02c2e 100644 --- a/sdk/batch/batch-rest/vitest.config.ts +++ b/sdk/batch/batch-rest/vitest.config.ts @@ -1,15 +1,34 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { defineConfig, mergeConfig } from "vitest/config"; -import viteConfig from "../../../vitest.shared.config.ts"; +import { defineConfig } from "vitest/config"; +import { relativeRecordingsPath } from "@azure-tools/test-recorder"; -export default mergeConfig( - viteConfig, - defineConfig({ - test: { - hookTimeout: 500000, - testTImeout: 500000, +export default defineConfig({ + test: { + reporters: ["basic", "junit"], + outputFile: { + junit: "test-results.browser.xml", }, - }), -); + fakeTimers: { + toFake: ["setTimeout", "Date"], + }, + watch: false, + include: ["test/**/*.spec.ts"], + exclude: ["test/**/browser/*.spec.ts"], + coverage: { + include: ["src/**/*.ts"], + exclude: [ + "src/**/*-browser.mts", + "src/**/*-react-native.mts", + "vitest*.config.ts", + "samples-dev/**/*.ts", + ], + provider: "istanbul", + reporter: ["text", "json", "html"], + reportsDirectory: "coverage", + }, + testTimeout: 1200000, + hookTimeout: 1200000, + }, +}); diff --git a/sdk/batch/batch-rest/vitest.esm.config.ts b/sdk/batch/batch-rest/vitest.esm.config.ts deleted file mode 100644 index 2f6e757a54f7..000000000000 --- a/sdk/batch/batch-rest/vitest.esm.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { mergeConfig } from "vitest/config"; -import vitestConfig from "./vitest.config.ts"; -import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; - -export default mergeConfig( - vitestConfig, - vitestEsmConfig -); diff --git a/sdk/batch/ci.yml b/sdk/batch/ci.yml index 7295c390487e..551aeae6fc2e 100644 --- a/sdk/batch/ci.yml +++ b/sdk/batch/ci.yml @@ -1,5 +1,5 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: @@ -11,7 +11,6 @@ trigger: include: - sdk/batch/ci.yml - sdk/batch/batch-rest - pr: branches: include: @@ -20,11 +19,12 @@ pr: - hotfix/* - release/* - restapi* + exclude: + - feature/v4 paths: include: - sdk/batch/ci.yml - sdk/batch/batch-rest - extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: