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

databricks.getStorageCredentials

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.StorageCredential objects, that were created by Pulumi or manually, so that special handling could be applied.

    Example Usage

    List all storage credentials in the metastore

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const all = databricks.getStorageCredentials({});
    export const allStorageCredentials = all.then(all => all.names);
    
    import pulumi
    import pulumi_databricks as databricks
    
    all = databricks.get_storage_credentials()
    pulumi.export("allStorageCredentials", 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.GetStorageCredentials(ctx, &databricks.GetStorageCredentialsArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("allStorageCredentials", all.Names)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var all = Databricks.GetStorageCredentials.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["allStorageCredentials"] = all.Apply(getStorageCredentialsResult => getStorageCredentialsResult.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.GetStorageCredentialsArgs;
    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.getStorageCredentials();
    
            ctx.export("allStorageCredentials", all.applyValue(getStorageCredentialsResult -> getStorageCredentialsResult.names()));
        }
    }
    
    variables:
      all:
        fn::invoke:
          Function: databricks:getStorageCredentials
          Arguments: {}
    outputs:
      allStorageCredentials: ${all.names}
    

    The following resources are used in the same context:

    • databricks.StorageCredential to get information about a single credential
    • databricks.StorageCredential to manage Storage Credentials within Unity Catalog.

    Using getStorageCredentials

    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 getStorageCredentials(args: GetStorageCredentialsArgs, opts?: InvokeOptions): Promise<GetStorageCredentialsResult>
    function getStorageCredentialsOutput(args: GetStorageCredentialsOutputArgs, opts?: InvokeOptions): Output<GetStorageCredentialsResult>
    def get_storage_credentials(names: Optional[Sequence[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> GetStorageCredentialsResult
    def get_storage_credentials_output(names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetStorageCredentialsResult]
    func GetStorageCredentials(ctx *Context, args *GetStorageCredentialsArgs, opts ...InvokeOption) (*GetStorageCredentialsResult, error)
    func GetStorageCredentialsOutput(ctx *Context, args *GetStorageCredentialsOutputArgs, opts ...InvokeOption) GetStorageCredentialsResultOutput

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

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

    The following arguments are supported:

    Names List<string>
    List of names of databricks.StorageCredential in the metastore
    Names []string
    List of names of databricks.StorageCredential in the metastore
    names List<String>
    List of names of databricks.StorageCredential in the metastore
    names string[]
    List of names of databricks.StorageCredential in the metastore
    names Sequence[str]
    List of names of databricks.StorageCredential in the metastore
    names List<String>
    List of names of databricks.StorageCredential in the metastore

    getStorageCredentials 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.StorageCredential in the metastore
    Id string
    The provider-assigned unique ID for this managed resource.
    Names []string
    List of names of databricks.StorageCredential in the metastore
    id String
    The provider-assigned unique ID for this managed resource.
    names List<String>
    List of names of databricks.StorageCredential in the metastore
    id string
    The provider-assigned unique ID for this managed resource.
    names string[]
    List of names of databricks.StorageCredential in the metastore
    id str
    The provider-assigned unique ID for this managed resource.
    names Sequence[str]
    List of names of databricks.StorageCredential in the metastore
    id String
    The provider-assigned unique ID for this managed resource.
    names List<String>
    List of names of databricks.StorageCredential in the metastore

    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