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

constellix.getGeoProximity

Explore with Pulumi AI

Data source for Geoproximity for A, AAAA, CNAME or ANAME records.

Example Usage

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

const firstgeoproximity = constellix.getGeoProximity({
    name: "practice",
});
Copy
import pulumi
import pulumi_constellix as constellix

firstgeoproximity = constellix.get_geo_proximity(name="practice")
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.LookupGeoProximity(ctx, &constellix.LookupGeoProximityArgs{
			Name: "practice",
		}, 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 firstgeoproximity = Constellix.GetGeoProximity.Invoke(new()
    {
        Name = "practice",
    });

});
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.GetGeoProximityArgs;
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 firstgeoproximity = ConstellixFunctions.getGeoProximity(GetGeoProximityArgs.builder()
            .name("practice")
            .build());

    }
}
Copy
variables:
  firstgeoproximity:
    fn::invoke:
      function: constellix:getGeoProximity
      arguments:
        name: practice
Copy

Attribute Reference

  • country - (Optional) Country code. Default is null.
  • region - (Optional)Region or state or province code. Default is null.
  • latitude - (Optional) Latitude value.
  • longitude - (Optional) Longitude value.
  • city - (Optional)City code. Default is null.

Using getGeoProximity

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 getGeoProximity(args: GetGeoProximityArgs, opts?: InvokeOptions): Promise<GetGeoProximityResult>
function getGeoProximityOutput(args: GetGeoProximityOutputArgs, opts?: InvokeOptions): Output<GetGeoProximityResult>
Copy
def get_geo_proximity(city: Optional[float] = None,
                      country: Optional[str] = None,
                      id: Optional[str] = None,
                      latitude: Optional[float] = None,
                      longitude: Optional[float] = None,
                      name: Optional[str] = None,
                      region: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetGeoProximityResult
def get_geo_proximity_output(city: Optional[pulumi.Input[float]] = None,
                      country: Optional[pulumi.Input[str]] = None,
                      id: Optional[pulumi.Input[str]] = None,
                      latitude: Optional[pulumi.Input[float]] = None,
                      longitude: Optional[pulumi.Input[float]] = None,
                      name: Optional[pulumi.Input[str]] = None,
                      region: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetGeoProximityResult]
Copy
func LookupGeoProximity(ctx *Context, args *LookupGeoProximityArgs, opts ...InvokeOption) (*LookupGeoProximityResult, error)
func LookupGeoProximityOutput(ctx *Context, args *LookupGeoProximityOutputArgs, opts ...InvokeOption) LookupGeoProximityResultOutput
Copy

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

public static class GetGeoProximity 
{
    public static Task<GetGeoProximityResult> InvokeAsync(GetGeoProximityArgs args, InvokeOptions? opts = null)
    public static Output<GetGeoProximityResult> Invoke(GetGeoProximityInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetGeoProximityResult> getGeoProximity(GetGeoProximityArgs args, InvokeOptions options)
public static Output<GetGeoProximityResult> getGeoProximity(GetGeoProximityArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: constellix:index/getGeoProximity:getGeoProximity
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Geo Proximity name should be unique.
City double
Country string
Id string
Latitude double
Longitude double
Region string
Name This property is required. string
Geo Proximity name should be unique.
City float64
Country string
Id string
Latitude float64
Longitude float64
Region string
name This property is required. String
Geo Proximity name should be unique.
city Double
country String
id String
latitude Double
longitude Double
region String
name This property is required. string
Geo Proximity name should be unique.
city number
country string
id string
latitude number
longitude number
region string
name This property is required. str
Geo Proximity name should be unique.
city float
country str
id str
latitude float
longitude float
region str
name This property is required. String
Geo Proximity name should be unique.
city Number
country String
id String
latitude Number
longitude Number
region String

getGeoProximity Result

The following output properties are available:

City double
Country string
Id string
Latitude double
Longitude double
Name string
Region string
City float64
Country string
Id string
Latitude float64
Longitude float64
Name string
Region string
city Double
country String
id String
latitude Double
longitude Double
name String
region String
city number
country string
id string
latitude number
longitude number
name string
region string
city float
country str
id str
latitude float
longitude float
name str
region str
city Number
country String
id String
latitude Number
longitude Number
name String
region String

Package Details

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