Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@azure/arm-recoveryservices
Advanced tools
RecoveryServicesClient Library with typescript type definitions for node.js and browser.
This package contains an isomorphic SDK for RecoveryServicesClient.
npm install @azure/arm-recoveryservices
"@azure/ms-rest-nodeauth": "^3.0.0"
.npm install @azure/ms-rest-nodeauth@"^3.0.0"
While the below sample uses the interactive login, other authentication options can be found in the README.md file of @azure/ms-rest-nodeauth package
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
const { RecoveryServicesClient } = require("@azure/arm-recoveryservices");
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new RecoveryServicesClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const vaultName = "testvaultName";
client.replicationUsages.list(resourceGroupName, vaultName).then((result) => {
console.log("The result is:");
console.log(result);
});
}).catch((err) => {
console.error(err);
});
npm install @azure/ms-rest-browserauth
See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
<!DOCTYPE html>
<html lang="en">
<head>
<title>@azure/arm-recoveryservices sample</title>
<script src="node_modules/@azure/ms-rest-js/dist/msRest.browser.js"></script>
<script src="node_modules/@azure/ms-rest-azure-js/dist/msRestAzure.js"></script>
<script src="node_modules/@azure/ms-rest-browserauth/dist/msAuth.js"></script>
<script src="node_modules/@azure/arm-recoveryservices/dist/arm-recoveryservices.js"></script>
<script type="text/javascript">
const subscriptionId = "<Subscription_Id>";
const authManager = new msAuth.AuthManager({
clientId: "<client id for your Azure AD app>",
tenant: "<optional tenant for your organization>"
});
authManager.finalizeLogin().then((res) => {
if (!res.isLoggedIn) {
// may cause redirects
authManager.login();
}
const client = new Azure.ArmRecoveryservices.RecoveryServicesClient(res.creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const vaultName = "testvaultName";
client.replicationUsages.list(resourceGroupName, vaultName).then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
console.log("An error occurred:");
console.error(err);
});
});
</script>
</head>
<body></body>
</html>
FAQs
A generated SDK for RecoveryServicesClient.
The npm package @azure/arm-recoveryservices receives a total of 12,884 weekly downloads. As such, @azure/arm-recoveryservices popularity was classified as popular.
We found that @azure/arm-recoveryservices demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.