@azure/arm-dns
Version:
A generated SDK for DnsManagementClient.
32 lines • 1.42 kB
JavaScript
/*
* 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 Creates or updates a DNS zone. Does not modify DNS records within the zone.
*
* @summary Creates or updates a DNS zone. Does not modify DNS records within the zone.
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/CreateOrUpdateZone.json
*/
function createZone() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "subid";
const resourceGroupName = "rg1";
const zoneName = "zone1";
const parameters = { location: "Global", tags: { key1: "value1" } };
const credential = new DefaultAzureCredential();
const client = new DnsManagementClient(credential, subscriptionId);
const result = yield client.zones.createOrUpdate(resourceGroupName, zoneName, parameters);
console.log(result);
});
}
createZone().catch(console.error);
//# sourceMappingURL=zonesCreateOrUpdateSample.js.map