Provides information about endpoints in different Azure Environments and a mechanism to add custom Azure Environment
Перейти к файлу
microsoft-github-policy-service[bot] 670db62feb
Microsoft mandatory file
2023-01-24 16:50:58 +00:00
.vscode initial commit 2017-09-06 16:48:57 -07:00
lib Remove leading dot from azure environment settings 2019-07-11 10:18:13 -07:00
test Fix weird noise code in tests 2018-10-04 15:52:27 -07:00
.gitattributes initial commit 2017-09-06 16:48:57 -07:00
.gitignore Add better sourcemap support for debugging 2018-11-14 13:21:16 -08:00
Changelog.md Rename NPM package to @azure/ms-rest-azure-env (#13) 2018-11-12 09:42:06 -08:00
LICENSE Initial commit 2017-09-06 09:50:41 -07:00
README.md Update missing sample imports (#18) 2018-11-13 10:22:15 -08:00
SECURITY.md Microsoft mandatory file 2023-01-24 16:50:58 +00:00
azure-pipelines.yml Add Azure Pipelines configuration (#15) 2018-11-12 09:45:36 -08:00
package.json Remove leading dot from azure environment settings 2019-07-11 10:18:13 -07:00
rollup.config.js Add better sourcemap support for debugging 2018-11-14 13:21:16 -08:00
tsconfig.es.json Add rollup config 2018-10-04 15:30:14 -07:00
tsconfig.json Add rollup config 2018-10-04 15:30:14 -07:00
tslint.json initial commit 2017-09-06 16:48:57 -07:00

README.md

ms-rest-azure-env Build Status

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

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. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.