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
- Acountry
block as documented below, which describes a country-based named location.id
- The ID of the named location.ip
- Anip
block 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azuread:index/getNamedLocation:getNamedLocation
arguments:
# arguments dictionary
The following arguments are supported:
- Display
Name string - Specifies the display named of the named location to look up.
- Display
Name string - Specifies the display named of the named location to look up.
- display
Name String - Specifies the display named of the named location to look up.
- display
Name 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.
- display
Name 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> - Display
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Ips
List<Pulumi.
Azure AD. Outputs. Get Named Location Ip>
- Countries
[]Get
Named Location Country - Display
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Ips
[]Get
Named Location Ip
- countries
List<Get
Named Location Country> - display
Name String - id String
- The provider-assigned unique ID for this managed resource.
- ips
List<Get
Named Location Ip>
- countries
Get
Named Location Country[] - display
Name string - id string
- The provider-assigned unique ID for this managed resource.
- ips
Get
Named Location Ip[]
- countries
Sequence[Get
Named Location Country] - display_
name str - id str
- The provider-assigned unique ID for this managed resource.
- ips
Sequence[Get
Named Location Ip]
- countries List<Property Map>
- display
Name String - id String
- The provider-assigned unique ID for this managed resource.
- ips List<Property Map>
Supporting Types
GetNamedLocationCountry
- Countries
And List<string>Regions - Include
Unknown boolCountries And Regions
- Countries
And []stringRegions - Include
Unknown boolCountries And Regions
- countries
And List<String>Regions - include
Unknown BooleanCountries And Regions
- countries
And string[]Regions - include
Unknown booleanCountries And Regions
- countries_
and_ Sequence[str]regions - include_
unknown_ boolcountries_ and_ regions
- countries
And List<String>Regions - include
Unknown 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
azuread
Terraform Provider.