# azure-asm-website

> Microsoft Azure WebSite Management Client Library for node

Latest version **0.10.7** (published 2018-06-12) · Apache-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install azure-asm-website
pnpm add azure-asm-website
yarn add azure-asm-website
bun add azure-asm-website
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.10.7 |
| Published | 2018-06-12 |
| First published | 2015-05-04 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 600.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1174 |
| Author | Microsoft Corporation |
| Maintainers | windowsazure |
| Keywords | node, azure |

## Links

- npm: https://www.npmjs.com/package/azure-asm-website
- Repository: https://github.com/Azure/azure-sdk-for-node
- Homepage: http://github.com/Azure/azure-sdk-for-node
- Issues: http://github.com/Azure/azure-sdk-for-node/issues
- npm.io page: https://npm.io/package/azure-asm-website

## Dependencies (3)

- [moment](https://npm.io/package/moment.md) ^2.22.2
- [underscore](https://npm.io/package/underscore.md) ^1.8.3
- [azure-common](https://npm.io/package/azure-common.md) ^0.9.17

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.10.7 (latest) — 2018-06-12
- 0.10.6 — 2017-10-11
- 0.10.5 — 2016-09-02
- 0.10.4 — 2016-07-29
- 0.10.3 — 2016-07-26
- 0.10.2 — 2016-07-08
- 0.10.1 — 2015-06-08
- 0.10.0 — 2015-05-04

## README

# Microsoft Azure SDK for Node.js - Web Site Management

This project provides a Node.js package that makes it easy to manage Microsoft Azure Web Site. Right now it supports:
- **Node.js version: 4.x or higher**
- **API version: 2014-04-01**

## Features

- Manage web space
- Manage web site
- Manage web farm

## How to Install

```bash
npm install azure-asm-website
```

## How to Use

### Authentication

This library support management certificate authentication. To authenticate the library for the REST API calls, you need to
* Have a management certificate set up in your Microsoft Azure subscription. You can do this by
  * Either uploading a certificate in the [Microsoft Azure management portal](https://manage.windowsazure.com).
  * Or use the [Microsoft Azure Xplat-CLI](https://github.com/Azure/azure-xplat-cli).
* Obtain the .pem file of your certificate. If you used [Microsoft Azure Xplat-CLI](https://github.com/Azure/azure-xplat-cli) to set it up. You can run ``azure account cert export`` to get the .pem file.

### Create the WebSiteManagementClient

```javascript
var fs                = require('fs'),
    webSiteManagement = require('azure-asm-website');

var webSiteManagementClient = webSiteManagement.createWebSiteManagementClient(webSiteManagement.createCertificateCloudCredentials({
  subscriptionId: '<your subscription id>',
  pem: fs.readFileSync('<your pem file>')
}));
```

### Manage Web Site

```javascript
var webSiteName = "website01";

// Get all the available webspaces under a subscription.
webSiteManagementClient.webSpaces.list(function (err, result) {
    if (err) {
    console.error(err);
  } else {
    console.info(result);
  }
});

// Create a web site.
webSiteManagementClient.webSites.create("westuswebspace", {
  name: webSiteName,
  hostNames: [webSiteName + ".azurewebsites.net"],
  webSpaceName: "westuswebspace"
}, function (err, result) {
  if (err) {
    console.error(err);
  } else {
    console.info(result);
  }
});
```

## Related projects

- [Microsoft Azure SDK for Node.js - All-up](https://github.com/WindowsAzure/azure-sdk-for-node)

---
_Source: https://npm.io/package/azure-asm-website · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
