Dynatrace v0.34.0 published on Thursday, Oct 30, 2025 by Pulumiverse
dynatrace.getGeoCities
Start a Neo task
Explain and create a dynatrace.getGeoCities resource
The dynatrace.getGeoCities data source retrieves the list of cities and their codes based on country and region code.
country_code(String) - The ISO code of the required countryregion_code(String) - The code of the required region
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 "@pulumiverse/dynatrace";
const example = dynatrace.getGeoCities({
countryCode: "FR",
regionCode: "BRE",
});
export const test = example;
import pulumi
import pulumi_dynatrace as dynatrace
example = dynatrace.get_geo_cities(country_code="FR",
region_code="BRE")
pulumi.export("test", example)
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.GetGeoCities(ctx, &dynatrace.GetGeoCitiesArgs{
CountryCode: "FR",
RegionCode: "BRE",
}, nil)
if err != nil {
return err
}
ctx.Export("test", example)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Dynatrace = Pulumi.Dynatrace;
return await Deployment.RunAsync(() =>
{
var example = Dynatrace.GetGeoCities.Invoke(new()
{
CountryCode = "FR",
RegionCode = "BRE",
});
return new Dictionary<string, object?>
{
["test"] = example,
};
});
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.GetGeoCitiesArgs;
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.getGeoCities(GetGeoCitiesArgs.builder()
.countryCode("FR")
.regionCode("BRE")
.build());
ctx.export("test", example);
}
}
variables:
example:
fn::invoke:
function: dynatrace:getGeoCities
arguments:
countryCode: FR
regionCode: BRE
outputs:
test: ${example}
Using getGeoCities
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 getGeoCities(args: GetGeoCitiesArgs, opts?: InvokeOptions): Promise<GetGeoCitiesResult>
function getGeoCitiesOutput(args: GetGeoCitiesOutputArgs, opts?: InvokeOptions): Output<GetGeoCitiesResult>def get_geo_cities(country_code: Optional[str] = None,
region_code: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetGeoCitiesResult
def get_geo_cities_output(country_code: Optional[pulumi.Input[str]] = None,
region_code: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetGeoCitiesResult]func GetGeoCities(ctx *Context, args *GetGeoCitiesArgs, opts ...InvokeOption) (*GetGeoCitiesResult, error)
func GetGeoCitiesOutput(ctx *Context, args *GetGeoCitiesOutputArgs, opts ...InvokeOption) GetGeoCitiesResultOutput> Note: This function is named GetGeoCities in the Go SDK.
public static class GetGeoCities
{
public static Task<GetGeoCitiesResult> InvokeAsync(GetGeoCitiesArgs args, InvokeOptions? opts = null)
public static Output<GetGeoCitiesResult> Invoke(GetGeoCitiesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetGeoCitiesResult> getGeoCities(GetGeoCitiesArgs args, InvokeOptions options)
public static Output<GetGeoCitiesResult> getGeoCities(GetGeoCitiesArgs args, InvokeOptions options)
fn::invoke:
function: dynatrace:index/getGeoCities:getGeoCities
arguments:
# arguments dictionaryThe following arguments are supported:
- Country
Code string - The ISO code of the required country
- Region
Code string - The code of the required region
- Country
Code string - The ISO code of the required country
- Region
Code string - The code of the required region
- country
Code String - The ISO code of the required country
- region
Code String - The code of the required region
- country
Code string - The ISO code of the required country
- region
Code string - The code of the required region
- country_
code str - The ISO code of the required country
- region_
code str - The code of the required region
- country
Code String - The ISO code of the required country
- region
Code String - The code of the required region
getGeoCities Result
The following output properties are available:
- Cities
List<Pulumiverse.
Dynatrace. Outputs. Get Geo Cities City> - Country
Code string - The ISO code of the required country
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Code string - The code of the required region
- Cities
[]Get
Geo Cities City - Country
Code string - The ISO code of the required country
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Code string - The code of the required region
- cities
List<Get
Geo Cities City> - country
Code String - The ISO code of the required country
- id String
- The provider-assigned unique ID for this managed resource.
- region
Code String - The code of the required region
- cities
Get
Geo Cities City[] - country
Code string - The ISO code of the required country
- id string
- The provider-assigned unique ID for this managed resource.
- region
Code string - The code of the required region
- cities
Sequence[Get
Geo Cities City] - country_
code str - The ISO code of the required country
- id str
- The provider-assigned unique ID for this managed resource.
- region_
code str - The code of the required region
- cities List<Property Map>
- country
Code String - The ISO code of the required country
- id String
- The provider-assigned unique ID for this managed resource.
- region
Code String - The code of the required region
Supporting Types
GetGeoCitiesCity
Package Details
- Repository
- dynatrace pulumiverse/pulumi-dynatrace
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dynatraceTerraform Provider.
