1. Packages
  2. Databricks Provider
  3. API Docs
  4. getShare
Databricks v1.65.0 published on Wednesday, Apr 9, 2025 by Pulumi

databricks.getShare

Explore with Pulumi AI

Databricks v1.65.0 published on Wednesday, Apr 9, 2025 by Pulumi

Retrieves details about a databricks.Share that were created by Pulumi or manually.

Example Usage

Getting details of an existing share in the metastore

import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";

const _this = databricks.getShare({
    name: "this",
});
export const createdBy = _this.then(_this => _this.createdBy);
Copy
import pulumi
import pulumi_databricks as databricks

this = databricks.get_share(name="this")
pulumi.export("createdBy", this.created_by)
Copy
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.LookupShare(ctx, &databricks.LookupShareArgs{
			Name: pulumi.StringRef("this"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("createdBy", this.CreatedBy)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;

return await Deployment.RunAsync(() => 
{
    var @this = Databricks.GetShare.Invoke(new()
    {
        Name = "this",
    });

    return new Dictionary<string, object?>
    {
        ["createdBy"] = @this.Apply(@this => @this.Apply(getShareResult => getShareResult.CreatedBy)),
    };
});
Copy
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.GetShareArgs;
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.getShare(GetShareArgs.builder()
            .name("this")
            .build());

        ctx.export("createdBy", this_.createdBy());
    }
}
Copy
variables:
  this:
    fn::invoke:
      function: databricks:getShare
      arguments:
        name: this
outputs:
  createdBy: ${this.createdBy}
Copy

The following resources are used in the same context:

  • databricks.Share to create Delta Sharing shares.
  • databricks.Recipient to create Delta Sharing recipients.
  • databricks.Grants to manage Delta Sharing permissions.

Using getShare

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 getShare(args: GetShareArgs, opts?: InvokeOptions): Promise<GetShareResult>
function getShareOutput(args: GetShareOutputArgs, opts?: InvokeOptions): Output<GetShareResult>
Copy
def get_share(created_at: Optional[int] = None,
              created_by: Optional[str] = None,
              name: Optional[str] = None,
              objects: Optional[Sequence[GetShareObject]] = None,
              opts: Optional[InvokeOptions] = None) -> GetShareResult
def get_share_output(created_at: Optional[pulumi.Input[int]] = None,
              created_by: Optional[pulumi.Input[str]] = None,
              name: Optional[pulumi.Input[str]] = None,
              objects: Optional[pulumi.Input[Sequence[pulumi.Input[GetShareObjectArgs]]]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetShareResult]
Copy
func LookupShare(ctx *Context, args *LookupShareArgs, opts ...InvokeOption) (*LookupShareResult, error)
func LookupShareOutput(ctx *Context, args *LookupShareOutputArgs, opts ...InvokeOption) LookupShareResultOutput
Copy

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

public static class GetShare 
{
    public static Task<GetShareResult> InvokeAsync(GetShareArgs args, InvokeOptions? opts = null)
    public static Output<GetShareResult> Invoke(GetShareInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetShareResult> getShare(GetShareArgs args, InvokeOptions options)
public static Output<GetShareResult> getShare(GetShareArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: databricks:index/getShare:getShare
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CreatedAt int
Time when the share was created.
CreatedBy string
The principal that created the share.
Name string
The name of the share
Objects List<GetShareObject>
arrays containing details of each object in the share.
CreatedAt int
Time when the share was created.
CreatedBy string
The principal that created the share.
Name string
The name of the share
Objects []GetShareObject
arrays containing details of each object in the share.
createdAt Integer
Time when the share was created.
createdBy String
The principal that created the share.
name String
The name of the share
objects List<GetShareObject>
arrays containing details of each object in the share.
createdAt number
Time when the share was created.
createdBy string
The principal that created the share.
name string
The name of the share
objects GetShareObject[]
arrays containing details of each object in the share.
created_at int
Time when the share was created.
created_by str
The principal that created the share.
name str
The name of the share
objects Sequence[GetShareObject]
arrays containing details of each object in the share.
createdAt Number
Time when the share was created.
createdBy String
The principal that created the share.
name String
The name of the share
objects List<Property Map>
arrays containing details of each object in the share.

getShare Result

The following output properties are available:

CreatedAt int
Time when the share was created.
CreatedBy string
The principal that created the share.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Full name of the object being shared.
Objects List<GetShareObject>
arrays containing details of each object in the share.
CreatedAt int
Time when the share was created.
CreatedBy string
The principal that created the share.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Full name of the object being shared.
Objects []GetShareObject
arrays containing details of each object in the share.
createdAt Integer
Time when the share was created.
createdBy String
The principal that created the share.
id String
The provider-assigned unique ID for this managed resource.
name String
Full name of the object being shared.
objects List<GetShareObject>
arrays containing details of each object in the share.
createdAt number
Time when the share was created.
createdBy string
The principal that created the share.
id string
The provider-assigned unique ID for this managed resource.
name string
Full name of the object being shared.
objects GetShareObject[]
arrays containing details of each object in the share.
created_at int
Time when the share was created.
created_by str
The principal that created the share.
id str
The provider-assigned unique ID for this managed resource.
name str
Full name of the object being shared.
objects Sequence[GetShareObject]
arrays containing details of each object in the share.
createdAt Number
Time when the share was created.
createdBy String
The principal that created the share.
id String
The provider-assigned unique ID for this managed resource.
name String
Full name of the object being shared.
objects List<Property Map>
arrays containing details of each object in the share.

Supporting Types

GetShareObject

AddedAt This property is required. int
AddedBy This property is required. string
DataObjectType This property is required. string
Type of the object.
Name This property is required. string
The name of the share
Status This property is required. string
CdfEnabled bool
Comment string
Description about the object.
Content string
HistoryDataSharingStatus string
Partitions List<GetShareObjectPartition>
SharedAs string
StartVersion int
StringSharedAs string
AddedAt This property is required. int
AddedBy This property is required. string
DataObjectType This property is required. string
Type of the object.
Name This property is required. string
The name of the share
Status This property is required. string
CdfEnabled bool
Comment string
Description about the object.
Content string
HistoryDataSharingStatus string
Partitions []GetShareObjectPartition
SharedAs string
StartVersion int
StringSharedAs string
addedAt This property is required. Integer
addedBy This property is required. String
dataObjectType This property is required. String
Type of the object.
name This property is required. String
The name of the share
status This property is required. String
cdfEnabled Boolean
comment String
Description about the object.
content String
historyDataSharingStatus String
partitions List<GetShareObjectPartition>
sharedAs String
startVersion Integer
stringSharedAs String
addedAt This property is required. number
addedBy This property is required. string
dataObjectType This property is required. string
Type of the object.
name This property is required. string
The name of the share
status This property is required. string
cdfEnabled boolean
comment string
Description about the object.
content string
historyDataSharingStatus string
partitions GetShareObjectPartition[]
sharedAs string
startVersion number
stringSharedAs string
added_at This property is required. int
added_by This property is required. str
data_object_type This property is required. str
Type of the object.
name This property is required. str
The name of the share
status This property is required. str
cdf_enabled bool
comment str
Description about the object.
content str
history_data_sharing_status str
partitions Sequence[GetShareObjectPartition]
shared_as str
start_version int
string_shared_as str
addedAt This property is required. Number
addedBy This property is required. String
dataObjectType This property is required. String
Type of the object.
name This property is required. String
The name of the share
status This property is required. String
cdfEnabled Boolean
comment String
Description about the object.
content String
historyDataSharingStatus String
partitions List<Property Map>
sharedAs String
startVersion Number
stringSharedAs String

GetShareObjectPartition

GetShareObjectPartitionValue

Name This property is required. string
The name of the share
Op This property is required. string
RecipientPropertyKey string
Value string
Name This property is required. string
The name of the share
Op This property is required. string
RecipientPropertyKey string
Value string
name This property is required. String
The name of the share
op This property is required. String
recipientPropertyKey String
value String
name This property is required. string
The name of the share
op This property is required. string
recipientPropertyKey string
value string
name This property is required. str
The name of the share
op This property is required. str
recipient_property_key str
value str
name This property is required. String
The name of the share
op This property is required. String
recipientPropertyKey String
value String

Package Details

Repository
databricks pulumi/pulumi-databricks
License
Apache-2.0
Notes
This Pulumi package is based on the databricks Terraform Provider.
Databricks v1.65.0 published on Wednesday, Apr 9, 2025 by Pulumi