databricks.getShare
Retrieves details about a databricks.Share that were created by Pulumi or manually.
This data source can only be used with a workspace-level provider!
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);
import pulumi
import pulumi_databricks as databricks
this = databricks.get_share(name="this")
pulumi.export("createdBy", this.created_by)
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
})
}
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)),
};
});
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());
}
}
variables:
this:
fn::invoke:
function: databricks:getShare
arguments:
name: this
outputs:
createdBy: ${this.createdBy}
Related Resources
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>def get_share(comment: Optional[str] = None,
name: Optional[str] = None,
objects: Optional[Sequence[GetShareObject]] = None,
owner: Optional[str] = None,
provider_config: Optional[GetShareProviderConfig] = None,
storage_root: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetShareResult
def get_share_output(comment: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
objects: Optional[pulumi.Input[Sequence[pulumi.Input[GetShareObjectArgs]]]] = None,
owner: Optional[pulumi.Input[str]] = None,
provider_config: Optional[pulumi.Input[GetShareProviderConfigArgs]] = None,
storage_root: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetShareResult]func LookupShare(ctx *Context, args *LookupShareArgs, opts ...InvokeOption) (*LookupShareResult, error)
func LookupShareOutput(ctx *Context, args *LookupShareOutputArgs, opts ...InvokeOption) LookupShareResultOutput> 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)
}public static CompletableFuture<GetShareResult> getShare(GetShareArgs args, InvokeOptions options)
public static Output<GetShareResult> getShare(GetShareArgs args, InvokeOptions options)
fn::invoke:
function: databricks:index/getShare:getShare
arguments:
# arguments dictionaryThe following arguments are supported:
- Comment string
- Description about the object.
- Name string
- The name of the share
- Objects
List<Get
Share Object> - arrays containing details of each object in the share.
- Owner string
- Provider
Config GetShare Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- Storage
Root string
- Comment string
- Description about the object.
- Name string
- The name of the share
- Objects
[]Get
Share Object - arrays containing details of each object in the share.
- Owner string
- Provider
Config GetShare Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- Storage
Root string
- comment String
- Description about the object.
- name String
- The name of the share
- objects
List<Get
Share Object> - arrays containing details of each object in the share.
- owner String
- provider
Config GetShare Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- storage
Root String
- comment string
- Description about the object.
- name string
- The name of the share
- objects
Get
Share Object[] - arrays containing details of each object in the share.
- owner string
- provider
Config GetShare Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- storage
Root string
- comment str
- Description about the object.
- name str
- The name of the share
- objects
Sequence[Get
Share Object] - arrays containing details of each object in the share.
- owner str
- provider_
config GetShare Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- storage_
root str
- comment String
- Description about the object.
- name String
- The name of the share
- objects List<Property Map>
- arrays containing details of each object in the share.
- owner String
- provider
Config Property Map - Configure the provider for management through account provider. This block consists of the following fields:
- storage
Root String
getShare Result
The following output properties are available:
- Created
At int - Time when the share was created.
- Created
By string - The principal that created the share.
- Effective
Owner string - Id string
- The provider-assigned unique ID for this managed resource.
- Storage
Location string - Updated
At int - Updated
By string - Comment string
- Description about the object.
- Name string
- Full name of the object being shared.
- Objects
List<Get
Share Object> - arrays containing details of each object in the share.
- Owner string
- Provider
Config GetShare Provider Config - Storage
Root string
- Created
At int - Time when the share was created.
- Created
By string - The principal that created the share.
- Effective
Owner string - Id string
- The provider-assigned unique ID for this managed resource.
- Storage
Location string - Updated
At int - Updated
By string - Comment string
- Description about the object.
- Name string
- Full name of the object being shared.
- Objects
[]Get
Share Object - arrays containing details of each object in the share.
- Owner string
- Provider
Config GetShare Provider Config - Storage
Root string
- created
At Integer - Time when the share was created.
- created
By String - The principal that created the share.
- effective
Owner String - id String
- The provider-assigned unique ID for this managed resource.
- storage
Location String - updated
At Integer - updated
By String - comment String
- Description about the object.
- name String
- Full name of the object being shared.
- objects
List<Get
Share Object> - arrays containing details of each object in the share.
- owner String
- provider
Config GetShare Provider Config - storage
Root String
- created
At number - Time when the share was created.
- created
By string - The principal that created the share.
- effective
Owner string - id string
- The provider-assigned unique ID for this managed resource.
- storage
Location string - updated
At number - updated
By string - comment string
- Description about the object.
- name string
- Full name of the object being shared.
- objects
Get
Share Object[] - arrays containing details of each object in the share.
- owner string
- provider
Config GetShare Provider Config - storage
Root string
- created_
at int - Time when the share was created.
- created_
by str - The principal that created the share.
- effective_
owner str - id str
- The provider-assigned unique ID for this managed resource.
- storage_
location str - updated_
at int - updated_
by str - comment str
- Description about the object.
- name str
- Full name of the object being shared.
- objects
Sequence[Get
Share Object] - arrays containing details of each object in the share.
- owner str
- provider_
config GetShare Provider Config - storage_
root str
- created
At Number - Time when the share was created.
- created
By String - The principal that created the share.
- effective
Owner String - id String
- The provider-assigned unique ID for this managed resource.
- storage
Location String - updated
At Number - updated
By String - comment String
- Description about the object.
- name String
- Full name of the object being shared.
- objects List<Property Map>
- arrays containing details of each object in the share.
- owner String
- provider
Config Property Map - storage
Root String
Supporting Types
GetShareObject
- Added
At int - Added
By string - Effective
Cdf boolEnabled - Effective
History stringData Sharing Status - string
- Effective
Start intVersion - string
- Name string
- The name of the share
- Status string
- Cdf
Enabled bool - Comment string
- Description about the object.
- Content string
- Data
Object stringType - Type of the object.
- History
Data stringSharing Status - Partitions
List<Get
Share Object Partition> - string
- Start
Version int - string
- Added
At int - Added
By string - Effective
Cdf boolEnabled - Effective
History stringData Sharing Status - string
- Effective
Start intVersion - string
- Name string
- The name of the share
- Status string
- Cdf
Enabled bool - Comment string
- Description about the object.
- Content string
- Data
Object stringType - Type of the object.
- History
Data stringSharing Status - Partitions
[]Get
Share Object Partition - string
- Start
Version int - string
- added
At Integer - added
By String - effective
Cdf BooleanEnabled - effective
History StringData Sharing Status - String
- effective
Start IntegerVersion - String
- name String
- The name of the share
- status String
- cdf
Enabled Boolean - comment String
- Description about the object.
- content String
- data
Object StringType - Type of the object.
- history
Data StringSharing Status - partitions
List<Get
Share Object Partition> - String
- start
Version Integer - String
- added
At number - added
By string - effective
Cdf booleanEnabled - effective
History stringData Sharing Status - string
- effective
Start numberVersion - string
- name string
- The name of the share
- status string
- cdf
Enabled boolean - comment string
- Description about the object.
- content string
- data
Object stringType - Type of the object.
- history
Data stringSharing Status - partitions
Get
Share Object Partition[] - string
- start
Version number - string
- added_
at int - added_
by str - effective_
cdf_ boolenabled - effective_
history_ strdata_ sharing_ status - str
- effective_
start_ intversion - str
- name str
- The name of the share
- status str
- cdf_
enabled bool - comment str
- Description about the object.
- content str
- data_
object_ strtype - Type of the object.
- history_
data_ strsharing_ status - partitions
Sequence[Get
Share Object Partition] - str
- start_
version int - str
- added
At Number - added
By String - effective
Cdf BooleanEnabled - effective
History StringData Sharing Status - String
- effective
Start NumberVersion - String
- name String
- The name of the share
- status String
- cdf
Enabled Boolean - comment String
- Description about the object.
- content String
- data
Object StringType - Type of the object.
- history
Data StringSharing Status - partitions List<Property Map>
- String
- start
Version Number - String
GetShareObjectPartition
GetShareObjectPartitionValue
- Name string
- The name of the share
- Op string
- Recipient
Property stringKey - Value string
- Name string
- The name of the share
- Op string
- Recipient
Property stringKey - Value string
- name String
- The name of the share
- op String
- recipient
Property StringKey - value String
- name string
- The name of the share
- op string
- recipient
Property stringKey - value string
- name str
- The name of the share
- op str
- recipient_
property_ strkey - value str
- name String
- The name of the share
- op String
- recipient
Property StringKey - value String
GetShareProviderConfig
- 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.
