Skip to content

Commit

Permalink
[AutoPR] hdinsight/resource-manager (#366)
Browse files Browse the repository at this point in the history
* Generated from 4470c45fbc3ee7fef05111908a961c64dec8f97f (#364)

Fixed non-existent extra parameter (bug)

* Regenerate @azure/arm-hdinsight package
  • Loading branch information
AutorestCI authored and kpajdzik committed Oct 31, 2018
1 parent 32d11f9 commit 1d1b11f
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 111 deletions.
42 changes: 21 additions & 21 deletions packages/@azure/arm-hdinsight/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
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.
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.
162 changes: 81 additions & 81 deletions packages/@azure/arm-hdinsight/README.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,81 @@
# Azure HDInsightManagementClient SDK for JavaScript
This package contains an isomorphic SDK for HDInsightManagementClient.

## Currently supported environments
- Node.js version 6.x.x or higher
- Browser JavaScript

## How to Install
```
npm install @azure/arm-hdinsight
```


## How to use

### nodejs - Authentication, client creation and get clusters as an example written in TypeScript.

```ts
import * as msRest from "ms-rest-js";
import * as msRestAzure from "ms-rest-azure-js";
import * as msRestNodeAuth from "ms-rest-nodeauth";
import { HDInsightManagementClient, HDInsightManagementModels, HDInsightManagementMappers } from "@azure/arm-hdinsight";
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new HDInsightManagementClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const clusterName = "testclusterName";
client.clusters.get(resourceGroupName, clusterName).then((result) => {
console.log("The result is:");
console.log(result);
});
}).catch((err) => {
console.error(err);
});
```

### browser - Authentication, client creation and get clusters as an example written in JavaScript.
See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.

- index.html
```html
<!DOCTYPE html>
<html lang="en">
<head>
<title>@azure/arm-hdinsight sample</title>
<script src="node_modules/ms-rest-js/dist/msRest.browser.js"></script>
<script src="node_modules/ms-rest-azure-js/dist/msRestAzure.js"></script>
<script src="node_modules/ms-rest-browserauth/dist/msAuth.js"></script>
<script src="node_modules/@azure/arm-hdinsight/dist/arm-hdinsight.js"></script>
<script>
const subscriptionId = "<Subscription_Id>";
const authManager = new msAuth.AuthManager({
clientId: "<client id for your Azure AD app>",
tenant: "<optional tenant for your organization>"
});
authManager.finalizeLogin().then((res) => {
if (!res.isLoggedIn) {
// may cause redirects
authManager.login();
}
const client = new Azure.ArmHdinsight.HDInsightManagementClient(res.creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const clusterName = "testclusterName";
client.clusters.get(resourceGroupName, clusterName).then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
console.log('An error occurred:');
console.error(err);
});
});
</script>
</head>
<body>
</body>
</html>
```

# Related projects
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
# Azure HDInsightManagementClient SDK for JavaScript
This package contains an isomorphic SDK for HDInsightManagementClient.

## Currently supported environments
- Node.js version 6.x.x or higher
- Browser JavaScript

## How to Install
```
npm install @azure/arm-hdinsight
```


## How to use

### nodejs - Authentication, client creation and get clusters as an example written in TypeScript.

```ts
import * as msRest from "ms-rest-js";
import * as msRestAzure from "ms-rest-azure-js";
import * as msRestNodeAuth from "ms-rest-nodeauth";
import { HDInsightManagementClient, HDInsightManagementModels, HDInsightManagementMappers } from "@azure/arm-hdinsight";
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new HDInsightManagementClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const clusterName = "testclusterName";
client.clusters.get(resourceGroupName, clusterName).then((result) => {
console.log("The result is:");
console.log(result);
});
}).catch((err) => {
console.error(err);
});
```

### browser - Authentication, client creation and get clusters as an example written in JavaScript.
See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.

- index.html
```html
<!DOCTYPE html>
<html lang="en">
<head>
<title>@azure/arm-hdinsight sample</title>
<script src="node_modules/ms-rest-js/dist/msRest.browser.js"></script>
<script src="node_modules/ms-rest-azure-js/dist/msRestAzure.js"></script>
<script src="node_modules/ms-rest-browserauth/dist/msAuth.js"></script>
<script src="node_modules/@azure/arm-hdinsight/dist/arm-hdinsight.js"></script>
<script>
const subscriptionId = "<Subscription_Id>";
const authManager = new msAuth.AuthManager({
clientId: "<client id for your Azure AD app>",
tenant: "<optional tenant for your organization>"
});
authManager.finalizeLogin().then((res) => {
if (!res.isLoggedIn) {
// may cause redirects
authManager.login();
}
const client = new Azure.ArmHdinsight.HDInsightManagementClient(res.creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const clusterName = "testclusterName";
client.clusters.get(resourceGroupName, clusterName).then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
console.log("An error occurred:");
console.error(err);
});
});
</script>
</head>
<body>
</body>
</html>
```

# Related projects
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,9 @@ const packageName = "@azure/arm-hdinsight";
const packageVersion = "1.0.0-preview";

export class HDInsightManagementClientContext extends msRestAzure.AzureServiceClient {

credentials: msRest.ServiceClientCredentials;

subscriptionId: string;

apiVersion: string;

acceptLanguage: string;

longRunningOperationRetryTimeout: number;
apiVersion?: string;

/**
* Initializes a new instance of the HDInsightManagementClient class.
Expand Down
15 changes: 14 additions & 1 deletion packages/@azure/arm-hdinsight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,23 @@
"bugs": {
"url": "https://github.com/azure/azure-sdk-for-js/issues"
},
"files": [
"dist/**/*.js",
"dist/**/*.js.map",
"dist/**/*.d.ts",
"dist/**/*.d.ts.map",
"esm/**/*.js",
"esm/**/*.js.map",
"esm/**/*.d.ts",
"esm/**/*.d.ts.map",
"lib/**/*.ts",
"rollup.config.js",
"tsconfig.json"
],
"scripts": {
"build": "tsc && rollup -c rollup.config.js && npm run minify",
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-hdinsight.js.map'\" -o ./dist/arm-hdinsight.min.js ./dist/arm-hdinsight.js",
"prepare": "npm run build"
"prepack": "npm install && npm run build"
},
"sideEffects": false
}

0 comments on commit 1d1b11f

Please sign in to comment.