Oracle Cloud Infrastructure

Pulumi Official
Package maintained by Pulumi
v0.1.1 published on Tuesday, May 3, 2022 by Pulumi

getRecords

Example Usage

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testRecords = Output.Create(Oci.Dns.GetRecords.InvokeAsync(new Oci.Dns.GetRecordsArgs
        {
            ZoneNameOrId = oci_dns_zone_name_or.Test_zone_name_or.Id,
            CompartmentId = @var.Compartment_id,
            Domain = @var.Record_domain,
            DomainContains = @var.Record_domain_contains,
            Rtype = @var.Record_rtype,
            Scope = @var.Record_scope,
            ViewId = oci_dns_view.Test_view.Id,
            ZoneVersion = @var.Record_zone_version,
        }));
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Dns.GetRecords(ctx, &dns.GetRecordsArgs{
			ZoneNameOrId:   oci_dns_zone_name_or.Test_zone_name_or.Id,
			CompartmentId:  pulumi.StringRef(_var.Compartment_id),
			Domain:         pulumi.StringRef(_var.Record_domain),
			DomainContains: pulumi.StringRef(_var.Record_domain_contains),
			Rtype:          pulumi.StringRef(_var.Record_rtype),
			Scope:          _var.Record_scope,
			ViewId:         oci_dns_view.Test_view.Id,
			ZoneVersion:    pulumi.StringRef(_var.Record_zone_version),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_oci as oci

test_records = oci.Dns.get_records(zone_name_or_id=oci_dns_zone_name_or["test_zone_name_or"]["id"],
    compartment_id=var["compartment_id"],
    domain=var["record_domain"],
    domain_contains=var["record_domain_contains"],
    rtype=var["record_rtype"],
    scope=var["record_scope"],
    view_id=oci_dns_view["test_view"]["id"],
    zone_version=var["record_zone_version"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testRecords = oci.Dns.getRecords({
    zoneNameOrId: oci_dns_zone_name_or.test_zone_name_or.id,
    compartmentId: _var.compartment_id,
    domain: _var.record_domain,
    domainContains: _var.record_domain_contains,
    rtype: _var.record_rtype,
    scope: _var.record_scope,
    viewId: oci_dns_view.test_view.id,
    zoneVersion: _var.record_zone_version,
});

Coming soon!

Using getRecords

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 getRecords(args: GetRecordsArgs, opts?: InvokeOptions): Promise<GetRecordsResult>
function getRecordsOutput(args: GetRecordsOutputArgs, opts?: InvokeOptions): Output<GetRecordsResult>
def get_records(compartment_id: Optional[str] = None,
                domain: Optional[str] = None,
                domain_contains: Optional[str] = None,
                filters: Optional[Sequence[_dns.GetRecordsFilter]] = None,
                rtype: Optional[str] = None,
                sort_by: Optional[str] = None,
                sort_order: Optional[str] = None,
                zone_name_or_id: Optional[str] = None,
                zone_version: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetRecordsResult
def get_records_output(compartment_id: Optional[pulumi.Input[str]] = None,
                domain: Optional[pulumi.Input[str]] = None,
                domain_contains: Optional[pulumi.Input[str]] = None,
                filters: Optional[pulumi.Input[Sequence[pulumi.Input[_dns.GetRecordsFilterArgs]]]] = None,
                rtype: Optional[pulumi.Input[str]] = None,
                sort_by: Optional[pulumi.Input[str]] = None,
                sort_order: Optional[pulumi.Input[str]] = None,
                zone_name_or_id: Optional[pulumi.Input[str]] = None,
                zone_version: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetRecordsResult]
func GetRecords(ctx *Context, args *GetRecordsArgs, opts ...InvokeOption) (*GetRecordsResult, error)
func GetRecordsOutput(ctx *Context, args *GetRecordsOutputArgs, opts ...InvokeOption) GetRecordsResultOutput

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

public static class GetRecords 
{
    public static Task<GetRecordsResult> InvokeAsync(GetRecordsArgs args, InvokeOptions? opts = null)
    public static Output<GetRecordsResult> Invoke(GetRecordsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRecordsResult> getRecords(GetRecordsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: oci:Dns/getRecords:getRecords
  Arguments:
    # Arguments dictionary

The following arguments are supported:

ZoneNameOrId string

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_records' resource has been deprecated. Please use 'oci_dns_rrset' instead.

CompartmentId string

The OCID of the compartment the resource belongs to.

Domain string

Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.

DomainContains string

Search by domain. Will match any record whose domain (case-insensitive) contains the provided value.

Filters List<GetRecordsFilter>
Rtype string

Search by record type. Will match any record whose type (case-insensitive) equals the provided value.

SortBy string

The field by which to sort records. Allowed values are: domain|rtype|ttl

SortOrder string

The order to sort the resources. Allowed values are: ASC|DESC

ZoneVersion string

The version of the zone for which data is requested.

ZoneNameOrId string

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_records' resource has been deprecated. Please use 'oci_dns_rrset' instead.

CompartmentId string

The OCID of the compartment the resource belongs to.

Domain string

Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.

DomainContains string

Search by domain. Will match any record whose domain (case-insensitive) contains the provided value.

Filters []GetRecordsFilter
Rtype string

Search by record type. Will match any record whose type (case-insensitive) equals the provided value.

SortBy string

The field by which to sort records. Allowed values are: domain|rtype|ttl

SortOrder string

The order to sort the resources. Allowed values are: ASC|DESC

ZoneVersion string

The version of the zone for which data is requested.

zoneNameOrId String

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_records' resource has been deprecated. Please use 'oci_dns_rrset' instead.

compartmentId String

The OCID of the compartment the resource belongs to.

domain String

Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.

domainContains String

Search by domain. Will match any record whose domain (case-insensitive) contains the provided value.

filters List<GetRecordsFilter>
rtype String

Search by record type. Will match any record whose type (case-insensitive) equals the provided value.

sortBy String

The field by which to sort records. Allowed values are: domain|rtype|ttl

sortOrder String

The order to sort the resources. Allowed values are: ASC|DESC

zoneVersion String

The version of the zone for which data is requested.

zoneNameOrId string

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_records' resource has been deprecated. Please use 'oci_dns_rrset' instead.

compartmentId string

The OCID of the compartment the resource belongs to.

domain string

Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.

domainContains string

Search by domain. Will match any record whose domain (case-insensitive) contains the provided value.

filters GetRecordsFilter[]
rtype string

Search by record type. Will match any record whose type (case-insensitive) equals the provided value.

sortBy string

The field by which to sort records. Allowed values are: domain|rtype|ttl

sortOrder string

The order to sort the resources. Allowed values are: ASC|DESC

zoneVersion string

The version of the zone for which data is requested.

zone_name_or_id str

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_records' resource has been deprecated. Please use 'oci_dns_rrset' instead.

compartment_id str

The OCID of the compartment the resource belongs to.

domain str

Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.

domain_contains str

Search by domain. Will match any record whose domain (case-insensitive) contains the provided value.

filters GetRecordsFilter]
rtype str

Search by record type. Will match any record whose type (case-insensitive) equals the provided value.

sort_by str

The field by which to sort records. Allowed values are: domain|rtype|ttl

sort_order str

The order to sort the resources. Allowed values are: ASC|DESC

zone_version str

The version of the zone for which data is requested.

zoneNameOrId String

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_records' resource has been deprecated. Please use 'oci_dns_rrset' instead.

compartmentId String

The OCID of the compartment the resource belongs to.

domain String

Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.

domainContains String

Search by domain. Will match any record whose domain (case-insensitive) contains the provided value.

filters List<Property Map>
rtype String

Search by record type. Will match any record whose type (case-insensitive) equals the provided value.

sortBy String

The field by which to sort records. Allowed values are: domain|rtype|ttl

sortOrder String

The order to sort the resources. Allowed values are: ASC|DESC

zoneVersion String

The version of the zone for which data is requested.

getRecords Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Records List<GetRecordsRecord>

The list of records.

ZoneNameOrId string

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_records' resource has been deprecated. Please use 'oci_dns_rrset' instead.

CompartmentId string
Domain string

The fully qualified domain name where the record can be located.

DomainContains string
Filters List<GetRecordsFilter>
Rtype string

The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.

SortBy string
SortOrder string
ZoneVersion string
Id string

The provider-assigned unique ID for this managed resource.

Records []GetRecordsRecord

The list of records.

ZoneNameOrId string

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_records' resource has been deprecated. Please use 'oci_dns_rrset' instead.

CompartmentId string
Domain string

The fully qualified domain name where the record can be located.

DomainContains string
Filters []GetRecordsFilter
Rtype string

The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.

SortBy string
SortOrder string
ZoneVersion string
id String

The provider-assigned unique ID for this managed resource.

records List<GetRecordsRecord>

The list of records.

zoneNameOrId String

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_records' resource has been deprecated. Please use 'oci_dns_rrset' instead.

compartmentId String
domain String

The fully qualified domain name where the record can be located.

domainContains String
filters List<GetRecordsFilter>
rtype String

The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.

sortBy String
sortOrder String
zoneVersion String
id string

The provider-assigned unique ID for this managed resource.

records GetRecordsRecord[]

The list of records.

zoneNameOrId string

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_records' resource has been deprecated. Please use 'oci_dns_rrset' instead.

compartmentId string
domain string

The fully qualified domain name where the record can be located.

domainContains string
filters GetRecordsFilter[]
rtype string

The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.

sortBy string
sortOrder string
zoneVersion string
id str

The provider-assigned unique ID for this managed resource.

records GetRecordsRecord]

The list of records.

zone_name_or_id str

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_records' resource has been deprecated. Please use 'oci_dns_rrset' instead.

compartment_id str
domain str

The fully qualified domain name where the record can be located.

domain_contains str
filters GetRecordsFilter]
rtype str

The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.

sort_by str
sort_order str
zone_version str
id String

The provider-assigned unique ID for this managed resource.

records List<Property Map>

The list of records.

zoneNameOrId String

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_records' resource has been deprecated. Please use 'oci_dns_rrset' instead.

compartmentId String
domain String

The fully qualified domain name where the record can be located.

domainContains String
filters List<Property Map>
rtype String

The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.

sortBy String
sortOrder String
zoneVersion String

Supporting Types

GetRecordsFilter

Name string
Values List<string>
Regex bool
Name string
Values []string
Regex bool
name String
values List<String>
regex Boolean
name string
values string[]
regex boolean
name str
values Sequence[str]
regex bool
name String
values List<String>
regex Boolean

GetRecordsRecord

Domain string

Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

IsProtected bool

A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.

RecordHash string

A unique identifier for the record within its zone.

RrsetVersion string

The latest version of the record's zone in which its RRSet differs from the preceding version.

Rtype string

Search by record type. Will match any record whose type (case-insensitive) equals the provided value.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

ZoneNameOrId string

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

CompartmentId string

The OCID of the compartment the resource belongs to.

Rdata 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

Ttl int

The Time To Live for the record, in seconds.

Domain string

Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

IsProtected bool

A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.

RecordHash string

A unique identifier for the record within its zone.

RrsetVersion string

The latest version of the record's zone in which its RRSet differs from the preceding version.

Rtype string

Search by record type. Will match any record whose type (case-insensitive) equals the provided value.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

ZoneNameOrId string

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

CompartmentId string

The OCID of the compartment the resource belongs to.

Rdata 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

Ttl int

The Time To Live for the record, in seconds.

domain String

Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

isProtected Boolean

A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.

recordHash String

A unique identifier for the record within its zone.

rrsetVersion String

The latest version of the record's zone in which its RRSet differs from the preceding version.

rtype String

Search by record type. Will match any record whose type (case-insensitive) equals the provided value.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

zoneNameOrId String

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

compartmentId String

The OCID of the compartment the resource belongs to.

rdata 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

ttl Integer

The Time To Live for the record, in seconds.

domain string

Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

isProtected boolean

A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.

recordHash string

A unique identifier for the record within its zone.

rrsetVersion string

The latest version of the record's zone in which its RRSet differs from the preceding version.

rtype string

Search by record type. Will match any record whose type (case-insensitive) equals the provided value.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

zoneNameOrId string

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

compartmentId string

The OCID of the compartment the resource belongs to.

rdata 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

ttl number

The Time To Live for the record, in seconds.

domain str

Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

is_protected bool

A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.

record_hash str

A unique identifier for the record within its zone.

rrset_version str

The latest version of the record's zone in which its RRSet differs from the preceding version.

rtype str

Search by record type. Will match any record whose type (case-insensitive) equals the provided value.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

zone_name_or_id str

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

compartment_id str

The OCID of the compartment the resource belongs to.

rdata 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

ttl int

The Time To Live for the record, in seconds.

domain String

Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

isProtected Boolean

A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.

recordHash String

A unique identifier for the record within its zone.

rrsetVersion String

The latest version of the record's zone in which its RRSet differs from the preceding version.

rtype String

Search by record type. Will match any record whose type (case-insensitive) equals the provided value.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

zoneNameOrId String

The name or OCID of the target zone.

Deprecated:

The 'oci_dns_record' resource has been deprecated. Please use 'oci_dns_rrset' instead.

compartmentId String

The OCID of the compartment the resource belongs to.

rdata 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

ttl Number

The Time To Live for the record, in seconds.

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.