1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Dns
  5. getRrsets
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

oci.Dns.getRrsets

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

This data source provides the list of RRsets in Oracle Cloud Infrastructure DNS service.

Gets a list of all rrsets in the specified zone.

You can optionally filter the results using the listed parameters. When the zone name is provided as a path parameter and PRIVATE is used for the scope query parameter then the viewId parameter is required.

Example Usage

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

const testRrsets = oci.Dns.getRrsets({
    zoneNameOrId: testZone.id,
    domain: rrsetDomain,
    domainContains: rrsetDomain,
    rtype: rrsetRtype,
    scope: rrsetScope,
    viewId: testView.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_rrsets = oci.Dns.get_rrsets(zone_name_or_id=test_zone["id"],
    domain=rrset_domain,
    domain_contains=rrset_domain,
    rtype=rrset_rtype,
    scope=rrset_scope,
    view_id=test_view["id"])
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/dns"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dns.GetRrsets(ctx, &dns.GetRrsetsArgs{
			ZoneNameOrId:   testZone.Id,
			Domain:         pulumi.StringRef(rrsetDomain),
			DomainContains: pulumi.StringRef(rrsetDomain),
			Rtype:          pulumi.StringRef(rrsetRtype),
			Scope:          pulumi.StringRef(rrsetScope),
			ViewId:         pulumi.StringRef(testView.Id),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testRrsets = Oci.Dns.GetRrsets.Invoke(new()
    {
        ZoneNameOrId = testZone.Id,
        Domain = rrsetDomain,
        DomainContains = rrsetDomain,
        Rtype = rrsetRtype,
        Scope = rrsetScope,
        ViewId = testView.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Dns.DnsFunctions;
import com.pulumi.oci.Dns.inputs.GetRrsetsArgs;
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 testRrsets = DnsFunctions.getRrsets(GetRrsetsArgs.builder()
            .zoneNameOrId(testZone.id())
            .domain(rrsetDomain)
            .domainContains(rrsetDomain)
            .rtype(rrsetRtype)
            .scope(rrsetScope)
            .viewId(testView.id())
            .build());

    }
}
Copy
variables:
  testRrsets:
    fn::invoke:
      function: oci:Dns:getRrsets
      arguments:
        zoneNameOrId: ${testZone.id}
        domain: ${rrsetDomain}
        domainContains: ${rrsetDomain}
        rtype: ${rrsetRtype}
        scope: ${rrsetScope}
        viewId: ${testView.id}
Copy

Using getRrsets

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 getRrsets(args: GetRrsetsArgs, opts?: InvokeOptions): Promise<GetRrsetsResult>
function getRrsetsOutput(args: GetRrsetsOutputArgs, opts?: InvokeOptions): Output<GetRrsetsResult>
Copy
def get_rrsets(domain: Optional[str] = None,
               domain_contains: Optional[str] = None,
               filters: Optional[Sequence[_dns.GetRrsetsFilter]] = None,
               rtype: Optional[str] = None,
               scope: Optional[str] = None,
               view_id: Optional[str] = None,
               zone_name_or_id: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetRrsetsResult
def get_rrsets_output(domain: Optional[pulumi.Input[str]] = None,
               domain_contains: Optional[pulumi.Input[str]] = None,
               filters: Optional[pulumi.Input[Sequence[pulumi.Input[_dns.GetRrsetsFilterArgs]]]] = None,
               rtype: Optional[pulumi.Input[str]] = None,
               scope: Optional[pulumi.Input[str]] = None,
               view_id: Optional[pulumi.Input[str]] = None,
               zone_name_or_id: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetRrsetsResult]
Copy
func GetRrsets(ctx *Context, args *GetRrsetsArgs, opts ...InvokeOption) (*GetRrsetsResult, error)
func GetRrsetsOutput(ctx *Context, args *GetRrsetsOutputArgs, opts ...InvokeOption) GetRrsetsResultOutput
Copy

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

public static class GetRrsets 
{
    public static Task<GetRrsetsResult> InvokeAsync(GetRrsetsArgs args, InvokeOptions? opts = null)
    public static Output<GetRrsetsResult> Invoke(GetRrsetsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetRrsetsResult> getRrsets(GetRrsetsArgs args, InvokeOptions options)
public static Output<GetRrsetsResult> getRrsets(GetRrsetsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Dns/getRrsets:getRrsets
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ZoneNameOrId This property is required. string
The name or OCID of the target zone.
Domain string
The target fully-qualified domain name (FQDN) within the target zone.
DomainContains string
Matches any rrset whose fully-qualified domain name (FQDN) contains the provided value.
Filters Changes to this property will trigger replacement. List<GetRrsetsFilter>
Rtype string
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
Scope string
Specifies to operate only on resources that have a matching DNS scope.
ViewId string
The OCID of the view the zone is associated with. Required when accessing a private zone by name.
ZoneNameOrId This property is required. string
The name or OCID of the target zone.
Domain string
The target fully-qualified domain name (FQDN) within the target zone.
DomainContains string
Matches any rrset whose fully-qualified domain name (FQDN) contains the provided value.
Filters Changes to this property will trigger replacement. []GetRrsetsFilter
Rtype string
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
Scope string
Specifies to operate only on resources that have a matching DNS scope.
ViewId string
The OCID of the view the zone is associated with. Required when accessing a private zone by name.
zoneNameOrId This property is required. String
The name or OCID of the target zone.
domain String
The target fully-qualified domain name (FQDN) within the target zone.
domainContains String
Matches any rrset whose fully-qualified domain name (FQDN) contains the provided value.
filters Changes to this property will trigger replacement. List<GetRrsetsFilter>
rtype String
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
scope String
Specifies to operate only on resources that have a matching DNS scope.
viewId String
The OCID of the view the zone is associated with. Required when accessing a private zone by name.
zoneNameOrId This property is required. string
The name or OCID of the target zone.
domain string
The target fully-qualified domain name (FQDN) within the target zone.
domainContains string
Matches any rrset whose fully-qualified domain name (FQDN) contains the provided value.
filters Changes to this property will trigger replacement. GetRrsetsFilter[]
rtype string
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
scope string
Specifies to operate only on resources that have a matching DNS scope.
viewId string
The OCID of the view the zone is associated with. Required when accessing a private zone by name.
zone_name_or_id This property is required. str
The name or OCID of the target zone.
domain str
The target fully-qualified domain name (FQDN) within the target zone.
domain_contains str
Matches any rrset whose fully-qualified domain name (FQDN) contains the provided value.
filters Changes to this property will trigger replacement. Sequence[dns.GetRrsetsFilter]
rtype str
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
scope str
Specifies to operate only on resources that have a matching DNS scope.
view_id str
The OCID of the view the zone is associated with. Required when accessing a private zone by name.
zoneNameOrId This property is required. String
The name or OCID of the target zone.
domain String
The target fully-qualified domain name (FQDN) within the target zone.
domainContains String
Matches any rrset whose fully-qualified domain name (FQDN) contains the provided value.
filters Changes to this property will trigger replacement. List<Property Map>
rtype String
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
scope String
Specifies to operate only on resources that have a matching DNS scope.
viewId String
The OCID of the view the zone is associated with. Required when accessing a private zone by name.

getRrsets Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Rrsets List<GetRrsetsRrset>
The list of rrsets.
ZoneNameOrId string
Domain string
The fully qualified domain name where the record can be located.
DomainContains string
Filters List<GetRrsetsFilter>
Rtype string
The type of DNS record, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
Scope string
ViewId string
Id string
The provider-assigned unique ID for this managed resource.
Rrsets []GetRrsetsRrset
The list of rrsets.
ZoneNameOrId string
Domain string
The fully qualified domain name where the record can be located.
DomainContains string
Filters []GetRrsetsFilter
Rtype string
The type of DNS record, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
Scope string
ViewId string
id String
The provider-assigned unique ID for this managed resource.
rrsets List<GetRrsetsRrset>
The list of rrsets.
zoneNameOrId String
domain String
The fully qualified domain name where the record can be located.
domainContains String
filters List<GetRrsetsFilter>
rtype String
The type of DNS record, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
scope String
viewId String
id string
The provider-assigned unique ID for this managed resource.
rrsets GetRrsetsRrset[]
The list of rrsets.
zoneNameOrId string
domain string
The fully qualified domain name where the record can be located.
domainContains string
filters GetRrsetsFilter[]
rtype string
The type of DNS record, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
scope string
viewId string
id str
The provider-assigned unique ID for this managed resource.
rrsets Sequence[dns.GetRrsetsRrset]
The list of rrsets.
zone_name_or_id str
domain str
The fully qualified domain name where the record can be located.
domain_contains str
filters Sequence[dns.GetRrsetsFilter]
rtype str
The type of DNS record, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
scope str
view_id str
id String
The provider-assigned unique ID for this managed resource.
rrsets List<Property Map>
The list of rrsets.
zoneNameOrId String
domain String
The fully qualified domain name where the record can be located.
domainContains String
filters List<Property Map>
rtype String
The type of DNS record, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
scope String
viewId String

Supporting Types

GetRrsetsFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

GetRrsetsRrset

Domain This property is required. string
The target fully-qualified domain name (FQDN) within the target zone.
Items This property is required. List<GetRrsetsRrsetItem>
Rtype This property is required. string
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
Domain This property is required. string
The target fully-qualified domain name (FQDN) within the target zone.
Items This property is required. []GetRrsetsRrsetItem
Rtype This property is required. string
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
domain This property is required. String
The target fully-qualified domain name (FQDN) within the target zone.
items This property is required. List<GetRrsetsRrsetItem>
rtype This property is required. String
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
domain This property is required. string
The target fully-qualified domain name (FQDN) within the target zone.
items This property is required. GetRrsetsRrsetItem[]
rtype This property is required. string
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
domain This property is required. str
The target fully-qualified domain name (FQDN) within the target zone.
items This property is required. Sequence[dns.GetRrsetsRrsetItem]
rtype This property is required. str
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
domain This property is required. String
The target fully-qualified domain name (FQDN) within the target zone.
items This property is required. List<Property Map>
rtype This property is required. String
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.

GetRrsetsRrsetItem

Domain This property is required. string
The target fully-qualified domain name (FQDN) within the target zone.
IsProtected This property is required. bool
A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
Rdata This property is required. string
The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
RecordHash This property is required. string
A unique identifier for the record within its zone.
RrsetVersion This property is required. string
The latest version of the record's zone in which its RRSet differs from the preceding version.
Rtype This property is required. string
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
Ttl This property is required. int
The Time To Live for the record, in seconds. Using a TTL lower than 30 seconds is not recommended.
Domain This property is required. string
The target fully-qualified domain name (FQDN) within the target zone.
IsProtected This property is required. bool
A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
Rdata This property is required. string
The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
RecordHash This property is required. string
A unique identifier for the record within its zone.
RrsetVersion This property is required. string
The latest version of the record's zone in which its RRSet differs from the preceding version.
Rtype This property is required. string
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
Ttl This property is required. int
The Time To Live for the record, in seconds. Using a TTL lower than 30 seconds is not recommended.
domain This property is required. String
The target fully-qualified domain name (FQDN) within the target zone.
isProtected This property is required. Boolean
A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
rdata This property is required. String
The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
recordHash This property is required. String
A unique identifier for the record within its zone.
rrsetVersion This property is required. String
The latest version of the record's zone in which its RRSet differs from the preceding version.
rtype This property is required. String
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
ttl This property is required. Integer
The Time To Live for the record, in seconds. Using a TTL lower than 30 seconds is not recommended.
domain This property is required. string
The target fully-qualified domain name (FQDN) within the target zone.
isProtected This property is required. boolean
A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
rdata This property is required. string
The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
recordHash This property is required. string
A unique identifier for the record within its zone.
rrsetVersion This property is required. string
The latest version of the record's zone in which its RRSet differs from the preceding version.
rtype This property is required. string
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
ttl This property is required. number
The Time To Live for the record, in seconds. Using a TTL lower than 30 seconds is not recommended.
domain This property is required. str
The target fully-qualified domain name (FQDN) within the target zone.
is_protected This property is required. bool
A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
rdata This property is required. str
The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
record_hash This property is required. str
A unique identifier for the record within its zone.
rrset_version This property is required. str
The latest version of the record's zone in which its RRSet differs from the preceding version.
rtype This property is required. str
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
ttl This property is required. int
The Time To Live for the record, in seconds. Using a TTL lower than 30 seconds is not recommended.
domain This property is required. String
The target fully-qualified domain name (FQDN) within the target zone.
isProtected This property is required. Boolean
A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
rdata This property is required. String
The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
recordHash This property is required. String
A unique identifier for the record within its zone.
rrsetVersion This property is required. String
The latest version of the record's zone in which its RRSet differs from the preceding version.
rtype This property is required. String
Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
ttl This property is required. Number
The Time To Live for the record, in seconds. Using a TTL lower than 30 seconds is not recommended.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi