UNPKG

@azure/arm-dns

Version:
31 lines 1.39 kB
/* * Copyright (c) Microsoft Corporation. * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { __awaiter } from "tslib"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { DnsManagementClient } from "@azure/arm-dns"; import { DefaultAzureCredential } from "@azure/identity"; /** * This sample demonstrates how to Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone. * * @summary Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone. * x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/DeleteZone.json */ function deleteZone() { return __awaiter(this, void 0, void 0, function* () { const subscriptionId = "subid"; const resourceGroupName = "rg1"; const zoneName = "zone1"; const credential = new DefaultAzureCredential(); const client = new DnsManagementClient(credential, subscriptionId); const result = yield client.zones.beginDeleteAndWait(resourceGroupName, zoneName); console.log(result); }); } deleteZone().catch(console.error); //# sourceMappingURL=zonesDeleteSample.js.map