0

如何列出所有SubscriptionIdsAzure 帐户?我目前拥有的是这样的:

const sub = require('azure-asm-subscription');

//getting the credentials

const subclient = sub.createSubscriptionClient(credentials);
subclient.subscriptions.list((err, data) => {
  console.log(data);
});

但这会返回一个status code of 200(表示一切正常),但订阅数组是空的。但他们至少是一个订阅。

4

1 回答 1

1

好的,我找到了解决方案:

const ArmResource = require('azure-arm-resource');

const subClient = new ArmResource.SubscriptionClient(credentials);
subClient.subscriptions.list().then(data => {
  console.log(data);
})
于 2018-06-08T08:53:48.970 回答