Skip to content

Commit d5ce37f

Browse files
authored
datalake-analytics release (Azure#13218)
1 parent 106bbdd commit d5ce37f

25 files changed

+7894
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2021 Microsoft
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
## Azure DataLakeAnalyticsAccountManagementClient SDK for JavaScript
2+
3+
This package contains an isomorphic SDK for DataLakeAnalyticsAccountManagementClient.
4+
5+
### Currently supported environments
6+
7+
- Node.js version 6.x.x or higher
8+
- Browser JavaScript
9+
10+
### How to Install
11+
12+
```bash
13+
npm install @azure/arm-datalake-analytics
14+
```
15+
16+
### How to use
17+
18+
#### nodejs - client creation and list accounts as an example written in TypeScript.
19+
20+
##### Install @azure/ms-rest-nodeauth
21+
22+
- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
23+
```bash
24+
npm install @azure/ms-rest-nodeauth@"^3.0.0"
25+
```
26+
27+
##### Sample code
28+
29+
While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package
30+
```typescript
31+
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
32+
const { DataLakeAnalyticsAccountManagementClient } = require("@azure/arm-datalake-analytics");
33+
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
34+
35+
msRestNodeAuth.interactiveLogin().then((creds) => {
36+
const client = new DataLakeAnalyticsAccountManagementClient(creds, subscriptionId);
37+
const filter = "testfilter";
38+
const top = 1;
39+
const skip = 1;
40+
const select = "testselect";
41+
const orderby = "testorderby";
42+
const count = true;
43+
client.accounts.list(filter, top, skip, select, orderby, count).then((result) => {
44+
console.log("The result is:");
45+
console.log(result);
46+
});
47+
}).catch((err) => {
48+
console.error(err);
49+
});
50+
```
51+
52+
#### browser - Authentication, client creation and list accounts as an example written in JavaScript.
53+
54+
##### Install @azure/ms-rest-browserauth
55+
56+
```bash
57+
npm install @azure/ms-rest-browserauth
58+
```
59+
60+
##### Sample code
61+
62+
See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
63+
64+
- index.html
65+
```html
66+
<!DOCTYPE html>
67+
<html lang="en">
68+
<head>
69+
<title>@azure/arm-datalake-analytics sample</title>
70+
<script src="node_modules/@azure/ms-rest-js/dist/msRest.browser.js"></script>
71+
<script src="node_modules/@azure/ms-rest-azure-js/dist/msRestAzure.js"></script>
72+
<script src="node_modules/@azure/ms-rest-browserauth/dist/msAuth.js"></script>
73+
<script src="node_modules/@azure/arm-datalake-analytics/dist/arm-datalake-analytics.js"></script>
74+
<script type="text/javascript">
75+
const subscriptionId = "<Subscription_Id>";
76+
const authManager = new msAuth.AuthManager({
77+
clientId: "<client id for your Azure AD app>",
78+
tenant: "<optional tenant for your organization>"
79+
});
80+
authManager.finalizeLogin().then((res) => {
81+
if (!res.isLoggedIn) {
82+
// may cause redirects
83+
authManager.login();
84+
}
85+
const client = new Azure.ArmDatalakeAnalytics.DataLakeAnalyticsAccountManagementClient(res.creds, subscriptionId);
86+
const filter = "testfilter";
87+
const top = 1;
88+
const skip = 1;
89+
const select = "testselect";
90+
const orderby = "testorderby";
91+
const count = true;
92+
client.accounts.list(filter, top, skip, select, orderby, count).then((result) => {
93+
console.log("The result is:");
94+
console.log(result);
95+
}).catch((err) => {
96+
console.log("An error occurred:");
97+
console.error(err);
98+
});
99+
});
100+
</script>
101+
</head>
102+
<body></body>
103+
</html>
104+
```
105+
106+
## Related projects
107+
108+
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
109+
110+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/datalake-analytics/arm-datalake-analytics/README.png)
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"name": "@azure/arm-datalake-analytics",
3+
"author": "Microsoft Corporation",
4+
"description": "DataLakeAnalyticsAccountManagementClient Library with typescript type definitions for node.js and browser.",
5+
"version": "1.0.0",
6+
"dependencies": {
7+
"@azure/ms-rest-azure-js": "^2.0.1",
8+
"@azure/ms-rest-js": "^2.0.4",
9+
"tslib": "^1.10.0"
10+
},
11+
"keywords": [
12+
"node",
13+
"azure",
14+
"typescript",
15+
"browser",
16+
"isomorphic"
17+
],
18+
"license": "MIT",
19+
"main": "./dist/arm-datalake-analytics.js",
20+
"module": "./esm/dataLakeAnalyticsAccountManagementClient.js",
21+
"types": "./esm/dataLakeAnalyticsAccountManagementClient.d.ts",
22+
"devDependencies": {
23+
"typescript": "^3.5.3",
24+
"rollup": "^1.18.0",
25+
"rollup-plugin-node-resolve": "^5.2.0",
26+
"rollup-plugin-sourcemaps": "^0.4.2",
27+
"uglify-js": "^3.6.0"
28+
},
29+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/datalake-analytics/arm-datalake-analytics",
30+
"repository": {
31+
"type": "git",
32+
"url": "https://github.com/Azure/azure-sdk-for-js.git"
33+
},
34+
"bugs": {
35+
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
36+
},
37+
"files": [
38+
"dist/**/*.js",
39+
"dist/**/*.js.map",
40+
"dist/**/*.d.ts",
41+
"dist/**/*.d.ts.map",
42+
"esm/**/*.js",
43+
"esm/**/*.js.map",
44+
"esm/**/*.d.ts",
45+
"esm/**/*.d.ts.map",
46+
"src/**/*.ts",
47+
"README.md",
48+
"rollup.config.js",
49+
"tsconfig.json"
50+
],
51+
"scripts": {
52+
"build": "tsc && rollup -c rollup.config.js && npm run minify",
53+
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-datalake-analytics.js.map'\" -o ./dist/arm-datalake-analytics.min.js ./dist/arm-datalake-analytics.js",
54+
"prepack": "npm install && npm run build"
55+
},
56+
"sideEffects": false,
57+
"autoPublish": true
58+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import rollup from "rollup";
2+
import nodeResolve from "rollup-plugin-node-resolve";
3+
import sourcemaps from "rollup-plugin-sourcemaps";
4+
5+
/**
6+
* @type {rollup.RollupFileOptions}
7+
*/
8+
const config = {
9+
input: "./esm/dataLakeAnalyticsAccountManagementClient.js",
10+
external: [
11+
"@azure/ms-rest-js",
12+
"@azure/ms-rest-azure-js"
13+
],
14+
output: {
15+
file: "./dist/arm-datalake-analytics.js",
16+
format: "umd",
17+
name: "Azure.ArmDatalakeAnalytics",
18+
sourcemap: true,
19+
globals: {
20+
"@azure/ms-rest-js": "msRest",
21+
"@azure/ms-rest-azure-js": "msRestAzure"
22+
},
23+
banner: `/*
24+
* Copyright (c) Microsoft Corporation.
25+
* Licensed under the MIT License.
26+
*
27+
* Code generated by Microsoft (R) AutoRest Code Generator.
28+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
29+
*/`
30+
},
31+
plugins: [
32+
nodeResolve({ mainFields: ['module', 'main'] }),
33+
sourcemaps()
34+
]
35+
};
36+
37+
export default config;
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is
7+
* regenerated.
8+
*/
9+
10+
import * as msRest from "@azure/ms-rest-js";
11+
import * as Models from "./models";
12+
import * as Mappers from "./models/mappers";
13+
import * as operations from "./operations";
14+
import { DataLakeAnalyticsAccountManagementClientContext } from "./dataLakeAnalyticsAccountManagementClientContext";
15+
16+
17+
class DataLakeAnalyticsAccountManagementClient extends DataLakeAnalyticsAccountManagementClientContext {
18+
// Operation groups
19+
accounts: operations.Accounts;
20+
dataLakeStoreAccounts: operations.DataLakeStoreAccounts;
21+
storageAccounts: operations.StorageAccounts;
22+
computePolicies: operations.ComputePolicies;
23+
firewallRules: operations.FirewallRules;
24+
operations: operations.Operations;
25+
locations: operations.Locations;
26+
27+
/**
28+
* Initializes a new instance of the DataLakeAnalyticsAccountManagementClient class.
29+
* @param credentials Credentials needed for the client to connect to Azure.
30+
* @param subscriptionId Get subscription credentials which uniquely identify Microsoft Azure
31+
* subscription. The subscription ID forms part of the URI for every service call.
32+
* @param [options] The parameter options
33+
*/
34+
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.DataLakeAnalyticsAccountManagementClientOptions) {
35+
super(credentials, subscriptionId, options);
36+
this.accounts = new operations.Accounts(this);
37+
this.dataLakeStoreAccounts = new operations.DataLakeStoreAccounts(this);
38+
this.storageAccounts = new operations.StorageAccounts(this);
39+
this.computePolicies = new operations.ComputePolicies(this);
40+
this.firewallRules = new operations.FirewallRules(this);
41+
this.operations = new operations.Operations(this);
42+
this.locations = new operations.Locations(this);
43+
}
44+
}
45+
46+
// Operation Specifications
47+
48+
export {
49+
DataLakeAnalyticsAccountManagementClient,
50+
DataLakeAnalyticsAccountManagementClientContext,
51+
Models as DataLakeAnalyticsAccountManagementModels,
52+
Mappers as DataLakeAnalyticsAccountManagementMappers
53+
};
54+
export * from "./operations";
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is
7+
* regenerated.
8+
*/
9+
10+
import * as Models from "./models";
11+
import * as msRest from "@azure/ms-rest-js";
12+
import * as msRestAzure from "@azure/ms-rest-azure-js";
13+
14+
const packageName = "@azure/arm-datalake-analytics";
15+
const packageVersion = "1.0.0";
16+
17+
export class DataLakeAnalyticsAccountManagementClientContext extends msRestAzure.AzureServiceClient {
18+
credentials: msRest.ServiceClientCredentials;
19+
subscriptionId: string;
20+
apiVersion?: string;
21+
22+
/**
23+
* Initializes a new instance of the DataLakeAnalyticsAccountManagementClient class.
24+
* @param credentials Credentials needed for the client to connect to Azure.
25+
* @param subscriptionId Get subscription credentials which uniquely identify Microsoft Azure
26+
* subscription. The subscription ID forms part of the URI for every service call.
27+
* @param [options] The parameter options
28+
*/
29+
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.DataLakeAnalyticsAccountManagementClientOptions) {
30+
if (credentials == undefined) {
31+
throw new Error('\'credentials\' cannot be null.');
32+
}
33+
if (subscriptionId == undefined) {
34+
throw new Error('\'subscriptionId\' cannot be null.');
35+
}
36+
37+
if (!options) {
38+
options = {};
39+
}
40+
if(!options.userAgent) {
41+
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
42+
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
43+
}
44+
45+
super(credentials, options);
46+
47+
this.apiVersion = '2016-11-01';
48+
this.acceptLanguage = 'en-US';
49+
this.longRunningOperationRetryTimeout = 30;
50+
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
51+
this.requestContentType = "application/json; charset=utf-8";
52+
this.credentials = credentials;
53+
this.subscriptionId = subscriptionId;
54+
55+
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
56+
this.acceptLanguage = options.acceptLanguage;
57+
}
58+
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
59+
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
60+
}
61+
}
62+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
*/
8+
9+
export {
10+
AddDataLakeStoreWithAccountParameters,
11+
AddStorageAccountWithAccountParameters,
12+
BaseResource,
13+
CheckNameAvailabilityParameters,
14+
ComputePolicy,
15+
CreateComputePolicyWithAccountParameters,
16+
CreateDataLakeAnalyticsAccountParameters,
17+
CreateFirewallRuleWithAccountParameters,
18+
DataLakeAnalyticsAccount,
19+
DataLakeAnalyticsAccountBasic,
20+
DataLakeAnalyticsAccountListResult,
21+
DataLakeStoreAccountInformation,
22+
ErrorAdditionalInfo,
23+
ErrorDetail,
24+
ErrorResponse,
25+
FirewallRule,
26+
HiveMetastore,
27+
NameAvailabilityInformation,
28+
Resource,
29+
StorageAccountInformation,
30+
StorageContainer,
31+
SubResource,
32+
UpdateComputePolicyWithAccountParameters,
33+
UpdateDataLakeAnalyticsAccountParameters,
34+
UpdateDataLakeStoreWithAccountParameters,
35+
UpdateFirewallRuleWithAccountParameters,
36+
UpdateStorageAccountWithAccountParameters,
37+
VirtualNetworkRule
38+
} from "../models/mappers";

0 commit comments

Comments
 (0)