We recommend using Azure Native.
Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi
azure.extendedlocation.getCustomLocation
Explore with Pulumi AI
Use this data source to access information about an existing Custom Location within an Extended Location.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.extendedlocation.getCustomLocation({
name: exampleAzurermExtendedLocationCustomLocation.name,
resourceGroupName: exampleAzurermResourceGroup.name,
});
export const customLocationId = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.extendedlocation.get_custom_location(name=example_azurerm_extended_location_custom_location["name"],
resource_group_name=example_azurerm_resource_group["name"])
pulumi.export("customLocationId", example.id)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/extendedlocation"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := extendedlocation.LookupCustomLocation(ctx, &extendedlocation.LookupCustomLocationArgs{
Name: exampleAzurermExtendedLocationCustomLocation.Name,
ResourceGroupName: exampleAzurermResourceGroup.Name,
}, nil)
if err != nil {
return err
}
ctx.Export("customLocationId", example.Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.ExtendedLocation.GetCustomLocation.Invoke(new()
{
Name = exampleAzurermExtendedLocationCustomLocation.Name,
ResourceGroupName = exampleAzurermResourceGroup.Name,
});
return new Dictionary<string, object?>
{
["customLocationId"] = example.Apply(getCustomLocationResult => getCustomLocationResult.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.extendedlocation.ExtendedlocationFunctions;
import com.pulumi.azure.extendedlocation.inputs.GetCustomLocationArgs;
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 = ExtendedlocationFunctions.getCustomLocation(GetCustomLocationArgs.builder()
.name(exampleAzurermExtendedLocationCustomLocation.name())
.resourceGroupName(exampleAzurermResourceGroup.name())
.build());
ctx.export("customLocationId", example.applyValue(getCustomLocationResult -> getCustomLocationResult.id()));
}
}
variables:
example:
fn::invoke:
function: azure:extendedlocation:getCustomLocation
arguments:
name: ${exampleAzurermExtendedLocationCustomLocation.name}
resourceGroupName: ${exampleAzurermResourceGroup.name}
outputs:
customLocationId: ${example.id}
Using getCustomLocation
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 getCustomLocation(args: GetCustomLocationArgs, opts?: InvokeOptions): Promise<GetCustomLocationResult>
function getCustomLocationOutput(args: GetCustomLocationOutputArgs, opts?: InvokeOptions): Output<GetCustomLocationResult>
def get_custom_location(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCustomLocationResult
def get_custom_location_output(name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCustomLocationResult]
func LookupCustomLocation(ctx *Context, args *LookupCustomLocationArgs, opts ...InvokeOption) (*LookupCustomLocationResult, error)
func LookupCustomLocationOutput(ctx *Context, args *LookupCustomLocationOutputArgs, opts ...InvokeOption) LookupCustomLocationResultOutput
> Note: This function is named LookupCustomLocation
in the Go SDK.
public static class GetCustomLocation
{
public static Task<GetCustomLocationResult> InvokeAsync(GetCustomLocationArgs args, InvokeOptions? opts = null)
public static Output<GetCustomLocationResult> Invoke(GetCustomLocationInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCustomLocationResult> getCustomLocation(GetCustomLocationArgs args, InvokeOptions options)
public static Output<GetCustomLocationResult> getCustomLocation(GetCustomLocationArgs args, InvokeOptions options)
fn::invoke:
function: azure:extendedlocation/getCustomLocation:getCustomLocation
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- The name of the Custom Location.
- Resource
Group stringName - The name of the Resource Group where the Custom Location exists.
- Name string
- The name of the Custom Location.
- Resource
Group stringName - The name of the Resource Group where the Custom Location exists.
- name String
- The name of the Custom Location.
- resource
Group StringName - The name of the Resource Group where the Custom Location exists.
- name string
- The name of the Custom Location.
- resource
Group stringName - The name of the Resource Group where the Custom Location exists.
- name str
- The name of the Custom Location.
- resource_
group_ strname - The name of the Resource Group where the Custom Location exists.
- name String
- The name of the Custom Location.
- resource
Group StringName - The name of the Resource Group where the Custom Location exists.
getCustomLocation Result
The following output properties are available:
- Authentications
List<Get
Custom Location Authentication> - An
authentication
block as defined below. - Cluster
Extension List<string>Ids - The list of Cluster Extension IDs.
- Display
Name string - The display name of the Custom Location.
- Host
Resource stringId - The host resource ID.
- Host
Type string - The host type of the Custom Location.
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The Azure location where the Custom Location exists.
- Name string
- Namespace string
- The namespace of the Custom Location.
- Resource
Group stringName
- Authentications
[]Get
Custom Location Authentication - An
authentication
block as defined below. - Cluster
Extension []stringIds - The list of Cluster Extension IDs.
- Display
Name string - The display name of the Custom Location.
- Host
Resource stringId - The host resource ID.
- Host
Type string - The host type of the Custom Location.
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The Azure location where the Custom Location exists.
- Name string
- Namespace string
- The namespace of the Custom Location.
- Resource
Group stringName
- authentications
List<Get
Custom Location Authentication> - An
authentication
block as defined below. - cluster
Extension List<String>Ids - The list of Cluster Extension IDs.
- display
Name String - The display name of the Custom Location.
- host
Resource StringId - The host resource ID.
- host
Type String - The host type of the Custom Location.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- The Azure location where the Custom Location exists.
- name String
- namespace String
- The namespace of the Custom Location.
- resource
Group StringName
- authentications
Get
Custom Location Authentication[] - An
authentication
block as defined below. - cluster
Extension string[]Ids - The list of Cluster Extension IDs.
- display
Name string - The display name of the Custom Location.
- host
Resource stringId - The host resource ID.
- host
Type string - The host type of the Custom Location.
- id string
- The provider-assigned unique ID for this managed resource.
- location string
- The Azure location where the Custom Location exists.
- name string
- namespace string
- The namespace of the Custom Location.
- resource
Group stringName
- authentications
Sequence[Get
Custom Location Authentication] - An
authentication
block as defined below. - cluster_
extension_ Sequence[str]ids - The list of Cluster Extension IDs.
- display_
name str - The display name of the Custom Location.
- host_
resource_ strid - The host resource ID.
- host_
type str - The host type of the Custom Location.
- id str
- The provider-assigned unique ID for this managed resource.
- location str
- The Azure location where the Custom Location exists.
- name str
- namespace str
- The namespace of the Custom Location.
- resource_
group_ strname
- authentications List<Property Map>
- An
authentication
block as defined below. - cluster
Extension List<String>Ids - The list of Cluster Extension IDs.
- display
Name String - The display name of the Custom Location.
- host
Resource StringId - The host resource ID.
- host
Type String - The host type of the Custom Location.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- The Azure location where the Custom Location exists.
- name String
- namespace String
- The namespace of the Custom Location.
- resource
Group StringName
Supporting Types
GetCustomLocationAuthentication
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.