1. Packages
  2. Dynatrace
  3. API Docs
  4. getGeoRegions
Dynatrace v0.27.0 published on Friday, Mar 21, 2025 by Pulumiverse

dynatrace.getGeoRegions

Explore with Pulumi AI

Dynatrace v0.27.0 published on Friday, Mar 21, 2025 by Pulumiverse

The dynatrace.getGeoRegions data source retrieves the list of regions and their codes based on country code.

  • country_code (String) - The ISO code of the required country

Geographic regions API: GET regions of a country - https://docs.dynatrace.com/docs/shortlink/api-v2-rum-geographic-regions-get-regions-country

Example Usage

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

const example = dynatrace.getGeoRegions({
    countryCode: "FR",
});
export const test = example;
Copy
import pulumi
import pulumi_dynatrace as dynatrace

example = dynatrace.get_geo_regions(country_code="FR")
pulumi.export("test", example)
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-dynatrace/sdk/go/dynatrace"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := dynatrace.GetGeoRegions(ctx, &dynatrace.GetGeoRegionsArgs{
			CountryCode: "FR",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("test", example)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Dynatrace = Pulumi.Dynatrace;

return await Deployment.RunAsync(() => 
{
    var example = Dynatrace.GetGeoRegions.Invoke(new()
    {
        CountryCode = "FR",
    });

    return new Dictionary<string, object?>
    {
        ["test"] = example,
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dynatrace.DynatraceFunctions;
import com.pulumi.dynatrace.inputs.GetGeoRegionsArgs;
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 example = DynatraceFunctions.getGeoRegions(GetGeoRegionsArgs.builder()
            .countryCode("FR")
            .build());

        ctx.export("test", example.applyValue(getGeoRegionsResult -> getGeoRegionsResult));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: dynatrace:getGeoRegions
      arguments:
        countryCode: FR
outputs:
  test: ${example}
Copy

Using getGeoRegions

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 getGeoRegions(args: GetGeoRegionsArgs, opts?: InvokeOptions): Promise<GetGeoRegionsResult>
function getGeoRegionsOutput(args: GetGeoRegionsOutputArgs, opts?: InvokeOptions): Output<GetGeoRegionsResult>
Copy
def get_geo_regions(country_code: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetGeoRegionsResult
def get_geo_regions_output(country_code: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetGeoRegionsResult]
Copy
func GetGeoRegions(ctx *Context, args *GetGeoRegionsArgs, opts ...InvokeOption) (*GetGeoRegionsResult, error)
func GetGeoRegionsOutput(ctx *Context, args *GetGeoRegionsOutputArgs, opts ...InvokeOption) GetGeoRegionsResultOutput
Copy

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

public static class GetGeoRegions 
{
    public static Task<GetGeoRegionsResult> InvokeAsync(GetGeoRegionsArgs args, InvokeOptions? opts = null)
    public static Output<GetGeoRegionsResult> Invoke(GetGeoRegionsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetGeoRegionsResult> getGeoRegions(GetGeoRegionsArgs args, InvokeOptions options)
public static Output<GetGeoRegionsResult> getGeoRegions(GetGeoRegionsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: dynatrace:index/getGeoRegions:getGeoRegions
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CountryCode This property is required. string
The ISO code of the required country
CountryCode This property is required. string
The ISO code of the required country
countryCode This property is required. String
The ISO code of the required country
countryCode This property is required. string
The ISO code of the required country
country_code This property is required. str
The ISO code of the required country
countryCode This property is required. String
The ISO code of the required country

getGeoRegions Result

The following output properties are available:

CountryCode string
The ISO code of the required country
Id string
The provider-assigned unique ID for this managed resource.
Regions List<Pulumiverse.Dynatrace.Outputs.GetGeoRegionsRegion>
CountryCode string
The ISO code of the required country
Id string
The provider-assigned unique ID for this managed resource.
Regions []GetGeoRegionsRegion
countryCode String
The ISO code of the required country
id String
The provider-assigned unique ID for this managed resource.
regions List<GetGeoRegionsRegion>
countryCode string
The ISO code of the required country
id string
The provider-assigned unique ID for this managed resource.
regions GetGeoRegionsRegion[]
country_code str
The ISO code of the required country
id str
The provider-assigned unique ID for this managed resource.
regions Sequence[GetGeoRegionsRegion]
countryCode String
The ISO code of the required country
id String
The provider-assigned unique ID for this managed resource.
regions List<Property Map>

Supporting Types

GetGeoRegionsRegion

Code This property is required. string
Name This property is required. string
Code This property is required. string
Name This property is required. string
code This property is required. String
name This property is required. String
code This property is required. string
name This property is required. string
code This property is required. str
name This property is required. str
code This property is required. String
name This property is required. String

Package Details

Repository
dynatrace pulumiverse/pulumi-dynatrace
License
Apache-2.0
Notes
This Pulumi package is based on the dynatrace Terraform Provider.
Dynatrace v0.27.0 published on Friday, Mar 21, 2025 by Pulumiverse