Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ms-rest-azure

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ms-rest-azure

Client Runtime for Node.js Azure client libraries generated using AutoRest

  • 3.0.1
  • npm
  • Socket score

Version published
Weekly downloads
132K
decreased by-44.41%
Maintainers
1
Weekly downloads
 
Created

What is ms-rest-azure?

The ms-rest-azure npm package is a library for Node.js that provides authentication and client creation functionalities for Azure services. It simplifies the process of interacting with Azure resources by handling the complexities of authentication and service client management.

What are ms-rest-azure's main functionalities?

Authentication with Azure

This feature allows you to authenticate with Azure using a service principal. The code sample demonstrates how to log in using a client ID, secret, and domain.

const msRestAzure = require('ms-rest-azure');
msRestAzure.loginWithServicePrincipalSecret(clientId, secret, domain, (err, credentials) => {
  if (err) return console.log(err);
  console.log('Authenticated successfully');
});

Creating a Resource Management Client

This feature allows you to create a client for managing Azure resources. The code sample shows how to create a Resource Management Client after authenticating with Azure.

const msRestAzure = require('ms-rest-azure');
const AzureArmResource = require('azure-arm-resource');
msRestAzure.loginWithServicePrincipalSecret(clientId, secret, domain, (err, credentials) => {
  if (err) return console.log(err);
  const client = new AzureArmResource.ResourceManagementClient(credentials, subscriptionId);
  console.log('Resource Management Client created successfully');
});

Listing Resource Groups

This feature allows you to list all resource groups in a subscription. The code sample demonstrates how to list resource groups using the Resource Management Client.

const msRestAzure = require('ms-rest-azure');
const AzureArmResource = require('azure-arm-resource');
msRestAzure.loginWithServicePrincipalSecret(clientId, secret, domain, (err, credentials) => {
  if (err) return console.log(err);
  const client = new AzureArmResource.ResourceManagementClient(credentials, subscriptionId);
  client.resourceGroups.list((err, result) => {
    if (err) return console.log(err);
    console.log('Resource Groups:', result);
  });
});

Other packages similar to ms-rest-azure

Keywords

FAQs

Package last updated on 10 Nov 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc