Skip to content

Commit

Permalink
CodeGen from PR 30651 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 358e95885b72fd6f1a543603b08d99f8ec44ca12 into a093926c85f2b7cc64ff2f1d9cd96b211aef84e2
  • Loading branch information
SDKAuto committed Sep 20, 2024
1 parent 7babca9 commit a8525df
Show file tree
Hide file tree
Showing 93 changed files with 31,537 additions and 18,432 deletions.
43 changes: 40 additions & 3 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

381 changes: 381 additions & 0 deletions sdk/machinelearning/arm-machinelearning/CHANGELOG.md

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions sdk/machinelearning/arm-machinelearning/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# AzureMachineLearningServicesManagement client library for JavaScript
# AzureMachineLearningServicesMgmt client library for JavaScript

This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureMachineLearningServicesManagement client.
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureMachineLearningServicesMgmt client.

These APIs allow end users to operate on Azure Machine Learning Workspace resources.

[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/machinelearning/arm-machinelearning) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-machinelearning) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-machinelearning) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-machinelearning?view=azure-node-preview) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started
Expand All @@ -24,16 +24,16 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP

### Install the `@azure/arm-machinelearning` package

Install the AzureMachineLearningServicesManagement client library for JavaScript with `npm`:
Install the AzureMachineLearningServicesMgmt client library for JavaScript with `npm`:

```bash
npm install @azure/arm-machinelearning
```

### Create and authenticate a `AzureMachineLearningServicesManagementClient`
### Create and authenticate a `AzureMachineLearningServicesMgmtClient`

To create a client object to access the AzureMachineLearningServicesManagement API, you will need the `endpoint` of your AzureMachineLearningServicesManagement resource and a `credential`. The AzureMachineLearningServicesManagement client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your AzureMachineLearningServicesManagement resource in the [Azure Portal][azure_portal].
To create a client object to access the AzureMachineLearningServicesMgmt API, you will need the `endpoint` of your AzureMachineLearningServicesMgmt resource and a `credential`. The AzureMachineLearningServicesMgmt client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your AzureMachineLearningServicesMgmt resource in the [Azure Portal][azure_portal].

You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).

Expand All @@ -43,25 +43,25 @@ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below
npm install @azure/identity
```

You will also need to **register a new AAD application and grant access to AzureMachineLearningServicesManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
You will also need to **register a new AAD application and grant access to AzureMachineLearningServicesMgmt** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.

For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).

```javascript
const { AzureMachineLearningServicesManagementClient } = require("@azure/arm-machinelearning");
const { AzureMachineLearningServicesMgmtClient } = require("@azure/arm-machinelearning");
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 AzureMachineLearningServicesManagementClient(new DefaultAzureCredential(), subscriptionId);
const client = new AzureMachineLearningServicesMgmtClient(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 AzureMachineLearningServicesManagementClient(credential, subscriptionId);
// const client = new AzureMachineLearningServicesMgmtClient(credential, subscriptionId);
```


Expand All @@ -70,9 +70,9 @@ To use this client library in the browser, first you need to use a bundler. For

## Key concepts

### AzureMachineLearningServicesManagementClient
### AzureMachineLearningServicesMgmtClient

`AzureMachineLearningServicesManagementClient` is the primary interface for developers using the AzureMachineLearningServicesManagement client library. Explore the methods on this client object to understand the different features of the AzureMachineLearningServicesManagement service that you can access.
`AzureMachineLearningServicesMgmtClient` is the primary interface for developers using the AzureMachineLearningServicesMgmt client library. Explore the methods on this client object to understand the different features of the AzureMachineLearningServicesMgmt service that you can access.

## Troubleshooting

Expand Down
8 changes: 4 additions & 4 deletions sdk/machinelearning/arm-machinelearning/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "41c3d8cd458627f85820d6028b37e31f8f3b2906",
"commit": "5bd937518ac87391da7d029da87fb6eb7d2e2e7c",
"readme": "specification/machinelearningservices/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\machinelearningservices\\resource-manager\\readme.md --use=@autorest/[email protected].23 --generate-sample=true",
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/machinelearningservices/resource-manager/readme.md --use=@autorest/typescript@^6.0.12",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/[email protected].11",
"use": "@autorest/[email protected].23"
"release_tool": "@azure-tools/[email protected].14",
"use": "@autorest/typescript@^6.0.12"
}
24 changes: 8 additions & 16 deletions sdk/machinelearning/arm-machinelearning/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"name": "@azure/arm-machinelearning",
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for AzureMachineLearningServicesManagementClient.",
"version": "3.0.0",
"description": "A generated SDK for AzureMachineLearningServicesMgmtClient.",
"version": "4.0.0-beta.1",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.5.4",
"@azure/abort-controller": "^1.0.0",
"@azure/abort-controller": "^2.1.2",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.6.0",
Expand All @@ -30,12 +30,12 @@
"devDependencies": {
"@microsoft/api-extractor": "^7.31.1",
"mkdirp": "^3.0.1",
"typescript": "~5.6.2",
"typescript": "~5.5.3",
"uglify-js": "^3.4.9",
"rimraf": "^5.0.0",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^4.0.1",
"@azure/identity": "^4.2.1",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-credential": "^1.1.0",
"mocha": "^10.0.0",
Expand Down Expand Up @@ -100,19 +100,11 @@
"//metadata": {
"constantPaths": [
{
"path": "src/azureMachineLearningServicesManagementClient.ts",
"path": "src/azureMachineLearningServicesMgmtClient.ts",
"prefix": "packageDetails"
}
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/machinelearning/arm-machinelearning",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-machinelearning?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/machinelearning/arm-machinelearning"
}
Loading

0 comments on commit a8525df

Please sign in to comment.