1. Packages
  2. Databricks
  3. API Docs
  4. getVolumes
Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi

databricks.getVolumes

Explore with Pulumi AI

databricks logo
Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi

    Note This data source can only be used with a workspace-level provider!

    Retrieves a list of databricks.Volume ids (full names), that were created by Pulumi or manually.

    Plugin Framework Migration

    The volumes data source has been migrated from sdkv2 to plugin framework in version 1.57。 If you encounter any problem with this data source and suspect it is due to the migration, you can fallback to sdkv2 by setting the environment variable in the following way export USE_SDK_V2_DATA_SOURCES="databricks.getVolumes".

    Example Usage

    Listing all volumes in a things databricks.Schema of a sandbox databricks_catalog:

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const this = databricks.getVolumes({
        catalogName: "sandbox",
        schemaName: "things",
    });
    export const allVolumes = _this;
    
    import pulumi
    import pulumi_databricks as databricks
    
    this = databricks.get_volumes(catalog_name="sandbox",
        schema_name="things")
    pulumi.export("allVolumes", this)
    
    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 {
    		this, err := databricks.GetVolumes(ctx, &databricks.GetVolumesArgs{
    			CatalogName: "sandbox",
    			SchemaName:  "things",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("allVolumes", this)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = Databricks.GetVolumes.Invoke(new()
        {
            CatalogName = "sandbox",
            SchemaName = "things",
        });
    
        return new Dictionary<string, object?>
        {
            ["allVolumes"] = @this,
        };
    });
    
    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.GetVolumesArgs;
    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 this = DatabricksFunctions.getVolumes(GetVolumesArgs.builder()
                .catalogName("sandbox")
                .schemaName("things")
                .build());
    
            ctx.export("allVolumes", this_);
        }
    }
    
    variables:
      this:
        fn::invoke:
          Function: databricks:getVolumes
          Arguments:
            catalogName: sandbox
            schemaName: things
    outputs:
      allVolumes: ${this}
    

    The following resources are used in the same context:

    • databricks.Volume to manage volumes within Unity Catalog.
    • databricks.Schema to manage schemas within Unity Catalog.
    • databricks.Catalog to manage catalogs within Unity Catalog.

    Using getVolumes

    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 getVolumes(args: GetVolumesArgs, opts?: InvokeOptions): Promise<GetVolumesResult>
    function getVolumesOutput(args: GetVolumesOutputArgs, opts?: InvokeOptions): Output<GetVolumesResult>
    def get_volumes(catalog_name: Optional[str] = None,
                    ids: Optional[Sequence[str]] = None,
                    schema_name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetVolumesResult
    def get_volumes_output(catalog_name: Optional[pulumi.Input[str]] = None,
                    ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                    schema_name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetVolumesResult]
    func GetVolumes(ctx *Context, args *GetVolumesArgs, opts ...InvokeOption) (*GetVolumesResult, error)
    func GetVolumesOutput(ctx *Context, args *GetVolumesOutputArgs, opts ...InvokeOption) GetVolumesResultOutput

    > Note: This function is named GetVolumes in the Go SDK.

    public static class GetVolumes 
    {
        public static Task<GetVolumesResult> InvokeAsync(GetVolumesArgs args, InvokeOptions? opts = null)
        public static Output<GetVolumesResult> Invoke(GetVolumesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVolumesResult> getVolumes(GetVolumesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: databricks:index/getVolumes:getVolumes
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CatalogName string
    Name of databricks_catalog
    SchemaName string
    Name of databricks_schema
    Ids List<string>
    a list of databricks.Volume full names: catalog.schema.volume
    CatalogName string
    Name of databricks_catalog
    SchemaName string
    Name of databricks_schema
    Ids []string
    a list of databricks.Volume full names: catalog.schema.volume
    catalogName String
    Name of databricks_catalog
    schemaName String
    Name of databricks_schema
    ids List<String>
    a list of databricks.Volume full names: catalog.schema.volume
    catalogName string
    Name of databricks_catalog
    schemaName string
    Name of databricks_schema
    ids string[]
    a list of databricks.Volume full names: catalog.schema.volume
    catalog_name str
    Name of databricks_catalog
    schema_name str
    Name of databricks_schema
    ids Sequence[str]
    a list of databricks.Volume full names: catalog.schema.volume
    catalogName String
    Name of databricks_catalog
    schemaName String
    Name of databricks_schema
    ids List<String>
    a list of databricks.Volume full names: catalog.schema.volume

    getVolumes Result

    The following output properties are available:

    CatalogName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    a list of databricks.Volume full names: catalog.schema.volume
    SchemaName string
    CatalogName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    a list of databricks.Volume full names: catalog.schema.volume
    SchemaName string
    catalogName String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    a list of databricks.Volume full names: catalog.schema.volume
    schemaName String
    catalogName string
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    a list of databricks.Volume full names: catalog.schema.volume
    schemaName string
    catalog_name str
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    a list of databricks.Volume full names: catalog.schema.volume
    schema_name str
    catalogName String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    a list of databricks.Volume full names: catalog.schema.volume
    schemaName String

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi