我正在尝试使用 Nodejs 与 Azure China Resources 进行交互。
但是找不到如何使用 nodejs SDK 对 Azure 中国的应用程序进行身份验证。
试过了@azure/arm-storage
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import { StorageManagementClient, StorageManagementModels, StorageManagementMappers } from "@azure/arm-storage";
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new StorageManagementClient(creds, subscriptionId);
client.operations.list().then((result) => {
console.log("The result is:");
console.log(result);
});
}).catch((err) => {
console.error(err);
});