Retrieves the DNS zone belonging to the domain from Google's Cloud DNS.
Important: This call requires an account level API key and cannot be authenticated with the standard authorization header.
function getDnsZone(domainName: string): Promise<DnsZone>;
Domain to retrieve the DNS zone for.
import { createClient, ApiKeyStrategy } from "@wix/sdk";
import { domainDns } from "@wix/domains";
const wixClient = createClient({
modules: { domainDns },
auth: ApiKeyStrategy({
siteId: "MY-SITE-ID",
apiKey: "MY-API-KEY",
}),
});
async function getDnsZone(domainName) {
const response = await domainDns.getDnsZone(domainName);
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.