適用於 Node.js 的 Azure DNS 模組Azure DNS modules for Node.js

使用 Azure DNS 在 Azure 中代管您的網域名稱系統 (DNS) 網域。Use Azure DNS to host your Domain Name System (DNS) domains in Azure. 您可以使用其他 Azure 服務所使用的同一組認證、帳單及支援合約來管理您的 DNS 記錄。Manage your DNS records using the same credentials and billing and support contract as your other Azure services. 將 Azure 服務與對應的 DNS 更新相整合,讓您的端對端部署程序得以簡化。Seamlessly integrate Azure-based services with corresponding DNS updates and streamline your end-to-end deployment process.

管理封裝Management package

安裝 npm 模組Install the npm module

安裝 Azure DNS npm 模組Install the Azure DNS npm module

npm install azure-arm-dns

範例Example

此範例會列出 DNS 管理區域。This example lists the DNS Management zones.

const msRestAzure = require('ms-rest-azure');
const DNSManagement = require('azure-arm-dns');

const subscriptionId = 'your-subscription-id';

msRestAzure
  .interactiveLogin()
  .then(credentials => {
    const client = new DNSManagement(credentials, subscriptionId);
    return client.zones.list();
  })
  .then(zones => console.dir(zones, { depth: null, colors: true }))
  .catch(err => console.log(err));

範例Samples

深入探索可在應用程式中使用的 Node.js 程式碼範例Explore more sample Node.js code you can use in your apps.