diff --git a/lib/services/servermanagement/LICENSE.txt b/lib/services/servermanagement/LICENSE.txt index 0313a903d7..5431ba98b9 100644 --- a/lib/services/servermanagement/LICENSE.txt +++ b/lib/services/servermanagement/LICENSE.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) 2017 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. \ No newline at end of file +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. diff --git a/lib/services/servermanagement/README.md b/lib/services/servermanagement/README.md index db2bcd0a9c..2bc9de8304 100644 --- a/lib/services/servermanagement/README.md +++ b/lib/services/servermanagement/README.md @@ -1,38 +1,43 @@ -# Microsoft Azure SDK for Node.js - ServerManagement - -This project provides a Node.js package that makes it easy to manage Azure ServerManagement Resources. Right now it supports: -- **Node.js version: 6.0.0 or higher** - -## Features - - - TODO - -## How to Install - -```bash -npm install azure-arm-servermanagement -``` - -## How to Use - -### Authentication, client creation and listing nodes in a resource group as an example - - ```javascript - var msRestAzure = require('ms-rest-azure'); - var ServerManagement = require('azure-arm-servermanagement'); - - // Interactive Login - msRestAzure.interactiveLogin(function(err, credentials) { - var client = new ServerManagement(credentials, 'your-subscription-id'); - client.node.list(resourceGroupName, function(err, nodes, request, response) { - if (err) console.log(err); - nodes.map(function (node, index, array) { - console.log('found node :' + node.name); - })); - }); - }); - ``` - -## Related projects - -- [Microsoft Azure SDK for Node.js - All-up](https://github.com/WindowsAzure/azure-sdk-for-node) +--- +uid: azure-arm-servermanagement +summary: *content + +--- +# Microsoft Azure SDK for Node.js - ServerManagement +This project provides a Node.js package for accessing Azure. Right now it supports: +- **Node.js version 6.x.x or higher** + +## Features + + +## How to Install + +```bash +npm install azure-arm-servermanagement +``` + +## How to use + +### Authentication, client creation and get gateway as an example. + +```javascript +const msRestAzure = require("ms-rest-azure"); +const ServerManagement = require("azure-arm-servermanagement"); +msRestAzure.interactiveLogin().then((creds) => { + const subscriptionId = ""; + const client = new ServerManagement(creds, subscriptionId); + const resourceGroupName = "testresourceGroupName"; + const gatewayName = "testgatewayName"; + const expand = "status"; + return client.gateway.get(resourceGroupName, gatewayName, expand).then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.log('An error occurred:'); + console.dir(err, {depth: null, colors: true}); +}); + +## Related projects + +- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/servermanagement/lib/serverManagement.d.ts b/lib/services/servermanagement/lib/serverManagement.d.ts index 086d193c57..c82a176049 100644 --- a/lib/services/servermanagement/lib/serverManagement.d.ts +++ b/lib/services/servermanagement/lib/serverManagement.d.ts @@ -10,9 +10,10 @@ import { ServiceClientCredentials } from 'ms-rest'; import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure'; +import * as models from "./models"; import * as operations from "./operations"; -declare class ServerManagement extends AzureServiceClient { +export default class ServerManagement extends AzureServiceClient { /** * Initializes a new instance of the ServerManagement class. * @constructor @@ -61,4 +62,4 @@ declare class ServerManagement extends AzureServiceClient { powerShell: operations.PowerShell; } -export = ServerManagement; +export { ServerManagement, models as ServerManagementModels }; diff --git a/lib/services/servermanagement/lib/serverManagement.js b/lib/services/servermanagement/lib/serverManagement.js index 6e76563395..ab4e95a6a8 100644 --- a/lib/services/servermanagement/lib/serverManagement.js +++ b/lib/services/servermanagement/lib/serverManagement.js @@ -83,3 +83,6 @@ class ServerManagement extends ServiceClient { } module.exports = ServerManagement; +module.exports['default'] = ServerManagement; +module.exports.ServerManagement = ServerManagement; +module.exports.ServerManagementModels = models; diff --git a/lib/services/servermanagement/package.json b/lib/services/servermanagement/package.json index bc2a1c0372..4e9aa40483 100644 --- a/lib/services/servermanagement/package.json +++ b/lib/services/servermanagement/package.json @@ -1,32 +1,25 @@ -{ - "name": "azure-arm-servermanagement", - "author": "Microsoft Corporation", - "contributors": [ - "Garrett Serack " - ], - "version": "1.1.0", - "description": "Microsoft Server Management Client Library for node", - "tags": [ - "azure", - "sdk" - ], - "keywords": [ - "node", - "azure" - ], - "main": "./lib/serverManagement.js", - "types": "./lib/serverManagement.d.ts", - "license": "MIT", - "dependencies": { - "ms-rest-azure": "^2.3.3", - "ms-rest": "^2.2.2" - }, - "homepage": "http://github.com/Azure/azure-sdk-for-node", - "repository": { - "type": "git", - "url": "git@github.com:Azure/azure-sdk-for-node.git" - }, - "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-node/issues" - } -} +{ + "name": "azure-arm-servermanagement", + "author": "Microsoft Corporation", + "description": "ServerManagement Library with typescript type definitions for node", + "version": "1.1.0", + "dependencies": { + "ms-rest": "^2.3.3", + "ms-rest-azure": "^2.5.5" + }, + "keywords": [ + "node", + "azure" + ], + "license": "MIT", + "main": "./lib/serverManagement.js", + "types": "./lib/serverManagement.d.ts", + "homepage": "http://github.com/azure/azure-sdk-for-node", + "repository": { + "type": "git", + "url": "https://github.com/azure/azure-sdk-for-node.git" + }, + "bugs": { + "url": "http://github.com/Azure/azure-sdk-for-node/issues" + } +}