Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
@azure/ms-rest-azure-env
Advanced tools
Isomorphic library that provides Azure endpoints for different Azure Environments/Clouds.
@azure/ms-rest-azure-env is a Node.js package that provides a set of Azure environments and their associated metadata. This package is useful for developers who need to interact with different Azure environments (such as Azure public cloud, Azure China cloud, etc.) in a consistent manner.
Get Azure Environment Metadata
This feature allows you to retrieve metadata for a specific Azure environment. The code sample demonstrates how to get metadata for the Azure public cloud environment.
const msRestAzureEnv = require('@azure/ms-rest-azure-env');
const azureEnvironment = msRestAzureEnv.AzureEnvironment.Azure;
console.log(azureEnvironment);
List All Azure Environments
This feature allows you to list all available Azure environments. The code sample demonstrates how to retrieve and print all the environments provided by the package.
const msRestAzureEnv = require('@azure/ms-rest-azure-env');
const environments = msRestAzureEnv.Environment;
console.log(environments);
Custom Azure Environment
This feature allows you to define a custom Azure environment with specific endpoints. The code sample demonstrates how to create and print a custom Azure environment.
const msRestAzureEnv = require('@azure/ms-rest-azure-env');
const customEnvironment = {
name: 'MyCustomAzureEnv',
portalUrl: 'https://portal.mycustomazure.com',
managementEndpointUrl: 'https://management.mycustomazure.com',
resourceManagerEndpointUrl: 'https://management.mycustomazure.com',
activeDirectoryEndpointUrl: 'https://login.mycustomazure.com',
activeDirectoryResourceId: 'https://management.mycustomazure.com'
};
console.log(customEnvironment);
@azure/identity provides Azure Active Directory token authentication support across the Azure SDK. It offers a variety of credential types to authenticate requests to Azure services, making it more focused on authentication compared to @azure/ms-rest-azure-env.
@azure/ms-rest-js is a core library for the Azure SDK for JavaScript. It provides HTTP client functionalities, request/response handling, and other utilities. While it offers broader functionalities, it does not specifically focus on Azure environment metadata like @azure/ms-rest-azure-env.
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.
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}`);
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.
FAQs
Isomorphic library that provides Azure endpoints for different Azure Environments/Clouds.
We found that @azure/ms-rest-azure-env demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.