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

constellix.getSrvRecord

Explore with Pulumi AI

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

    Data source for SRV record

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as constellix from "@pulumi/constellix";
    
    const datasrv = constellix.getSrvRecord({
        domainId: data.constellix_domain.first.id,
        name: "srvdatasource",
        sourceType: "domains",
    });
    
    import pulumi
    import pulumi_constellix as constellix
    
    datasrv = constellix.get_srv_record(domain_id=data["constellix_domain"]["first"]["id"],
        name="srvdatasource",
        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.LookupSrvRecord(ctx, &constellix.LookupSrvRecordArgs{
    			DomainId:   data.Constellix_domain.First.Id,
    			Name:       "srvdatasource",
    			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 datasrv = Constellix.GetSrvRecord.Invoke(new()
        {
            DomainId = data.Constellix_domain.First.Id,
            Name = "srvdatasource",
            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.GetSrvRecordArgs;
    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 datasrv = ConstellixFunctions.getSrvRecord(GetSrvRecordArgs.builder()
                .domainId(data.constellix_domain().first().id())
                .name("srvdatasource")
                .sourceType("domains")
                .build());
    
        }
    }
    
    variables:
      datasrv:
        fn::invoke:
          function: constellix:getSrvRecord
          arguments:
            domainId: ${data.constellix_domain.first.id}
            name: srvdatasource
            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 SRV 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) The system that will receive the service.
    • roundrobin.disable_flag - (Optional) Enable or Disable the roundrobin object. Default is false. Atleast one roundrobin object should be false.
    • roundrobin.port - (Optional) The port of the service offered. Value should be between 0 and 65535.
    • roundrobin.priority - (Optional) The lower the number in the priority field, the higher the preference of the associated target. 0 is the highest priority (lowest number). Value should be between 0 and 65535.
    • roundrobin.weight - (Optional) The weight of the record allows an administrator to distribute load to multiple targets (load balance). Value should be between 0 and 65535.
    • 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 SRV

    Using getSrvRecord

    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 getSrvRecord(args: GetSrvRecordArgs, opts?: InvokeOptions): Promise<GetSrvRecordResult>
    function getSrvRecordOutput(args: GetSrvRecordOutputArgs, opts?: InvokeOptions): Output<GetSrvRecordResult>
    def get_srv_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,
                       roundrobins: Optional[Sequence[GetSrvRecordRoundrobin]] = None,
                       source_type: Optional[str] = None,
                       ttl: Optional[float] = None,
                       type: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetSrvRecordResult
    def get_srv_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,
                       roundrobins: Optional[pulumi.Input[Sequence[pulumi.Input[GetSrvRecordRoundrobinArgs]]]] = 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[GetSrvRecordResult]
    func LookupSrvRecord(ctx *Context, args *LookupSrvRecordArgs, opts ...InvokeOption) (*LookupSrvRecordResult, error)
    func LookupSrvRecordOutput(ctx *Context, args *LookupSrvRecordOutputArgs, opts ...InvokeOption) LookupSrvRecordResultOutput

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

    public static class GetSrvRecord 
    {
        public static Task<GetSrvRecordResult> InvokeAsync(GetSrvRecordArgs args, InvokeOptions? opts = null)
        public static Output<GetSrvRecordResult> Invoke(GetSrvRecordInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSrvRecordResult> getSrvRecord(GetSrvRecordArgs args, InvokeOptions options)
    public static Output<GetSrvRecordResult> getSrvRecord(GetSrvRecordArgs args, InvokeOptions options)
    
    fn::invoke:
      function: constellix:index/getSrvRecord:getSrvRecord
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    getSrvRecord Result

    The following output properties are available:

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

    Supporting Types

    GetSrvRecordRoundrobin

    DisableFlag bool
    Port double
    Priority double
    Value string
    Weight double
    DisableFlag bool
    Port float64
    Priority float64
    Value string
    Weight float64
    disableFlag Boolean
    port Double
    priority Double
    value String
    weight Double
    disableFlag boolean
    port number
    priority number
    value string
    weight number
    disable_flag bool
    port float
    priority float
    value str
    weight float
    disableFlag Boolean
    port Number
    priority Number
    value String
    weight Number

    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