We recommend using Azure Native.
Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi
azure.core.getLocation
Explore with Pulumi AI
Use this data source to access information of a specific physical location.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.core.getLocation({
    location: "West Europe",
});
import pulumi
import pulumi_azure as azure
example = azure.core.get_location(location="West Europe")
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := core.GetLocation(ctx, &core.GetLocationArgs{
			Location: "West Europe",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.Core.GetLocation.Invoke(new()
    {
        Location = "West Europe",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.core.inputs.GetLocationArgs;
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 = CoreFunctions.getLocation(GetLocationArgs.builder()
            .location("West Europe")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      Function: azure:core:getLocation
      Arguments:
        location: West Europe
Using getLocation
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 getLocation(args: GetLocationArgs, opts?: InvokeOptions): Promise<GetLocationResult>
function getLocationOutput(args: GetLocationOutputArgs, opts?: InvokeOptions): Output<GetLocationResult>def get_location(location: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetLocationResult
def get_location_output(location: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetLocationResult]func GetLocation(ctx *Context, args *GetLocationArgs, opts ...InvokeOption) (*GetLocationResult, error)
func GetLocationOutput(ctx *Context, args *GetLocationOutputArgs, opts ...InvokeOption) GetLocationResultOutput> Note: This function is named GetLocation in the Go SDK.
public static class GetLocation 
{
    public static Task<GetLocationResult> InvokeAsync(GetLocationArgs args, InvokeOptions? opts = null)
    public static Output<GetLocationResult> Invoke(GetLocationInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLocationResult> getLocation(GetLocationArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: azure:core/getLocation:getLocation
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Location string
 - Specifies the supported Azure location where the resource exists.
 
- Location string
 - Specifies the supported Azure location where the resource exists.
 
- location String
 - Specifies the supported Azure location where the resource exists.
 
- location string
 - Specifies the supported Azure location where the resource exists.
 
- location str
 - Specifies the supported Azure location where the resource exists.
 
- location String
 - Specifies the supported Azure location where the resource exists.
 
getLocation Result
The following output properties are available:
- Display
Name string - The display name of the location.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Location string
 - Zone
Mappings List<GetLocation Zone Mapping>  - A 
zone_mappingsblock as defined below. 
- Display
Name string - The display name of the location.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Location string
 - Zone
Mappings []GetLocation Zone Mapping  - A 
zone_mappingsblock as defined below. 
- display
Name String - The display name of the location.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - location String
 - zone
Mappings List<GetLocation Zone Mapping>  - A 
zone_mappingsblock as defined below. 
- display
Name string - The display name of the location.
 - id string
 - The provider-assigned unique ID for this managed resource.
 - location string
 - zone
Mappings GetLocation Zone Mapping[]  - A 
zone_mappingsblock as defined below. 
- display_
name str - The display name of the location.
 - id str
 - The provider-assigned unique ID for this managed resource.
 - location str
 - zone_
mappings Sequence[GetLocation Zone Mapping]  - A 
zone_mappingsblock as defined below. 
- display
Name String - The display name of the location.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - location String
 - zone
Mappings List<Property Map> - A 
zone_mappingsblock as defined below. 
Supporting Types
GetLocationZoneMapping   
- Logical
Zone string - The logical zone id for the availability zone
 - Physical
Zone string - The fully qualified physical zone id of availability zone to which logical zone id is mapped to
 
- Logical
Zone string - The logical zone id for the availability zone
 - Physical
Zone string - The fully qualified physical zone id of availability zone to which logical zone id is mapped to
 
- logical
Zone String - The logical zone id for the availability zone
 - physical
Zone String - The fully qualified physical zone id of availability zone to which logical zone id is mapped to
 
- logical
Zone string - The logical zone id for the availability zone
 - physical
Zone string - The fully qualified physical zone id of availability zone to which logical zone id is mapped to
 
- logical_
zone str - The logical zone id for the availability zone
 - physical_
zone str - The fully qualified physical zone id of availability zone to which logical zone id is mapped to
 
- logical
Zone String - The logical zone id for the availability zone
 - physical
Zone String - The fully qualified physical zone id of availability zone to which logical zone id is mapped to
 
Package Details
- Repository
 - Azure Classic pulumi/pulumi-azure
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
azurermTerraform Provider.