databricks.getExternalLocations
Retrieves a list of databricks.ExternalLocation objects, that were created by Pulumi or manually, so that special handling could be applied.
This data source can only be used with a workspace-level provider!
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(GetExternalLocationsArgs.builder()
.build());
ctx.export("allExternalLocations", all.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,
provider_config: Optional[GetExternalLocationsProviderConfig] = None,
opts: Optional[InvokeOptions] = None) -> GetExternalLocationsResult
def get_external_locations_output(names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
provider_config: Optional[pulumi.Input[GetExternalLocationsProviderConfigArgs]] = 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)
public static Output<GetExternalLocationsResult> getExternalLocations(GetExternalLocationsArgs args, InvokeOptions options)
fn::invoke:
function: databricks:index/getExternalLocations:getExternalLocations
arguments:
# arguments dictionaryThe following arguments are supported:
- Names List<string>
- List of names of databricks.ExternalLocation in the metastore
- Provider
Config GetExternal Locations Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- Names []string
- List of names of databricks.ExternalLocation in the metastore
- Provider
Config GetExternal Locations Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- names List<String>
- List of names of databricks.ExternalLocation in the metastore
- provider
Config GetExternal Locations Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- names string[]
- List of names of databricks.ExternalLocation in the metastore
- provider
Config GetExternal Locations Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- names Sequence[str]
- List of names of databricks.ExternalLocation in the metastore
- provider_
config GetExternal Locations Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- names List<String>
- List of names of databricks.ExternalLocation in the metastore
- provider
Config Property Map - Configure the provider for management through account provider. This block consists of the following fields:
getExternalLocations Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Names List<string>
- List of names of databricks.ExternalLocation in the metastore
- Provider
Config GetExternal Locations Provider Config
- Id string
- The provider-assigned unique ID for this managed resource.
- Names []string
- List of names of databricks.ExternalLocation in the metastore
- Provider
Config GetExternal Locations Provider Config
- id String
- The provider-assigned unique ID for this managed resource.
- names List<String>
- List of names of databricks.ExternalLocation in the metastore
- provider
Config GetExternal Locations Provider Config
- id string
- The provider-assigned unique ID for this managed resource.
- names string[]
- List of names of databricks.ExternalLocation in the metastore
- provider
Config GetExternal Locations Provider Config
- id str
- The provider-assigned unique ID for this managed resource.
- names Sequence[str]
- List of names of databricks.ExternalLocation in the metastore
- provider_
config GetExternal Locations Provider Config
- id String
- The provider-assigned unique ID for this managed resource.
- names List<String>
- List of names of databricks.ExternalLocation in the metastore
- provider
Config Property Map
Supporting Types
GetExternalLocationsProviderConfig
- Workspace
Id string - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- Workspace
Id string - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace
Id String - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace
Id string - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace_
id str - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace
Id String - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricksTerraform Provider.
