Skip to content

Commit

Permalink
CodeGen from PR 31901 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 134dab2ea4de63069e9d51cf7bfcf516ed213a6b into 59799c650469a665614dd88c261ade7b78dcf77d
  • Loading branch information
SDKAuto committed Dec 17, 2024
1 parent f6904d7 commit 766709e
Show file tree
Hide file tree
Showing 70 changed files with 1,299 additions and 17,194 deletions.
1,169 changes: 7 additions & 1,162 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

12 changes: 3 additions & 9 deletions sdk/batch/batch-rest/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
# Release History

## 1.0.0-beta.2 (2024-11-07)

### Features Added

- Update API version to `2024-07-01.20.0` for Azure Batch service.

## 1.0.0-beta.1 (2024-08-07)

## 1.0.0 (2024-12-17)

### Features Added

- This is the initial beta release for the Azure Batch SDK, which is a common API supporting Azure Batch services.
The package of @azure-rest/batch is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart).
265 changes: 0 additions & 265 deletions sdk/batch/batch-rest/MigrationGuide.md

This file was deleted.

31 changes: 5 additions & 26 deletions sdk/batch/batch-rest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ Azure Batch provides Cloud-scale job scheduling and compute management.

Key links:

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

## Getting started

Expand All @@ -21,46 +22,24 @@ Key links:

### Install the `@azure-rest/batch` package

Install the Azure Batch REST client library for JavaScript with `npm`:
Install the Azure Batch REST client REST client library for JavaScript with `npm`:

```bash
npm install @azure-rest/batch
```

### Create and authenticate a `BatchClient`

Azure batch supports authentication either via Microsoft Entra ID or Shared Key.

- [Microsoft Entra ID](#microsoft-entra-id)
- [Shared Key](#shared-key)

#### Microsoft Entra ID

To use an [Microsoft Entra ID token credential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token),
To use an [Azure Active Directory (AAD) token credential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token),
provide an instance of the desired credential type obtained from the
[@azure/identity](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) library.

To authenticate with Microsoft Entra ID, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity)
To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity)

After setup, you can choose which type of [credential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) from `@azure/identity` to use.
As an example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential)
can be used to authenticate the client.

Set the values of the client ID, tenant ID, and client secret of the Microsoft Entra ID application as environment variables:
AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET

#### Shared Key

To use shared key to authenticate, you must first `npm` install [`@azure/core-auth`](https://www.npmjs.com/package/@azure/core-auth), then provide the account name and account key to construct the an `AzureNamedKeyCredential` credential from `@azure/core-auth`

```typescript
import { AzureNamedKeyCredential } from "@azure/core-auth";
import createClient from "@azure-rest/batch";

const credential = new AzureNamedKeyCredential("<account name>", "<account key>");
const batchClient = createClient("<account endpoint>", credential);
```

## Troubleshooting

### Logging
Expand Down
25 changes: 19 additions & 6 deletions sdk/batch/batch-rest/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./dist/esm/index.d.ts",
"docModel": { "enabled": true },
"apiReport": { "enabled": true, "reportFolder": "./review" },
"docModel": {
"enabled": true
},
"apiReport": {
"enabled": true,
"reportFolder": "./review"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/batch.d.ts"
},
"messages": {
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
},
"extractorMessageReporting": {
"ae-missing-release-tag": { "logLevel": "none" },
"ae-unresolved-link": { "logLevel": "none" }
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-unresolved-link": {
"logLevel": "none"
}
}
}
}
}
6 changes: 0 additions & 6 deletions sdk/batch/batch-rest/assets.json

This file was deleted.

Loading

0 comments on commit 766709e

Please sign in to comment.