New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

azure-mgmt-subscription

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azure-mgmt-subscription - npm Package Compare versions

Comparing version 0.9.14 to 0.9.15

253

lib/subscriptionClient.js

@@ -117,3 +117,4 @@ /* jshint latedef:false */

// Construct URL
var url2 = '/subscriptions';
var url2 = '';
url2 = url2 + '/subscriptions';
var baseUrl = this.client.baseUri;

@@ -155,130 +156,132 @@ // Trim '/' character from the end of baseUrl and beginning of url.

// Deserialize Response
var responseContent = body;
result = { subscriptions: [] };
var options = {};
options.trim = false;
options.strict = false;
return xml.parseString(responseContent, options, function (err2, responseDoc) {
if (err2 !== null && err2 !== undefined) {
return callback(err2);
}
var subscriptionsElement = js2xml.getElement(responseDoc, responseDoc, 'SUBSCRIPTIONS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (subscriptionsElement !== null && subscriptionsElement !== undefined) {
if (statusCode === 200) {
var responseContent = body;
result = { subscriptions: [] };
var options = {};
options.trim = false;
options.strict = false;
xml.parseString(responseContent, options, function (err2, responseDoc) {
if (err2 !== null && err2 !== undefined) {
return callback(err2);
}
var subscriptionsElement = js2xml.getElement(responseDoc, responseDoc, 'SUBSCRIPTIONS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (subscriptionsElement !== null && subscriptionsElement !== undefined) {
for (var loweredIndex1 = 0; loweredIndex1 < js2xml.getElements(responseDoc, subscriptionsElement, 'SUBSCRIPTION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE').length; loweredIndex1 = loweredIndex1 + 1) {
var subscriptionsElement2 = js2xml.getElements(responseDoc, subscriptionsElement, 'SUBSCRIPTION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE')[loweredIndex1];
var subscriptionInstance = {};
result.subscriptions.push(subscriptionInstance);
var subscriptionIDElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'SUBSCRIPTIONID', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (subscriptionIDElement !== null && subscriptionIDElement !== undefined) {
var subscriptionIDInstance = subscriptionIDElement;
subscriptionInstance.subscriptionId = subscriptionIDInstance;
if (subscriptionsElement !== null && subscriptionsElement !== undefined) {
for (var loweredIndex1 = 0; loweredIndex1 < js2xml.getElements(responseDoc, subscriptionsElement, 'SUBSCRIPTION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE').length; loweredIndex1 = loweredIndex1 + 1) {
var subscriptionsElement2 = js2xml.getElements(responseDoc, subscriptionsElement, 'SUBSCRIPTION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE')[loweredIndex1];
var subscriptionInstance = {};
result.subscriptions.push(subscriptionInstance);
var subscriptionIDElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'SUBSCRIPTIONID', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (subscriptionIDElement !== null && subscriptionIDElement !== undefined) {
var subscriptionIDInstance = subscriptionIDElement;
subscriptionInstance.subscriptionId = subscriptionIDInstance;
}
var subscriptionNameElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'SUBSCRIPTIONNAME', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (subscriptionNameElement !== null && subscriptionNameElement !== undefined) {
var subscriptionNameInstance = subscriptionNameElement;
subscriptionInstance.subscriptionName = subscriptionNameInstance;
}
var subscriptionStatusElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'SUBSCRIPTIONSTATUS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (subscriptionStatusElement !== null && subscriptionStatusElement !== undefined && subscriptionStatusElement.length !== 0) {
var subscriptionStatusInstance = subscriptionStatusElement;
subscriptionInstance.subscriptionStatus = subscriptionStatusInstance;
}
var accountAdminLiveEmailIdElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'ACCOUNTADMINLIVEEMAILID', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (accountAdminLiveEmailIdElement !== null && accountAdminLiveEmailIdElement !== undefined) {
var accountAdminLiveEmailIdInstance = accountAdminLiveEmailIdElement;
subscriptionInstance.accountAdminLiveEmailId = accountAdminLiveEmailIdInstance;
}
var serviceAdminLiveEmailIdElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'SERVICEADMINLIVEEMAILID', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (serviceAdminLiveEmailIdElement !== null && serviceAdminLiveEmailIdElement !== undefined) {
var serviceAdminLiveEmailIdInstance = serviceAdminLiveEmailIdElement;
subscriptionInstance.serviceAdminLiveEmailId = serviceAdminLiveEmailIdInstance;
}
var maxCoreCountElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXCORECOUNT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (maxCoreCountElement !== null && maxCoreCountElement !== undefined && maxCoreCountElement.length !== 0) {
var maxCoreCountInstance = parseInt(maxCoreCountElement, 10);
subscriptionInstance.maximumCoreCount = maxCoreCountInstance;
}
var maxStorageAccountsElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXSTORAGEACCOUNTS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (maxStorageAccountsElement !== null && maxStorageAccountsElement !== undefined && maxStorageAccountsElement.length !== 0) {
var maxStorageAccountsInstance = parseInt(maxStorageAccountsElement, 10);
subscriptionInstance.maximumStorageAccounts = maxStorageAccountsInstance;
}
var maxHostedServicesElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXHOSTEDSERVICES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (maxHostedServicesElement !== null && maxHostedServicesElement !== undefined && maxHostedServicesElement.length !== 0) {
var maxHostedServicesInstance = parseInt(maxHostedServicesElement, 10);
subscriptionInstance.maximumHostedServices = maxHostedServicesInstance;
}
var currentCoreCountElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'CURRENTCORECOUNT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (currentCoreCountElement !== null && currentCoreCountElement !== undefined && currentCoreCountElement.length !== 0) {
var currentCoreCountInstance = parseInt(currentCoreCountElement, 10);
subscriptionInstance.currentCoreCount = currentCoreCountInstance;
}
var currentStorageAccountsElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'CURRENTSTORAGEACCOUNTS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (currentStorageAccountsElement !== null && currentStorageAccountsElement !== undefined && currentStorageAccountsElement.length !== 0) {
var currentStorageAccountsInstance = parseInt(currentStorageAccountsElement, 10);
subscriptionInstance.currentStorageAccounts = currentStorageAccountsInstance;
}
var currentHostedServicesElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'CURRENTHOSTEDSERVICES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (currentHostedServicesElement !== null && currentHostedServicesElement !== undefined && currentHostedServicesElement.length !== 0) {
var currentHostedServicesInstance = parseInt(currentHostedServicesElement, 10);
subscriptionInstance.currentHostedServices = currentHostedServicesInstance;
}
var maxVirtualNetworkSitesElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXVIRTUALNETWORKSITES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (maxVirtualNetworkSitesElement !== null && maxVirtualNetworkSitesElement !== undefined && maxVirtualNetworkSitesElement.length !== 0) {
var maxVirtualNetworkSitesInstance = parseInt(maxVirtualNetworkSitesElement, 10);
subscriptionInstance.maximumVirtualNetworkSites = maxVirtualNetworkSitesInstance;
}
var maxLocalNetworkSitesElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXLOCALNETWORKSITES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (maxLocalNetworkSitesElement !== null && maxLocalNetworkSitesElement !== undefined && maxLocalNetworkSitesElement.length !== 0) {
var maxLocalNetworkSitesInstance = parseInt(maxLocalNetworkSitesElement, 10);
subscriptionInstance.maximumLocalNetworkSites = maxLocalNetworkSitesInstance;
}
var maxDnsServersElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXDNSSERVERS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (maxDnsServersElement !== null && maxDnsServersElement !== undefined && maxDnsServersElement.length !== 0) {
var maxDnsServersInstance = parseInt(maxDnsServersElement, 10);
subscriptionInstance.maximumDnsServers = maxDnsServersInstance;
}
var maxExtraVIPCountElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXEXTRAVIPCOUNT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (maxExtraVIPCountElement !== null && maxExtraVIPCountElement !== undefined && maxExtraVIPCountElement.length !== 0) {
var maxExtraVIPCountInstance = parseInt(maxExtraVIPCountElement, 10);
subscriptionInstance.maximumExtraVirtualIPCount = maxExtraVIPCountInstance;
}
var aADTenantIDElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'AADTENANTID', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (aADTenantIDElement !== null && aADTenantIDElement !== undefined) {
var aADTenantIDInstance = aADTenantIDElement;
subscriptionInstance.activeDirectoryTenantId = aADTenantIDInstance;
}
var createdTimeElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'CREATEDTIME', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (createdTimeElement !== null && createdTimeElement !== undefined && createdTimeElement.length !== 0) {
var createdTimeInstance = new Date(createdTimeElement);
subscriptionInstance.created = createdTimeInstance;
}
}
var subscriptionNameElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'SUBSCRIPTIONNAME', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (subscriptionNameElement !== null && subscriptionNameElement !== undefined) {
var subscriptionNameInstance = subscriptionNameElement;
subscriptionInstance.subscriptionName = subscriptionNameInstance;
}
var subscriptionStatusElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'SUBSCRIPTIONSTATUS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (subscriptionStatusElement !== null && subscriptionStatusElement !== undefined) {
var subscriptionStatusInstance = subscriptionStatusElement;
subscriptionInstance.subscriptionStatus = subscriptionStatusInstance;
}
var accountAdminLiveEmailIdElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'ACCOUNTADMINLIVEEMAILID', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (accountAdminLiveEmailIdElement !== null && accountAdminLiveEmailIdElement !== undefined) {
var accountAdminLiveEmailIdInstance = accountAdminLiveEmailIdElement;
subscriptionInstance.accountAdminLiveEmailId = accountAdminLiveEmailIdInstance;
}
var serviceAdminLiveEmailIdElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'SERVICEADMINLIVEEMAILID', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (serviceAdminLiveEmailIdElement !== null && serviceAdminLiveEmailIdElement !== undefined) {
var serviceAdminLiveEmailIdInstance = serviceAdminLiveEmailIdElement;
subscriptionInstance.serviceAdminLiveEmailId = serviceAdminLiveEmailIdInstance;
}
var maxCoreCountElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXCORECOUNT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (maxCoreCountElement !== null && maxCoreCountElement !== undefined) {
var maxCoreCountInstance = parseInt(maxCoreCountElement, 10);
subscriptionInstance.maximumCoreCount = maxCoreCountInstance;
}
var maxStorageAccountsElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXSTORAGEACCOUNTS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (maxStorageAccountsElement !== null && maxStorageAccountsElement !== undefined) {
var maxStorageAccountsInstance = parseInt(maxStorageAccountsElement, 10);
subscriptionInstance.maximumStorageAccounts = maxStorageAccountsInstance;
}
var maxHostedServicesElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXHOSTEDSERVICES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (maxHostedServicesElement !== null && maxHostedServicesElement !== undefined) {
var maxHostedServicesInstance = parseInt(maxHostedServicesElement, 10);
subscriptionInstance.maximumHostedServices = maxHostedServicesInstance;
}
var currentCoreCountElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'CURRENTCORECOUNT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (currentCoreCountElement !== null && currentCoreCountElement !== undefined) {
var currentCoreCountInstance = parseInt(currentCoreCountElement, 10);
subscriptionInstance.currentCoreCount = currentCoreCountInstance;
}
var currentStorageAccountsElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'CURRENTSTORAGEACCOUNTS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (currentStorageAccountsElement !== null && currentStorageAccountsElement !== undefined) {
var currentStorageAccountsInstance = parseInt(currentStorageAccountsElement, 10);
subscriptionInstance.currentStorageAccounts = currentStorageAccountsInstance;
}
var currentHostedServicesElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'CURRENTHOSTEDSERVICES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (currentHostedServicesElement !== null && currentHostedServicesElement !== undefined) {
var currentHostedServicesInstance = parseInt(currentHostedServicesElement, 10);
subscriptionInstance.currentHostedServices = currentHostedServicesInstance;
}
var maxVirtualNetworkSitesElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXVIRTUALNETWORKSITES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (maxVirtualNetworkSitesElement !== null && maxVirtualNetworkSitesElement !== undefined) {
var maxVirtualNetworkSitesInstance = parseInt(maxVirtualNetworkSitesElement, 10);
subscriptionInstance.maximumVirtualNetworkSites = maxVirtualNetworkSitesInstance;
}
var maxLocalNetworkSitesElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXLOCALNETWORKSITES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (maxLocalNetworkSitesElement !== null && maxLocalNetworkSitesElement !== undefined) {
var maxLocalNetworkSitesInstance = parseInt(maxLocalNetworkSitesElement, 10);
subscriptionInstance.maximumLocalNetworkSites = maxLocalNetworkSitesInstance;
}
var maxDnsServersElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXDNSSERVERS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (maxDnsServersElement !== null && maxDnsServersElement !== undefined) {
var maxDnsServersInstance = parseInt(maxDnsServersElement, 10);
subscriptionInstance.maximumDnsServers = maxDnsServersInstance;
}
var maxExtraVIPCountElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXEXTRAVIPCOUNT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (maxExtraVIPCountElement !== null && maxExtraVIPCountElement !== undefined) {
var maxExtraVIPCountInstance = parseInt(maxExtraVIPCountElement, 10);
subscriptionInstance.maximumExtraVirtualIPCount = maxExtraVIPCountInstance;
}
var aADTenantIDElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'AADTENANTID', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (aADTenantIDElement !== null && aADTenantIDElement !== undefined) {
var aADTenantIDInstance = aADTenantIDElement;
subscriptionInstance.activeDirectoryTenantId = aADTenantIDInstance;
}
var createdTimeElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'CREATEDTIME', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
if (createdTimeElement !== null && createdTimeElement !== undefined) {
var createdTimeInstance = new Date(createdTimeElement);
subscriptionInstance.created = createdTimeInstance;
}
}
}
}
result.statusCode = statusCode;
result.requestId = response.headers['x-ms-request-id'];
return callback(null, result);
});
});
}
result.statusCode = statusCode;
result.requestId = response.headers['x-ms-request-id'];
return callback(null, result);
});

@@ -285,0 +288,0 @@ };

@@ -13,3 +13,3 @@ {

],
"version": "0.9.14",
"version": "0.9.15",
"description": "Microsoft Azure Subscription Management Client Library for node",

@@ -16,0 +16,0 @@ "tags": [

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