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

constellix.getARecord

Explore with Pulumi AI

Data source for A record.

Example Usage

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

const firstrecord = constellix.getARecord({
    domainId: constellix_domain.first_domain.id,
    name: "firstrecord",
    sourceType: "domains",
});
Copy
import pulumi
import pulumi_constellix as constellix

firstrecord = constellix.get_a_record(domain_id=constellix_domain["first_domain"]["id"],
    name="firstrecord",
    source_type="domains")
Copy
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.LookupARecord(ctx, &constellix.LookupARecordArgs{
			DomainId:   constellix_domain.First_domain.Id,
			Name:       "firstrecord",
			SourceType: "domains",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Constellix = Pulumi.Constellix;

return await Deployment.RunAsync(() => 
{
    var firstrecord = Constellix.GetARecord.Invoke(new()
    {
        DomainId = constellix_domain.First_domain.Id,
        Name = "firstrecord",
        SourceType = "domains",
    });

});
Copy
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.GetARecordArgs;
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 firstrecord = ConstellixFunctions.getARecord(GetARecordArgs.builder()
            .domainId(constellix_domain.first_domain().id())
            .name("firstrecord")
            .sourceType("domains")
            .build());

    }
}
Copy
variables:
  firstrecord:
    fn::invoke:
      function: constellix:getARecord
      arguments:
        domainId: ${constellix_domain.first_domain.id}
        name: firstrecord
        sourceType: domains
Copy

Attribute Reference

  • ttl - (Optional) TTL must be in between 0 and 2147483647.
  • roundrobin - (Optional) Object.
  • roundrobin.value - (Optional) IPv4 address.
  • roundrobin.disable_flag - (Optional) enable or disable the roundrobin object. Default is false. Atleast one roundrobin object should be false.
  • geo_location - (Optional) Details of IP filter / Geo proximity to be applied. Default is null.
  • geo_location.geo_ip_user_region - (Optional) For Geo proximity to be applied. geoipUserRegion should not be provided.
  • geo_location.drop - (Optional) drop flag. Default is false.
  • geo_location.geo_ip_proximity - (Optional) a valid geoipProximity id.
  • geo_location.geo_ip_user_region - (Optional) For Geo IP Filter to be applied. geoipUserRegion should be [1].
  • geo_location.drop - (Optional) drop flag. Default is false.
  • geo_location.geo_ip_failover - (Optional) Flag to enable/disable Failover to nearest proximity when all the host fails. Works with the record type pools. It requires Geo Proximity to be enabled at the Domain level. Default is false.
  • geo_location.geo_ip_proximity - (Optional) for Geo IP Filter, geoipProximity must not be provided. please create an A record with “World (Default)” IP Filter first before a more specific IP Filter is applied. The “World (Default)” record would only be used if no matching Filter or Proximity records are found.
  • record_option - (Optional) Type of record. “roundRobin” for Standard record (Default). “failover” for Failover. “pools” for Pools. “roundRobinFailover” for Round Robin with Failover.
  • 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 A.
  • contact_ids - (Optional) Applied contact list id. Only applicable to record with type roundRobin with failover and failover.
  • pools - (Optional) Ids of Apool.
  • roundrobin_failover - (Optional) Set.
  • roundrobin_failover.value - (Optional) IPv4 address.
  • roundrobin_failover.disable_flag - (Optional) enable or disable the recordFailover value object. Default is false (Active). Atleast one recordFailover value object should be false.
  • roundrobin_failover.sort_order - (Optional) Integer value which decides in which order the rounrobinfailover should be sorted.
  • record_failover - (Optional) To create a record failover object pass the following attributes.
  • record_failover_values - (Optional) Set.
  • record_failover_values.value - (Optional) IPv4 address.
  • record_failover_values.check_id - (Optional) Sonar check id.
  • record_failover_values.sort_order - (Optional) Integer value which decides in which order the recordfailover should be sorted.
  • record_failover_values.disable_flag - (Optional) enable or disable the recordFailover value object. Default is false (Active). Atleast one recordFailover value object should be false.
  • record_failover_failover_type - (Optional) 1 for Normal (always lowest level). 2 for Off on any Failover event. 3 for One Way (move to higher level).
  • record_failover_disable_flag - (Optional) enable or disable the recordFailover object. Default is false (Active). Atleast one recordFailover object should be false.

