GetDomains

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

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var domainsDs = Output.Create(AliCloud.Dns.GetDomains.InvokeAsync(new AliCloud.Dns.GetDomainsArgs
        {
            DomainNameRegex = "^hegu",
            OutputFile = "domains.txt",
        }));
        this.FirstDomainId = domainsDs.Apply(domainsDs => domainsDs.Domains[0].DomainId);
    }

    [Output("firstDomainId")]
    public Output<string> FirstDomainId { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

domains_ds = alicloud.dns.get_domains(domain_name_regex="^hegu",
    output_file="domains.txt")
pulumi.export("firstDomainId", domains_ds.domains[0]["domain_id"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const domainsDs = pulumi.output(alicloud.dns.getDomains({
    domainNameRegex: "^hegu",
    outputFile: "domains.txt",
}, { async: true }));

export const firstDomainId = domainsDs.domains[0].domainId;

Using GetDomains

function getDomains(args: GetDomainsArgs, opts?: InvokeOptions): Promise<GetDomainsResult>
function  get_domains(ali_domain=None, domain_name_regex=None, group_id=None, group_name_regex=None, ids=None, instance_id=None, key_word=None, lang=None, output_file=None, resource_group_id=None, search_mode=None, starmark=None, tags=None, version_code=None, opts=None)
func GetDomains(ctx *Context, args *GetDomainsArgs, opts ...InvokeOption) (*GetDomainsResult, error)
public static class GetDomains {
    public static Task<GetDomainsResult> InvokeAsync(GetDomainsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

AliDomain bool

Specifies whether the domain is from Alibaba Cloud or not.

DomainNameRegex string

A regex string to filter results by the domain name.

GroupId string

Domain group ID, if not filled, the default is all groups.

GroupNameRegex string

A regex string to filter results by the group name.

Ids List<string>
  • A list of domain IDs.
InstanceId string

Cloud analysis product ID.

KeyWord string

The keywords are searched according to the %KeyWord% mode, which is not case sensitive.

Lang string

User language.

OutputFile string
ResourceGroupId string

The Id of resource group which the dns belongs.

SearchMode string

Search mode, LIKE fuzzy search, EXACT exact search.

Starmark bool

Whether to query the domain name star.

Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

VersionCode string

Cloud analysis version code.

AliDomain bool

Specifies whether the domain is from Alibaba Cloud or not.

DomainNameRegex string

A regex string to filter results by the domain name.

GroupId string

Domain group ID, if not filled, the default is all groups.

GroupNameRegex string

A regex string to filter results by the group name.

Ids []string
  • A list of domain IDs.
InstanceId string

Cloud analysis product ID.

KeyWord string

The keywords are searched according to the %KeyWord% mode, which is not case sensitive.

Lang string

User language.

OutputFile string
ResourceGroupId string

The Id of resource group which the dns belongs.

SearchMode string

Search mode, LIKE fuzzy search, EXACT exact search.

Starmark bool

Whether to query the domain name star.

Tags map[string]interface{}

A mapping of tags to assign to the resource.

VersionCode string

Cloud analysis version code.

aliDomain boolean

Specifies whether the domain is from Alibaba Cloud or not.

domainNameRegex string

A regex string to filter results by the domain name.

groupId string

Domain group ID, if not filled, the default is all groups.

groupNameRegex string

A regex string to filter results by the group name.

ids string[]
  • A list of domain IDs.
instanceId string

Cloud analysis product ID.

keyWord string

The keywords are searched according to the %KeyWord% mode, which is not case sensitive.

lang string

User language.

outputFile string
resourceGroupId string

The Id of resource group which the dns belongs.

searchMode string

Search mode, LIKE fuzzy search, EXACT exact search.

starmark boolean

Whether to query the domain name star.

tags {[key: string]: any}

A mapping of tags to assign to the resource.

versionCode string

Cloud analysis version code.

ali_domain bool

Specifies whether the domain is from Alibaba Cloud or not.

domain_name_regex str

A regex string to filter results by the domain name.

group_id str

Domain group ID, if not filled, the default is all groups.

group_name_regex str

A regex string to filter results by the group name.

ids List[str]
  • A list of domain IDs.
instance_id str

Cloud analysis product ID.

key_word str

The keywords are searched according to the %KeyWord% mode, which is not case sensitive.

lang str

User language.

output_file str
resource_group_id str

The Id of resource group which the dns belongs.

search_mode str

Search mode, LIKE fuzzy search, EXACT exact search.

starmark bool

Whether to query the domain name star.

tags Dict[str, Any]

A mapping of tags to assign to the resource.

version_code str

Cloud analysis version code.

GetDomains Result

The following output properties are available:

Domains List<Pulumi.AliCloud.Dns.Outputs.GetDomainsDomain>

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

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of domain IDs.

Names List<string>

A list of domain names.

AliDomain bool

Indicates whether the domain is an Alibaba Cloud domain.

DomainNameRegex string
GroupId string

Id of group that contains the domain.

GroupNameRegex string
InstanceId string

Cloud analysis product ID of the domain.

KeyWord string
Lang string
OutputFile string
ResourceGroupId string

The Id of resource group which the dns belongs.

SearchMode string
Starmark bool
Tags Dictionary<string, object>
VersionCode string

Cloud resolution version ID.

Domains []GetDomainsDomain

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

Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of domain IDs.

Names []string

A list of domain names.

AliDomain bool

Indicates whether the domain is an Alibaba Cloud domain.

DomainNameRegex string
GroupId string

Id of group that contains the domain.

GroupNameRegex string
InstanceId string

Cloud analysis product ID of the domain.

KeyWord string
Lang string
OutputFile string
ResourceGroupId string

The Id of resource group which the dns belongs.

SearchMode string
Starmark bool
Tags map[string]interface{}
VersionCode string

Cloud resolution version ID.

domains GetDomainsDomain[]

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

id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of domain IDs.

names string[]

A list of domain names.

aliDomain boolean

Indicates whether the domain is an Alibaba Cloud domain.

domainNameRegex string
groupId string

Id of group that contains the domain.

groupNameRegex string
instanceId string

Cloud analysis product ID of the domain.

keyWord string
lang string
outputFile string
resourceGroupId string

The Id of resource group which the dns belongs.

searchMode string
starmark boolean
tags {[key: string]: any}
versionCode string

Cloud resolution version ID.

domains List[GetDomainsDomain]

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

id str

The provider-assigned unique ID for this managed resource.

ids List[str]

A list of domain IDs.

names List[str]

A list of domain names.

ali_domain bool

Indicates whether the domain is an Alibaba Cloud domain.

domain_name_regex str
group_id str

Id of group that contains the domain.

group_name_regex str
instance_id str

Cloud analysis product ID of the domain.

key_word str
lang str
output_file str
resource_group_id str

The Id of resource group which the dns belongs.

search_mode str
starmark bool
tags Dict[str, Any]
version_code str

Cloud resolution version ID.

Supporting Types

GetDomainsDomain

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AliDomain bool

Specifies whether the domain is from Alibaba Cloud or not.

DnsServers List<string>

DNS list of domain names in the resolution system.

DomainId string

ID of the domain.

DomainName string

Name of the domain.

GroupId string

Domain group ID, if not filled, the default is all groups.

GroupName string

Name of group that contains the domain.

Id string

The Id of resource.

InBlackHole bool

Whether it is in black hole.

InClean bool

Whether it is cleaning.

InstanceId string

Cloud analysis product ID.

LineType string
MinTtl int

Minimum TTL.

PunyCode string

Punycode of the Chinese domain.

RecordLineTreeJson string

Tree-like analytical line list.

RegionLines bool

Whether it is a regional route.

Remark string

The Id of resource group which the dns belongs.

SlaveDns bool

Whether to allow auxiliary dns.

Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

VersionCode string

Cloud analysis version code.

VersionName string
AliDomain bool

Specifies whether the domain is from Alibaba Cloud or not.

DnsServers []string

DNS list of domain names in the resolution system.

DomainId string

ID of the domain.

DomainName string

Name of the domain.

GroupId string

Domain group ID, if not filled, the default is all groups.

GroupName string

Name of group that contains the domain.

Id string

The Id of resource.

InBlackHole bool

Whether it is in black hole.

InClean bool

Whether it is cleaning.

InstanceId string

Cloud analysis product ID.

LineType string
MinTtl int

Minimum TTL.

PunyCode string

Punycode of the Chinese domain.

RecordLineTreeJson string

Tree-like analytical line list.

RegionLines bool

Whether it is a regional route.

Remark string

The Id of resource group which the dns belongs.

SlaveDns bool

Whether to allow auxiliary dns.

Tags map[string]interface{}

A mapping of tags to assign to the resource.

VersionCode string

Cloud analysis version code.

VersionName string
aliDomain boolean

Specifies whether the domain is from Alibaba Cloud or not.

dnsServers string[]

DNS list of domain names in the resolution system.

domainId string

ID of the domain.

domainName string

Name of the domain.

groupId string

Domain group ID, if not filled, the default is all groups.

groupName string

Name of group that contains the domain.

id string

The Id of resource.

inBlackHole boolean

Whether it is in black hole.

inClean boolean

Whether it is cleaning.

instanceId string

Cloud analysis product ID.

lineType string
minTtl number

Minimum TTL.

punyCode string

Punycode of the Chinese domain.

recordLineTreeJson string

Tree-like analytical line list.

regionLines boolean

Whether it is a regional route.

remark string

The Id of resource group which the dns belongs.

slaveDns boolean

Whether to allow auxiliary dns.

tags {[key: string]: any}

A mapping of tags to assign to the resource.

versionCode string

Cloud analysis version code.

versionName string
aliDomain bool

Specifies whether the domain is from Alibaba Cloud or not.

dns_servers List[str]

DNS list of domain names in the resolution system.

domain_id str

ID of the domain.

domain_name str

Name of the domain.

group_id str

Domain group ID, if not filled, the default is all groups.

group_name str

Name of group that contains the domain.

id str

The Id of resource.

inBlackHole bool

Whether it is in black hole.

inClean bool

Whether it is cleaning.

instance_id str

Cloud analysis product ID.

lineType str
minTtl float

Minimum TTL.

punyCode str

Punycode of the Chinese domain.

recordLineTreeJson str

Tree-like analytical line list.

regionLines bool

Whether it is a regional route.

remark str

The Id of resource group which the dns belongs.

slaveDns bool

Whether to allow auxiliary dns.

tags Dict[str, Any]

A mapping of tags to assign to the resource.

version_code str

Cloud analysis version code.

version_name str

Package Details

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