Skip to content

Commit 11b12c9

Browse files
authored
datalake-analytics-track2-ga (Azure#19531)
* datalake-analytics-track2-ga * update readme.md
1 parent cbbbcf1 commit 11b12c9

15 files changed

+86
-145
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"node": ">=10.10.0"
6363
},
6464
"dependencies": {
65-
"@azure-tools/js-sdk-release-tools": "^1.0.3",
65+
"@azure-tools/js-sdk-release-tools": "^1.0.4",
6666
"eng-package-utils": "file:eng/tools/eng-package-utils",
6767
"versioning": "file:eng/tools/versioning"
6868
}
Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,11 @@
1-
## Release History
1+
# Release History
2+
3+
## 2.0.0-beta.2 (2021-12-23)
24

3-
### 2.0.0-beta.2 (Unreleased)
5+
The package of @azure/arm-datalake-analytics is using our next generation design principles since version 2.0.0-beta.2, which contains breaking changes.
46

5-
#### Features Added
7+
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
68

7-
#### Breaking Changes
9+
To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
810

9-
#### Bugs Fixed
10-
11-
#### Other Changes
12-
13-
### 2.0.0-beta.1 (2021-11-17)
14-
15-
This is the first preview for the new version of the `@azure/arm-datalake-analytics` package that follows the new [guidelines for TypeScript SDKs](https://azure.github.io/azure-sdk/typescript_introduction.html) for Azure services.
16-
17-
While this package remains auto generated, the SDK generator itself has undergone changes to comply with the above guidelines in order to generate packages that are idiomatic to the JavaScript/TypeScript ecosystem and consistent with other packages for Azure services. For more on this, please see [State of the Azure SDK 2021](https://devblogs.microsoft.com/azure-sdk/state-of-the-azure-sdk-2021/).
18-
19-
Please note that this version has breaking changes, all of which were made after careful consideration during the authoring of the guidelines and user studies.
20-
21-
**Noteworthy changes and features**
22-
- Authentication: The packages `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` are no longer supported. Use package [@azure/identity](https://www.npmjs.com/package/@azure/identity) instead. Select a credential from Azure Identity examples based on the authentication method of your choice.
23-
- Callbacks: Method overloads that used callbacks have been removed and the use of promises is encouraged instead.
24-
- List operations now return an iterable result that follows the `PagedAsyncIterableIterator` interface as opposed to the previous model where you had to make a new request using the link to the next page.
25-
- Long running operations i.e. the Lro related object returned by methods whose names started with `begin`, now uses `pollUntilDone` to check whether the request is finished, instead of `pollUntilFinished`. To get the final result, use the corresponding method that will have the suffix `AndWait`.
26-
- The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6.
11+
To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"commit": "c4d6f92d3fd35a69ebce68f4c73c35c4238c2ac5",
2+
"commit": "270ba8923ce458af2b59cd66b008355676bccd49",
33
"readme": "specification/datalake-analytics/resource-manager/readme.md",
4-
"autorest_command": "autorest --version=3.1.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/datalake-analytics/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.15.20211116.1",
4+
"autorest_command": "autorest --version=3.1.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/datalake-analytics/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"use": "@autorest/typescript@6.0.0-alpha.15.20211116.1"
6+
"use": "@autorest/typescript@6.0.0-alpha.16.20211217.1"
77
}

sdk/datalake-analytics/arm-datalake-analytics/package.json

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for DataLakeAnalyticsAccountManagementClient.",
66
"version": "2.0.0-beta.2",
7-
"engines": {
8-
"node": ">=12.0.0"
9-
},
7+
"engines": { "node": ">=12.0.0" },
108
"dependencies": {
119
"@azure/core-lro": "^2.2.0",
1210
"@azure/abort-controller": "^1.0.0",
@@ -16,13 +14,7 @@
1614
"@azure/core-rest-pipeline": "^1.1.0",
1715
"tslib": "^2.2.0"
1816
},
19-
"keywords": [
20-
"node",
21-
"azure",
22-
"typescript",
23-
"browser",
24-
"isomorphic"
25-
],
17+
"keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
2618
"license": "MIT",
2719
"main": "./dist/index.js",
2820
"module": "./dist-esm/src/index.js",
@@ -49,9 +41,7 @@
4941
"type": "git",
5042
"url": "https://github.com/Azure/azure-sdk-for-js.git"
5143
},
52-
"bugs": {
53-
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
54-
},
44+
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
5545
"files": [
5646
"dist/**/*.js",
5747
"dist/**/*.js.map",

sdk/datalake-analytics/arm-datalake-analytics/review/arm-datalake-analytics.api.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -323,11 +323,15 @@ export interface DataLakeAnalyticsAccountListResult {
323323
}
324324

325325
// @public (undocumented)
326-
export class DataLakeAnalyticsAccountManagementClient extends DataLakeAnalyticsAccountManagementClientContext {
326+
export class DataLakeAnalyticsAccountManagementClient extends coreClient.ServiceClient {
327+
// (undocumented)
328+
$host: string;
327329
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: DataLakeAnalyticsAccountManagementClientOptionalParams);
328330
// (undocumented)
329331
accounts: Accounts;
330332
// (undocumented)
333+
apiVersion: string;
334+
// (undocumented)
331335
computePolicies: ComputePolicies;
332336
// (undocumented)
333337
dataLakeStoreAccounts: DataLakeStoreAccounts;
@@ -339,15 +343,6 @@ export class DataLakeAnalyticsAccountManagementClient extends DataLakeAnalyticsA
339343
operations: Operations;
340344
// (undocumented)
341345
storageAccounts: StorageAccounts;
342-
}
343-
344-
// @public (undocumented)
345-
export class DataLakeAnalyticsAccountManagementClientContext extends coreClient.ServiceClient {
346-
// (undocumented)
347-
$host: string;
348-
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: DataLakeAnalyticsAccountManagementClientOptionalParams);
349-
// (undocumented)
350-
apiVersion: string;
351346
// (undocumented)
352347
subscriptionId: string;
353348
}

sdk/datalake-analytics/arm-datalake-analytics/src/dataLakeAnalyticsAccountManagementClient.ts

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
*/
88

9+
import * as coreClient from "@azure/core-client";
910
import * as coreAuth from "@azure/core-auth";
1011
import {
1112
AccountsImpl,
@@ -25,10 +26,13 @@ import {
2526
Operations,
2627
Locations
2728
} from "./operationsInterfaces";
28-
import { DataLakeAnalyticsAccountManagementClientContext } from "./dataLakeAnalyticsAccountManagementClientContext";
2929
import { DataLakeAnalyticsAccountManagementClientOptionalParams } from "./models";
3030

31-
export class DataLakeAnalyticsAccountManagementClient extends DataLakeAnalyticsAccountManagementClientContext {
31+
export class DataLakeAnalyticsAccountManagementClient extends coreClient.ServiceClient {
32+
$host: string;
33+
subscriptionId: string;
34+
apiVersion: string;
35+
3236
/**
3337
* Initializes a new instance of the DataLakeAnalyticsAccountManagementClient class.
3438
* @param credentials Subscription credentials which uniquely identify client subscription.
@@ -41,7 +45,46 @@ export class DataLakeAnalyticsAccountManagementClient extends DataLakeAnalyticsA
4145
subscriptionId: string,
4246
options?: DataLakeAnalyticsAccountManagementClientOptionalParams
4347
) {
44-
super(credentials, subscriptionId, options);
48+
if (credentials === undefined) {
49+
throw new Error("'credentials' cannot be null");
50+
}
51+
if (subscriptionId === undefined) {
52+
throw new Error("'subscriptionId' cannot be null");
53+
}
54+
55+
// Initializing default values for options
56+
if (!options) {
57+
options = {};
58+
}
59+
const defaults: DataLakeAnalyticsAccountManagementClientOptionalParams = {
60+
requestContentType: "application/json; charset=utf-8",
61+
credential: credentials
62+
};
63+
64+
const packageDetails = `azsdk-js-arm-datalake-analytics/2.0.0-beta.2`;
65+
const userAgentPrefix =
66+
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
67+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
68+
: `${packageDetails}`;
69+
70+
if (!options.credentialScopes) {
71+
options.credentialScopes = ["https://management.azure.com/.default"];
72+
}
73+
const optionsWithDefaults = {
74+
...defaults,
75+
...options,
76+
userAgentOptions: {
77+
userAgentPrefix
78+
},
79+
baseUri: options.endpoint || "https://management.azure.com"
80+
};
81+
super(optionsWithDefaults);
82+
// Parameter assignments
83+
this.subscriptionId = subscriptionId;
84+
85+
// Assigning values to Constant parameters
86+
this.$host = options.$host || "https://management.azure.com";
87+
this.apiVersion = options.apiVersion || "2019-11-01-preview";
4588
this.accounts = new AccountsImpl(this);
4689
this.dataLakeStoreAccounts = new DataLakeStoreAccountsImpl(this);
4790
this.storageAccounts = new StorageAccountsImpl(this);

sdk/datalake-analytics/arm-datalake-analytics/src/dataLakeAnalyticsAccountManagementClientContext.ts

Lines changed: 0 additions & 71 deletions
This file was deleted.

sdk/datalake-analytics/arm-datalake-analytics/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@
99
/// <reference lib="esnext.asynciterable" />
1010
export * from "./models";
1111
export { DataLakeAnalyticsAccountManagementClient } from "./dataLakeAnalyticsAccountManagementClient";
12-
export { DataLakeAnalyticsAccountManagementClientContext } from "./dataLakeAnalyticsAccountManagementClientContext";
1312
export * from "./operationsInterfaces";

sdk/datalake-analytics/arm-datalake-analytics/src/operations/accounts.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Accounts } from "../operationsInterfaces";
1111
import * as coreClient from "@azure/core-client";
1212
import * as Mappers from "../models/mappers";
1313
import * as Parameters from "../models/parameters";
14-
import { DataLakeAnalyticsAccountManagementClientContext } from "../dataLakeAnalyticsAccountManagementClientContext";
14+
import { DataLakeAnalyticsAccountManagementClient } from "../dataLakeAnalyticsAccountManagementClient";
1515
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
1616
import { LroImpl } from "../lroImpl";
1717
import {
@@ -40,13 +40,13 @@ import {
4040
/// <reference lib="esnext.asynciterable" />
4141
/** Class containing Accounts operations. */
4242
export class AccountsImpl implements Accounts {
43-
private readonly client: DataLakeAnalyticsAccountManagementClientContext;
43+
private readonly client: DataLakeAnalyticsAccountManagementClient;
4444

4545
/**
4646
* Initialize a new instance of the class Accounts class.
4747
* @param client Reference to the service client
4848
*/
49-
constructor(client: DataLakeAnalyticsAccountManagementClientContext) {
49+
constructor(client: DataLakeAnalyticsAccountManagementClient) {
5050
this.client = client;
5151
}
5252

sdk/datalake-analytics/arm-datalake-analytics/src/operations/computePolicies.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { ComputePolicies } from "../operationsInterfaces";
1111
import * as coreClient from "@azure/core-client";
1212
import * as Mappers from "../models/mappers";
1313
import * as Parameters from "../models/parameters";
14-
import { DataLakeAnalyticsAccountManagementClientContext } from "../dataLakeAnalyticsAccountManagementClientContext";
14+
import { DataLakeAnalyticsAccountManagementClient } from "../dataLakeAnalyticsAccountManagementClient";
1515
import {
1616
ComputePolicy,
1717
ComputePoliciesListByAccountNextOptionalParams,
@@ -31,13 +31,13 @@ import {
3131
/// <reference lib="esnext.asynciterable" />
3232
/** Class containing ComputePolicies operations. */
3333
export class ComputePoliciesImpl implements ComputePolicies {
34-
private readonly client: DataLakeAnalyticsAccountManagementClientContext;
34+
private readonly client: DataLakeAnalyticsAccountManagementClient;
3535

3636
/**
3737
* Initialize a new instance of the class ComputePolicies class.
3838
* @param client Reference to the service client
3939
*/
40-
constructor(client: DataLakeAnalyticsAccountManagementClientContext) {
40+
constructor(client: DataLakeAnalyticsAccountManagementClient) {
4141
this.client = client;
4242
}
4343

0 commit comments

Comments
 (0)