Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi
databricks.getExternalLocations
Explore with Pulumi AI
Note This data source can only be used with a workspace-level provider!
Retrieves a list of databricks.ExternalLocation objects, that were created by Pulumi or manually, so that special handling could be applied.
Example Usage
List all external locations in the metastore
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const all = databricks.getExternalLocations({});
export const allExternalLocations = all.then(all => all.names);
import pulumi
import pulumi_databricks as databricks
all = databricks.get_external_locations()
pulumi.export("allExternalLocations", all.names)
package main
import (
"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
all, err := databricks.GetExternalLocations(ctx, &databricks.GetExternalLocationsArgs{}, nil)
if err != nil {
return err
}
ctx.Export("allExternalLocations", all.Names)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var all = Databricks.GetExternalLocations.Invoke();
return new Dictionary<string, object?>
{
["allExternalLocations"] = all.Apply(getExternalLocationsResult => getExternalLocationsResult.Names),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.DatabricksFunctions;
import com.pulumi.databricks.inputs.GetExternalLocationsArgs;
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 all = DatabricksFunctions.getExternalLocations();
ctx.export("allExternalLocations", all.applyValue(getExternalLocationsResult -> getExternalLocationsResult.names()));
}
}
variables:
all:
fn::invoke:
Function: databricks:getExternalLocations
Arguments: {}
outputs:
allExternalLocations: ${all.names}
Related Resources
The following resources are used in the same context:
- databricks.ExternalLocation to get information about a single external location
- databricks.ExternalLocation to manage external locations within Unity Catalog.
Using getExternalLocations
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 getExternalLocations(args: GetExternalLocationsArgs, opts?: InvokeOptions): Promise<GetExternalLocationsResult>
function getExternalLocationsOutput(args: GetExternalLocationsOutputArgs, opts?: InvokeOptions): Output<GetExternalLocationsResult>
def get_external_locations(names: Optional[Sequence[str]] = None,
opts: Optional[InvokeOptions] = None) -> GetExternalLocationsResult
def get_external_locations_output(names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetExternalLocationsResult]
func GetExternalLocations(ctx *Context, args *GetExternalLocationsArgs, opts ...InvokeOption) (*GetExternalLocationsResult, error)
func GetExternalLocationsOutput(ctx *Context, args *GetExternalLocationsOutputArgs, opts ...InvokeOption) GetExternalLocationsResultOutput
> Note: This function is named GetExternalLocations
in the Go SDK.
public static class GetExternalLocations
{
public static Task<GetExternalLocationsResult> InvokeAsync(GetExternalLocationsArgs args, InvokeOptions? opts = null)
public static Output<GetExternalLocationsResult> Invoke(GetExternalLocationsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetExternalLocationsResult> getExternalLocations(GetExternalLocationsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: databricks:index/getExternalLocations:getExternalLocations
arguments:
# arguments dictionary
The following arguments are supported:
- Names List<string>
- List of names of databricks.ExternalLocation in the metastore
- Names []string
- List of names of databricks.ExternalLocation in the metastore
- names List<String>
- List of names of databricks.ExternalLocation in the metastore
- names string[]
- List of names of databricks.ExternalLocation in the metastore
- names Sequence[str]
- List of names of databricks.ExternalLocation in the metastore
- names List<String>
- List of names of databricks.ExternalLocation in the metastore
getExternalLocations Result
The following output properties are available:
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricks
Terraform Provider.