1. Packages
  2. Linode Provider
  3. API Docs
  4. getDomains
Linode v4.36.0 published on Thursday, Mar 27, 2025 by Pulumi

linode.getDomains

Explore with Pulumi AI

Provides information about Linode Domains that match a set of filters. For more information, see the Linode APIv4 docs.

Example Usage

Get information about all Linode Cloud Domains with a specific tag:

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

const specific = linode.getDomains({
    filters: [{
        name: "tags",
        values: ["test-tag"],
    }],
});
export const domain = specific.then(specific => specific.domains?.[0]?.domain);
Copy
import pulumi
import pulumi_linode as linode

specific = linode.get_domains(filters=[{
    "name": "tags",
    "values": ["test-tag"],
}])
pulumi.export("domain", specific.domains[0].domain)
Copy
package main

import (
	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		specific, err := linode.GetDomains(ctx, &linode.GetDomainsArgs{
			Filters: []linode.GetDomainsFilter{
				{
					Name: "tags",
					Values: []string{
						"test-tag",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("domain", specific.Domains[0].Domain)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;

return await Deployment.RunAsync(() => 
{
    var specific = Linode.GetDomains.Invoke(new()
    {
        Filters = new[]
        {
            new Linode.Inputs.GetDomainsFilterInputArgs
            {
                Name = "tags",
                Values = new[]
                {
                    "test-tag",
                },
            },
        },
    });

    return new Dictionary<string, object?>
    {
        ["domain"] = specific.Apply(getDomainsResult => getDomainsResult.Domains[0]?.Domain),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.LinodeFunctions;
import com.pulumi.linode.inputs.GetDomainsArgs;
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 specific = LinodeFunctions.getDomains(GetDomainsArgs.builder()
            .filters(GetDomainsFilterArgs.builder()
                .name("tags")
                .values("test-tag")
                .build())
            .build());

        ctx.export("domain", specific.applyValue(getDomainsResult -> getDomainsResult.domains()[0].domain()));
    }
}
Copy
variables:
  specific:
    fn::invoke:
      function: linode:getDomains
      arguments:
        filters:
          - name: tags
            values:
              - test-tag
outputs:
  domain: ${specific.domains[0].domain}
Copy

Filterable Fields

  • group

  • tags

  • domain

  • type

  • status

  • description

  • master_ips

  • axfr_ips

  • ttl_sec

  • retry_sec

  • expire_sec

  • refresh_sec

  • soa_email

Using getDomains

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 getDomains(args: GetDomainsArgs, opts?: InvokeOptions): Promise<GetDomainsResult>
function getDomainsOutput(args: GetDomainsOutputArgs, opts?: InvokeOptions): Output<GetDomainsResult>
Copy
def get_domains(domains: Optional[Sequence[GetDomainsDomain]] = None,
                filters: Optional[Sequence[GetDomainsFilter]] = None,
                order: Optional[str] = None,
                order_by: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetDomainsResult
def get_domains_output(domains: Optional[pulumi.Input[Sequence[pulumi.Input[GetDomainsDomainArgs]]]] = None,
                filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetDomainsFilterArgs]]]] = None,
                order: Optional[pulumi.Input[str]] = None,
                order_by: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetDomainsResult]
Copy
func GetDomains(ctx *Context, args *GetDomainsArgs, opts ...InvokeOption) (*GetDomainsResult, error)
func GetDomainsOutput(ctx *Context, args *GetDomainsOutputArgs, opts ...InvokeOption) GetDomainsResultOutput
Copy

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

public static class GetDomains 
{
    public static Task<GetDomainsResult> InvokeAsync(GetDomainsArgs args, InvokeOptions? opts = null)
    public static Output<GetDomainsResult> Invoke(GetDomainsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDomainsResult> getDomains(GetDomainsArgs args, InvokeOptions options)
public static Output<GetDomainsResult> getDomains(GetDomainsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: linode:index/getDomains:getDomains
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Domains List<GetDomainsDomain>
Filters List<GetDomainsFilter>
Order string
The order in which results should be returned. (asc, desc; default asc)
OrderBy string
The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
Domains []GetDomainsDomain
Filters []GetDomainsFilter
Order string
The order in which results should be returned. (asc, desc; default asc)
OrderBy string
The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
domains List<GetDomainsDomain>
filters List<GetDomainsFilter>
order String
The order in which results should be returned. (asc, desc; default asc)
orderBy String
The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
domains GetDomainsDomain[]
filters GetDomainsFilter[]
order string
The order in which results should be returned. (asc, desc; default asc)
orderBy string
The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
domains Sequence[GetDomainsDomain]
filters Sequence[GetDomainsFilter]
order str
The order in which results should be returned. (asc, desc; default asc)
order_by str
The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
domains List<Property Map>
filters List<Property Map>
order String
The order in which results should be returned. (asc, desc; default asc)
orderBy String
The attribute to order the results by. See the Filterable Fields section for a list of valid fields.

getDomains Result

The following output properties are available:

Id string
The unique ID of this Domain.
Domains List<GetDomainsDomain>
Filters List<GetDomainsFilter>
Order string
OrderBy string
Id string
The unique ID of this Domain.
Domains []GetDomainsDomain
Filters []GetDomainsFilter
Order string
OrderBy string
id String
The unique ID of this Domain.
domains List<GetDomainsDomain>
filters List<GetDomainsFilter>
order String
orderBy String
id string
The unique ID of this Domain.
domains GetDomainsDomain[]
filters GetDomainsFilter[]
order string
orderBy string
id String
The unique ID of this Domain.
domains List<Property Map>
filters List<Property Map>
order String
orderBy String

Supporting Types

GetDomainsDomain

AxfrIps This property is required. List<string>
The list of IPs that may perform a zone transfer for this Domain.
Description This property is required. string
A description for this Domain.
ExpireSec This property is required. int
The amount of time in seconds that may pass before this Domain is no longer authoritative.
Group This property is required. string
The group this Domain belongs to.
MasterIps This property is required. List<string>
The IP addresses representing the master DNS for this Domain.
RefreshSec This property is required. int
The amount of time in seconds before this Domain should be refreshed.
RetrySec This property is required. int
The interval, in seconds, at which a failed refresh should be retried.
SoaEmail This property is required. string
Start of Authority email address.
Status This property is required. string
Used to control whether this Domain is currently being rendered. (disabled, active)
Tags This property is required. List<string>
An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
TtlSec This property is required. int
'Time to Live'-the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers.
Type This property is required. string
If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave) (master, slave)
Domain string
The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain
Id int
The unique ID of this Domain.
AxfrIps This property is required. []string
The list of IPs that may perform a zone transfer for this Domain.
Description This property is required. string
A description for this Domain.
ExpireSec This property is required. int
The amount of time in seconds that may pass before this Domain is no longer authoritative.
Group This property is required. string
The group this Domain belongs to.
MasterIps This property is required. []string
The IP addresses representing the master DNS for this Domain.
RefreshSec This property is required. int
The amount of time in seconds before this Domain should be refreshed.
RetrySec This property is required. int
The interval, in seconds, at which a failed refresh should be retried.
SoaEmail This property is required. string
Start of Authority email address.
Status This property is required. string
Used to control whether this Domain is currently being rendered. (disabled, active)
Tags This property is required. []string
An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
TtlSec This property is required. int
'Time to Live'-the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers.
Type This property is required. string
If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave) (master, slave)
Domain string
The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain
Id int
The unique ID of this Domain.
axfrIps This property is required. List<String>
The list of IPs that may perform a zone transfer for this Domain.
description This property is required. String
A description for this Domain.
expireSec This property is required. Integer
The amount of time in seconds that may pass before this Domain is no longer authoritative.
group This property is required. String
The group this Domain belongs to.
masterIps This property is required. List<String>
The IP addresses representing the master DNS for this Domain.
refreshSec This property is required. Integer
The amount of time in seconds before this Domain should be refreshed.
retrySec This property is required. Integer
The interval, in seconds, at which a failed refresh should be retried.
soaEmail This property is required. String
Start of Authority email address.
status This property is required. String
Used to control whether this Domain is currently being rendered. (disabled, active)
tags This property is required. List<String>
An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
ttlSec This property is required. Integer
'Time to Live'-the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers.
type This property is required. String
If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave) (master, slave)
domain String
The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain
id Integer
The unique ID of this Domain.
axfrIps This property is required. string[]
The list of IPs that may perform a zone transfer for this Domain.
description This property is required. string
A description for this Domain.
expireSec This property is required. number
The amount of time in seconds that may pass before this Domain is no longer authoritative.
group This property is required. string
The group this Domain belongs to.
masterIps This property is required. string[]
The IP addresses representing the master DNS for this Domain.
refreshSec This property is required. number
The amount of time in seconds before this Domain should be refreshed.
retrySec This property is required. number
The interval, in seconds, at which a failed refresh should be retried.
soaEmail This property is required. string
Start of Authority email address.
status This property is required. string
Used to control whether this Domain is currently being rendered. (disabled, active)
tags This property is required. string[]
An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
ttlSec This property is required. number
'Time to Live'-the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers.
type This property is required. string
If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave) (master, slave)
domain string
The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain
id number
The unique ID of this Domain.
axfr_ips This property is required. Sequence[str]
The list of IPs that may perform a zone transfer for this Domain.
description This property is required. str
A description for this Domain.
expire_sec This property is required. int
The amount of time in seconds that may pass before this Domain is no longer authoritative.
group This property is required. str
The group this Domain belongs to.
master_ips This property is required. Sequence[str]
The IP addresses representing the master DNS for this Domain.
refresh_sec This property is required. int
The amount of time in seconds before this Domain should be refreshed.
retry_sec This property is required. int
The interval, in seconds, at which a failed refresh should be retried.
soa_email This property is required. str
Start of Authority email address.
status This property is required. str
Used to control whether this Domain is currently being rendered. (disabled, active)
tags This property is required. Sequence[str]
An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
ttl_sec This property is required. int
'Time to Live'-the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers.
type This property is required. str
If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave) (master, slave)
domain str
The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain
id int
The unique ID of this Domain.
axfrIps This property is required. List<String>
The list of IPs that may perform a zone transfer for this Domain.
description This property is required. String
A description for this Domain.
expireSec This property is required. Number
The amount of time in seconds that may pass before this Domain is no longer authoritative.
group This property is required. String
The group this Domain belongs to.
masterIps This property is required. List<String>
The IP addresses representing the master DNS for this Domain.
refreshSec This property is required. Number
The amount of time in seconds before this Domain should be refreshed.
retrySec This property is required. Number
The interval, in seconds, at which a failed refresh should be retried.
soaEmail This property is required. String
Start of Authority email address.
status This property is required. String
Used to control whether this Domain is currently being rendered. (disabled, active)
tags This property is required. List<String>
An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
ttlSec This property is required. Number
'Time to Live'-the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers.
type This property is required. String
If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave) (master, slave)
domain String
The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain
id Number
The unique ID of this Domain.

GetDomainsFilter

Name This property is required. string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
Values This property is required. List<string>
A list of values for the filter to allow. These values should all be in string form.
MatchBy string
The method to match the field by. (exact, regex, substring; default exact)
Name This property is required. string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
Values This property is required. []string
A list of values for the filter to allow. These values should all be in string form.
MatchBy string
The method to match the field by. (exact, regex, substring; default exact)
name This property is required. String
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
values This property is required. List<String>
A list of values for the filter to allow. These values should all be in string form.
matchBy String
The method to match the field by. (exact, regex, substring; default exact)
name This property is required. string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
values This property is required. string[]
A list of values for the filter to allow. These values should all be in string form.
matchBy string
The method to match the field by. (exact, regex, substring; default exact)
name This property is required. str
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
values This property is required. Sequence[str]
A list of values for the filter to allow. These values should all be in string form.
match_by str
The method to match the field by. (exact, regex, substring; default exact)
name This property is required. String
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
values This property is required. List<String>
A list of values for the filter to allow. These values should all be in string form.
matchBy String
The method to match the field by. (exact, regex, substring; default exact)

Package Details

Repository
Linode pulumi/pulumi-linode
License
Apache-2.0
Notes
This Pulumi package is based on the linode Terraform Provider.