1. Packages
  2. Ibm Provider
  3. API Docs
  4. getDnsResourceRecords
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.getDnsResourceRecords

Explore with Pulumi AI

Retrieve details about existing IBM Cloud private domain name service records. For more information, about DNS records, see managing DNS record.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";

const dsPdnsResourceRecords = ibm.getDnsResourceRecords({
    instanceId: "resource_instance_guid",
    zoneId: "resource_dns_resource_records_zone_id",
});
Copy
import pulumi
import pulumi_ibm as ibm

ds_pdns_resource_records = ibm.get_dns_resource_records(instance_id="resource_instance_guid",
    zone_id="resource_dns_resource_records_zone_id")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ibm.GetDnsResourceRecords(ctx, &ibm.GetDnsResourceRecordsArgs{
			InstanceId: "resource_instance_guid",
			ZoneId:     "resource_dns_resource_records_zone_id",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    var dsPdnsResourceRecords = Ibm.GetDnsResourceRecords.Invoke(new()
    {
        InstanceId = "resource_instance_guid",
        ZoneId = "resource_dns_resource_records_zone_id",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetDnsResourceRecordsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var dsPdnsResourceRecords = IbmFunctions.getDnsResourceRecords(GetDnsResourceRecordsArgs.builder()
            .instanceId("resource_instance_guid")
            .zoneId("resource_dns_resource_records_zone_id")
            .build());

    }
}
Copy
variables:
  dsPdnsResourceRecords:
    fn::invoke:
      function: ibm:getDnsResourceRecords
      arguments:
        instanceId: resource_instance_guid
        zoneId: resource_dns_resource_records_zone_id
Copy

Using getDnsResourceRecords

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getDnsResourceRecords(args: GetDnsResourceRecordsArgs, opts?: InvokeOptions): Promise<GetDnsResourceRecordsResult>
function getDnsResourceRecordsOutput(args: GetDnsResourceRecordsOutputArgs, opts?: InvokeOptions): Output<GetDnsResourceRecordsResult>
Copy
def get_dns_resource_records(id: Optional[str] = None,
                             instance_id: Optional[str] = None,
                             zone_id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetDnsResourceRecordsResult
def get_dns_resource_records_output(id: Optional[pulumi.Input[str]] = None,
                             instance_id: Optional[pulumi.Input[str]] = None,
                             zone_id: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetDnsResourceRecordsResult]
Copy
func GetDnsResourceRecords(ctx *Context, args *GetDnsResourceRecordsArgs, opts ...InvokeOption) (*GetDnsResourceRecordsResult, error)
func GetDnsResourceRecordsOutput(ctx *Context, args *GetDnsResourceRecordsOutputArgs, opts ...InvokeOption) GetDnsResourceRecordsResultOutput
Copy

> Note: This function is named GetDnsResourceRecords in the Go SDK.

public static class GetDnsResourceRecords 
{
    public static Task<GetDnsResourceRecordsResult> InvokeAsync(GetDnsResourceRecordsArgs args, InvokeOptions? opts = null)
    public static Output<GetDnsResourceRecordsResult> Invoke(GetDnsResourceRecordsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDnsResourceRecordsResult> getDnsResourceRecords(GetDnsResourceRecordsArgs args, InvokeOptions options)
public static Output<GetDnsResourceRecordsResult> getDnsResourceRecords(GetDnsResourceRecordsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ibm:index/getDnsResourceRecords:getDnsResourceRecords
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

InstanceId This property is required. string
The GUID of the private DNS service instance.
ZoneId This property is required. string
The ID of the zone that you added to the private DNS service instance.
Id string
(String) The unique identifier of the private DNS resource record.
InstanceId This property is required. string
The GUID of the private DNS service instance.
ZoneId This property is required. string
The ID of the zone that you added to the private DNS service instance.
Id string
(String) The unique identifier of the private DNS resource record.
instanceId This property is required. String
The GUID of the private DNS service instance.
zoneId This property is required. String
The ID of the zone that you added to the private DNS service instance.
id String
(String) The unique identifier of the private DNS resource record.
instanceId This property is required. string
The GUID of the private DNS service instance.
zoneId This property is required. string
The ID of the zone that you added to the private DNS service instance.
id string
(String) The unique identifier of the private DNS resource record.
instance_id This property is required. str
The GUID of the private DNS service instance.
zone_id This property is required. str
The ID of the zone that you added to the private DNS service instance.
id str
(String) The unique identifier of the private DNS resource record.
instanceId This property is required. String
The GUID of the private DNS service instance.
zoneId This property is required. String
The ID of the zone that you added to the private DNS service instance.
id String
(String) The unique identifier of the private DNS resource record.

getDnsResourceRecords Result

The following output properties are available:

DnsResourceRecords List<GetDnsResourceRecordsDnsResourceRecord>
(List) A list of all private domain name service resource records.
Id string
(String) The unique identifier of the private DNS resource record.
InstanceId string
ZoneId string
DnsResourceRecords []GetDnsResourceRecordsDnsResourceRecord
(List) A list of all private domain name service resource records.
Id string
(String) The unique identifier of the private DNS resource record.
InstanceId string
ZoneId string
dnsResourceRecords List<GetDnsResourceRecordsDnsResourceRecord>
(List) A list of all private domain name service resource records.
id String
(String) The unique identifier of the private DNS resource record.
instanceId String
zoneId String
dnsResourceRecords GetDnsResourceRecordsDnsResourceRecord[]
(List) A list of all private domain name service resource records.
id string
(String) The unique identifier of the private DNS resource record.
instanceId string
zoneId string
dns_resource_records Sequence[GetDnsResourceRecordsDnsResourceRecord]
(List) A list of all private domain name service resource records.
id str
(String) The unique identifier of the private DNS resource record.
instance_id str
zone_id str
dnsResourceRecords List<Property Map>
(List) A list of all private domain name service resource records.
id String
(String) The unique identifier of the private DNS resource record.
instanceId String
zoneId String

Supporting Types

GetDnsResourceRecordsDnsResourceRecord

Id This property is required. string
(String) The unique identifier of the private DNS resource record.
Name This property is required. string
(String) The name of a private DNS resource record.
Rdata This property is required. string
(String) The resource data of a private DNS resource record.
Ttl This property is required. double
(Integer) The time-to-live value of the DNS resource record.
Type This property is required. string
(String) The type of the private DNS resource record. Supported values are A, AAAA, CNAME, PTR, TXT, MX, and SRV.
Id This property is required. string
(String) The unique identifier of the private DNS resource record.
Name This property is required. string
(String) The name of a private DNS resource record.
Rdata This property is required. string
(String) The resource data of a private DNS resource record.
Ttl This property is required. float64
(Integer) The time-to-live value of the DNS resource record.
Type This property is required. string
(String) The type of the private DNS resource record. Supported values are A, AAAA, CNAME, PTR, TXT, MX, and SRV.
id This property is required. String
(String) The unique identifier of the private DNS resource record.
name This property is required. String
(String) The name of a private DNS resource record.
rdata This property is required. String
(String) The resource data of a private DNS resource record.
ttl This property is required. Double
(Integer) The time-to-live value of the DNS resource record.
type This property is required. String
(String) The type of the private DNS resource record. Supported values are A, AAAA, CNAME, PTR, TXT, MX, and SRV.
id This property is required. string
(String) The unique identifier of the private DNS resource record.
name This property is required. string
(String) The name of a private DNS resource record.
rdata This property is required. string
(String) The resource data of a private DNS resource record.
ttl This property is required. number
(Integer) The time-to-live value of the DNS resource record.
type This property is required. string
(String) The type of the private DNS resource record. Supported values are A, AAAA, CNAME, PTR, TXT, MX, and SRV.
id This property is required. str
(String) The unique identifier of the private DNS resource record.
name This property is required. str
(String) The name of a private DNS resource record.
rdata This property is required. str
(String) The resource data of a private DNS resource record.
ttl This property is required. float
(Integer) The time-to-live value of the DNS resource record.
type This property is required. str
(String) The type of the private DNS resource record. Supported values are A, AAAA, CNAME, PTR, TXT, MX, and SRV.
id This property is required. String
(String) The unique identifier of the private DNS resource record.
name This property is required. String
(String) The name of a private DNS resource record.
rdata This property is required. String
(String) The resource data of a private DNS resource record.
ttl This property is required. Number
(Integer) The time-to-live value of the DNS resource record.
type This property is required. String
(String) The type of the private DNS resource record. Supported values are A, AAAA, CNAME, PTR, TXT, MX, and SRV.

Package Details

Repository
ibm ibm-cloud/terraform-provider-ibm
License
Notes
This Pulumi package is based on the ibm Terraform Provider.