alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.dns.getAlidnsDomains

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

NOTE: Available in 1.95.0+.

Example Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var domainsDs = AliCloud.Dns.GetAlidnsDomains.Invoke(new()
    {
        DomainNameRegex = "^hegu",
        OutputFile = "domains.txt",
    });

    return new Dictionary<string, object?>
    {
        ["firstDomainId"] = domainsDs.Apply(getAlidnsDomainsResult => getAlidnsDomainsResult.Domains[0]?.DomainId),
    };
});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		domainsDs, err := dns.GetAlidnsDomains(ctx, &dns.GetAlidnsDomainsArgs{
			DomainNameRegex: pulumi.StringRef("^hegu"),
			OutputFile:      pulumi.StringRef("domains.txt"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstDomainId", domainsDs.Domains[0].DomainId)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dns.DnsFunctions;
import com.pulumi.alicloud.dns.inputs.GetAlidnsDomainsArgs;
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 domainsDs = DnsFunctions.getAlidnsDomains(GetAlidnsDomainsArgs.builder()
            .domainNameRegex("^hegu")
            .outputFile("domains.txt")
            .build());

        ctx.export("firstDomainId", domainsDs.applyValue(getAlidnsDomainsResult -> getAlidnsDomainsResult.domains()[0].domainId()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

domains_ds = alicloud.dns.get_alidns_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 = alicloud.dns.getAlidnsDomains({
    domainNameRegex: "^hegu",
    outputFile: "domains.txt",
});
export const firstDomainId = domainsDs.then(domainsDs => domainsDs.domains?.[0]?.domainId);
variables:
  domainsDs:
    fn::invoke:
      Function: alicloud:dns:getAlidnsDomains
      Arguments:
        domainNameRegex: ^hegu
        outputFile: domains.txt
outputs:
  firstDomainId: ${domainsDs.domains[0].domainId}

Using getAlidnsDomains

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 getAlidnsDomains(args: GetAlidnsDomainsArgs, opts?: InvokeOptions): Promise<GetAlidnsDomainsResult>
function getAlidnsDomainsOutput(args: GetAlidnsDomainsOutputArgs, opts?: InvokeOptions): Output<GetAlidnsDomainsResult>
def get_alidns_domains(ali_domain: Optional[bool] = None,
                       domain_name_regex: Optional[str] = None,
                       enable_details: Optional[bool] = None,
                       group_id: Optional[str] = None,
                       group_name_regex: Optional[str] = None,
                       ids: Optional[Sequence[str]] = None,
                       instance_id: Optional[str] = None,
                       key_word: Optional[str] = None,
                       lang: Optional[str] = None,
                       output_file: Optional[str] = None,
                       resource_group_id: Optional[str] = None,
                       search_mode: Optional[str] = None,
                       starmark: Optional[bool] = None,
                       tags: Optional[Mapping[str, Any]] = None,
                       version_code: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetAlidnsDomainsResult
def get_alidns_domains_output(ali_domain: Optional[pulumi.Input[bool]] = None,
                       domain_name_regex: Optional[pulumi.Input[str]] = None,
                       enable_details: Optional[pulumi.Input[bool]] = None,
                       group_id: Optional[pulumi.Input[str]] = None,
                       group_name_regex: Optional[pulumi.Input[str]] = None,
                       ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                       instance_id: Optional[pulumi.Input[str]] = None,
                       key_word: Optional[pulumi.Input[str]] = None,
                       lang: Optional[pulumi.Input[str]] = None,
                       output_file: Optional[pulumi.Input[str]] = None,
                       resource_group_id: Optional[pulumi.Input[str]] = None,
                       search_mode: Optional[pulumi.Input[str]] = None,
                       starmark: Optional[pulumi.Input[bool]] = None,
                       tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                       version_code: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetAlidnsDomainsResult]
func GetAlidnsDomains(ctx *Context, args *GetAlidnsDomainsArgs, opts ...InvokeOption) (*GetAlidnsDomainsResult, error)
func GetAlidnsDomainsOutput(ctx *Context, args *GetAlidnsDomainsOutputArgs, opts ...InvokeOption) GetAlidnsDomainsResultOutput

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

public static class GetAlidnsDomains 
{
    public static Task<GetAlidnsDomainsResult> InvokeAsync(GetAlidnsDomainsArgs args, InvokeOptions? opts = null)
    public static Output<GetAlidnsDomainsResult> Invoke(GetAlidnsDomainsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAlidnsDomainsResult> getAlidnsDomains(GetAlidnsDomainsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:dns/getAlidnsDomains:getAlidnsDomains
  arguments:
    # arguments dictionary

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.

EnableDetails bool
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.

EnableDetails bool
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.

enableDetails Boolean
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 Boolean

Whether to query the domain name star.

tags Map<String,Object>

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.

enableDetails boolean
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.

enable_details bool
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 Sequence[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 Mapping[str, Any]

A mapping of tags to assign to the resource.

version_code str

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.

enableDetails Boolean
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 Boolean

Whether to query the domain name star.

tags Map<Any>

A mapping of tags to assign to the resource.

versionCode String

Cloud analysis version code.

getAlidnsDomains Result

The following output properties are available:

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

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
EnableDetails bool
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 []GetAlidnsDomainsDomain

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
EnableDetails bool
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 List<GetAliDomainsDomain>

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 Boolean

Indicates whether the domain is an Alibaba Cloud domain.

domainNameRegex String
enableDetails Boolean
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 Map<String,Object>
versionCode String

Cloud resolution version ID.

domains GetAlidnsDomainsDomain[]

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
enableDetails boolean
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 Sequence[GetAlidnsDomainsDomain]

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

id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]

A list of domain IDs.

names Sequence[str]

A list of domain names.

ali_domain bool

Indicates whether the domain is an Alibaba Cloud domain.

domain_name_regex str
enable_details bool
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 Mapping[str, Any]
version_code str

Cloud resolution version ID.

domains List<Property Map>

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 Boolean

Indicates whether the domain is an Alibaba Cloud domain.

domainNameRegex String
enableDetails Boolean
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 Map<Any>
versionCode String

Cloud resolution version ID.

Supporting Types

GetAlidnsDomainsDomain

AliDomain bool

Specifies whether the domain is from Alibaba Cloud or not.

AvailableTtls List<int>

List of available TTLs.

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.

RecordLines List<Pulumi.AliCloud.Dns.Inputs.GetAlidnsDomainsDomainRecordLine>

Parse the line data list.

RegionLines bool

Whether it is a regional route.

Remark string

The Id of resource group which the dns belongs.

ResourceGroupId 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.

AvailableTtls []int

List of available TTLs.

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.

RecordLines []GetAlidnsDomainsDomainRecordLine

Parse the line data list.

RegionLines bool

Whether it is a regional route.

Remark string

The Id of resource group which the dns belongs.

ResourceGroupId 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.

availableTtls List<Integer>

List of available TTLs.

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 Boolean

Whether it is in black hole.

inClean Boolean

Whether it is cleaning.

instanceId String

Cloud analysis product ID.

lineType String
minTtl Integer

Minimum TTL.

punyCode String

Punycode of the Chinese domain.

recordLineTreeJson String

Tree-like analytical line list.

recordLines List<GetAliDomainsDomainRecordLine>

Parse the line data list.

regionLines Boolean

Whether it is a regional route.

remark String

The Id of resource group which the dns belongs.

resourceGroupId String

The Id of resource group which the dns belongs.

slaveDns Boolean

Whether to allow auxiliary dns.

tags Map<String,Object>

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.

availableTtls number[]

List of available TTLs.

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.

recordLines GetAlidnsDomainsDomainRecordLine[]

Parse the line data list.

regionLines boolean

Whether it is a regional route.

remark string

The Id of resource group which the dns belongs.

resourceGroupId 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
ali_domain bool

Specifies whether the domain is from Alibaba Cloud or not.

available_ttls Sequence[int]

List of available TTLs.

dns_servers Sequence[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.

in_black_hole bool

Whether it is in black hole.

in_clean bool

Whether it is cleaning.

instance_id str

Cloud analysis product ID.

line_type str
min_ttl int

Minimum TTL.

puny_code str

Punycode of the Chinese domain.

record_line_tree_json str

Tree-like analytical line list.

record_lines Sequence[GetAlidnsDomainsDomainRecordLine]

Parse the line data list.

region_lines bool

Whether it is a regional route.

remark str

The Id of resource group which the dns belongs.

resource_group_id str

The Id of resource group which the dns belongs.

slave_dns bool

Whether to allow auxiliary dns.

tags Mapping[str, Any]

A mapping of tags to assign to the resource.

version_code str

Cloud analysis version code.

version_name str
aliDomain Boolean

Specifies whether the domain is from Alibaba Cloud or not.

availableTtls List<Number>

List of available TTLs.

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 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.

recordLines List<Property Map>

Parse the line data list.

regionLines Boolean

Whether it is a regional route.

remark String

The Id of resource group which the dns belongs.

resourceGroupId String

The Id of resource group which the dns belongs.

slaveDns Boolean

Whether to allow auxiliary dns.

tags Map<Any>

A mapping of tags to assign to the resource.

versionCode String

Cloud analysis version code.

versionName String

GetAlidnsDomainsDomainRecordLine

FatherCode string

The code of the parent line, or empty if there is none.

LineCode string

Sub-line Code.

LineDisplayName string

Parent line display name.

LineName string

Sub-line display name.

FatherCode string

The code of the parent line, or empty if there is none.

LineCode string

Sub-line Code.

LineDisplayName string

Parent line display name.

LineName string

Sub-line display name.

fatherCode String

The code of the parent line, or empty if there is none.

lineCode String

Sub-line Code.

lineDisplayName String

Parent line display name.

lineName String

Sub-line display name.

fatherCode string

The code of the parent line, or empty if there is none.

lineCode string

Sub-line Code.

lineDisplayName string

Parent line display name.

lineName string

Sub-line display name.

father_code str

The code of the parent line, or empty if there is none.

line_code str

Sub-line Code.

line_display_name str

Parent line display name.

line_name str

Sub-line display name.

fatherCode String

The code of the parent line, or empty if there is none.

lineCode String

Sub-line Code.

lineDisplayName String

Parent line display name.

lineName String

Sub-line display name.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.