1. Packages
  2. Ibm Provider
  3. API Docs
  4. getCisDnsRecords
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getCisDnsRecords

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Retrieve information about an IBM Cloud Internet Services domain name service record. For more information, about DNS records, refer to Managing DNS records.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const test = ibm.getCisDnsRecords({
        cisId: _var.cis_crn,
        domainId: _var.zone_id,
        file: "records.txt",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    test = ibm.get_cis_dns_records(cis_id=var["cis_crn"],
        domain_id=var["zone_id"],
        file="records.txt")
    
    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.GetCisDnsRecords(ctx, &ibm.GetCisDnsRecordsArgs{
    			CisId:    _var.Cis_crn,
    			DomainId: _var.Zone_id,
    			File:     pulumi.StringRef("records.txt"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Ibm.GetCisDnsRecords.Invoke(new()
        {
            CisId = @var.Cis_crn,
            DomainId = @var.Zone_id,
            File = "records.txt",
        });
    
    });
    
    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.GetCisDnsRecordsArgs;
    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 test = IbmFunctions.getCisDnsRecords(GetCisDnsRecordsArgs.builder()
                .cisId(var_.cis_crn())
                .domainId(var_.zone_id())
                .file("records.txt")
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: ibm:getCisDnsRecords
          arguments:
            cisId: ${var.cis_crn}
            domainId: ${var.zone_id}
            file: records.txt
    

    Using getCisDnsRecords

    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 getCisDnsRecords(args: GetCisDnsRecordsArgs, opts?: InvokeOptions): Promise<GetCisDnsRecordsResult>
    function getCisDnsRecordsOutput(args: GetCisDnsRecordsOutputArgs, opts?: InvokeOptions): Output<GetCisDnsRecordsResult>
    def get_cis_dns_records(cis_id: Optional[str] = None,
                            domain_id: Optional[str] = None,
                            file: Optional[str] = None,
                            id: Optional[str] = None,
                            timeouts: Optional[GetCisDnsRecordsTimeouts] = None,
                            opts: Optional[InvokeOptions] = None) -> GetCisDnsRecordsResult
    def get_cis_dns_records_output(cis_id: Optional[pulumi.Input[str]] = None,
                            domain_id: Optional[pulumi.Input[str]] = None,
                            file: Optional[pulumi.Input[str]] = None,
                            id: Optional[pulumi.Input[str]] = None,
                            timeouts: Optional[pulumi.Input[GetCisDnsRecordsTimeoutsArgs]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetCisDnsRecordsResult]
    func GetCisDnsRecords(ctx *Context, args *GetCisDnsRecordsArgs, opts ...InvokeOption) (*GetCisDnsRecordsResult, error)
    func GetCisDnsRecordsOutput(ctx *Context, args *GetCisDnsRecordsOutputArgs, opts ...InvokeOption) GetCisDnsRecordsResultOutput

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

    public static class GetCisDnsRecords 
    {
        public static Task<GetCisDnsRecordsResult> InvokeAsync(GetCisDnsRecordsArgs args, InvokeOptions? opts = null)
        public static Output<GetCisDnsRecordsResult> Invoke(GetCisDnsRecordsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCisDnsRecordsResult> getCisDnsRecords(GetCisDnsRecordsArgs args, InvokeOptions options)
    public static Output<GetCisDnsRecordsResult> getCisDnsRecords(GetCisDnsRecordsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getCisDnsRecords:getCisDnsRecords
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CisId string
    The ID of the IBM Cloud Internet Services instance on which zones were created.
    DomainId string
    The resource domain ID of the DNS on which zones were created.
    File string
    The file that DNS records to be exported.
    Id string
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    Timeouts GetCisDnsRecordsTimeouts
    CisId string
    The ID of the IBM Cloud Internet Services instance on which zones were created.
    DomainId string
    The resource domain ID of the DNS on which zones were created.
    File string
    The file that DNS records to be exported.
    Id string
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    Timeouts GetCisDnsRecordsTimeouts
    cisId String
    The ID of the IBM Cloud Internet Services instance on which zones were created.
    domainId String
    The resource domain ID of the DNS on which zones were created.
    file String
    The file that DNS records to be exported.
    id String
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    timeouts GetCisDnsRecordsTimeouts
    cisId string
    The ID of the IBM Cloud Internet Services instance on which zones were created.
    domainId string
    The resource domain ID of the DNS on which zones were created.
    file string
    The file that DNS records to be exported.
    id string
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    timeouts GetCisDnsRecordsTimeouts
    cis_id str
    The ID of the IBM Cloud Internet Services instance on which zones were created.
    domain_id str
    The resource domain ID of the DNS on which zones were created.
    file str
    The file that DNS records to be exported.
    id str
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    timeouts GetCisDnsRecordsTimeouts
    cisId String
    The ID of the IBM Cloud Internet Services instance on which zones were created.
    domainId String
    The resource domain ID of the DNS on which zones were created.
    file String
    The file that DNS records to be exported.
    id String
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    timeouts Property Map

    getCisDnsRecords Result

    The following output properties are available:

    CisDnsRecords List<GetCisDnsRecordsCisDnsRecord>
    (List) The list of DNS records.
    CisId string
    DomainId string
    Id string
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    File string
    Timeouts GetCisDnsRecordsTimeouts
    CisDnsRecords []GetCisDnsRecordsCisDnsRecord
    (List) The list of DNS records.
    CisId string
    DomainId string
    Id string
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    File string
    Timeouts GetCisDnsRecordsTimeouts
    cisDnsRecords List<GetCisDnsRecordsCisDnsRecord>
    (List) The list of DNS records.
    cisId String
    domainId String
    id String
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    file String
    timeouts GetCisDnsRecordsTimeouts
    cisDnsRecords GetCisDnsRecordsCisDnsRecord[]
    (List) The list of DNS records.
    cisId string
    domainId string
    id string
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    file string
    timeouts GetCisDnsRecordsTimeouts
    cis_dns_records Sequence[GetCisDnsRecordsCisDnsRecord]
    (List) The list of DNS records.
    cis_id str
    domain_id str
    id str
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    file str
    timeouts GetCisDnsRecordsTimeouts
    cisDnsRecords List<Property Map>
    (List) The list of DNS records.
    cisId String
    domainId String
    id String
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    file String
    timeouts Property Map

    Supporting Types

    GetCisDnsRecordsCisDnsRecord

    Content string
    CreatedOn string
    (String) The created date of the DNS record.
    Data Dictionary<string, string>
    (String) Map of attributes that constitute the record value. Only for LOC, CAA and SRV record types.
    Id string
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    ModifiedOn string
    (String) The modified date of the DNS record.
    Name string
    (String) The name of a DNS record.
    Priority double
    (String) The priority of the record. Mandatory field for SRV record type.
    Proxiable bool
    (String) Whether the record has option to set proxied.
    Proxied bool
    (String) Whether the record gets CIS's origin protection; defaults to false.
    RecordId string
    (String) The DNS record identifier.
    Ttl double
    Type string
    (String) The type of the DNS record to be created. Supported Record types are A, AAAA, CNAME, LOC, TXT, MX, SRV, SPF, NS, CAA.
    ZoneName string
    (String) The DNS zone name.
    Content string
    CreatedOn string
    (String) The created date of the DNS record.
    Data map[string]string
    (String) Map of attributes that constitute the record value. Only for LOC, CAA and SRV record types.
    Id string
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    ModifiedOn string
    (String) The modified date of the DNS record.
    Name string
    (String) The name of a DNS record.
    Priority float64
    (String) The priority of the record. Mandatory field for SRV record type.
    Proxiable bool
    (String) Whether the record has option to set proxied.
    Proxied bool
    (String) Whether the record gets CIS's origin protection; defaults to false.
    RecordId string
    (String) The DNS record identifier.
    Ttl float64
    Type string
    (String) The type of the DNS record to be created. Supported Record types are A, AAAA, CNAME, LOC, TXT, MX, SRV, SPF, NS, CAA.
    ZoneName string
    (String) The DNS zone name.
    content String
    createdOn String
    (String) The created date of the DNS record.
    data Map<String,String>
    (String) Map of attributes that constitute the record value. Only for LOC, CAA and SRV record types.
    id String
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    modifiedOn String
    (String) The modified date of the DNS record.
    name String
    (String) The name of a DNS record.
    priority Double
    (String) The priority of the record. Mandatory field for SRV record type.
    proxiable Boolean
    (String) Whether the record has option to set proxied.
    proxied Boolean
    (String) Whether the record gets CIS's origin protection; defaults to false.
    recordId String
    (String) The DNS record identifier.
    ttl Double
    type String
    (String) The type of the DNS record to be created. Supported Record types are A, AAAA, CNAME, LOC, TXT, MX, SRV, SPF, NS, CAA.
    zoneName String
    (String) The DNS zone name.
    content string
    createdOn string
    (String) The created date of the DNS record.
    data {[key: string]: string}
    (String) Map of attributes that constitute the record value. Only for LOC, CAA and SRV record types.
    id string
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    modifiedOn string
    (String) The modified date of the DNS record.
    name string
    (String) The name of a DNS record.
    priority number
    (String) The priority of the record. Mandatory field for SRV record type.
    proxiable boolean
    (String) Whether the record has option to set proxied.
    proxied boolean
    (String) Whether the record gets CIS's origin protection; defaults to false.
    recordId string
    (String) The DNS record identifier.
    ttl number
    type string
    (String) The type of the DNS record to be created. Supported Record types are A, AAAA, CNAME, LOC, TXT, MX, SRV, SPF, NS, CAA.
    zoneName string
    (String) The DNS zone name.
    content str
    created_on str
    (String) The created date of the DNS record.
    data Mapping[str, str]
    (String) Map of attributes that constitute the record value. Only for LOC, CAA and SRV record types.
    id str
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    modified_on str
    (String) The modified date of the DNS record.
    name str
    (String) The name of a DNS record.
    priority float
    (String) The priority of the record. Mandatory field for SRV record type.
    proxiable bool
    (String) Whether the record has option to set proxied.
    proxied bool
    (String) Whether the record gets CIS's origin protection; defaults to false.
    record_id str
    (String) The DNS record identifier.
    ttl float
    type str
    (String) The type of the DNS record to be created. Supported Record types are A, AAAA, CNAME, LOC, TXT, MX, SRV, SPF, NS, CAA.
    zone_name str
    (String) The DNS zone name.
    content String
    createdOn String
    (String) The created date of the DNS record.
    data Map<String>
    (String) Map of attributes that constitute the record value. Only for LOC, CAA and SRV record types.
    id String
    (String) The ID which consists of record ID, zone ID and CRN with : separator.
    modifiedOn String
    (String) The modified date of the DNS record.
    name String
    (String) The name of a DNS record.
    priority Number
    (String) The priority of the record. Mandatory field for SRV record type.
    proxiable Boolean
    (String) Whether the record has option to set proxied.
    proxied Boolean
    (String) Whether the record gets CIS's origin protection; defaults to false.
    recordId String
    (String) The DNS record identifier.
    ttl Number
    type String
    (String) The type of the DNS record to be created. Supported Record types are A, AAAA, CNAME, LOC, TXT, MX, SRV, SPF, NS, CAA.
    zoneName String
    (String) The DNS zone name.

    GetCisDnsRecordsTimeouts

    Read string
    Read string
    read String
    read string
    read str
    read String

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud