GetRecords

This data source provides a list of DNS Domain Records in an Alibaba Cloud account according to the specified filters.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var recordsDs = Output.Create(AliCloud.Dns.GetRecords.InvokeAsync(new AliCloud.Dns.GetRecordsArgs
        {
            DomainName = "xiaozhu.top",
            HostRecordRegex = "^@",
            IsLocked = false,
            OutputFile = "records.txt",
            Type = "A",
        }));
        this.FirstRecordId = recordsDs.Apply(recordsDs => recordsDs.Records[0].RecordId);
    }

    [Output("firstRecordId")]
    public Output<string> FirstRecordId { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

records_ds = alicloud.dns.get_records(domain_name="xiaozhu.top",
    host_record_regex="^@",
    is_locked=False,
    output_file="records.txt",
    type="A")
pulumi.export("firstRecordId", records_ds.records[0]["record_id"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const recordsDs = pulumi.output(alicloud.dns.getRecords({
    domainName: "xiaozhu.top",
    hostRecordRegex: "^@",
    isLocked: false,
    outputFile: "records.txt",
    type: "A",
}, { async: true }));

export const firstRecordId = recordsDs.records[0].recordId;

Using GetRecords

function getRecords(args: GetRecordsArgs, opts?: InvokeOptions): Promise<GetRecordsResult>
function  get_records(domain_name=None, host_record_regex=None, ids=None, is_locked=None, line=None, output_file=None, status=None, type=None, value_regex=None, opts=None)
func GetRecords(ctx *Context, args *GetRecordsArgs, opts ...InvokeOption) (*GetRecordsResult, error)
public static class GetRecords {
    public static Task<GetRecordsResult> InvokeAsync(GetRecordsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

DomainName string

The domain name associated to the records.

HostRecordRegex string

Host record regex.

Ids List<string>

A list of record IDs.

IsLocked bool

Whether the record is locked or not.

Line string

ISP line. Valid items are default, telecom, unicom, mobile, oversea, edu, drpeng, btvn, .etc. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc

OutputFile string
Status string

Record status. Valid items are ENABLE and DISABLE.

Type string

Record type. Valid items are A, NS, MX, TXT, CNAME, SRV, AAAA, REDIRECT_URL, FORWORD_URL .

ValueRegex string

Host record value regex.

DomainName string

The domain name associated to the records.

HostRecordRegex string

Host record regex.

Ids []string

A list of record IDs.

IsLocked bool

Whether the record is locked or not.

Line string

ISP line. Valid items are default, telecom, unicom, mobile, oversea, edu, drpeng, btvn, .etc. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc

OutputFile string
Status string

Record status. Valid items are ENABLE and DISABLE.

Type string

Record type. Valid items are A, NS, MX, TXT, CNAME, SRV, AAAA, REDIRECT_URL, FORWORD_URL .

ValueRegex string

Host record value regex.

domainName string

The domain name associated to the records.

hostRecordRegex string

Host record regex.

ids string[]

A list of record IDs.

isLocked boolean

Whether the record is locked or not.

line string

ISP line. Valid items are default, telecom, unicom, mobile, oversea, edu, drpeng, btvn, .etc. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc

outputFile string
status string

Record status. Valid items are ENABLE and DISABLE.

type string

Record type. Valid items are A, NS, MX, TXT, CNAME, SRV, AAAA, REDIRECT_URL, FORWORD_URL .

valueRegex string

Host record value regex.

domain_name str

The domain name associated to the records.

host_record_regex str

Host record regex.

ids List[str]

A list of record IDs.

is_locked bool

Whether the record is locked or not.

line str

ISP line. Valid items are default, telecom, unicom, mobile, oversea, edu, drpeng, btvn, .etc. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc

output_file str
status str

Record status. Valid items are ENABLE and DISABLE.

type str

Record type. Valid items are A, NS, MX, TXT, CNAME, SRV, AAAA, REDIRECT_URL, FORWORD_URL .

value_regex str

Host record value regex.

GetRecords Result

The following output properties are available:

DomainName string

Name of the domain the record belongs to.

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of record IDs.

Records List<Pulumi.AliCloud.Dns.Outputs.GetRecordsRecord>

A list of records. Each element contains the following attributes:

Urls List<string>

A list of entire URLs. Each item format as <host_record>.<domain_name>.

HostRecordRegex string
IsLocked bool
Line string

ISP line of the record.

OutputFile string
Status string

Status of the record.

Type string

Type of the record.

ValueRegex string
DomainName string

Name of the domain the record belongs to.

Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of record IDs.

Records []GetRecordsRecord

A list of records. Each element contains the following attributes:

Urls []string

A list of entire URLs. Each item format as <host_record>.<domain_name>.

HostRecordRegex string
IsLocked bool
Line string

ISP line of the record.

OutputFile string
Status string

Status of the record.

Type string

Type of the record.

ValueRegex string
domainName string

Name of the domain the record belongs to.

id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of record IDs.

records GetRecordsRecord[]

A list of records. Each element contains the following attributes:

urls string[]

A list of entire URLs. Each item format as <host_record>.<domain_name>.

hostRecordRegex string
isLocked boolean
line string

ISP line of the record.

outputFile string
status string

Status of the record.

type string

Type of the record.

valueRegex string
domain_name str

Name of the domain the record belongs to.

id str

The provider-assigned unique ID for this managed resource.

ids List[str]

A list of record IDs.

records List[GetRecordsRecord]

A list of records. Each element contains the following attributes:

urls List[str]

A list of entire URLs. Each item format as <host_record>.<domain_name>.

host_record_regex str
is_locked bool
line str

ISP line of the record.

output_file str
status str

Status of the record.

type str

Type of the record.

value_regex str

Supporting Types

GetRecordsRecord

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

DomainName string

The domain name associated to the records.

HostRecord string

Host record of the domain.

Line string

ISP line. Valid items are default, telecom, unicom, mobile, oversea, edu, drpeng, btvn, .etc. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc

Locked bool

Indicates whether the record is locked.

Priority int

Priority of the MX record.

RecordId string

ID of the record.

Status string

Record status. Valid items are ENABLE and DISABLE.

Ttl double

TTL of the record.

Type string

Record type. Valid items are A, NS, MX, TXT, CNAME, SRV, AAAA, REDIRECT_URL, FORWORD_URL .

Value string

Host record value of the domain.

DomainName string

The domain name associated to the records.

HostRecord string

Host record of the domain.

Line string

ISP line. Valid items are default, telecom, unicom, mobile, oversea, edu, drpeng, btvn, .etc. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc

Locked bool

Indicates whether the record is locked.

Priority int

Priority of the MX record.

RecordId string

ID of the record.

Status string

Record status. Valid items are ENABLE and DISABLE.

Ttl float64

TTL of the record.

Type string

Record type. Valid items are A, NS, MX, TXT, CNAME, SRV, AAAA, REDIRECT_URL, FORWORD_URL .

Value string

Host record value of the domain.

domainName string

The domain name associated to the records.

hostRecord string

Host record of the domain.

line string

ISP line. Valid items are default, telecom, unicom, mobile, oversea, edu, drpeng, btvn, .etc. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc

locked boolean

Indicates whether the record is locked.

priority number

Priority of the MX record.

recordId string

ID of the record.

status string

Record status. Valid items are ENABLE and DISABLE.

ttl number

TTL of the record.

type string

Record type. Valid items are A, NS, MX, TXT, CNAME, SRV, AAAA, REDIRECT_URL, FORWORD_URL .

value string

Host record value of the domain.

domain_name str

The domain name associated to the records.

host_record str

Host record of the domain.

line str

ISP line. Valid items are default, telecom, unicom, mobile, oversea, edu, drpeng, btvn, .etc. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc

locked bool

Indicates whether the record is locked.

priority float

Priority of the MX record.

record_id str

ID of the record.

status str

Record status. Valid items are ENABLE and DISABLE.

ttl float

TTL of the record.

type str

Record type. Valid items are A, NS, MX, TXT, CNAME, SRV, AAAA, REDIRECT_URL, FORWORD_URL .

value str

Host record value of the domain.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.