Using getARecord

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 getARecord(args: GetARecordArgs, opts?: InvokeOptions): Promise<GetARecordResult>
function getARecordOutput(args: GetARecordOutputArgs, opts?: InvokeOptions): Output<GetARecordResult>
Copy
def get_a_record(contact_ids: Optional[Sequence[float]] = None,
                 domain_id: Optional[str] = None,
                 geo_location: Optional[Mapping[str, str]] = None,
                 gtd_region: Optional[float] = None,
                 id: Optional[str] = None,
                 name: Optional[str] = None,
                 noanswer: Optional[bool] = None,
                 note: Optional[str] = None,
                 pools: Optional[Sequence[float]] = None,
                 record_failover_disable_flag: Optional[str] = None,
                 record_failover_failover_type: Optional[str] = None,
                 record_failover_values: Optional[Sequence[GetARecordRecordFailoverValue]] = None,
                 record_option: Optional[str] = None,
                 roundrobin: Optional[Mapping[str, str]] = None,
                 roundrobin_failovers: Optional[Sequence[GetARecordRoundrobinFailover]] = None,
                 source_type: Optional[str] = None,
                 ttl: Optional[float] = None,
                 type: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetARecordResult
def get_a_record_output(contact_ids: Optional[pulumi.Input[Sequence[pulumi.Input[float]]]] = None,
                 domain_id: Optional[pulumi.Input[str]] = None,
                 geo_location: Optional[pulumi.Input[Mapping[str, 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,
                 pools: Optional[pulumi.Input[Sequence[pulumi.Input[float]]]] = None,
                 record_failover_disable_flag: Optional[pulumi.Input[str]] = None,
                 record_failover_failover_type: Optional[pulumi.Input[str]] = None,
                 record_failover_values: Optional[pulumi.Input[Sequence[pulumi.Input[GetARecordRecordFailoverValueArgs]]]] = None,
                 record_option: Optional[pulumi.Input[str]] = None,
                 roundrobin: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 roundrobin_failovers: Optional[pulumi.Input[Sequence[pulumi.Input[GetARecordRoundrobinFailoverArgs]]]] = 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[GetARecordResult]
Copy
func LookupARecord(ctx *Context, args *LookupARecordArgs, opts ...InvokeOption) (*LookupARecordResult, error)
func LookupARecordOutput(ctx *Context, args *LookupARecordOutputArgs, opts ...InvokeOption) LookupARecordResultOutput
Copy

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

public static class GetARecord 
{
    public static Task<GetARecordResult> InvokeAsync(GetARecordArgs args, InvokeOptions? opts = null)
    public static Output<GetARecordResult> Invoke(GetARecordInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetARecordResult> getARecord(GetARecordArgs args, InvokeOptions options)
public static Output<GetARecordResult> getARecord(GetARecordArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: constellix:index/getARecord:getARecord
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DomainId This property is required. string
Domain id of the A record.
Name This property is required. string
Name of record. Name should be unique.
SourceType This property is required. string
Type of the A record. The values which can be applied are "domains" or "templates".
ContactIds List<double>
GeoLocation Dictionary<string, string>
GtdRegion double
Id string
Noanswer bool
Note string
Pools List<double>
RecordFailoverDisableFlag string
RecordFailoverFailoverType string
RecordFailoverValues List<GetARecordRecordFailoverValue>
RecordOption string
Roundrobin Dictionary<string, string>
RoundrobinFailovers List<GetARecordRoundrobinFailover>
Ttl double
Type string
DomainId This property is required. string
Domain id of the A record.
Name This property is required. string
Name of record. Name should be unique.
SourceType This property is required. string
Type of the A record. The values which can be applied are "domains" or "templates".
ContactIds []float64
GeoLocation map[string]string
GtdRegion float64
Id string
Noanswer bool
Note string
Pools []float64
RecordFailoverDisableFlag string
RecordFailoverFailoverType string
RecordFailoverValues []GetARecordRecordFailoverValue
RecordOption string
Roundrobin map[string]string
RoundrobinFailovers []GetARecordRoundrobinFailover
Ttl float64
Type string
domainId This property is required. String
Domain id of the A record.
name This property is required. String
Name of record. Name should be unique.
sourceType This property is required. String
Type of the A record. The values which can be applied are "domains" or "templates".
contactIds List<Double>
geoLocation Map<String,String>
gtdRegion Double
id String
noanswer Boolean
note String
pools List<Double>
recordFailoverDisableFlag String
recordFailoverFailoverType String
recordFailoverValues List<GetARecordRecordFailoverValue>
recordOption String
roundrobin Map<String,String>
roundrobinFailovers List<GetARecordRoundrobinFailover>
ttl Double
type String
domainId This property is required. string
Domain id of the A record.
name This property is required. string
Name of record. Name should be unique.
sourceType This property is required. string
Type of the A record. The values which can be applied are "domains" or "templates".
contactIds number[]
geoLocation {[key: string]: string}
gtdRegion number
id string
noanswer boolean
note string
pools number[]
recordFailoverDisableFlag string
recordFailoverFailoverType string
recordFailoverValues GetARecordRecordFailoverValue[]
recordOption string
roundrobin {[key: string]: string}
roundrobinFailovers GetARecordRoundrobinFailover[]
ttl number
type string
domain_id This property is required. str
Domain id of the A record.
name This property is required. str
Name of record. Name should be unique.
source_type This property is required. str
Type of the A record. The values which can be applied are "domains" or "templates".
contact_ids Sequence[float]
geo_location Mapping[str, str]
gtd_region float
id str
noanswer bool
note str
pools Sequence[float]
record_failover_disable_flag str
record_failover_failover_type str
record_failover_values Sequence[GetARecordRecordFailoverValue]
record_option str
roundrobin Mapping[str, str]
roundrobin_failovers Sequence[GetARecordRoundrobinFailover]
ttl float
type str
domainId This property is required. String
Domain id of the A record.
name This property is required. String
Name of record. Name should be unique.
sourceType This property is required. String
Type of the A record. The values which can be applied are "domains" or "templates".
contactIds List<Number>
geoLocation Map<String>
gtdRegion Number
id String
noanswer Boolean
note String
pools List<Number>
recordFailoverDisableFlag String
recordFailoverFailoverType String
recordFailoverValues List<Property Map>
recordOption String
roundrobin Map<String>
roundrobinFailovers List<Property Map>
ttl Number
type String

getARecord Result

The following output properties are available:

Supporting Types

GetARecordRecordFailoverValue

Checkidrcdf This property is required. double
DisableFlag This property is required. string
SortOrder This property is required. string
Value This property is required. string
Checkidrcdf This property is required. float64
DisableFlag This property is required. string
SortOrder This property is required. string
Value This property is required. string
checkidrcdf This property is required. Double
disableFlag This property is required. String
sortOrder This property is required. String
value This property is required. String
checkidrcdf This property is required. number
disableFlag This property is required. string
sortOrder This property is required. string
value This property is required. string
checkidrcdf This property is required. float
disable_flag This property is required. str
sort_order This property is required. str
value This property is required. str
checkidrcdf This property is required. Number
disableFlag This property is required. String
sortOrder This property is required. String
value This property is required. String

GetARecordRoundrobinFailover

DisableFlag This property is required. string
SortOrder This property is required. string
Value This property is required. string
DisableFlag This property is required. string
SortOrder This property is required. string
Value This property is required. string
disableFlag This property is required. String
sortOrder This property is required. String
value This property is required. String
disableFlag This property is required. string
sortOrder This property is required. string
value This property is required. string
disable_flag This property is required. str
sort_order This property is required. str
value This property is required. str
disableFlag This property is required. String
sortOrder This property is required. String
value This property is required. String

Package Details

Repository
constellix constellix/terraform-provider-constellix
License
Notes
This Pulumi package is based on the constellix Terraform Provider.