azuread.getNamedLocation
Explore with Pulumi AI
Gets information about a Named Location within Azure Active Directory.
API Permissions
The following API permissions are required in order to use this data source.
When authenticated with a service principal, this resource requires the following application roles: Policy.Read.All
When authenticated with a user principal, this resource requires one of the following directory roles: Conditional Access Administrator or Global Reader
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";
const example = azuread.getNamedLocation({
    displayName: "My Named Location",
});
import pulumi
import pulumi_azuread as azuread
example = azuread.get_named_location(display_name="My Named Location")
package main
import (
	"github.com/pulumi/pulumi-azuread/sdk/v6/go/azuread"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := azuread.LookupNamedLocation(ctx, &azuread.LookupNamedLocationArgs{
			DisplayName: "My Named Location",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureAD = Pulumi.AzureAD;
return await Deployment.RunAsync(() => 
{
    var example = AzureAD.GetNamedLocation.Invoke(new()
    {
        DisplayName = "My Named Location",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuread.AzureadFunctions;
import com.pulumi.azuread.inputs.GetNamedLocationArgs;
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 = AzureadFunctions.getNamedLocation(GetNamedLocationArgs.builder()
            .displayName("My Named Location")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: azuread:getNamedLocation
      arguments:
        displayName: My Named Location
Attributes Reference
The following attributes are exported:
- country- A- countryblock as documented below, which describes a country-based named location.
- id- The ID of the named location.
- ip- An- ipblock as documented below, which describes an IP-based named location.
country block exports the following:
- countries_and_regions- List of countries and/or regions in two-letter format specified by ISO 3166-2.
- include_unknown_countries_and_regions- Whether IP addresses that don’t map to a country or region are included in the named location.
ip block exports the following:
- ip_ranges- List of IP address ranges in IPv4 CIDR format (e.g.- 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596.
- trusted- Whether the named location is trusted.
Using getNamedLocation
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 getNamedLocation(args: GetNamedLocationArgs, opts?: InvokeOptions): Promise<GetNamedLocationResult>
function getNamedLocationOutput(args: GetNamedLocationOutputArgs, opts?: InvokeOptions): Output<GetNamedLocationResult>def get_named_location(display_name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetNamedLocationResult
def get_named_location_output(display_name: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetNamedLocationResult]func LookupNamedLocation(ctx *Context, args *LookupNamedLocationArgs, opts ...InvokeOption) (*LookupNamedLocationResult, error)
func LookupNamedLocationOutput(ctx *Context, args *LookupNamedLocationOutputArgs, opts ...InvokeOption) LookupNamedLocationResultOutput> Note: This function is named LookupNamedLocation in the Go SDK.
public static class GetNamedLocation 
{
    public static Task<GetNamedLocationResult> InvokeAsync(GetNamedLocationArgs args, InvokeOptions? opts = null)
    public static Output<GetNamedLocationResult> Invoke(GetNamedLocationInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNamedLocationResult> getNamedLocation(GetNamedLocationArgs args, InvokeOptions options)
public static Output<GetNamedLocationResult> getNamedLocation(GetNamedLocationArgs args, InvokeOptions options)
fn::invoke:
  function: azuread:index/getNamedLocation:getNamedLocation
  arguments:
    # arguments dictionaryThe following arguments are supported:
- DisplayName string
- Specifies the display named of the named location to look up.
- DisplayName string
- Specifies the display named of the named location to look up.
- displayName String
- Specifies the display named of the named location to look up.
- displayName string
- Specifies the display named of the named location to look up.
- display_name str
- Specifies the display named of the named location to look up.
- displayName String
- Specifies the display named of the named location to look up.
getNamedLocation Result
The following output properties are available:
- Countries
List<Pulumi.Azure AD. Outputs. Get Named Location Country> 
- DisplayName string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ips
List<Pulumi.Azure AD. Outputs. Get Named Location Ip> 
- Countries
[]GetNamed Location Country 
- DisplayName string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ips
[]GetNamed Location Ip 
- countries
List<GetNamed Location Country> 
- displayName String
- id String
- The provider-assigned unique ID for this managed resource.
- ips
List<GetNamed Location Ip> 
- countries
GetNamed Location Country[] 
- displayName string
- id string
- The provider-assigned unique ID for this managed resource.
- ips
GetNamed Location Ip[] 
- countries
Sequence[GetNamed Location Country] 
- display_name str
- id str
- The provider-assigned unique ID for this managed resource.
- ips
Sequence[GetNamed Location Ip] 
- countries List<Property Map>
- displayName String
- id String
- The provider-assigned unique ID for this managed resource.
- ips List<Property Map>
Supporting Types
GetNamedLocationCountry   
- CountriesAnd List<string>Regions 
- CountryLookup stringMethod 
- IncludeUnknown boolCountries And Regions 
- CountriesAnd []stringRegions 
- CountryLookup stringMethod 
- IncludeUnknown boolCountries And Regions 
- countriesAnd List<String>Regions 
- countryLookup StringMethod 
- includeUnknown BooleanCountries And Regions 
- countriesAnd string[]Regions 
- countryLookup stringMethod 
- includeUnknown booleanCountries And Regions 
- countries_and_ Sequence[str]regions 
- country_lookup_ strmethod 
- include_unknown_ boolcountries_ and_ regions 
- countriesAnd List<String>Regions 
- countryLookup StringMethod 
- includeUnknown BooleanCountries And Regions 
GetNamedLocationIp   
Package Details
- Repository
- Azure Active Directory (Azure AD) pulumi/pulumi-azuread
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azureadTerraform Provider.