# @azure/ms-rest-azure-env

> Isomorphic library that provides Azure endpoints for different Azure Environments/Clouds.

Latest version **2.0.0** (published 2019-07-11) · MIT license · 0 weekly downloads

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

## Install

```sh
npm install @azure/ms-rest-azure-env
pnpm add @azure/ms-rest-azure-env
yarn add @azure/ms-rest-azure-env
bun add @azure/ms-rest-azure-env
```

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2019-07-11 |
| First published | 2018-11-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 73 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Microsoft Corporation |
| Maintainers | amarzavery, azure-sdk, billytrend, sergeyshandar, veronicagg, vladbarosan |
| Keywords | node, isomorphic, azure, environment, endpoint |

## Links

- npm: https://www.npmjs.com/package/@azure/ms-rest-azure-env
- Repository: https://github.com/Azure/ms-rest-azure-env
- Issues: http://github.com/Azure/ms-rest-azure-env/issues
- npm.io page: https://npm.io/package/@azure/ms-rest-azure-env

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2019-07-11
- 1.1.2 — 2019-01-14
- 1.1.1 — 2018-11-29
- 1.1.0 — 2018-11-12

## README

# ms-rest-azure-env [![Build Status](https://dev.azure.com/azure-public/adx/_apis/build/status/public.Azure.ms-rest-azure-env)](https://dev.azure.com/azure-public/adx/_build/latest?definitionId=7)

An isomorphic javascript library with typescript type definitions that provides a mechanism to access Azure Endpoints in different Azure clouds. It also provides a mechanism to add a custom environment.

### Example

```javascript
import { Environment, EnvironmentParameters } from "@azure/ms-rest-azure-env";

// Accesing predefined environment endpoints.
console.log(Environment.AzureCloud.resourceManagerEndpointUrl);
console.log(Environment.ChinaCloud.resourceManagerEndpointUrl);

//Adding a custom environment with required endpoint values.
let df: AzureEnvironmentParameters = {
  name: "Dogfood",
  portalUrl: "http://go.microsoft.com/fwlink/?LinkId=254433",
  managementEndpointUrl: "https://management.core.windows.net",
  resourceManagerEndpointUrl: "https://management.azure.com/",
  activeDirectoryEndpointUrl: "https://login.microsoftonline.com/",
  activeDirectoryResourceId: "https://management.core.windows.net/"
};
Environment.add(df);
let dfoodEnv = Environment.get("Dogfood");
console.log(dfoodEnv);
console.log(`Accessing the custom environment info: ${(<any>Environment)["Dogfood"].managementEndpointUrl}`);
```

### Contributing

This project welcomes contributions and suggestions.  Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

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