azure.trafficmanager.getGeographicalLocation

Deprecated:

azure.trafficmanager.getGeographicalLocation has been deprecated in favor of azure.network.getTrafficManager

Use this data source to access the ID of a specified Traffic Manager Geographical Location within the Geographical Hierarchy.

Example Usage

World)

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = Azure.Network.GetTrafficManager.Invoke(new()
    {
        Name = "World",
    });

    return new Dictionary<string, object?>
    {
        ["locationCode"] = example.Apply(getTrafficManagerResult => getTrafficManagerResult.Id),
    };
});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := network.GetTrafficManager(ctx, &network.GetTrafficManagerArgs{
			Name: "World",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("locationCode", example.Id)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.network.NetworkFunctions;
import com.pulumi.azure.network.inputs.GetTrafficManagerArgs;
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 = NetworkFunctions.getTrafficManager(GetTrafficManagerArgs.builder()
            .name("World")
            .build());

        ctx.export("locationCode", example.applyValue(getTrafficManagerResult -> getTrafficManagerResult.id()));
    }
}
import pulumi
import pulumi_azure as azure

example = azure.network.get_traffic_manager(name="World")
pulumi.export("locationCode", example.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.network.getTrafficManager({
    name: "World",
});
export const locationCode = example.then(example => example.id);
variables:
  example:
    fn::invoke:
      Function: azure:network:getTrafficManager
      Arguments:
        name: World
outputs:
  locationCode: ${example.id}

Using getGeographicalLocation

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 getGeographicalLocation(args: GetGeographicalLocationArgs, opts?: InvokeOptions): Promise<GetGeographicalLocationResult>
function getGeographicalLocationOutput(args: GetGeographicalLocationOutputArgs, opts?: InvokeOptions): Output<GetGeographicalLocationResult>
def get_geographical_location(name: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetGeographicalLocationResult
def get_geographical_location_output(name: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetGeographicalLocationResult]
func GetGeographicalLocation(ctx *Context, args *GetGeographicalLocationArgs, opts ...InvokeOption) (*GetGeographicalLocationResult, error)
func GetGeographicalLocationOutput(ctx *Context, args *GetGeographicalLocationOutputArgs, opts ...InvokeOption) GetGeographicalLocationResultOutput

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

public static class GetGeographicalLocation 
{
    public static Task<GetGeographicalLocationResult> InvokeAsync(GetGeographicalLocationArgs args, InvokeOptions? opts = null)
    public static Output<GetGeographicalLocationResult> Invoke(GetGeographicalLocationInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetGeographicalLocationResult> getGeographicalLocation(GetGeographicalLocationArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: azure:trafficmanager/getGeographicalLocation:getGeographicalLocation
  arguments:
    # arguments dictionary

The following arguments are supported:

Name string

Specifies the name of the Location, for example World, Europe or Germany.

Name string

Specifies the name of the Location, for example World, Europe or Germany.

name String

Specifies the name of the Location, for example World, Europe or Germany.

name string

Specifies the name of the Location, for example World, Europe or Germany.

name str

Specifies the name of the Location, for example World, Europe or Germany.

name String

Specifies the name of the Location, for example World, Europe or Germany.

getGeographicalLocation Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Name string
Id string

The provider-assigned unique ID for this managed resource.

Name string
id String

The provider-assigned unique ID for this managed resource.

name String
id string

The provider-assigned unique ID for this managed resource.

name string
id str

The provider-assigned unique ID for this managed resource.

name str
id String

The provider-assigned unique ID for this managed resource.

name String

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.