Refresh 11 (#21580)
* machinelearning * refresh-11 * update sample-dev * update * update * update
This commit is contained in:
Родитель
73b744f2de
Коммит
2b73b255a0
|
@ -9921,27 +9921,28 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/arm-commitmentplans.tgz:
|
||||
resolution: {integrity: sha512-Pwl4XWirPLkzFTqmVBDy6xCkdxwGV/nfZ6+aD30edjxfnT2ilTJ1i7skIh+Xckq6HrjF3apV1+3cE4gS9A8E7A==, tarball: file:projects/arm-commitmentplans.tgz}
|
||||
resolution: {integrity: sha512-hUWE4lpYayVOrFbgp3jpvjsob+qKoa/VS6nQklBYMDA7UILGmrDncgKQpAOr8zGhI1azmhgdZ/AiRiwHpgztLw==, tarball: file:projects/arm-commitmentplans.tgz}
|
||||
name: '@rush-temp/arm-commitmentplans'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@azure-tools/test-recorder': 1.0.2
|
||||
'@azure/identity': 2.0.4
|
||||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@1.32.1
|
||||
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
|
||||
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
|
||||
'@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
|
||||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 1.32.1
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
|
||||
rollup: 2.70.1
|
||||
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
|
||||
tslib: 2.3.1
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.15.4
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- debug
|
||||
- encoding
|
||||
- supports-color
|
||||
|
@ -11541,81 +11542,84 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/arm-machinelearningcompute.tgz:
|
||||
resolution: {integrity: sha512-odY601dQZHlFaR6R1ai9ngHTiwdjZ6c2shVVkOkCSG8RNxYzwHoBW5b9Hx4J9ky+9cPrGrmOm3lwavuDiORvPg==, tarball: file:projects/arm-machinelearningcompute.tgz}
|
||||
resolution: {integrity: sha512-Nr66pzVAE4+loW3ONsvOyLf4sYjsraAQpsBAm21YJrUbdbiL5qsx52CFq47ctN08zK/NTVxGIVKmNnCYWze6nQ==, tarball: file:projects/arm-machinelearningcompute.tgz}
|
||||
name: '@rush-temp/arm-machinelearningcompute'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@azure-tools/test-recorder': 1.0.2
|
||||
'@azure/identity': 2.0.4
|
||||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@1.32.1
|
||||
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
|
||||
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
|
||||
'@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
|
||||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 1.32.1
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
|
||||
rollup: 2.70.1
|
||||
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
|
||||
tslib: 2.3.1
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.15.4
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- debug
|
||||
- encoding
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
file:projects/arm-machinelearningexperimentation.tgz:
|
||||
resolution: {integrity: sha512-8xWwBGC71QFG5N/3QrY+DKMeYycswg7Jv0g1NXfucxvLwOZXxRxgM8h6LFFgHTVdo0PHwj/fh7jh6oXdzR++PQ==, tarball: file:projects/arm-machinelearningexperimentation.tgz}
|
||||
resolution: {integrity: sha512-oZxXBbPnv94Ql1INrbYWLA0ZPqzjhTADqq1cizYsu1oCAknd07kf4t/Tk1YAzicTNjANHhP9vL5fWiTUle5Tbw==, tarball: file:projects/arm-machinelearningexperimentation.tgz}
|
||||
name: '@rush-temp/arm-machinelearningexperimentation'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@azure-tools/test-recorder': 1.0.2
|
||||
'@azure/identity': 2.0.4
|
||||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@1.32.1
|
||||
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
|
||||
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
|
||||
'@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
|
||||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 1.32.1
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
|
||||
rollup: 2.70.1
|
||||
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
|
||||
tslib: 2.3.1
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.15.4
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- debug
|
||||
- encoding
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
file:projects/arm-machinelearningservices.tgz:
|
||||
resolution: {integrity: sha512-HqNFdP1iYynydC8d5n2qOldK5b94bzXS/w4P5yA1E6dWTCnfuEWJN1TuYI/Jjr0CkZDuQk/FnJVZSTwN3tzbqg==, tarball: file:projects/arm-machinelearningservices.tgz}
|
||||
resolution: {integrity: sha512-eKKEUDB85wqKccMN1CqNaol7X8wsCg0NI+8hvXqbG8zUxVFwnFW9lFeIJk1LMT5EDV8/DUyXCy4UF4T3V92D4Q==, tarball: file:projects/arm-machinelearningservices.tgz}
|
||||
name: '@rush-temp/arm-machinelearningservices'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@azure-tools/test-recorder': 1.0.2
|
||||
'@azure/identity': 2.0.4
|
||||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@1.32.1
|
||||
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
|
||||
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
|
||||
'@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
|
||||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 1.32.1
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
|
||||
rollup: 2.70.1
|
||||
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
|
||||
tslib: 2.3.1
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.15.4
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- debug
|
||||
- encoding
|
||||
- supports-color
|
||||
|
@ -11650,7 +11654,7 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/arm-managementgroups.tgz:
|
||||
resolution: {integrity: sha512-7bzYy/8EjTs6YrBjnHU3edHewdJ9SED9W6o5N27SrEVicqJeYOjlvK09JB44eCKXSm5aAa+14RXQNOrnouf5Lw==, tarball: file:projects/arm-managementgroups.tgz}
|
||||
resolution: {integrity: sha512-aN/J0YOOx9YHYoAOd7qVvtzqnLDLfBN9llInGRAi7vLe/va+U0H7VrZ4fZGZpxGbluj2EKyLozd+PUtrvepx7Q==, tarball: file:projects/arm-managementgroups.tgz}
|
||||
name: '@rush-temp/arm-managementgroups'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
@ -11659,45 +11663,47 @@ packages:
|
|||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-multi-entry': 3.0.1_rollup@2.70.1
|
||||
'@rollup/plugin-node-resolve': 8.4.0_rollup@2.70.1
|
||||
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
|
||||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 2.70.1
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@2.70.1
|
||||
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
|
||||
tslib: 2.3.1
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.15.4
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- debug
|
||||
- encoding
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
file:projects/arm-managementpartner.tgz:
|
||||
resolution: {integrity: sha512-VpOVj0VjxuXQHVtc/I2xsyZuC8KaoVA0hZy41FbYIaceYAcPq29KQXtp0ai4YJiHRRYTPPYVxGdTM6o8XAeAZQ==, tarball: file:projects/arm-managementpartner.tgz}
|
||||
resolution: {integrity: sha512-sP7x1wf3eZSkxtXqWPCZ0HA4c3dzLfT4/PzPx2cZGlGQWhZAFQduhN52I2AX9voHqLStRUp/gVNWX7ODTqCW5w==, tarball: file:projects/arm-managementpartner.tgz}
|
||||
name: '@rush-temp/arm-managementpartner'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@azure-tools/test-recorder': 1.0.2
|
||||
'@azure/identity': 2.0.4
|
||||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@1.32.1
|
||||
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
|
||||
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
|
||||
'@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
|
||||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 1.32.1
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
|
||||
rollup: 2.70.1
|
||||
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
|
||||
tslib: 2.3.1
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.15.4
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- debug
|
||||
- encoding
|
||||
- supports-color
|
||||
|
@ -13762,54 +13768,56 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/arm-webservices.tgz:
|
||||
resolution: {integrity: sha512-FA2egPQgE8ExbfHaI29YHDgt6f4v0ZVNw1pHQh9A3NRzbvLM3Vofm0BjFLHFwcZ3XhHPvOafMItP7fH/7oI0vw==, tarball: file:projects/arm-webservices.tgz}
|
||||
resolution: {integrity: sha512-yHtp8FORfTotvCrUBoHxN9OWiiLmAUS21V/QH7d2hzw6GoWpWjUqNRs2/xFLp85oY59bHIhJ4i6clKuP/Ilvew==, tarball: file:projects/arm-webservices.tgz}
|
||||
name: '@rush-temp/arm-webservices'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@azure-tools/test-recorder': 1.0.2
|
||||
'@azure/identity': 2.0.4
|
||||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@1.32.1
|
||||
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
|
||||
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
|
||||
'@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
|
||||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 1.32.1
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
|
||||
rollup: 2.70.1
|
||||
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
|
||||
tslib: 2.3.1
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.15.4
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- debug
|
||||
- encoding
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
file:projects/arm-workspaces.tgz:
|
||||
resolution: {integrity: sha512-9+atMoMsJ1wsgJu9RnGcAbMxmxA7zmnQXm8NG6eNPmu/WWNk0uwexifDqAYXFVqqIqleXM4FHGq9pAOmOraO7g==, tarball: file:projects/arm-workspaces.tgz}
|
||||
resolution: {integrity: sha512-kZH9xy+GCEJvZWdGfdjthX+8z2uTRDTyUkNItlhVRk47oc85jHOwvMsjtM2yY9UdLd1I+4zIF6qU/snt3QRCTg==, tarball: file:projects/arm-workspaces.tgz}
|
||||
name: '@rush-temp/arm-workspaces'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@azure-tools/test-recorder': 1.0.2
|
||||
'@azure/identity': 2.0.4
|
||||
'@microsoft/api-extractor': 7.18.11
|
||||
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@1.32.1
|
||||
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
|
||||
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
|
||||
'@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
|
||||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 1.32.1
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
|
||||
rollup: 2.70.1
|
||||
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
|
||||
tslib: 2.3.1
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.15.4
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- debug
|
||||
- encoding
|
||||
- supports-color
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# Release History
|
||||
|
||||
## 2.0.0-beta.1 (2022-01-19)
|
||||
## 2.0.0-beta.2 (2022-04-24)
|
||||
|
||||
The package of @azure/arm-commitmentplans is using our next generation design principles since version 2.0.0-beta.1, which contains breaking changes.
|
||||
The package of @azure/arm-commitmentplans is using our next generation design principles since version 2.0.0-beta.2, which contains breaking changes.
|
||||
|
||||
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
|
||||
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018 Microsoft
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -16,6 +16,8 @@ These APIs allow end users to operate on Azure Machine Learning Commitment Plans
|
|||
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
|
||||
- Latest versions of Safari, Chrome, Edge and Firefox.
|
||||
|
||||
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- An [Azure subscription][azure_sub].
|
||||
|
@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
|
|||
```javascript
|
||||
const { AzureMLCommitmentPlansManagementClient } = require("@azure/arm-commitmentplans");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
|
||||
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const client = new AzureMLCommitmentPlansManagementClient(new DefaultAzureCredential(), subscriptionId);
|
||||
|
||||
// For client-side applications running in the browser, use this code instead:
|
||||
// const credential = new InteractiveBrowserCredential({
|
||||
// tenantId: "<YOUR_TENANT_ID>",
|
||||
// clientId: "<YOUR_CLIENT_ID>"
|
||||
// });
|
||||
// const client = new AzureMLCommitmentPlansManagementClient(credential, subscriptionId);
|
||||
```
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"commit": "1b0a465061c68175898f8f5d27f0301f42ce994c",
|
||||
"readme": "specification/machinelearning/resource-manager/readme.md",
|
||||
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/iotspaces/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1 --generate-sample=true",
|
||||
"readme": "specification\\machinelearning\\resource-manager\\readme.md",
|
||||
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\machinelearning\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"use": "@autorest/typescript@6.0.0-alpha.16.20220114.1"
|
||||
}
|
||||
"release_tool": "@azure-tools/js-sdk-release-tools@2.2.6",
|
||||
"use": "@autorest/typescript@6.0.0-alpha.19.20220408.1"
|
||||
}
|
|
@ -1,18 +1,31 @@
|
|||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||
"mainEntryPointFilePath": "./dist-esm/src/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/arm-commitmentplans.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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,15 +3,15 @@
|
|||
"sdk-type": "mgmt",
|
||||
"author": "Microsoft Corporation",
|
||||
"description": "A generated SDK for AzureMLCommitmentPlansManagementClient.",
|
||||
"version": "2.0.0-beta.1",
|
||||
"version": "2.0.0-beta.2",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@azure/core-paging": "^1.2.0",
|
||||
"@azure/core-client": "^1.0.0",
|
||||
"@azure/core-client": "^1.5.0",
|
||||
"@azure/core-auth": "^1.3.0",
|
||||
"@azure/core-rest-pipeline": "^1.1.0",
|
||||
"@azure/core-rest-pipeline": "^1.8.0",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"keywords": [
|
||||
|
@ -27,13 +27,13 @@
|
|||
"types": "./types/arm-commitmentplans.d.ts",
|
||||
"devDependencies": {
|
||||
"@microsoft/api-extractor": "7.18.11",
|
||||
"@rollup/plugin-commonjs": "11.0.2",
|
||||
"@rollup/plugin-json": "^4.0.0",
|
||||
"@rollup/plugin-multi-entry": "^3.0.0",
|
||||
"@rollup/plugin-node-resolve": "^8.0.0",
|
||||
"@rollup/plugin-commonjs": "^21.0.1",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-multi-entry": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^13.1.3",
|
||||
"mkdirp": "^1.0.4",
|
||||
"rollup": "^1.16.3",
|
||||
"rollup-plugin-sourcemaps": "^0.4.2",
|
||||
"rollup": "^2.66.1",
|
||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||
"typescript": "~4.2.0",
|
||||
"uglify-js": "^3.4.9",
|
||||
"rimraf": "^3.0.0",
|
||||
|
@ -99,7 +99,7 @@
|
|||
"//metadata": {
|
||||
"constantPaths": [
|
||||
{
|
||||
"path": "src/AzureMLCommitmentPlansManagementClient.ts",
|
||||
"path": "src/azureMLCommitmentPlansManagementClient.ts",
|
||||
"prefix": "packageDetails"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
|
|||
|
||||
import nodeBuiltins from "builtin-modules";
|
||||
|
||||
/**
|
||||
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
|
||||
*
|
||||
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
|
||||
* __exportStar downleveled helper function to declare its exports which confuses
|
||||
* rollup's automatic discovery mechanism.
|
||||
*
|
||||
* @returns an object reference that can be `...`'d into your cjs() configuration.
|
||||
*/
|
||||
export function openTelemetryCommonJs() {
|
||||
const namedExports = {};
|
||||
|
||||
for (const key of [
|
||||
"@opentelemetry/api",
|
||||
"@azure/core-tracing/node_modules/@opentelemetry/api"
|
||||
]) {
|
||||
namedExports[key] = [
|
||||
"SpanKind",
|
||||
"TraceFlags",
|
||||
"getSpan",
|
||||
"setSpan",
|
||||
"SpanStatusCode",
|
||||
"getSpanContext",
|
||||
"setSpanContext"
|
||||
];
|
||||
}
|
||||
|
||||
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
|
||||
|
||||
for (const version of releasedOpenTelemetryVersions) {
|
||||
namedExports[
|
||||
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
|
||||
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
|
||||
] = [
|
||||
"SpanKind",
|
||||
"TraceFlags",
|
||||
"getSpan",
|
||||
"setSpan",
|
||||
"StatusCode",
|
||||
"CanonicalCode",
|
||||
"getSpanContext",
|
||||
"setSpanContext"
|
||||
];
|
||||
}
|
||||
|
||||
return namedExports;
|
||||
}
|
||||
|
||||
// #region Warning Handler
|
||||
|
||||
/**
|
||||
* A function that can determine whether a rollupwarning should be ignored. If
|
||||
* A function that can determine whether a rollup warning should be ignored. If
|
||||
* the function returns `true`, then the warning will not be displayed.
|
||||
*/
|
||||
|
||||
function ignoreNiseSinonEvalWarnings(warning) {
|
||||
function ignoreNiseSinonEval(warning) {
|
||||
return (
|
||||
warning.code === "EVAL" &&
|
||||
warning.id &&
|
||||
|
@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
|
|||
);
|
||||
}
|
||||
|
||||
function ignoreChaiCircularDependencyWarnings(warning) {
|
||||
function ignoreChaiCircularDependency(warning) {
|
||||
return (
|
||||
warning.code === "CIRCULAR_DEPENDENCY" &&
|
||||
warning.importer && warning.importer.includes("node_modules/chai") === true
|
||||
);
|
||||
}
|
||||
|
||||
const warningInhibitors = [
|
||||
ignoreChaiCircularDependencyWarnings,
|
||||
ignoreNiseSinonEvalWarnings
|
||||
];
|
||||
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
|
||||
|
||||
/**
|
||||
* Construct a warning handler for the shared rollup configuration
|
||||
|
@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
|
|||
nodeResolve({
|
||||
mainFields: ["module", "browser"]
|
||||
}),
|
||||
cjs({
|
||||
namedExports: {
|
||||
// Chai's strange internal architecture makes it impossible to statically
|
||||
// analyze its exports.
|
||||
chai: [
|
||||
"version",
|
||||
"use",
|
||||
"util",
|
||||
"config",
|
||||
"expect",
|
||||
"should",
|
||||
"assert"
|
||||
],
|
||||
...openTelemetryCommonJs()
|
||||
}
|
||||
}),
|
||||
cjs(),
|
||||
json(),
|
||||
sourcemaps()
|
||||
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
|
||||
|
@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
|
|||
],
|
||||
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
|
||||
preserveSymlinks: false,
|
||||
plugins: [sourcemaps(), nodeResolve(), cjs()]
|
||||
plugins: [sourcemaps(), nodeResolve()]
|
||||
};
|
||||
|
||||
const config = [baseConfig];
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
||||
import * as coreAuth from "@azure/core-auth";
|
||||
import {
|
||||
OperationsImpl,
|
||||
|
@ -56,7 +57,7 @@ export class AzureMLCommitmentPlansManagementClient extends coreClient.ServiceCl
|
|||
credential: credentials
|
||||
};
|
||||
|
||||
const packageDetails = `azsdk-js-arm-commitmentplans/2.0.0-beta.1`;
|
||||
const packageDetails = `azsdk-js-arm-commitmentplans/2.0.0-beta.2`;
|
||||
const userAgentPrefix =
|
||||
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
||||
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
||||
|
@ -71,9 +72,33 @@ export class AzureMLCommitmentPlansManagementClient extends coreClient.ServiceCl
|
|||
userAgentOptions: {
|
||||
userAgentPrefix
|
||||
},
|
||||
baseUri: options.endpoint || "https://management.azure.com"
|
||||
baseUri:
|
||||
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
||||
};
|
||||
super(optionsWithDefaults);
|
||||
|
||||
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
||||
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
|
||||
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
||||
(pipelinePolicy) =>
|
||||
pipelinePolicy.name ===
|
||||
coreRestPipeline.bearerTokenAuthenticationPolicyName
|
||||
);
|
||||
if (!bearerTokenAuthenticationPolicyFound) {
|
||||
this.pipeline.removePolicy({
|
||||
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
||||
});
|
||||
this.pipeline.addPolicy(
|
||||
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
||||
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
||||
challengeCallbacks: {
|
||||
authorizeRequestOnChallenge:
|
||||
coreClient.authorizeRequestOnClaimChallenge
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
// Parameter assignments
|
||||
this.subscriptionId = subscriptionId;
|
||||
|
||||
|
|
|
@ -9,12 +9,25 @@
|
|||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"lib": ["es6", "dom"],
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"declaration": true,
|
||||
"outDir": "./dist-esm",
|
||||
"importHelpers": true,
|
||||
"paths": { "@azure/arm-commitmentplans": ["./src/index"] }
|
||||
"paths": {
|
||||
"@azure/arm-commitmentplans": [
|
||||
"./src/index"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*.ts", "./test/**/*.ts", "samples-dev/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
"include": [
|
||||
"./src/**/*.ts",
|
||||
"./test/**/*.ts",
|
||||
"samples-dev/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
|
@ -1,4 +1,10 @@
|
|||
# Release History
|
||||
|
||||
## 1.0.1 (2022-04-24)
|
||||
|
||||
**Features**
|
||||
|
||||
- Bug fix
|
||||
|
||||
## 1.0.0 (2022-01-19)
|
||||
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018 Microsoft
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -16,6 +16,8 @@ These APIs allow end users to operate on Azure Machine Learning Web Services res
|
|||
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
|
||||
- Latest versions of Safari, Chrome, Edge and Firefox.
|
||||
|
||||
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- An [Azure subscription][azure_sub].
|
||||
|
@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
|
|||
```javascript
|
||||
const { AzureMLWebServicesManagementClient } = require("@azure/arm-webservices");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
|
||||
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const client = new AzureMLWebServicesManagementClient(new DefaultAzureCredential(), subscriptionId);
|
||||
|
||||
// For client-side applications running in the browser, use this code instead:
|
||||
// const credential = new InteractiveBrowserCredential({
|
||||
// tenantId: "<YOUR_TENANT_ID>",
|
||||
// clientId: "<YOUR_CLIENT_ID>"
|
||||
// });
|
||||
// const client = new AzureMLWebServicesManagementClient(credential, subscriptionId);
|
||||
```
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"commit": "184b23b63ee3a79fb41ca3aa55a31a8d9e636772",
|
||||
"readme": "specification/machinelearning/resource-manager/readme.md",
|
||||
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/machinelearning/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1",
|
||||
"commit": "1b0a465061c68175898f8f5d27f0301f42ce994c",
|
||||
"readme": "specification\\machinelearning\\resource-manager\\readme.md",
|
||||
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\machinelearning\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"use": "@autorest/typescript@6.0.0-alpha.16.20220114.1"
|
||||
"release_tool": "@azure-tools/js-sdk-release-tools@2.2.6",
|
||||
"use": "@autorest/typescript@6.0.0-alpha.19.20220408.1"
|
||||
}
|
|
@ -1,18 +1,31 @@
|
|||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||
"mainEntryPointFilePath": "./dist-esm/src/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/arm-webservices.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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
"sdk-type": "mgmt",
|
||||
"author": "Microsoft Corporation",
|
||||
"description": "A generated SDK for AzureMLWebServicesManagementClient.",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
|
@ -11,9 +11,9 @@
|
|||
"@azure/core-lro": "^2.2.0",
|
||||
"@azure/abort-controller": "^1.0.0",
|
||||
"@azure/core-paging": "^1.2.0",
|
||||
"@azure/core-client": "^1.0.0",
|
||||
"@azure/core-client": "^1.5.0",
|
||||
"@azure/core-auth": "^1.3.0",
|
||||
"@azure/core-rest-pipeline": "^1.1.0",
|
||||
"@azure/core-rest-pipeline": "^1.8.0",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"keywords": [
|
||||
|
@ -29,13 +29,13 @@
|
|||
"types": "./types/arm-webservices.d.ts",
|
||||
"devDependencies": {
|
||||
"@microsoft/api-extractor": "7.18.11",
|
||||
"@rollup/plugin-commonjs": "11.0.2",
|
||||
"@rollup/plugin-json": "^4.0.0",
|
||||
"@rollup/plugin-multi-entry": "^3.0.0",
|
||||
"@rollup/plugin-node-resolve": "^8.0.0",
|
||||
"@rollup/plugin-commonjs": "^21.0.1",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-multi-entry": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^13.1.3",
|
||||
"mkdirp": "^1.0.4",
|
||||
"rollup": "^1.16.3",
|
||||
"rollup-plugin-sourcemaps": "^0.4.2",
|
||||
"rollup": "^2.66.1",
|
||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||
"typescript": "~4.2.0",
|
||||
"uglify-js": "^3.4.9",
|
||||
"rimraf": "^3.0.0",
|
||||
|
@ -101,10 +101,18 @@
|
|||
"//metadata": {
|
||||
"constantPaths": [
|
||||
{
|
||||
"path": "src/AzureMLWebServicesManagementClient.ts",
|
||||
"path": "src/azureMLWebServicesManagementClient.ts",
|
||||
"prefix": "packageDetails"
|
||||
}
|
||||
]
|
||||
},
|
||||
"autoPublish": true
|
||||
"autoPublish": true,
|
||||
"//sampleConfiguration": {
|
||||
"productName": "",
|
||||
"productSlugs": [
|
||||
"azure"
|
||||
],
|
||||
"disableDocsMs": true,
|
||||
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-webservices?view=azure-node-preview"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
|
|||
|
||||
import nodeBuiltins from "builtin-modules";
|
||||
|
||||
/**
|
||||
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
|
||||
*
|
||||
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
|
||||
* __exportStar downleveled helper function to declare its exports which confuses
|
||||
* rollup's automatic discovery mechanism.
|
||||
*
|
||||
* @returns an object reference that can be `...`'d into your cjs() configuration.
|
||||
*/
|
||||
export function openTelemetryCommonJs() {
|
||||
const namedExports = {};
|
||||
|
||||
for (const key of [
|
||||
"@opentelemetry/api",
|
||||
"@azure/core-tracing/node_modules/@opentelemetry/api"
|
||||
]) {
|
||||
namedExports[key] = [
|
||||
"SpanKind",
|
||||
"TraceFlags",
|
||||
"getSpan",
|
||||
"setSpan",
|
||||
"SpanStatusCode",
|
||||
"getSpanContext",
|
||||
"setSpanContext"
|
||||
];
|
||||
}
|
||||
|
||||
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
|
||||
|
||||
for (const version of releasedOpenTelemetryVersions) {
|
||||
namedExports[
|
||||
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
|
||||
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
|
||||
] = [
|
||||
"SpanKind",
|
||||
"TraceFlags",
|
||||
"getSpan",
|
||||
"setSpan",
|
||||
"StatusCode",
|
||||
"CanonicalCode",
|
||||
"getSpanContext",
|
||||
"setSpanContext"
|
||||
];
|
||||
}
|
||||
|
||||
return namedExports;
|
||||
}
|
||||
|
||||
// #region Warning Handler
|
||||
|
||||
/**
|
||||
* A function that can determine whether a rollupwarning should be ignored. If
|
||||
* A function that can determine whether a rollup warning should be ignored. If
|
||||
* the function returns `true`, then the warning will not be displayed.
|
||||
*/
|
||||
|
||||
function ignoreNiseSinonEvalWarnings(warning) {
|
||||
function ignoreNiseSinonEval(warning) {
|
||||
return (
|
||||
warning.code === "EVAL" &&
|
||||
warning.id &&
|
||||
|
@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
|
|||
);
|
||||
}
|
||||
|
||||
function ignoreChaiCircularDependencyWarnings(warning) {
|
||||
function ignoreChaiCircularDependency(warning) {
|
||||
return (
|
||||
warning.code === "CIRCULAR_DEPENDENCY" &&
|
||||
warning.importer && warning.importer.includes("node_modules/chai") === true
|
||||
);
|
||||
}
|
||||
|
||||
const warningInhibitors = [
|
||||
ignoreChaiCircularDependencyWarnings,
|
||||
ignoreNiseSinonEvalWarnings
|
||||
];
|
||||
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
|
||||
|
||||
/**
|
||||
* Construct a warning handler for the shared rollup configuration
|
||||
|
@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
|
|||
nodeResolve({
|
||||
mainFields: ["module", "browser"]
|
||||
}),
|
||||
cjs({
|
||||
namedExports: {
|
||||
// Chai's strange internal architecture makes it impossible to statically
|
||||
// analyze its exports.
|
||||
chai: [
|
||||
"version",
|
||||
"use",
|
||||
"util",
|
||||
"config",
|
||||
"expect",
|
||||
"should",
|
||||
"assert"
|
||||
],
|
||||
...openTelemetryCommonJs()
|
||||
}
|
||||
}),
|
||||
cjs(),
|
||||
json(),
|
||||
sourcemaps()
|
||||
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
|
||||
|
@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
|
|||
],
|
||||
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
|
||||
preserveSymlinks: false,
|
||||
plugins: [sourcemaps(), nodeResolve(), cjs()]
|
||||
plugins: [sourcemaps(), nodeResolve()]
|
||||
};
|
||||
|
||||
const config = [baseConfig];
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
# App registration secret for AAD authentication
|
||||
AZURE_CLIENT_SECRET=
|
||||
AZURE_CLIENT_ID=
|
||||
AZURE_TENANT_ID=
|
|
@ -0,0 +1,157 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
WebService,
|
||||
AzureMLWebServicesManagementClient
|
||||
} from "@azure/arm-webservices";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or update a web service. This call will overwrite an existing web service. Note that there is no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call the Get operation first to verify that it does not exist.
|
||||
*
|
||||
* @summary Create or update a web service. This call will overwrite an existing web service. Note that there is no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call the Get operation first to verify that it does not exist.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/putWebService.json
|
||||
*/
|
||||
async function putWebService() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const createOrUpdatePayload: WebService = {
|
||||
location: "West US",
|
||||
properties: {
|
||||
description: "Web Service Description",
|
||||
assets: {
|
||||
asset1: {
|
||||
name: "Execute R Script",
|
||||
type: "Module",
|
||||
locationInfo: { credentials: "", uri: "aml://module/moduleId-1" }
|
||||
},
|
||||
asset2: {
|
||||
name: "Import Data",
|
||||
type: "Module",
|
||||
locationInfo: { credentials: "", uri: "aml://module/moduleId-2" }
|
||||
}
|
||||
},
|
||||
commitmentPlan: {
|
||||
id:
|
||||
"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.MachineLearning/commitmentPlans/commitmentPlanName"
|
||||
},
|
||||
diagnostics: { level: "None" },
|
||||
exampleRequest: {
|
||||
globalParameters: {},
|
||||
inputs: {
|
||||
input1: []
|
||||
}
|
||||
},
|
||||
exposeSampleData: true,
|
||||
input: {
|
||||
type: "object",
|
||||
description: "",
|
||||
properties: {
|
||||
input1: {
|
||||
type: "object",
|
||||
description: "",
|
||||
properties: {
|
||||
columnName: { type: "String", xMsIsnullable: false }
|
||||
},
|
||||
title: ""
|
||||
}
|
||||
},
|
||||
title: ""
|
||||
},
|
||||
machineLearningWorkspace: { id: "workspaceId" },
|
||||
output: {
|
||||
type: "object",
|
||||
description: "",
|
||||
properties: {
|
||||
output1: {
|
||||
type: "object",
|
||||
description: "",
|
||||
properties: {
|
||||
age: { type: "Integer", format: "Int32", xMsIsnullable: true },
|
||||
workclass: { type: "String", xMsIsnullable: false }
|
||||
},
|
||||
title: ""
|
||||
}
|
||||
},
|
||||
title: ""
|
||||
},
|
||||
package: {
|
||||
edges: [
|
||||
{
|
||||
sourceNodeId: "node2",
|
||||
sourcePortId: "Results dataset",
|
||||
targetNodeId: "node1",
|
||||
targetPortId: "Dataset2"
|
||||
},
|
||||
{
|
||||
sourceNodeId: "node3",
|
||||
targetNodeId: "node1",
|
||||
targetPortId: "Dataset1"
|
||||
},
|
||||
{
|
||||
sourceNodeId: "node1",
|
||||
sourcePortId: "Result Dataset",
|
||||
targetNodeId: "node4"
|
||||
}
|
||||
],
|
||||
graphParameters: {},
|
||||
nodes: {
|
||||
node1: {
|
||||
assetId: "asset1",
|
||||
parameters: {
|
||||
rScript: { certificateThumbprint: "" },
|
||||
rVersion: { certificateThumbprint: "" }
|
||||
}
|
||||
},
|
||||
node2: {
|
||||
assetId: "asset2",
|
||||
parameters: {
|
||||
accountKey: {
|
||||
certificateThumbprint: "TheThumbprint"
|
||||
},
|
||||
accountName: { certificateThumbprint: "" },
|
||||
pleaseSpecifyAuthenticationType: {
|
||||
certificateThumbprint: ""
|
||||
},
|
||||
pleaseSpecifyDataSource: {
|
||||
certificateThumbprint: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
node3: { inputId: "input1" },
|
||||
node4: { outputId: "output1" }
|
||||
}
|
||||
},
|
||||
packageType: "Graph",
|
||||
parameters: {},
|
||||
payloadsInBlobStorage: false,
|
||||
readOnly: false,
|
||||
realtimeConfiguration: { maxConcurrentCalls: 4 },
|
||||
storageAccount: { name: "Storage_Name", key: "Storage_Key" },
|
||||
title: "Web Service Title"
|
||||
},
|
||||
tags: { tag1: "value1", tag2: "value2" }
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.webServices.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
webServiceName,
|
||||
createOrUpdatePayload
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
putWebService().catch(console.error);
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { AzureMLWebServicesManagementClient } from "@azure/arm-webservices";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates an encrypted credentials parameter blob for the specified region. To get the web service from a region other than the region in which it has been created, you must first call Create Regional Web Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do this before the first time that you get the web service in the new region.
|
||||
*
|
||||
* @summary Creates an encrypted credentials parameter blob for the specified region. To get the web service from a region other than the region in which it has been created, you must first call Create Regional Web Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do this before the first time that you get the web service in the new region.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/createRegionalProperties.json
|
||||
*/
|
||||
async function createRegionalProperties() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const region = "Southeast Asia";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.webServices.beginCreateRegionalPropertiesAndWait(
|
||||
resourceGroupName,
|
||||
webServiceName,
|
||||
region
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
createRegionalProperties().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { AzureMLWebServicesManagementClient } from "@azure/arm-webservices";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys.
|
||||
*
|
||||
* @summary Gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebService.json
|
||||
*/
|
||||
async function getWebService() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.webServices.get(
|
||||
resourceGroupName,
|
||||
webServiceName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getWebService().catch(console.error);
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { AzureMLWebServicesManagementClient } from "@azure/arm-webservices";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the web services in the specified resource group.
|
||||
*
|
||||
* @summary Gets the web services in the specified resource group.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebServicesByResourceGroup.json
|
||||
*/
|
||||
async function getWebServicesByResourceGroup() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.webServices.listByResourceGroup(
|
||||
resourceGroupName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
getWebServicesByResourceGroup().catch(console.error);
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { AzureMLWebServicesManagementClient } from "@azure/arm-webservices";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the web services in the specified subscription.
|
||||
*
|
||||
* @summary Gets the web services in the specified subscription.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebServicesBySubscriptionId.json
|
||||
*/
|
||||
async function getWebServicesBySubscriptionId() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.webServices.listBySubscriptionId()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
getWebServicesBySubscriptionId().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { AzureMLWebServicesManagementClient } from "@azure/arm-webservices";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the access keys for the specified web service.
|
||||
*
|
||||
* @summary Gets the access keys for the specified web service.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebServiceKeys.json
|
||||
*/
|
||||
async function getWebServiceKeys() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.webServices.listKeys(
|
||||
resourceGroupName,
|
||||
webServiceName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getWebServiceKeys().catch(console.error);
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
PatchedWebService,
|
||||
AzureMLWebServicesManagementClient
|
||||
} from "@azure/arm-webservices";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine whether it has completed successfully, you must perform a Get operation.
|
||||
*
|
||||
* @summary Modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine whether it has completed successfully, you must perform a Get operation.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/patchWebService.json
|
||||
*/
|
||||
async function patchWebService() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const patchPayload: PatchedWebService = {
|
||||
location: "West US",
|
||||
properties: {
|
||||
description: "New Web Service Description",
|
||||
packageType: "Graph",
|
||||
title: "New Web Service Title"
|
||||
}
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.webServices.beginPatchAndWait(
|
||||
resourceGroupName,
|
||||
webServiceName,
|
||||
patchPayload
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
patchWebService().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { AzureMLWebServicesManagementClient } from "@azure/arm-webservices";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes the specified web service.
|
||||
*
|
||||
* @summary Deletes the specified web service.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/deleteWebService.json
|
||||
*/
|
||||
async function deleteWebService() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.webServices.beginRemoveAndWait(
|
||||
resourceGroupName,
|
||||
webServiceName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
deleteWebService().catch(console.error);
|
|
@ -0,0 +1,64 @@
|
|||
# client library samples for JavaScript
|
||||
|
||||
These sample programs show how to use the JavaScript client libraries for in some common scenarios.
|
||||
|
||||
| **File Name** | **Description** |
|
||||
| ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [webServicesCreateOrUpdateSample.js][webservicescreateorupdatesample] | Create or update a web service. This call will overwrite an existing web service. Note that there is no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call the Get operation first to verify that it does not exist. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/putWebService.json |
|
||||
| [webServicesCreateRegionalPropertiesSample.js][webservicescreateregionalpropertiessample] | Creates an encrypted credentials parameter blob for the specified region. To get the web service from a region other than the region in which it has been created, you must first call Create Regional Web Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do this before the first time that you get the web service in the new region. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/createRegionalProperties.json |
|
||||
| [webServicesGetSample.js][webservicesgetsample] | Gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebService.json |
|
||||
| [webServicesListByResourceGroupSample.js][webserviceslistbyresourcegroupsample] | Gets the web services in the specified resource group. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebServicesByResourceGroup.json |
|
||||
| [webServicesListBySubscriptionIdSample.js][webserviceslistbysubscriptionidsample] | Gets the web services in the specified subscription. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebServicesBySubscriptionId.json |
|
||||
| [webServicesListKeysSample.js][webserviceslistkeyssample] | Gets the access keys for the specified web service. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebServiceKeys.json |
|
||||
| [webServicesPatchSample.js][webservicespatchsample] | Modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine whether it has completed successfully, you must perform a Get operation. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/patchWebService.json |
|
||||
| [webServicesRemoveSample.js][webservicesremovesample] | Deletes the specified web service. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/deleteWebService.json |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/).
|
||||
|
||||
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 webServicesCreateOrUpdateSample.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 cross-env node webServicesCreateOrUpdateSample.js
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
|
||||
|
||||
[webservicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-webservices/samples/v1/javascript/webServicesCreateOrUpdateSample.js
|
||||
[webservicescreateregionalpropertiessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-webservices/samples/v1/javascript/webServicesCreateRegionalPropertiesSample.js
|
||||
[webservicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-webservices/samples/v1/javascript/webServicesGetSample.js
|
||||
[webserviceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-webservices/samples/v1/javascript/webServicesListByResourceGroupSample.js
|
||||
[webserviceslistbysubscriptionidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-webservices/samples/v1/javascript/webServicesListBySubscriptionIdSample.js
|
||||
[webserviceslistkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-webservices/samples/v1/javascript/webServicesListKeysSample.js
|
||||
[webservicespatchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-webservices/samples/v1/javascript/webServicesPatchSample.js
|
||||
[webservicesremovesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-webservices/samples/v1/javascript/webServicesRemoveSample.js
|
||||
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-webservices?view=azure-node-preview
|
||||
[freesub]: https://azure.microsoft.com/free/
|
||||
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/machinelearning/arm-webservices/README.md
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"name": "@azure-samples/arm-webservices-js",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"description": " client library samples for JavaScript",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Azure/azure-sdk-for-js.git",
|
||||
"directory": "sdk/machinelearning/arm-webservices"
|
||||
},
|
||||
"keywords": [
|
||||
"node",
|
||||
"azure",
|
||||
"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/machinelearning/arm-webservices",
|
||||
"dependencies": {
|
||||
"@azure/arm-webservices": "latest",
|
||||
"dotenv": "latest",
|
||||
"@azure/identity": "^2.0.1"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
# App registration secret for AAD authentication
|
||||
AZURE_CLIENT_SECRET=
|
||||
AZURE_CLIENT_ID=
|
||||
AZURE_TENANT_ID=
|
|
@ -0,0 +1,153 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { AzureMLWebServicesManagementClient } = require("@azure/arm-webservices");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or update a web service. This call will overwrite an existing web service. Note that there is no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call the Get operation first to verify that it does not exist.
|
||||
*
|
||||
* @summary Create or update a web service. This call will overwrite an existing web service. Note that there is no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call the Get operation first to verify that it does not exist.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/putWebService.json
|
||||
*/
|
||||
async function putWebService() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const createOrUpdatePayload = {
|
||||
location: "West US",
|
||||
properties: {
|
||||
description: "Web Service Description",
|
||||
assets: {
|
||||
asset1: {
|
||||
name: "Execute R Script",
|
||||
type: "Module",
|
||||
locationInfo: { credentials: "", uri: "aml://module/moduleId-1" },
|
||||
},
|
||||
asset2: {
|
||||
name: "Import Data",
|
||||
type: "Module",
|
||||
locationInfo: { credentials: "", uri: "aml://module/moduleId-2" },
|
||||
},
|
||||
},
|
||||
commitmentPlan: {
|
||||
id: "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.MachineLearning/commitmentPlans/commitmentPlanName",
|
||||
},
|
||||
diagnostics: { level: "None" },
|
||||
exampleRequest: {
|
||||
globalParameters: {},
|
||||
inputs: {
|
||||
input1: [["age"], ["workclass"], ["fnlwgt"], ["education"], ["education-num"]],
|
||||
},
|
||||
},
|
||||
exposeSampleData: true,
|
||||
input: {
|
||||
type: "object",
|
||||
description: "",
|
||||
properties: {
|
||||
input1: {
|
||||
type: "object",
|
||||
description: "",
|
||||
properties: {
|
||||
columnName: { type: "String", xMsIsnullable: false },
|
||||
},
|
||||
title: "",
|
||||
},
|
||||
},
|
||||
title: "",
|
||||
},
|
||||
machineLearningWorkspace: { id: "workspaceId" },
|
||||
output: {
|
||||
type: "object",
|
||||
description: "",
|
||||
properties: {
|
||||
output1: {
|
||||
type: "object",
|
||||
description: "",
|
||||
properties: {
|
||||
age: { type: "Integer", format: "Int32", xMsIsnullable: true },
|
||||
workclass: { type: "String", xMsIsnullable: false },
|
||||
},
|
||||
title: "",
|
||||
},
|
||||
},
|
||||
title: "",
|
||||
},
|
||||
package: {
|
||||
edges: [
|
||||
{
|
||||
sourceNodeId: "node2",
|
||||
sourcePortId: "Results dataset",
|
||||
targetNodeId: "node1",
|
||||
targetPortId: "Dataset2",
|
||||
},
|
||||
{
|
||||
sourceNodeId: "node3",
|
||||
targetNodeId: "node1",
|
||||
targetPortId: "Dataset1",
|
||||
},
|
||||
{
|
||||
sourceNodeId: "node1",
|
||||
sourcePortId: "Result Dataset",
|
||||
targetNodeId: "node4",
|
||||
},
|
||||
],
|
||||
graphParameters: {},
|
||||
nodes: {
|
||||
node1: {
|
||||
assetId: "asset1",
|
||||
parameters: {
|
||||
rScript: { certificateThumbprint: "", value: "The R Script" },
|
||||
rVersion: { certificateThumbprint: "", value: "CRAN R 3.1.0" },
|
||||
},
|
||||
},
|
||||
node2: {
|
||||
assetId: "asset2",
|
||||
parameters: {
|
||||
accountKey: {
|
||||
certificateThumbprint: "TheThumbprint",
|
||||
value: "Encrypted Key",
|
||||
},
|
||||
accountName: { certificateThumbprint: "", value: "accountName" },
|
||||
pleaseSpecifyAuthenticationType: {
|
||||
certificateThumbprint: "",
|
||||
value: "Account",
|
||||
},
|
||||
pleaseSpecifyDataSource: {
|
||||
certificateThumbprint: "",
|
||||
value: "AzureBlobStorage",
|
||||
},
|
||||
},
|
||||
},
|
||||
node3: { inputId: "input1" },
|
||||
node4: { outputId: "output1" },
|
||||
},
|
||||
},
|
||||
packageType: "Graph",
|
||||
parameters: {},
|
||||
payloadsInBlobStorage: false,
|
||||
readOnly: false,
|
||||
realtimeConfiguration: { maxConcurrentCalls: 4 },
|
||||
storageAccount: { name: "Storage_Name", key: "Storage_Key" },
|
||||
title: "Web Service Title",
|
||||
},
|
||||
tags: { tag1: "value1", tag2: "value2" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(credential, subscriptionId);
|
||||
const result = await client.webServices.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
webServiceName,
|
||||
createOrUpdatePayload
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
putWebService().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { AzureMLWebServicesManagementClient } = require("@azure/arm-webservices");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates an encrypted credentials parameter blob for the specified region. To get the web service from a region other than the region in which it has been created, you must first call Create Regional Web Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do this before the first time that you get the web service in the new region.
|
||||
*
|
||||
* @summary Creates an encrypted credentials parameter blob for the specified region. To get the web service from a region other than the region in which it has been created, you must first call Create Regional Web Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do this before the first time that you get the web service in the new region.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/createRegionalProperties.json
|
||||
*/
|
||||
async function createRegionalProperties() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const region = "Southeast Asia";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(credential, subscriptionId);
|
||||
const result = await client.webServices.beginCreateRegionalPropertiesAndWait(
|
||||
resourceGroupName,
|
||||
webServiceName,
|
||||
region
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
createRegionalProperties().catch(console.error);
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { AzureMLWebServicesManagementClient } = require("@azure/arm-webservices");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys.
|
||||
*
|
||||
* @summary Gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebService.json
|
||||
*/
|
||||
async function getWebService() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(credential, subscriptionId);
|
||||
const result = await client.webServices.get(resourceGroupName, webServiceName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getWebService().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { AzureMLWebServicesManagementClient } = require("@azure/arm-webservices");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the web services in the specified resource group.
|
||||
*
|
||||
* @summary Gets the web services in the specified resource group.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebServicesByResourceGroup.json
|
||||
*/
|
||||
async function getWebServicesByResourceGroup() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.webServices.listByResourceGroup(resourceGroupName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
getWebServicesByResourceGroup().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { AzureMLWebServicesManagementClient } = require("@azure/arm-webservices");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the web services in the specified subscription.
|
||||
*
|
||||
* @summary Gets the web services in the specified subscription.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebServicesBySubscriptionId.json
|
||||
*/
|
||||
async function getWebServicesBySubscriptionId() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.webServices.listBySubscriptionId()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
getWebServicesBySubscriptionId().catch(console.error);
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { AzureMLWebServicesManagementClient } = require("@azure/arm-webservices");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the access keys for the specified web service.
|
||||
*
|
||||
* @summary Gets the access keys for the specified web service.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebServiceKeys.json
|
||||
*/
|
||||
async function getWebServiceKeys() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(credential, subscriptionId);
|
||||
const result = await client.webServices.listKeys(resourceGroupName, webServiceName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getWebServiceKeys().catch(console.error);
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { AzureMLWebServicesManagementClient } = require("@azure/arm-webservices");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine whether it has completed successfully, you must perform a Get operation.
|
||||
*
|
||||
* @summary Modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine whether it has completed successfully, you must perform a Get operation.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/patchWebService.json
|
||||
*/
|
||||
async function patchWebService() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const patchPayload = {
|
||||
location: "West US",
|
||||
properties: {
|
||||
description: "New Web Service Description",
|
||||
packageType: "Graph",
|
||||
title: "New Web Service Title",
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(credential, subscriptionId);
|
||||
const result = await client.webServices.beginPatchAndWait(
|
||||
resourceGroupName,
|
||||
webServiceName,
|
||||
patchPayload
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
patchWebService().catch(console.error);
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { AzureMLWebServicesManagementClient } = require("@azure/arm-webservices");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes the specified web service.
|
||||
*
|
||||
* @summary Deletes the specified web service.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/deleteWebService.json
|
||||
*/
|
||||
async function deleteWebService() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(credential, subscriptionId);
|
||||
const result = await client.webServices.beginRemoveAndWait(resourceGroupName, webServiceName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
deleteWebService().catch(console.error);
|
|
@ -0,0 +1,77 @@
|
|||
# client library samples for TypeScript
|
||||
|
||||
These sample programs show how to use the TypeScript client libraries for in some common scenarios.
|
||||
|
||||
| **File Name** | **Description** |
|
||||
| ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [webServicesCreateOrUpdateSample.ts][webservicescreateorupdatesample] | Create or update a web service. This call will overwrite an existing web service. Note that there is no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call the Get operation first to verify that it does not exist. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/putWebService.json |
|
||||
| [webServicesCreateRegionalPropertiesSample.ts][webservicescreateregionalpropertiessample] | Creates an encrypted credentials parameter blob for the specified region. To get the web service from a region other than the region in which it has been created, you must first call Create Regional Web Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do this before the first time that you get the web service in the new region. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/createRegionalProperties.json |
|
||||
| [webServicesGetSample.ts][webservicesgetsample] | Gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebService.json |
|
||||
| [webServicesListByResourceGroupSample.ts][webserviceslistbyresourcegroupsample] | Gets the web services in the specified resource group. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebServicesByResourceGroup.json |
|
||||
| [webServicesListBySubscriptionIdSample.ts][webserviceslistbysubscriptionidsample] | Gets the web services in the specified subscription. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebServicesBySubscriptionId.json |
|
||||
| [webServicesListKeysSample.ts][webserviceslistkeyssample] | Gets the access keys for the specified web service. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebServiceKeys.json |
|
||||
| [webServicesPatchSample.ts][webservicespatchsample] | Modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine whether it has completed successfully, you must perform a Get operation. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/patchWebService.json |
|
||||
| [webServicesRemoveSample.ts][webservicesremovesample] | Deletes the specified web service. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/deleteWebService.json |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/).
|
||||
|
||||
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/webServicesCreateOrUpdateSample.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 cross-env node dist/webServicesCreateOrUpdateSample.js
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
|
||||
|
||||
[webservicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-webservices/samples/v1/typescript/src/webServicesCreateOrUpdateSample.ts
|
||||
[webservicescreateregionalpropertiessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-webservices/samples/v1/typescript/src/webServicesCreateRegionalPropertiesSample.ts
|
||||
[webservicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-webservices/samples/v1/typescript/src/webServicesGetSample.ts
|
||||
[webserviceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-webservices/samples/v1/typescript/src/webServicesListByResourceGroupSample.ts
|
||||
[webserviceslistbysubscriptionidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-webservices/samples/v1/typescript/src/webServicesListBySubscriptionIdSample.ts
|
||||
[webserviceslistkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-webservices/samples/v1/typescript/src/webServicesListKeysSample.ts
|
||||
[webservicespatchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-webservices/samples/v1/typescript/src/webServicesPatchSample.ts
|
||||
[webservicesremovesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-webservices/samples/v1/typescript/src/webServicesRemoveSample.ts
|
||||
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-webservices?view=azure-node-preview
|
||||
[freesub]: https://azure.microsoft.com/free/
|
||||
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/machinelearning/arm-webservices/README.md
|
||||
[typescript]: https://www.typescriptlang.org/docs/home.html
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "@azure-samples/arm-webservices-ts",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"description": " client library samples for TypeScript",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"prebuild": "rimraf dist/"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Azure/azure-sdk-for-js.git",
|
||||
"directory": "sdk/machinelearning/arm-webservices"
|
||||
},
|
||||
"keywords": [
|
||||
"node",
|
||||
"azure",
|
||||
"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/machinelearning/arm-webservices",
|
||||
"dependencies": {
|
||||
"@azure/arm-webservices": "latest",
|
||||
"dotenv": "latest",
|
||||
"@azure/identity": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^12.0.0",
|
||||
"typescript": "~4.4.0",
|
||||
"rimraf": "latest"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
# App registration secret for AAD authentication
|
||||
AZURE_CLIENT_SECRET=
|
||||
AZURE_CLIENT_ID=
|
||||
AZURE_TENANT_ID=
|
|
@ -0,0 +1,166 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
WebService,
|
||||
AzureMLWebServicesManagementClient
|
||||
} from "@azure/arm-webservices";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or update a web service. This call will overwrite an existing web service. Note that there is no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call the Get operation first to verify that it does not exist.
|
||||
*
|
||||
* @summary Create or update a web service. This call will overwrite an existing web service. Note that there is no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call the Get operation first to verify that it does not exist.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/putWebService.json
|
||||
*/
|
||||
async function putWebService() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const createOrUpdatePayload: WebService = {
|
||||
location: "West US",
|
||||
properties: {
|
||||
description: "Web Service Description",
|
||||
assets: {
|
||||
asset1: {
|
||||
name: "Execute R Script",
|
||||
type: "Module",
|
||||
locationInfo: { credentials: "", uri: "aml://module/moduleId-1" }
|
||||
},
|
||||
asset2: {
|
||||
name: "Import Data",
|
||||
type: "Module",
|
||||
locationInfo: { credentials: "", uri: "aml://module/moduleId-2" }
|
||||
}
|
||||
},
|
||||
commitmentPlan: {
|
||||
id:
|
||||
"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.MachineLearning/commitmentPlans/commitmentPlanName"
|
||||
},
|
||||
diagnostics: { level: "None" },
|
||||
exampleRequest: {
|
||||
globalParameters: {},
|
||||
inputs: {
|
||||
input1: [
|
||||
["age"],
|
||||
["workclass"],
|
||||
["fnlwgt"],
|
||||
["education"],
|
||||
["education-num"]
|
||||
]
|
||||
}
|
||||
},
|
||||
exposeSampleData: true,
|
||||
input: {
|
||||
type: "object",
|
||||
description: "",
|
||||
properties: {
|
||||
input1: {
|
||||
type: "object",
|
||||
description: "",
|
||||
properties: {
|
||||
columnName: { type: "String", xMsIsnullable: false }
|
||||
},
|
||||
title: ""
|
||||
}
|
||||
},
|
||||
title: ""
|
||||
},
|
||||
machineLearningWorkspace: { id: "workspaceId" },
|
||||
output: {
|
||||
type: "object",
|
||||
description: "",
|
||||
properties: {
|
||||
output1: {
|
||||
type: "object",
|
||||
description: "",
|
||||
properties: {
|
||||
age: { type: "Integer", format: "Int32", xMsIsnullable: true },
|
||||
workclass: { type: "String", xMsIsnullable: false }
|
||||
},
|
||||
title: ""
|
||||
}
|
||||
},
|
||||
title: ""
|
||||
},
|
||||
package: {
|
||||
edges: [
|
||||
{
|
||||
sourceNodeId: "node2",
|
||||
sourcePortId: "Results dataset",
|
||||
targetNodeId: "node1",
|
||||
targetPortId: "Dataset2"
|
||||
},
|
||||
{
|
||||
sourceNodeId: "node3",
|
||||
targetNodeId: "node1",
|
||||
targetPortId: "Dataset1"
|
||||
},
|
||||
{
|
||||
sourceNodeId: "node1",
|
||||
sourcePortId: "Result Dataset",
|
||||
targetNodeId: "node4"
|
||||
}
|
||||
],
|
||||
graphParameters: {},
|
||||
nodes: {
|
||||
node1: {
|
||||
assetId: "asset1",
|
||||
parameters: {
|
||||
rScript: { certificateThumbprint: "", value: "The R Script" },
|
||||
rVersion: { certificateThumbprint: "", value: "CRAN R 3.1.0" }
|
||||
}
|
||||
},
|
||||
node2: {
|
||||
assetId: "asset2",
|
||||
parameters: {
|
||||
accountKey: {
|
||||
certificateThumbprint: "TheThumbprint",
|
||||
value: "Encrypted Key"
|
||||
},
|
||||
accountName: { certificateThumbprint: "", value: "accountName" },
|
||||
pleaseSpecifyAuthenticationType: {
|
||||
certificateThumbprint: "",
|
||||
value: "Account"
|
||||
},
|
||||
pleaseSpecifyDataSource: {
|
||||
certificateThumbprint: "",
|
||||
value: "AzureBlobStorage"
|
||||
}
|
||||
}
|
||||
},
|
||||
node3: { inputId: "input1" },
|
||||
node4: { outputId: "output1" }
|
||||
}
|
||||
},
|
||||
packageType: "Graph",
|
||||
parameters: {},
|
||||
payloadsInBlobStorage: false,
|
||||
readOnly: false,
|
||||
realtimeConfiguration: { maxConcurrentCalls: 4 },
|
||||
storageAccount: { name: "Storage_Name", key: "Storage_Key" },
|
||||
title: "Web Service Title"
|
||||
},
|
||||
tags: { tag1: "value1", tag2: "value2" }
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.webServices.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
webServiceName,
|
||||
createOrUpdatePayload
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
putWebService().catch(console.error);
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { AzureMLWebServicesManagementClient } from "@azure/arm-webservices";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates an encrypted credentials parameter blob for the specified region. To get the web service from a region other than the region in which it has been created, you must first call Create Regional Web Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do this before the first time that you get the web service in the new region.
|
||||
*
|
||||
* @summary Creates an encrypted credentials parameter blob for the specified region. To get the web service from a region other than the region in which it has been created, you must first call Create Regional Web Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do this before the first time that you get the web service in the new region.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/createRegionalProperties.json
|
||||
*/
|
||||
async function createRegionalProperties() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const region = "Southeast Asia";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.webServices.beginCreateRegionalPropertiesAndWait(
|
||||
resourceGroupName,
|
||||
webServiceName,
|
||||
region
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
createRegionalProperties().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { AzureMLWebServicesManagementClient } from "@azure/arm-webservices";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys.
|
||||
*
|
||||
* @summary Gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebService.json
|
||||
*/
|
||||
async function getWebService() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.webServices.get(
|
||||
resourceGroupName,
|
||||
webServiceName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getWebService().catch(console.error);
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { AzureMLWebServicesManagementClient } from "@azure/arm-webservices";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the web services in the specified resource group.
|
||||
*
|
||||
* @summary Gets the web services in the specified resource group.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebServicesByResourceGroup.json
|
||||
*/
|
||||
async function getWebServicesByResourceGroup() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.webServices.listByResourceGroup(
|
||||
resourceGroupName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
getWebServicesByResourceGroup().catch(console.error);
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { AzureMLWebServicesManagementClient } from "@azure/arm-webservices";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the web services in the specified subscription.
|
||||
*
|
||||
* @summary Gets the web services in the specified subscription.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebServicesBySubscriptionId.json
|
||||
*/
|
||||
async function getWebServicesBySubscriptionId() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.webServices.listBySubscriptionId()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
getWebServicesBySubscriptionId().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { AzureMLWebServicesManagementClient } from "@azure/arm-webservices";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the access keys for the specified web service.
|
||||
*
|
||||
* @summary Gets the access keys for the specified web service.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/getWebServiceKeys.json
|
||||
*/
|
||||
async function getWebServiceKeys() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.webServices.listKeys(
|
||||
resourceGroupName,
|
||||
webServiceName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getWebServiceKeys().catch(console.error);
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
PatchedWebService,
|
||||
AzureMLWebServicesManagementClient
|
||||
} from "@azure/arm-webservices";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine whether it has completed successfully, you must perform a Get operation.
|
||||
*
|
||||
* @summary Modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine whether it has completed successfully, you must perform a Get operation.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/patchWebService.json
|
||||
*/
|
||||
async function patchWebService() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const patchPayload: PatchedWebService = {
|
||||
location: "West US",
|
||||
properties: {
|
||||
description: "New Web Service Description",
|
||||
packageType: "Graph",
|
||||
title: "New Web Service Title"
|
||||
}
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.webServices.beginPatchAndWait(
|
||||
resourceGroupName,
|
||||
webServiceName,
|
||||
patchPayload
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
patchWebService().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { AzureMLWebServicesManagementClient } from "@azure/arm-webservices";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes the specified web service.
|
||||
*
|
||||
* @summary Deletes the specified web service.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/examples/deleteWebService.json
|
||||
*/
|
||||
async function deleteWebService() {
|
||||
const subscriptionId = "subscription-id";
|
||||
const resourceGroupName = "OneResourceGroupName";
|
||||
const webServiceName = "TargetWebServiceName";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new AzureMLWebServicesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.webServices.beginRemoveAndWait(
|
||||
resourceGroupName,
|
||||
webServiceName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
deleteWebService().catch(console.error);
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2018",
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"alwaysStrict": true,
|
||||
"outDir": "dist",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"include": [
|
||||
"src/**.ts"
|
||||
]
|
||||
}
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
||||
import * as coreAuth from "@azure/core-auth";
|
||||
import { OperationsImpl, WebServicesImpl } from "./operations";
|
||||
import { Operations, WebServices } from "./operationsInterfaces";
|
||||
|
@ -44,7 +45,7 @@ export class AzureMLWebServicesManagementClient extends coreClient.ServiceClient
|
|||
credential: credentials
|
||||
};
|
||||
|
||||
const packageDetails = `azsdk-js-arm-webservices/1.0.0`;
|
||||
const packageDetails = `azsdk-js-arm-webservices/1.0.1`;
|
||||
const userAgentPrefix =
|
||||
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
||||
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
||||
|
@ -59,9 +60,33 @@ export class AzureMLWebServicesManagementClient extends coreClient.ServiceClient
|
|||
userAgentOptions: {
|
||||
userAgentPrefix
|
||||
},
|
||||
baseUri: options.endpoint || "https://management.azure.com"
|
||||
baseUri:
|
||||
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
||||
};
|
||||
super(optionsWithDefaults);
|
||||
|
||||
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
||||
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
|
||||
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
||||
(pipelinePolicy) =>
|
||||
pipelinePolicy.name ===
|
||||
coreRestPipeline.bearerTokenAuthenticationPolicyName
|
||||
);
|
||||
if (!bearerTokenAuthenticationPolicyFound) {
|
||||
this.pipeline.removePolicy({
|
||||
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
||||
});
|
||||
this.pipeline.addPolicy(
|
||||
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
||||
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
||||
challengeCallbacks: {
|
||||
authorizeRequestOnChallenge:
|
||||
coreClient.authorizeRequestOnClaimChallenge
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
// Parameter assignments
|
||||
this.subscriptionId = subscriptionId;
|
||||
|
||||
|
|
|
@ -210,10 +210,12 @@ export class WebServicesImpl implements WebServices {
|
|||
{ resourceGroupName, webServiceName, createOrUpdatePayload, options },
|
||||
createOrUpdateOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -322,10 +324,12 @@ export class WebServicesImpl implements WebServices {
|
|||
{ resourceGroupName, webServiceName, patchPayload, options },
|
||||
patchOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -406,10 +410,12 @@ export class WebServicesImpl implements WebServices {
|
|||
{ resourceGroupName, webServiceName, options },
|
||||
removeOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -497,10 +503,12 @@ export class WebServicesImpl implements WebServices {
|
|||
{ resourceGroupName, webServiceName, region, options },
|
||||
createRegionalPropertiesOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,11 +9,25 @@
|
|||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"lib": ["es6", "dom"],
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"declaration": true,
|
||||
"outDir": "./dist-esm",
|
||||
"importHelpers": true
|
||||
"importHelpers": true,
|
||||
"paths": {
|
||||
"@azure/arm-webservices": [
|
||||
"./src/index"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*.ts", "./test/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
"include": [
|
||||
"./src/**/*.ts",
|
||||
"./test/**/*.ts",
|
||||
"samples-dev/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
# Release History
|
||||
|
||||
## 1.0.1 (2022-04-24)
|
||||
|
||||
**Features**
|
||||
|
||||
- Bug fix
|
||||
|
||||
## 1.0.0 (2022-01-19)
|
||||
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018 Microsoft
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -16,6 +16,8 @@ These APIs allow end users to operate on Azure Machine Learning Workspace resour
|
|||
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
|
||||
- Latest versions of Safari, Chrome, Edge and Firefox.
|
||||
|
||||
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- An [Azure subscription][azure_sub].
|
||||
|
@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
|
|||
```javascript
|
||||
const { MachineLearningWorkspacesManagementClient } = require("@azure/arm-workspaces");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
|
||||
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const client = new MachineLearningWorkspacesManagementClient(new DefaultAzureCredential(), subscriptionId);
|
||||
|
||||
// For client-side applications running in the browser, use this code instead:
|
||||
// const credential = new InteractiveBrowserCredential({
|
||||
// tenantId: "<YOUR_TENANT_ID>",
|
||||
// clientId: "<YOUR_CLIENT_ID>"
|
||||
// });
|
||||
// const client = new MachineLearningWorkspacesManagementClient(credential, subscriptionId);
|
||||
```
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"commit": "184b23b63ee3a79fb41ca3aa55a31a8d9e636772",
|
||||
"readme": "specification/machinelearning/resource-manager/readme.md",
|
||||
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/machinelearning/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1 --generate-sample=true",
|
||||
"commit": "1b0a465061c68175898f8f5d27f0301f42ce994c",
|
||||
"readme": "specification\\machinelearning\\resource-manager\\readme.md",
|
||||
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\machinelearning\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"use": "@autorest/typescript@6.0.0-alpha.16.20220114.1"
|
||||
"release_tool": "@azure-tools/js-sdk-release-tools@2.2.6",
|
||||
"use": "@autorest/typescript@6.0.0-alpha.19.20220408.1"
|
||||
}
|
|
@ -1,18 +1,31 @@
|
|||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||
"mainEntryPointFilePath": "./dist-esm/src/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/arm-workspaces.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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,15 +3,15 @@
|
|||
"sdk-type": "mgmt",
|
||||
"author": "Microsoft Corporation",
|
||||
"description": "A generated SDK for MachineLearningWorkspacesManagementClient.",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@azure/core-paging": "^1.2.0",
|
||||
"@azure/core-client": "^1.0.0",
|
||||
"@azure/core-client": "^1.5.0",
|
||||
"@azure/core-auth": "^1.3.0",
|
||||
"@azure/core-rest-pipeline": "^1.1.0",
|
||||
"@azure/core-rest-pipeline": "^1.8.0",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"keywords": [
|
||||
|
@ -27,13 +27,13 @@
|
|||
"types": "./types/arm-workspaces.d.ts",
|
||||
"devDependencies": {
|
||||
"@microsoft/api-extractor": "7.18.11",
|
||||
"@rollup/plugin-commonjs": "11.0.2",
|
||||
"@rollup/plugin-json": "^4.0.0",
|
||||
"@rollup/plugin-multi-entry": "^3.0.0",
|
||||
"@rollup/plugin-node-resolve": "^8.0.0",
|
||||
"@rollup/plugin-commonjs": "^21.0.1",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-multi-entry": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^13.1.3",
|
||||
"mkdirp": "^1.0.4",
|
||||
"rollup": "^1.16.3",
|
||||
"rollup-plugin-sourcemaps": "^0.4.2",
|
||||
"rollup": "^2.66.1",
|
||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||
"typescript": "~4.2.0",
|
||||
"uglify-js": "^3.4.9",
|
||||
"rimraf": "^3.0.0",
|
||||
|
@ -99,7 +99,7 @@
|
|||
"//metadata": {
|
||||
"constantPaths": [
|
||||
{
|
||||
"path": "src/MachineLearningWorkspacesManagementClient.ts",
|
||||
"path": "src/machineLearningWorkspacesManagementClient.ts",
|
||||
"prefix": "packageDetails"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
|
|||
|
||||
import nodeBuiltins from "builtin-modules";
|
||||
|
||||
/**
|
||||
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
|
||||
*
|
||||
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
|
||||
* __exportStar downleveled helper function to declare its exports which confuses
|
||||
* rollup's automatic discovery mechanism.
|
||||
*
|
||||
* @returns an object reference that can be `...`'d into your cjs() configuration.
|
||||
*/
|
||||
export function openTelemetryCommonJs() {
|
||||
const namedExports = {};
|
||||
|
||||
for (const key of [
|
||||
"@opentelemetry/api",
|
||||
"@azure/core-tracing/node_modules/@opentelemetry/api"
|
||||
]) {
|
||||
namedExports[key] = [
|
||||
"SpanKind",
|
||||
"TraceFlags",
|
||||
"getSpan",
|
||||
"setSpan",
|
||||
"SpanStatusCode",
|
||||
"getSpanContext",
|
||||
"setSpanContext"
|
||||
];
|
||||
}
|
||||
|
||||
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
|
||||
|
||||
for (const version of releasedOpenTelemetryVersions) {
|
||||
namedExports[
|
||||
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
|
||||
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
|
||||
] = [
|
||||
"SpanKind",
|
||||
"TraceFlags",
|
||||
"getSpan",
|
||||
"setSpan",
|
||||
"StatusCode",
|
||||
"CanonicalCode",
|
||||
"getSpanContext",
|
||||
"setSpanContext"
|
||||
];
|
||||
}
|
||||
|
||||
return namedExports;
|
||||
}
|
||||
|
||||
// #region Warning Handler
|
||||
|
||||
/**
|
||||
* A function that can determine whether a rollupwarning should be ignored. If
|
||||
* A function that can determine whether a rollup warning should be ignored. If
|
||||
* the function returns `true`, then the warning will not be displayed.
|
||||
*/
|
||||
|
||||
function ignoreNiseSinonEvalWarnings(warning) {
|
||||
function ignoreNiseSinonEval(warning) {
|
||||
return (
|
||||
warning.code === "EVAL" &&
|
||||
warning.id &&
|
||||
|
@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
|
|||
);
|
||||
}
|
||||
|
||||
function ignoreChaiCircularDependencyWarnings(warning) {
|
||||
function ignoreChaiCircularDependency(warning) {
|
||||
return (
|
||||
warning.code === "CIRCULAR_DEPENDENCY" &&
|
||||
warning.importer && warning.importer.includes("node_modules/chai") === true
|
||||
);
|
||||
}
|
||||
|
||||
const warningInhibitors = [
|
||||
ignoreChaiCircularDependencyWarnings,
|
||||
ignoreNiseSinonEvalWarnings
|
||||
];
|
||||
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
|
||||
|
||||
/**
|
||||
* Construct a warning handler for the shared rollup configuration
|
||||
|
@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
|
|||
nodeResolve({
|
||||
mainFields: ["module", "browser"]
|
||||
}),
|
||||
cjs({
|
||||
namedExports: {
|
||||
// Chai's strange internal architecture makes it impossible to statically
|
||||
// analyze its exports.
|
||||
chai: [
|
||||
"version",
|
||||
"use",
|
||||
"util",
|
||||
"config",
|
||||
"expect",
|
||||
"should",
|
||||
"assert"
|
||||
],
|
||||
...openTelemetryCommonJs()
|
||||
}
|
||||
}),
|
||||
cjs(),
|
||||
json(),
|
||||
sourcemaps()
|
||||
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
|
||||
|
@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
|
|||
],
|
||||
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
|
||||
preserveSymlinks: false,
|
||||
plugins: [sourcemaps(), nodeResolve(), cjs()]
|
||||
plugins: [sourcemaps(), nodeResolve()]
|
||||
};
|
||||
|
||||
const config = [baseConfig];
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
Workspace,
|
||||
MachineLearningWorkspacesManagementClient
|
||||
} from "@azure/arm-workspaces";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates a workspace with the specified parameters.
|
||||
*
|
||||
* @summary Creates or updates a workspace with the specified parameters.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/CreateWorkspace.json
|
||||
*/
|
||||
async function workspaceCreate() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const workspaceName = "testworkspace";
|
||||
const parameters: Workspace = {
|
||||
location: "West Europe",
|
||||
ownerEmail: "abc@microsoft.com",
|
||||
sku: { name: "Enterprise", tier: "Enterprise" },
|
||||
tags: { tagKey1: "TagValue1" },
|
||||
userStorageAccountId:
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/teststorage"
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.workspaces.createOrUpdate(
|
||||
resourceGroupName,
|
||||
workspaceName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
workspaceCreate().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MachineLearningWorkspacesManagementClient } from "@azure/arm-workspaces";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes a machine learning workspace.
|
||||
*
|
||||
* @summary Deletes a machine learning workspace.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/DeleteWorkspace.json
|
||||
*/
|
||||
async function workspaceDelete() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const workspaceName = "testworkspace";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.workspaces.delete(
|
||||
resourceGroupName,
|
||||
workspaceName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
workspaceDelete().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MachineLearningWorkspacesManagementClient } from "@azure/arm-workspaces";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the properties of the specified machine learning workspace.
|
||||
*
|
||||
* @summary Gets the properties of the specified machine learning workspace.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/GetWorkspace.json
|
||||
*/
|
||||
async function workspaceGet() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const workspaceName = "testworkspace";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.workspaces.get(resourceGroupName, workspaceName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
workspaceGet().catch(console.error);
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MachineLearningWorkspacesManagementClient } from "@azure/arm-workspaces";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all the available machine learning workspaces under the specified resource group.
|
||||
*
|
||||
* @summary Lists all the available machine learning workspaces under the specified resource group.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceResourceGroup.json
|
||||
*/
|
||||
async function workspaceListResourceGroup() {
|
||||
const subscriptionId = "00000000-1111-2222-3333-444444444444";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.workspaces.listByResourceGroup(
|
||||
resourceGroupName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
workspaceListResourceGroup().catch(console.error);
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MachineLearningWorkspacesManagementClient } from "@azure/arm-workspaces";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all the available machine learning workspaces under the specified subscription.
|
||||
*
|
||||
* @summary Lists all the available machine learning workspaces under the specified subscription.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaces.json
|
||||
*/
|
||||
async function workspaceGetBySubscription() {
|
||||
const subscriptionId = "00000000-1111-2222-3333-444444444444";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.workspaces.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
workspaceGetBySubscription().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MachineLearningWorkspacesManagementClient } from "@azure/arm-workspaces";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List the authorization keys associated with this workspace.
|
||||
*
|
||||
* @summary List the authorization keys associated with this workspace.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceKeys.json
|
||||
*/
|
||||
async function listWorkspaceKeys() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const workspaceName = "testworkspace";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.workspaces.listWorkspaceKeys(
|
||||
workspaceName,
|
||||
resourceGroupName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
listWorkspaceKeys().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MachineLearningWorkspacesManagementClient } from "@azure/arm-workspaces";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Resync storage keys associated with this workspace.
|
||||
*
|
||||
* @summary Resync storage keys associated with this workspace.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ResyncStorageKeys.json
|
||||
*/
|
||||
async function resyncStorageKeys() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const workspaceName = "testworkspace";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.workspaces.resyncStorageKeys(
|
||||
workspaceName,
|
||||
resourceGroupName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
resyncStorageKeys().catch(console.error);
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
WorkspaceUpdateParameters,
|
||||
MachineLearningWorkspacesManagementClient
|
||||
} from "@azure/arm-workspaces";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Updates a machine learning workspace with the specified parameters.
|
||||
*
|
||||
* @summary Updates a machine learning workspace with the specified parameters.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/UpdateWorkspace.json
|
||||
*/
|
||||
async function workspaceUpdate() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const workspaceName = "testworkspace";
|
||||
const parameters: WorkspaceUpdateParameters = {
|
||||
keyVaultIdentifierId: "kvidnew",
|
||||
sku: { name: "Enterprise", tier: "Enterprise" },
|
||||
tags: { tagKey1: "TagValue1" }
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.workspaces.update(
|
||||
resourceGroupName,
|
||||
workspaceName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
workspaceUpdate().catch(console.error);
|
|
@ -2,16 +2,24 @@
|
|||
|
||||
These sample programs show how to use the JavaScript client libraries for in some common scenarios.
|
||||
|
||||
| **File Name** | **Description** |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [listWorkspaceKeys.js][listworkspacekeys] | List the authorization keys associated with this workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceKeys.json |
|
||||
| [resyncStorageKeys.js][resyncstoragekeys] | Resync storage keys associated with this workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ResyncStorageKeys.json |
|
||||
| [workspaceCreate.js][workspacecreate] | Creates or updates a workspace with the specified parameters. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/CreateWorkspace.json |
|
||||
| [workspaceDelete.js][workspacedelete] | Deletes a machine learning workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/DeleteWorkspace.json |
|
||||
| [workspaceGet.js][workspaceget] | Gets the properties of the specified machine learning workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/GetWorkspace.json |
|
||||
| [workspaceGetBySubscription.js][workspacegetbysubscription] | Lists all the available machine learning workspaces under the specified subscription. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaces.json |
|
||||
| [workspaceListResourceGroup.js][workspacelistresourcegroup] | Lists all the available machine learning workspaces under the specified resource group. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceResourceGroup.json |
|
||||
| [workspaceUpdate.js][workspaceupdate] | Updates a machine learning workspace with the specified parameters. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/UpdateWorkspace.json |
|
||||
| **File Name** | **Description** |
|
||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [listWorkspaceKeys.js][listworkspacekeys] | List the authorization keys associated with this workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceKeys.json |
|
||||
| [resyncStorageKeys.js][resyncstoragekeys] | Resync storage keys associated with this workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ResyncStorageKeys.json |
|
||||
| [workspaceCreate.js][workspacecreate] | Creates or updates a workspace with the specified parameters. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/CreateWorkspace.json |
|
||||
| [workspaceDelete.js][workspacedelete] | Deletes a machine learning workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/DeleteWorkspace.json |
|
||||
| [workspaceGet.js][workspaceget] | Gets the properties of the specified machine learning workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/GetWorkspace.json |
|
||||
| [workspaceGetBySubscription.js][workspacegetbysubscription] | Lists all the available machine learning workspaces under the specified subscription. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaces.json |
|
||||
| [workspaceListResourceGroup.js][workspacelistresourcegroup] | Lists all the available machine learning workspaces under the specified resource group. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceResourceGroup.json |
|
||||
| [workspaceUpdate.js][workspaceupdate] | Updates a machine learning workspace with the specified parameters. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/UpdateWorkspace.json |
|
||||
| [workspacesCreateOrUpdateSample.js][workspacescreateorupdatesample] | Creates or updates a workspace with the specified parameters. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/CreateWorkspace.json |
|
||||
| [workspacesDeleteSample.js][workspacesdeletesample] | Deletes a machine learning workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/DeleteWorkspace.json |
|
||||
| [workspacesGetSample.js][workspacesgetsample] | Gets the properties of the specified machine learning workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/GetWorkspace.json |
|
||||
| [workspacesListByResourceGroupSample.js][workspaceslistbyresourcegroupsample] | Lists all the available machine learning workspaces under the specified resource group. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceResourceGroup.json |
|
||||
| [workspacesListSample.js][workspaceslistsample] | Lists all the available machine learning workspaces under the specified subscription. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaces.json |
|
||||
| [workspacesListWorkspaceKeysSample.js][workspaceslistworkspacekeyssample] | List the authorization keys associated with this workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceKeys.json |
|
||||
| [workspacesResyncStorageKeysSample.js][workspacesresyncstoragekeyssample] | Resync storage keys associated with this workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ResyncStorageKeys.json |
|
||||
| [workspacesUpdateSample.js][workspacesupdatesample] | Updates a machine learning workspace with the specified parameters. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/UpdateWorkspace.json |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
@ -59,6 +67,14 @@ Take a look at our [API Documentation][apiref] for more information about the AP
|
|||
[workspacegetbysubscription]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/javascript/workspaceGetBySubscription.js
|
||||
[workspacelistresourcegroup]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/javascript/workspaceListResourceGroup.js
|
||||
[workspaceupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/javascript/workspaceUpdate.js
|
||||
[workspacescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/javascript/workspacesCreateOrUpdateSample.js
|
||||
[workspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/javascript/workspacesDeleteSample.js
|
||||
[workspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/javascript/workspacesGetSample.js
|
||||
[workspaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/javascript/workspacesListByResourceGroupSample.js
|
||||
[workspaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/javascript/workspacesListSample.js
|
||||
[workspaceslistworkspacekeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/javascript/workspacesListWorkspaceKeysSample.js
|
||||
[workspacesresyncstoragekeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/javascript/workspacesResyncStorageKeysSample.js
|
||||
[workspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/javascript/workspacesUpdateSample.js
|
||||
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-workspaces?view=azure-node-preview
|
||||
[freesub]: https://azure.microsoft.com/free/
|
||||
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/machinelearning/arm-workspaces/README.md
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { MachineLearningWorkspacesManagementClient } = require("@azure/arm-workspaces");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates a workspace with the specified parameters.
|
||||
*
|
||||
* @summary Creates or updates a workspace with the specified parameters.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/CreateWorkspace.json
|
||||
*/
|
||||
async function workspaceCreate() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const workspaceName = "testworkspace";
|
||||
const parameters = {
|
||||
location: "West Europe",
|
||||
ownerEmail: "abc@microsoft.com",
|
||||
sku: { name: "Enterprise", tier: "Enterprise" },
|
||||
tags: { tagKey1: "TagValue1" },
|
||||
userStorageAccountId:
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/teststorage",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(credential, subscriptionId);
|
||||
const result = await client.workspaces.createOrUpdate(
|
||||
resourceGroupName,
|
||||
workspaceName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
workspaceCreate().catch(console.error);
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { MachineLearningWorkspacesManagementClient } = require("@azure/arm-workspaces");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes a machine learning workspace.
|
||||
*
|
||||
* @summary Deletes a machine learning workspace.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/DeleteWorkspace.json
|
||||
*/
|
||||
async function workspaceDelete() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const workspaceName = "testworkspace";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(credential, subscriptionId);
|
||||
const result = await client.workspaces.delete(resourceGroupName, workspaceName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
workspaceDelete().catch(console.error);
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { MachineLearningWorkspacesManagementClient } = require("@azure/arm-workspaces");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the properties of the specified machine learning workspace.
|
||||
*
|
||||
* @summary Gets the properties of the specified machine learning workspace.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/GetWorkspace.json
|
||||
*/
|
||||
async function workspaceGet() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const workspaceName = "testworkspace";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(credential, subscriptionId);
|
||||
const result = await client.workspaces.get(resourceGroupName, workspaceName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
workspaceGet().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { MachineLearningWorkspacesManagementClient } = require("@azure/arm-workspaces");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all the available machine learning workspaces under the specified resource group.
|
||||
*
|
||||
* @summary Lists all the available machine learning workspaces under the specified resource group.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceResourceGroup.json
|
||||
*/
|
||||
async function workspaceListResourceGroup() {
|
||||
const subscriptionId = "00000000-1111-2222-3333-444444444444";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.workspaces.listByResourceGroup(resourceGroupName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
workspaceListResourceGroup().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { MachineLearningWorkspacesManagementClient } = require("@azure/arm-workspaces");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all the available machine learning workspaces under the specified subscription.
|
||||
*
|
||||
* @summary Lists all the available machine learning workspaces under the specified subscription.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaces.json
|
||||
*/
|
||||
async function workspaceGetBySubscription() {
|
||||
const subscriptionId = "00000000-1111-2222-3333-444444444444";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.workspaces.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
workspaceGetBySubscription().catch(console.error);
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { MachineLearningWorkspacesManagementClient } = require("@azure/arm-workspaces");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List the authorization keys associated with this workspace.
|
||||
*
|
||||
* @summary List the authorization keys associated with this workspace.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceKeys.json
|
||||
*/
|
||||
async function listWorkspaceKeys() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const workspaceName = "testworkspace";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(credential, subscriptionId);
|
||||
const result = await client.workspaces.listWorkspaceKeys(workspaceName, resourceGroupName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
listWorkspaceKeys().catch(console.error);
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { MachineLearningWorkspacesManagementClient } = require("@azure/arm-workspaces");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Resync storage keys associated with this workspace.
|
||||
*
|
||||
* @summary Resync storage keys associated with this workspace.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ResyncStorageKeys.json
|
||||
*/
|
||||
async function resyncStorageKeys() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const workspaceName = "testworkspace";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(credential, subscriptionId);
|
||||
const result = await client.workspaces.resyncStorageKeys(workspaceName, resourceGroupName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
resyncStorageKeys().catch(console.error);
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { MachineLearningWorkspacesManagementClient } = require("@azure/arm-workspaces");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Updates a machine learning workspace with the specified parameters.
|
||||
*
|
||||
* @summary Updates a machine learning workspace with the specified parameters.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/UpdateWorkspace.json
|
||||
*/
|
||||
async function workspaceUpdate() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const workspaceName = "testworkspace";
|
||||
const parameters = {
|
||||
keyVaultIdentifierId: "kvidnew",
|
||||
sku: { name: "Enterprise", tier: "Enterprise" },
|
||||
tags: { tagKey1: "TagValue1" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(credential, subscriptionId);
|
||||
const result = await client.workspaces.update(resourceGroupName, workspaceName, parameters);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
workspaceUpdate().catch(console.error);
|
|
@ -2,16 +2,24 @@
|
|||
|
||||
These sample programs show how to use the TypeScript client libraries for in some common scenarios.
|
||||
|
||||
| **File Name** | **Description** |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [listWorkspaceKeys.ts][listworkspacekeys] | List the authorization keys associated with this workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceKeys.json |
|
||||
| [resyncStorageKeys.ts][resyncstoragekeys] | Resync storage keys associated with this workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ResyncStorageKeys.json |
|
||||
| [workspaceCreate.ts][workspacecreate] | Creates or updates a workspace with the specified parameters. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/CreateWorkspace.json |
|
||||
| [workspaceDelete.ts][workspacedelete] | Deletes a machine learning workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/DeleteWorkspace.json |
|
||||
| [workspaceGet.ts][workspaceget] | Gets the properties of the specified machine learning workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/GetWorkspace.json |
|
||||
| [workspaceGetBySubscription.ts][workspacegetbysubscription] | Lists all the available machine learning workspaces under the specified subscription. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaces.json |
|
||||
| [workspaceListResourceGroup.ts][workspacelistresourcegroup] | Lists all the available machine learning workspaces under the specified resource group. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceResourceGroup.json |
|
||||
| [workspaceUpdate.ts][workspaceupdate] | Updates a machine learning workspace with the specified parameters. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/UpdateWorkspace.json |
|
||||
| **File Name** | **Description** |
|
||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [listWorkspaceKeys.ts][listworkspacekeys] | List the authorization keys associated with this workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceKeys.json |
|
||||
| [resyncStorageKeys.ts][resyncstoragekeys] | Resync storage keys associated with this workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ResyncStorageKeys.json |
|
||||
| [workspaceCreate.ts][workspacecreate] | Creates or updates a workspace with the specified parameters. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/CreateWorkspace.json |
|
||||
| [workspaceDelete.ts][workspacedelete] | Deletes a machine learning workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/DeleteWorkspace.json |
|
||||
| [workspaceGet.ts][workspaceget] | Gets the properties of the specified machine learning workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/GetWorkspace.json |
|
||||
| [workspaceGetBySubscription.ts][workspacegetbysubscription] | Lists all the available machine learning workspaces under the specified subscription. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaces.json |
|
||||
| [workspaceListResourceGroup.ts][workspacelistresourcegroup] | Lists all the available machine learning workspaces under the specified resource group. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceResourceGroup.json |
|
||||
| [workspaceUpdate.ts][workspaceupdate] | Updates a machine learning workspace with the specified parameters. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/UpdateWorkspace.json |
|
||||
| [workspacesCreateOrUpdateSample.ts][workspacescreateorupdatesample] | Creates or updates a workspace with the specified parameters. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/CreateWorkspace.json |
|
||||
| [workspacesDeleteSample.ts][workspacesdeletesample] | Deletes a machine learning workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/DeleteWorkspace.json |
|
||||
| [workspacesGetSample.ts][workspacesgetsample] | Gets the properties of the specified machine learning workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/GetWorkspace.json |
|
||||
| [workspacesListByResourceGroupSample.ts][workspaceslistbyresourcegroupsample] | Lists all the available machine learning workspaces under the specified resource group. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceResourceGroup.json |
|
||||
| [workspacesListSample.ts][workspaceslistsample] | Lists all the available machine learning workspaces under the specified subscription. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaces.json |
|
||||
| [workspacesListWorkspaceKeysSample.ts][workspaceslistworkspacekeyssample] | List the authorization keys associated with this workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceKeys.json |
|
||||
| [workspacesResyncStorageKeysSample.ts][workspacesresyncstoragekeyssample] | Resync storage keys associated with this workspace. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ResyncStorageKeys.json |
|
||||
| [workspacesUpdateSample.ts][workspacesupdatesample] | Updates a machine learning workspace with the specified parameters. x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/UpdateWorkspace.json |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
@ -71,6 +79,14 @@ Take a look at our [API Documentation][apiref] for more information about the AP
|
|||
[workspacegetbysubscription]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/typescript/src/workspaceGetBySubscription.ts
|
||||
[workspacelistresourcegroup]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/typescript/src/workspaceListResourceGroup.ts
|
||||
[workspaceupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/typescript/src/workspaceUpdate.ts
|
||||
[workspacescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/typescript/src/workspacesCreateOrUpdateSample.ts
|
||||
[workspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/typescript/src/workspacesDeleteSample.ts
|
||||
[workspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/typescript/src/workspacesGetSample.ts
|
||||
[workspaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/typescript/src/workspacesListByResourceGroupSample.ts
|
||||
[workspaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/typescript/src/workspacesListSample.ts
|
||||
[workspaceslistworkspacekeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/typescript/src/workspacesListWorkspaceKeysSample.ts
|
||||
[workspacesresyncstoragekeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/typescript/src/workspacesResyncStorageKeysSample.ts
|
||||
[workspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/machinelearning/arm-workspaces/samples/v1/typescript/src/workspacesUpdateSample.ts
|
||||
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-workspaces?view=azure-node-preview
|
||||
[freesub]: https://azure.microsoft.com/free/
|
||||
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/machinelearning/arm-workspaces/README.md
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
Workspace,
|
||||
MachineLearningWorkspacesManagementClient
|
||||
} from "@azure/arm-workspaces";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates a workspace with the specified parameters.
|
||||
*
|
||||
* @summary Creates or updates a workspace with the specified parameters.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/CreateWorkspace.json
|
||||
*/
|
||||
async function workspaceCreate() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const workspaceName = "testworkspace";
|
||||
const parameters: Workspace = {
|
||||
location: "West Europe",
|
||||
ownerEmail: "abc@microsoft.com",
|
||||
sku: { name: "Enterprise", tier: "Enterprise" },
|
||||
tags: { tagKey1: "TagValue1" },
|
||||
userStorageAccountId:
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/teststorage"
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.workspaces.createOrUpdate(
|
||||
resourceGroupName,
|
||||
workspaceName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
workspaceCreate().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MachineLearningWorkspacesManagementClient } from "@azure/arm-workspaces";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes a machine learning workspace.
|
||||
*
|
||||
* @summary Deletes a machine learning workspace.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/DeleteWorkspace.json
|
||||
*/
|
||||
async function workspaceDelete() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const workspaceName = "testworkspace";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.workspaces.delete(
|
||||
resourceGroupName,
|
||||
workspaceName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
workspaceDelete().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MachineLearningWorkspacesManagementClient } from "@azure/arm-workspaces";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the properties of the specified machine learning workspace.
|
||||
*
|
||||
* @summary Gets the properties of the specified machine learning workspace.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/GetWorkspace.json
|
||||
*/
|
||||
async function workspaceGet() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const workspaceName = "testworkspace";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.workspaces.get(resourceGroupName, workspaceName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
workspaceGet().catch(console.error);
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MachineLearningWorkspacesManagementClient } from "@azure/arm-workspaces";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all the available machine learning workspaces under the specified resource group.
|
||||
*
|
||||
* @summary Lists all the available machine learning workspaces under the specified resource group.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceResourceGroup.json
|
||||
*/
|
||||
async function workspaceListResourceGroup() {
|
||||
const subscriptionId = "00000000-1111-2222-3333-444444444444";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.workspaces.listByResourceGroup(
|
||||
resourceGroupName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
workspaceListResourceGroup().catch(console.error);
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MachineLearningWorkspacesManagementClient } from "@azure/arm-workspaces";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all the available machine learning workspaces under the specified subscription.
|
||||
*
|
||||
* @summary Lists all the available machine learning workspaces under the specified subscription.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaces.json
|
||||
*/
|
||||
async function workspaceGetBySubscription() {
|
||||
const subscriptionId = "00000000-1111-2222-3333-444444444444";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.workspaces.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
workspaceGetBySubscription().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MachineLearningWorkspacesManagementClient } from "@azure/arm-workspaces";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List the authorization keys associated with this workspace.
|
||||
*
|
||||
* @summary List the authorization keys associated with this workspace.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ListWorkspaceKeys.json
|
||||
*/
|
||||
async function listWorkspaceKeys() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const workspaceName = "testworkspace";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.workspaces.listWorkspaceKeys(
|
||||
workspaceName,
|
||||
resourceGroupName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
listWorkspaceKeys().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MachineLearningWorkspacesManagementClient } from "@azure/arm-workspaces";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Resync storage keys associated with this workspace.
|
||||
*
|
||||
* @summary Resync storage keys associated with this workspace.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/ResyncStorageKeys.json
|
||||
*/
|
||||
async function resyncStorageKeys() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const workspaceName = "testworkspace";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.workspaces.resyncStorageKeys(
|
||||
workspaceName,
|
||||
resourceGroupName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
resyncStorageKeys().catch(console.error);
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
WorkspaceUpdateParameters,
|
||||
MachineLearningWorkspacesManagementClient
|
||||
} from "@azure/arm-workspaces";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Updates a machine learning workspace with the specified parameters.
|
||||
*
|
||||
* @summary Updates a machine learning workspace with the specified parameters.
|
||||
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/UpdateWorkspace.json
|
||||
*/
|
||||
async function workspaceUpdate() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const workspaceName = "testworkspace";
|
||||
const parameters: WorkspaceUpdateParameters = {
|
||||
keyVaultIdentifierId: "kvidnew",
|
||||
sku: { name: "Enterprise", tier: "Enterprise" },
|
||||
tags: { tagKey1: "TagValue1" }
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningWorkspacesManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.workspaces.update(
|
||||
resourceGroupName,
|
||||
workspaceName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
workspaceUpdate().catch(console.error);
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
||||
import * as coreAuth from "@azure/core-auth";
|
||||
import { OperationsImpl, WorkspacesImpl } from "./operations";
|
||||
import { Operations, Workspaces } from "./operationsInterfaces";
|
||||
|
@ -44,7 +45,7 @@ export class MachineLearningWorkspacesManagementClient extends coreClient.Servic
|
|||
credential: credentials
|
||||
};
|
||||
|
||||
const packageDetails = `azsdk-js-arm-workspaces/1.0.0`;
|
||||
const packageDetails = `azsdk-js-arm-workspaces/1.0.1`;
|
||||
const userAgentPrefix =
|
||||
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
||||
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
||||
|
@ -59,9 +60,33 @@ export class MachineLearningWorkspacesManagementClient extends coreClient.Servic
|
|||
userAgentOptions: {
|
||||
userAgentPrefix
|
||||
},
|
||||
baseUri: options.endpoint || "https://management.azure.com"
|
||||
baseUri:
|
||||
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
||||
};
|
||||
super(optionsWithDefaults);
|
||||
|
||||
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
||||
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
|
||||
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
||||
(pipelinePolicy) =>
|
||||
pipelinePolicy.name ===
|
||||
coreRestPipeline.bearerTokenAuthenticationPolicyName
|
||||
);
|
||||
if (!bearerTokenAuthenticationPolicyFound) {
|
||||
this.pipeline.removePolicy({
|
||||
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
||||
});
|
||||
this.pipeline.addPolicy(
|
||||
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
||||
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
||||
challengeCallbacks: {
|
||||
authorizeRequestOnChallenge:
|
||||
coreClient.authorizeRequestOnClaimChallenge
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
// Parameter assignments
|
||||
this.subscriptionId = subscriptionId;
|
||||
|
||||
|
|
|
@ -9,12 +9,25 @@
|
|||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"lib": ["es6", "dom"],
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"declaration": true,
|
||||
"outDir": "./dist-esm",
|
||||
"importHelpers": true,
|
||||
"paths": { "@azure/arm-workspaces": ["./src/index"] }
|
||||
"paths": {
|
||||
"@azure/arm-workspaces": [
|
||||
"./src/index"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*.ts", "./test/**/*.ts", "samples-dev/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
"include": [
|
||||
"./src/**/*.ts",
|
||||
"./test/**/*.ts",
|
||||
"samples-dev/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
|
||||
|
||||
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
|
@ -9,9 +9,9 @@ trigger:
|
|||
paths:
|
||||
include:
|
||||
- sdk/machinelearning/ci.mgmt.yml
|
||||
- sdk/machinelearning/arm-workspaces/
|
||||
- sdk/machinelearning/arm-webservices/
|
||||
- sdk/machinelearning/arm-commitmentplans/
|
||||
- sdk/machinelearning/arm-commitmentplans
|
||||
- sdk/machinelearning/arm-webservices
|
||||
- sdk/machinelearning/arm-workspaces
|
||||
pr:
|
||||
branches:
|
||||
include:
|
||||
|
@ -24,10 +24,9 @@ pr:
|
|||
paths:
|
||||
include:
|
||||
- sdk/machinelearning/ci.mgmt.yml
|
||||
- sdk/machinelearning/arm-workspaces/
|
||||
- sdk/machinelearning/arm-webservices/
|
||||
- sdk/machinelearning/arm-commitmentplans/
|
||||
|
||||
- sdk/machinelearning/arm-commitmentplans
|
||||
- sdk/machinelearning/arm-webservices
|
||||
- sdk/machinelearning/arm-workspaces
|
||||
extends:
|
||||
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
|
||||
parameters:
|
||||
|
@ -38,4 +37,4 @@ extends:
|
|||
- name: azure-arm-webservices
|
||||
safeName: azurearmwebservices
|
||||
- name: azure-arm-commitmentplans
|
||||
safeName: azurearmcommitmentplans
|
||||
safeName: azurearmcommitmentplans
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
# Release History
|
||||
|
||||
## 3.0.0-beta.2 (Unreleased)
|
||||
## 3.0.0-beta.2 (2022-04-24)
|
||||
|
||||
## 3.0.0-beta.1 (2022-01-17)
|
||||
|
||||
The package of @azure/arm-machinelearningcompute is using our next generation design principles since version 3.0.0-beta.1, which contains breaking changes.
|
||||
The package of @azure/arm-machinelearningcompute is using our next generation design principles since version 3.0.0-beta.2, which contains breaking changes.
|
||||
|
||||
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
|
||||
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2021 Microsoft
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -16,6 +16,8 @@ These APIs allow end users to operate on Azure Machine Learning Compute resource
|
|||
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
|
||||
- Latest versions of Safari, Chrome, Edge and Firefox.
|
||||
|
||||
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- An [Azure subscription][azure_sub].
|
||||
|
@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
|
|||
```javascript
|
||||
const { MachineLearningComputeManagementClient } = require("@azure/arm-machinelearningcompute");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
|
||||
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const client = new MachineLearningComputeManagementClient(new DefaultAzureCredential(), subscriptionId);
|
||||
|
||||
// For client-side applications running in the browser, use this code instead:
|
||||
// const credential = new InteractiveBrowserCredential({
|
||||
// tenantId: "<YOUR_TENANT_ID>",
|
||||
// clientId: "<YOUR_CLIENT_ID>"
|
||||
// });
|
||||
// const client = new MachineLearningComputeManagementClient(credential, subscriptionId);
|
||||
```
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"commit": "6dd1d6d39dd0a7fc67ee53429d7c4ed084a0bac2",
|
||||
"readme": "specification/machinelearningcompute/resource-manager/readme.md",
|
||||
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/machinelearningexperimentation/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1 --generate-sample=true",
|
||||
"commit": "184b23b63ee3a79fb41ca3aa55a31a8d9e636772",
|
||||
"readme": "specification\\machinelearningcompute\\resource-manager\\readme.md",
|
||||
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\machinelearningcompute\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"use": "@autorest/typescript@6.0.0-alpha.16.20220114.1"
|
||||
"release_tool": "@azure-tools/js-sdk-release-tools@2.2.6",
|
||||
"use": "@autorest/typescript@6.0.0-alpha.19.20220408.1"
|
||||
}
|
||||
|
|
|
@ -1,18 +1,31 @@
|
|||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||
"mainEntryPointFilePath": "./dist-esm/src/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/arm-machinelearningcompute.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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -11,9 +11,9 @@
|
|||
"@azure/core-lro": "^2.2.0",
|
||||
"@azure/abort-controller": "^1.0.0",
|
||||
"@azure/core-paging": "^1.2.0",
|
||||
"@azure/core-client": "^1.0.0",
|
||||
"@azure/core-client": "^1.5.0",
|
||||
"@azure/core-auth": "^1.3.0",
|
||||
"@azure/core-rest-pipeline": "^1.1.0",
|
||||
"@azure/core-rest-pipeline": "^1.8.0",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"keywords": [
|
||||
|
@ -29,13 +29,13 @@
|
|||
"types": "./types/arm-machinelearningcompute.d.ts",
|
||||
"devDependencies": {
|
||||
"@microsoft/api-extractor": "7.18.11",
|
||||
"@rollup/plugin-commonjs": "11.0.2",
|
||||
"@rollup/plugin-json": "^4.0.0",
|
||||
"@rollup/plugin-multi-entry": "^3.0.0",
|
||||
"@rollup/plugin-node-resolve": "^8.0.0",
|
||||
"@rollup/plugin-commonjs": "^21.0.1",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-multi-entry": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^13.1.3",
|
||||
"mkdirp": "^1.0.4",
|
||||
"rollup": "^1.16.3",
|
||||
"rollup-plugin-sourcemaps": "^0.4.2",
|
||||
"rollup": "^2.66.1",
|
||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||
"typescript": "~4.2.0",
|
||||
"uglify-js": "^3.4.9",
|
||||
"rimraf": "^3.0.0",
|
||||
|
@ -101,7 +101,7 @@
|
|||
"//metadata": {
|
||||
"constantPaths": [
|
||||
{
|
||||
"path": "src/MachineLearningComputeManagementClient.ts",
|
||||
"path": "src/machineLearningComputeManagementClient.ts",
|
||||
"prefix": "packageDetails"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
|
|||
|
||||
import nodeBuiltins from "builtin-modules";
|
||||
|
||||
/**
|
||||
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
|
||||
*
|
||||
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
|
||||
* __exportStar downleveled helper function to declare its exports which confuses
|
||||
* rollup's automatic discovery mechanism.
|
||||
*
|
||||
* @returns an object reference that can be `...`'d into your cjs() configuration.
|
||||
*/
|
||||
export function openTelemetryCommonJs() {
|
||||
const namedExports = {};
|
||||
|
||||
for (const key of [
|
||||
"@opentelemetry/api",
|
||||
"@azure/core-tracing/node_modules/@opentelemetry/api"
|
||||
]) {
|
||||
namedExports[key] = [
|
||||
"SpanKind",
|
||||
"TraceFlags",
|
||||
"getSpan",
|
||||
"setSpan",
|
||||
"SpanStatusCode",
|
||||
"getSpanContext",
|
||||
"setSpanContext"
|
||||
];
|
||||
}
|
||||
|
||||
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
|
||||
|
||||
for (const version of releasedOpenTelemetryVersions) {
|
||||
namedExports[
|
||||
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
|
||||
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
|
||||
] = [
|
||||
"SpanKind",
|
||||
"TraceFlags",
|
||||
"getSpan",
|
||||
"setSpan",
|
||||
"StatusCode",
|
||||
"CanonicalCode",
|
||||
"getSpanContext",
|
||||
"setSpanContext"
|
||||
];
|
||||
}
|
||||
|
||||
return namedExports;
|
||||
}
|
||||
|
||||
// #region Warning Handler
|
||||
|
||||
/**
|
||||
* A function that can determine whether a rollupwarning should be ignored. If
|
||||
* A function that can determine whether a rollup warning should be ignored. If
|
||||
* the function returns `true`, then the warning will not be displayed.
|
||||
*/
|
||||
|
||||
function ignoreNiseSinonEvalWarnings(warning) {
|
||||
function ignoreNiseSinonEval(warning) {
|
||||
return (
|
||||
warning.code === "EVAL" &&
|
||||
warning.id &&
|
||||
|
@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
|
|||
);
|
||||
}
|
||||
|
||||
function ignoreChaiCircularDependencyWarnings(warning) {
|
||||
function ignoreChaiCircularDependency(warning) {
|
||||
return (
|
||||
warning.code === "CIRCULAR_DEPENDENCY" &&
|
||||
warning.importer && warning.importer.includes("node_modules/chai") === true
|
||||
);
|
||||
}
|
||||
|
||||
const warningInhibitors = [
|
||||
ignoreChaiCircularDependencyWarnings,
|
||||
ignoreNiseSinonEvalWarnings
|
||||
];
|
||||
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
|
||||
|
||||
/**
|
||||
* Construct a warning handler for the shared rollup configuration
|
||||
|
@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
|
|||
nodeResolve({
|
||||
mainFields: ["module", "browser"]
|
||||
}),
|
||||
cjs({
|
||||
namedExports: {
|
||||
// Chai's strange internal architecture makes it impossible to statically
|
||||
// analyze its exports.
|
||||
chai: [
|
||||
"version",
|
||||
"use",
|
||||
"util",
|
||||
"config",
|
||||
"expect",
|
||||
"should",
|
||||
"assert"
|
||||
],
|
||||
...openTelemetryCommonJs()
|
||||
}
|
||||
}),
|
||||
cjs(),
|
||||
json(),
|
||||
sourcemaps()
|
||||
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
|
||||
|
@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
|
|||
],
|
||||
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
|
||||
preserveSymlinks: false,
|
||||
plugins: [sourcemaps(), nodeResolve(), cjs()]
|
||||
plugins: [sourcemaps(), nodeResolve()]
|
||||
};
|
||||
|
||||
const config = [baseConfig];
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MachineLearningComputeManagementClient } from "@azure/arm-machinelearningcompute";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets all available operations.
|
||||
*
|
||||
* @summary Gets all available operations.
|
||||
* x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/MachineLearningCompute_ListAvailableOperations.json
|
||||
*/
|
||||
async function machineLearningComputeListAvailableOperations() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningComputeManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.machineLearningCompute.listAvailableOperations();
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
machineLearningComputeListAvailableOperations().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MachineLearningComputeManagementClient } from "@azure/arm-machinelearningcompute";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Checks if updates are available for system services in the cluster.
|
||||
*
|
||||
* @summary Checks if updates are available for system services in the cluster.
|
||||
* x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_CheckSystemServicesUpdatesAvailable.json
|
||||
*/
|
||||
async function checkUpdateForAnOperationalizationCluster() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const clusterName = "myCluster";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningComputeManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.operationalizationClusters.checkSystemServicesUpdatesAvailable(
|
||||
resourceGroupName,
|
||||
clusterName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
checkUpdateForAnOperationalizationCluster().catch(console.error);
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
OperationalizationCluster,
|
||||
MachineLearningComputeManagementClient
|
||||
} from "@azure/arm-machinelearningcompute";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or update an operationalization cluster.
|
||||
*
|
||||
* @summary Create or update an operationalization cluster.
|
||||
* x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_CreateOrUpdate.json
|
||||
*/
|
||||
async function putOperationalizationCluster() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const clusterName = "myCluster";
|
||||
const parameters: OperationalizationCluster = {
|
||||
description: "My Operationalization Cluster",
|
||||
clusterType: "ACS",
|
||||
containerService: {
|
||||
orchestratorProperties: {
|
||||
servicePrincipal: {
|
||||
clientId: "abcdefghijklmnopqrt",
|
||||
secret: "<secret>"
|
||||
}
|
||||
},
|
||||
orchestratorType: "Kubernetes"
|
||||
},
|
||||
globalServiceConfiguration: {
|
||||
ssl: {
|
||||
cert: "afjdklq2131casfakld=",
|
||||
cname: "foo.bar.com",
|
||||
key: "flksdafkldsajf=",
|
||||
status: "Enabled"
|
||||
}
|
||||
},
|
||||
location: "West US",
|
||||
tags: { key1: "alpha", key2: "beta" }
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningComputeManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.operationalizationClusters.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
clusterName,
|
||||
parameters
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
putOperationalizationCluster().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MachineLearningComputeManagementClient } from "@azure/arm-machinelearningcompute";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes the specified cluster.
|
||||
*
|
||||
* @summary Deletes the specified cluster.
|
||||
* x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_Delete.json
|
||||
*/
|
||||
async function deleteOperationalizationCluster() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const clusterName = "myCluster";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningComputeManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.operationalizationClusters.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
clusterName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
deleteOperationalizationCluster().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MachineLearningComputeManagementClient } from "@azure/arm-machinelearningcompute";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call ListKeys to get them.
|
||||
*
|
||||
* @summary Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call ListKeys to get them.
|
||||
* x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_Get.json
|
||||
*/
|
||||
async function getOperationalizationCluster() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "myResourceGroup";
|
||||
const clusterName = "myCluster";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MachineLearningComputeManagementClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const result = await client.operationalizationClusters.get(
|
||||
resourceGroupName,
|
||||
clusterName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
getOperationalizationCluster().catch(console.error);
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче