1. Packages
  2. Scaleway
  3. API Docs
  4. getDomainRecord
Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs

scaleway.getDomainRecord

Explore with Pulumi AI

scaleway logo
Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs

    Gets information about a domain record.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var byContent = Scaleway.GetDomainRecord.Invoke(new()
        {
            Data = "1.2.3.4",
            DnsZone = "domain.tld",
            Name = "www",
            Type = "A",
        });
    
        var byId = Scaleway.GetDomainRecord.Invoke(new()
        {
            DnsZone = "domain.tld",
            RecordId = "11111111-1111-1111-1111-111111111111",
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.LookupDomainRecord(ctx, &scaleway.LookupDomainRecordArgs{
    			Data:    pulumi.StringRef("1.2.3.4"),
    			DnsZone: pulumi.StringRef("domain.tld"),
    			Name:    pulumi.StringRef("www"),
    			Type:    pulumi.StringRef("A"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.LookupDomainRecord(ctx, &scaleway.LookupDomainRecordArgs{
    			DnsZone:  pulumi.StringRef("domain.tld"),
    			RecordId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetDomainRecordArgs;
    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 byContent = ScalewayFunctions.getDomainRecord(GetDomainRecordArgs.builder()
                .data("1.2.3.4")
                .dnsZone("domain.tld")
                .name("www")
                .type("A")
                .build());
    
            final var byId = ScalewayFunctions.getDomainRecord(GetDomainRecordArgs.builder()
                .dnsZone("domain.tld")
                .recordId("11111111-1111-1111-1111-111111111111")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    by_content = scaleway.get_domain_record(data="1.2.3.4",
        dns_zone="domain.tld",
        name="www",
        type="A")
    by_id = scaleway.get_domain_record(dns_zone="domain.tld",
        record_id="11111111-1111-1111-1111-111111111111")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    
    const byContent = scaleway.getDomainRecord({
        data: "1.2.3.4",
        dnsZone: "domain.tld",
        name: "www",
        type: "A",
    });
    const byId = scaleway.getDomainRecord({
        dnsZone: "domain.tld",
        recordId: "11111111-1111-1111-1111-111111111111",
    });
    
    variables:
      byContent:
        fn::invoke:
          Function: scaleway:getDomainRecord
          Arguments:
            data: 1.2.3.4
            dnsZone: domain.tld
            name: www
            type: A
      byId:
        fn::invoke:
          Function: scaleway:getDomainRecord
          Arguments:
            dnsZone: domain.tld
            recordId: 11111111-1111-1111-1111-111111111111
    

    Using getDomainRecord

    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 getDomainRecord(args: GetDomainRecordArgs, opts?: InvokeOptions): Promise<GetDomainRecordResult>
    function getDomainRecordOutput(args: GetDomainRecordOutputArgs, opts?: InvokeOptions): Output<GetDomainRecordResult>
    def get_domain_record(data: Optional[str] = None,
                          dns_zone: Optional[str] = None,
                          name: Optional[str] = None,
                          record_id: Optional[str] = None,
                          type: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetDomainRecordResult
    def get_domain_record_output(data: Optional[pulumi.Input[str]] = None,
                          dns_zone: Optional[pulumi.Input[str]] = None,
                          name: Optional[pulumi.Input[str]] = None,
                          record_id: Optional[pulumi.Input[str]] = None,
                          type: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetDomainRecordResult]
    func LookupDomainRecord(ctx *Context, args *LookupDomainRecordArgs, opts ...InvokeOption) (*LookupDomainRecordResult, error)
    func LookupDomainRecordOutput(ctx *Context, args *LookupDomainRecordOutputArgs, opts ...InvokeOption) LookupDomainRecordResultOutput

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

    public static class GetDomainRecord 
    {
        public static Task<GetDomainRecordResult> InvokeAsync(GetDomainRecordArgs args, InvokeOptions? opts = null)
        public static Output<GetDomainRecordResult> Invoke(GetDomainRecordInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDomainRecordResult> getDomainRecord(GetDomainRecordArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: scaleway:index/getDomainRecord:getDomainRecord
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Data string

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    DnsZone string

    The IP address.

    Name string

    The name of the record (can be an empty string for a root record). Cannot be used with record_id.

    RecordId string

    The record ID. Cannot be used with name, type and data.

    Type string

    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA). Cannot be used with record_id.

    Data string

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    DnsZone string

    The IP address.

    Name string

    The name of the record (can be an empty string for a root record). Cannot be used with record_id.

    RecordId string

    The record ID. Cannot be used with name, type and data.

    Type string

    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA). Cannot be used with record_id.

    data String

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    dnsZone String

    The IP address.

    name String

    The name of the record (can be an empty string for a root record). Cannot be used with record_id.

    recordId String

    The record ID. Cannot be used with name, type and data.

    type String

    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA). Cannot be used with record_id.

    data string

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    dnsZone string

    The IP address.

    name string

    The name of the record (can be an empty string for a root record). Cannot be used with record_id.

    recordId string

    The record ID. Cannot be used with name, type and data.

    type string

    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA). Cannot be used with record_id.

    data str

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    dns_zone str

    The IP address.

    name str

    The name of the record (can be an empty string for a root record). Cannot be used with record_id.

    record_id str

    The record ID. Cannot be used with name, type and data.

    type str

    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA). Cannot be used with record_id.

    data String

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    dnsZone String

    The IP address.

    name String

    The name of the record (can be an empty string for a root record). Cannot be used with record_id.

    recordId String

    The record ID. Cannot be used with name, type and data.

    type String

    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA). Cannot be used with record_id.

    getDomainRecord Result

    The following output properties are available:

    GeoIps List<Lbrlabs.PulumiPackage.Scaleway.Outputs.GetDomainRecordGeoIp>

    Dynamic record base on user geolocalisation (More information about dynamic records)

    HttpServices List<Lbrlabs.PulumiPackage.Scaleway.Outputs.GetDomainRecordHttpService>

    Dynamic record base on URL resolve (More information about dynamic records)

    Id string

    The provider-assigned unique ID for this managed resource.

    KeepEmptyZone bool
    Priority int

    The priority of the record (mostly used with an MX record)

    ProjectId string
    RootZone bool
    Ttl int

    Time To Live of the record in seconds.

    Views List<Lbrlabs.PulumiPackage.Scaleway.Outputs.GetDomainRecordView>

    Dynamic record based on the client’s (resolver) subnet (More information about dynamic records)

    Weighteds List<Lbrlabs.PulumiPackage.Scaleway.Outputs.GetDomainRecordWeighted>

    Dynamic record base on IP weights (More information about dynamic records)

    Data string
    DnsZone string
    Name string
    RecordId string
    Type string
    GeoIps []GetDomainRecordGeoIp

    Dynamic record base on user geolocalisation (More information about dynamic records)

    HttpServices []GetDomainRecordHttpService

    Dynamic record base on URL resolve (More information about dynamic records)

    Id string

    The provider-assigned unique ID for this managed resource.

    KeepEmptyZone bool
    Priority int

    The priority of the record (mostly used with an MX record)

    ProjectId string
    RootZone bool
    Ttl int

    Time To Live of the record in seconds.

    Views []GetDomainRecordView

    Dynamic record based on the client’s (resolver) subnet (More information about dynamic records)

    Weighteds []GetDomainRecordWeighted

    Dynamic record base on IP weights (More information about dynamic records)

    Data string
    DnsZone string
    Name string
    RecordId string
    Type string
    geoIps List<GetDomainRecordGeoIp>

    Dynamic record base on user geolocalisation (More information about dynamic records)

    httpServices List<GetDomainRecordHttpService>

    Dynamic record base on URL resolve (More information about dynamic records)

    id String

    The provider-assigned unique ID for this managed resource.

    keepEmptyZone Boolean
    priority Integer

    The priority of the record (mostly used with an MX record)

    projectId String
    rootZone Boolean
    ttl Integer

    Time To Live of the record in seconds.

    views List<GetDomainRecordView>

    Dynamic record based on the client’s (resolver) subnet (More information about dynamic records)

    weighteds List<GetDomainRecordWeighted>

    Dynamic record base on IP weights (More information about dynamic records)

    data String
    dnsZone String
    name String
    recordId String
    type String
    geoIps GetDomainRecordGeoIp[]

    Dynamic record base on user geolocalisation (More information about dynamic records)

    httpServices GetDomainRecordHttpService[]

    Dynamic record base on URL resolve (More information about dynamic records)

    id string

    The provider-assigned unique ID for this managed resource.

    keepEmptyZone boolean
    priority number

    The priority of the record (mostly used with an MX record)

    projectId string
    rootZone boolean
    ttl number

    Time To Live of the record in seconds.

    views GetDomainRecordView[]

    Dynamic record based on the client’s (resolver) subnet (More information about dynamic records)

    weighteds GetDomainRecordWeighted[]

    Dynamic record base on IP weights (More information about dynamic records)

    data string
    dnsZone string
    name string
    recordId string
    type string
    geo_ips Sequence[GetDomainRecordGeoIp]

    Dynamic record base on user geolocalisation (More information about dynamic records)

    http_services Sequence[GetDomainRecordHttpService]

    Dynamic record base on URL resolve (More information about dynamic records)

    id str

    The provider-assigned unique ID for this managed resource.

    keep_empty_zone bool
    priority int

    The priority of the record (mostly used with an MX record)

    project_id str
    root_zone bool
    ttl int

    Time To Live of the record in seconds.

    views Sequence[GetDomainRecordView]

    Dynamic record based on the client’s (resolver) subnet (More information about dynamic records)

    weighteds Sequence[GetDomainRecordWeighted]

    Dynamic record base on IP weights (More information about dynamic records)

    data str
    dns_zone str
    name str
    record_id str
    type str
    geoIps List<Property Map>

    Dynamic record base on user geolocalisation (More information about dynamic records)

    httpServices List<Property Map>

    Dynamic record base on URL resolve (More information about dynamic records)

    id String

    The provider-assigned unique ID for this managed resource.

    keepEmptyZone Boolean
    priority Number

    The priority of the record (mostly used with an MX record)

    projectId String
    rootZone Boolean
    ttl Number

    Time To Live of the record in seconds.

    views List<Property Map>

    Dynamic record based on the client’s (resolver) subnet (More information about dynamic records)

    weighteds List<Property Map>

    Dynamic record base on IP weights (More information about dynamic records)

    data String
    dnsZone String
    name String
    recordId String
    type String

    Supporting Types

    GetDomainRecordGeoIp

    GetDomainRecordGeoIpMatch

    Continents List<string>
    Countries List<string>
    Data string

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    Continents []string
    Countries []string
    Data string

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    continents List<String>
    countries List<String>
    data String

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    continents string[]
    countries string[]
    data string

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    continents Sequence[str]
    countries Sequence[str]
    data str

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    continents List<String>
    countries List<String>
    data String

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    GetDomainRecordHttpService

    Ips List<string>
    MustContain string
    Strategy string
    Url string
    UserAgent string
    Ips []string
    MustContain string
    Strategy string
    Url string
    UserAgent string
    ips List<String>
    mustContain String
    strategy String
    url String
    userAgent String
    ips string[]
    mustContain string
    strategy string
    url string
    userAgent string
    ips Sequence[str]
    must_contain str
    strategy str
    url str
    user_agent str
    ips List<String>
    mustContain String
    strategy String
    url String
    userAgent String

    GetDomainRecordView

    Data string

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    Subnet string
    Data string

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    Subnet string
    data String

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    subnet String
    data string

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    subnet string
    data str

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    subnet str
    data String

    The content of the record (an IPv4 for an A, a string for a TXT...). Cannot be used with record_id.

    subnet String

    GetDomainRecordWeighted

    Ip string
    Weight int
    Ip string
    Weight int
    ip String
    weight Integer
    ip string
    weight number
    ip str
    weight int
    ip String
    weight Number

    Package Details

    Repository
    scaleway lbrlabs/pulumi-scaleway
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the scaleway Terraform Provider.

    scaleway logo
    Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs