1. Packages
  2. Constellix Provider
  3. API Docs
  4. getTxtRecord
constellix 0.4.6 published on Friday, Mar 7, 2025 by constellix

constellix.getTxtRecord

Explore with Pulumi AI

constellix logo
constellix 0.4.6 published on Friday, Mar 7, 2025 by constellix

    Data source for TXT record

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as constellix from "@pulumi/constellix";
    
    const datatxt = constellix.getTxtRecord({
        domainId: data.constellix_domain.first.id,
        name: "txtdatasource",
        sourceType: "domains",
    });
    
    import pulumi
    import pulumi_constellix as constellix
    
    datatxt = constellix.get_txt_record(domain_id=data["constellix_domain"]["first"]["id"],
        name="txtdatasource",
        source_type="domains")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/constellix/constellix"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := constellix.LookupTxtRecord(ctx, &constellix.LookupTxtRecordArgs{
    			DomainId:   data.Constellix_domain.First.Id,
    			Name:       "txtdatasource",
    			SourceType: "domains",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Constellix = Pulumi.Constellix;
    
    return await Deployment.RunAsync(() => 
    {
        var datatxt = Constellix.GetTxtRecord.Invoke(new()
        {
            DomainId = data.Constellix_domain.First.Id,
            Name = "txtdatasource",
            SourceType = "domains",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.constellix.ConstellixFunctions;
    import com.pulumi.constellix.inputs.GetTxtRecordArgs;
    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 datatxt = ConstellixFunctions.getTxtRecord(GetTxtRecordArgs.builder()
                .domainId(data.constellix_domain().first().id())
                .name("txtdatasource")
                .sourceType("domains")
                .build());
    
        }
    }
    
    variables:
      datatxt:
        fn::invoke:
          function: constellix:getTxtRecord
          arguments:
            domainId: ${data.constellix_domain.first.id}
            name: txtdatasource
            sourceType: domains
    

    Argument Reference

    • name - (Required) Name of record. Name should be unique.
    • source_type - (Required) “domains” for Domain records and “template” for Template records
    • domain_id - (Required) Record id of TXT record

    Attribute Reference

    • ttl - (Optional) TTL must be in between 0 and 2147483647
    • source_type - (Required) “domains” for Domain records and “template” for Template records
    • roundrobin - (Optional) Set
    • roundrobin.value - (Optional) Free form text data of any type which may be no longer than 255 characters unless divided into multiple strings with sets of quotation marks..
    • roundrobin.disable_flag - (Optional) Disable flag. Default is false
    • name - (Required) Name of record. Name should be unique.
    • noanswer - (Optional) Shows if record is enabled or disabled. Default is false (Active)
    • note - (Optional) Record note
    • gtd_region - (Optional) Shows id of GTD region in which record is to be created.
    • type - (Optional) Record type TXT

    Using getTxtRecord

    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 getTxtRecord(args: GetTxtRecordArgs, opts?: InvokeOptions): Promise<GetTxtRecordResult>
    function getTxtRecordOutput(args: GetTxtRecordOutputArgs, opts?: InvokeOptions): Output<GetTxtRecordResult>
    def get_txt_record(domain_id: Optional[str] = None,
                       gtd_region: Optional[float] = None,
                       id: Optional[str] = None,
                       name: Optional[str] = None,
                       noanswer: Optional[bool] = None,
                       note: Optional[str] = None,
                       parent: Optional[str] = None,
                       parentid: Optional[float] = None,
                       roundrobins: Optional[Sequence[GetTxtRecordRoundrobin]] = None,
                       source: Optional[str] = None,
                       source_type: Optional[str] = None,
                       ttl: Optional[float] = None,
                       type: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetTxtRecordResult
    def get_txt_record_output(domain_id: Optional[pulumi.Input[str]] = None,
                       gtd_region: Optional[pulumi.Input[float]] = None,
                       id: Optional[pulumi.Input[str]] = None,
                       name: Optional[pulumi.Input[str]] = None,
                       noanswer: Optional[pulumi.Input[bool]] = None,
                       note: Optional[pulumi.Input[str]] = None,
                       parent: Optional[pulumi.Input[str]] = None,
                       parentid: Optional[pulumi.Input[float]] = None,
                       roundrobins: Optional[pulumi.Input[Sequence[pulumi.Input[GetTxtRecordRoundrobinArgs]]]] = None,
                       source: Optional[pulumi.Input[str]] = None,
                       source_type: Optional[pulumi.Input[str]] = None,
                       ttl: Optional[pulumi.Input[float]] = None,
                       type: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetTxtRecordResult]
    func LookupTxtRecord(ctx *Context, args *LookupTxtRecordArgs, opts ...InvokeOption) (*LookupTxtRecordResult, error)
    func LookupTxtRecordOutput(ctx *Context, args *LookupTxtRecordOutputArgs, opts ...InvokeOption) LookupTxtRecordResultOutput

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

    public static class GetTxtRecord 
    {
        public static Task<GetTxtRecordResult> InvokeAsync(GetTxtRecordArgs args, InvokeOptions? opts = null)
        public static Output<GetTxtRecordResult> Invoke(GetTxtRecordInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTxtRecordResult> getTxtRecord(GetTxtRecordArgs args, InvokeOptions options)
    public static Output<GetTxtRecordResult> getTxtRecord(GetTxtRecordArgs args, InvokeOptions options)
    
    fn::invoke:
      function: constellix:index/getTxtRecord:getTxtRecord
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DomainId string
    Name string
    SourceType string
    GtdRegion double
    Id string
    Noanswer bool
    Note string
    Parent string
    Parentid double
    Roundrobins List<GetTxtRecordRoundrobin>
    Source string
    Ttl double
    Type string
    DomainId string
    Name string
    SourceType string
    GtdRegion float64
    Id string
    Noanswer bool
    Note string
    Parent string
    Parentid float64
    Roundrobins []GetTxtRecordRoundrobin
    Source string
    Ttl float64
    Type string
    domainId String
    name String
    sourceType String
    gtdRegion Double
    id String
    noanswer Boolean
    note String
    parent String
    parentid Double
    roundrobins List<GetTxtRecordRoundrobin>
    source String
    ttl Double
    type String
    domainId string
    name string
    sourceType string
    gtdRegion number
    id string
    noanswer boolean
    note string
    parent string
    parentid number
    roundrobins GetTxtRecordRoundrobin[]
    source string
    ttl number
    type string
    domainId String
    name String
    sourceType String
    gtdRegion Number
    id String
    noanswer Boolean
    note String
    parent String
    parentid Number
    roundrobins List<Property Map>
    source String
    ttl Number
    type String

    getTxtRecord Result

    The following output properties are available:

    DomainId string
    GtdRegion double
    Id string
    Name string
    Noanswer bool
    Note string
    Parent string
    Parentid double
    Source string
    SourceType string
    Ttl double
    Type string
    Roundrobins List<GetTxtRecordRoundrobin>
    DomainId string
    GtdRegion float64
    Id string
    Name string
    Noanswer bool
    Note string
    Parent string
    Parentid float64
    Source string
    SourceType string
    Ttl float64
    Type string
    Roundrobins []GetTxtRecordRoundrobin
    domainId String
    gtdRegion Double
    id String
    name String
    noanswer Boolean
    note String
    parent String
    parentid Double
    source String
    sourceType String
    ttl Double
    type String
    roundrobins List<GetTxtRecordRoundrobin>
    domainId string
    gtdRegion number
    id string
    name string
    noanswer boolean
    note string
    parent string
    parentid number
    source string
    sourceType string
    ttl number
    type string
    roundrobins GetTxtRecordRoundrobin[]
    domainId String
    gtdRegion Number
    id String
    name String
    noanswer Boolean
    note String
    parent String
    parentid Number
    source String
    sourceType String
    ttl Number
    type String
    roundrobins List<Property Map>

    Supporting Types

    GetTxtRecordRoundrobin

    DisableFlag bool
    Value string
    DisableFlag bool
    Value string
    disableFlag Boolean
    value String
    disableFlag boolean
    value string
    disableFlag Boolean
    value String

    Package Details

    Repository
    constellix constellix/terraform-provider-constellix
    License
    Notes
    This Pulumi package is based on the constellix Terraform Provider.
    constellix logo
    constellix 0.4.6 published on Friday, Mar 7, 2025 by constellix