Skip to main content

GetRecordSet

Returns the specified record set.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const GetDnsZoneRecordSetRequest =
cloudApi.dns.dns_zone_service.GetDnsZoneRecordSetRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.DnsZoneServiceClient);

const result = await client.getRecordSet(
GetDnsZoneRecordSetRequest.fromPartial({
// dnsZoneId: "dnsZoneId",
name: "name",
type: "type",
})
);
console.log(result);
})();

GetDnsZoneRecordSetRequest

dnsZoneId : string

ID of the DNS zone to get record set from.

To get a DNS zone ID, make a DnsZoneService.List request.

name : string

Name of the record set.

type : string

Type of the record set.

RecordSet

A record set. For details about the concept, see Resource record.

name : string

Domain name.

type : string

Record type.

ttl : int64

Time to live in seconds.

data : string

Data of the record set.