GetGeographicalLocation
Use this data source to access the ID of a specified Traffic Manager Geographical Location within the Geographical Hierarchy.
Example Usage
World)
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Network.GetTrafficManager.InvokeAsync(new Azure.Network.GetTrafficManagerArgs
{
Name = "World",
}));
this.LocationCode = example.Apply(example => example.Id);
}
[Output("locationCode")]
public Output<string> LocationCode { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/network"
"github.com/pulumi/pulumi/sdk/v2/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
})
}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);Deprecated: azure.trafficmanager.getGeographicalLocation has been deprecated in favor of azure.network.getTrafficManager
Using GetGeographicalLocation
function getGeographicalLocation(args: GetGeographicalLocationArgs, opts?: InvokeOptions): Promise<GetGeographicalLocationResult>function get_geographical_location(name=None, opts=None)func GetGeographicalLocation(ctx *Context, args *GetGeographicalLocationArgs, opts ...InvokeOption) (*GetGeographicalLocationResult, error)public static class GetGeographicalLocation {
public static Task<GetGeographicalLocationResult> InvokeAsync(GetGeographicalLocationArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetGeographicalLocation Result
The following output properties are available:
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.