databricks.Share
Explore with Pulumi AI
Create Share Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Share(name: string, args?: ShareArgs, opts?: CustomResourceOptions);
@overload
def Share(resource_name: str,
args: Optional[ShareArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Share(resource_name: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[int] = None,
created_by: Optional[str] = None,
name: Optional[str] = None,
objects: Optional[Sequence[ShareObjectArgs]] = None,
owner: Optional[str] = None)
func NewShare(ctx *Context, name string, args *ShareArgs, opts ...ResourceOption) (*Share, error)
public Share(string name, ShareArgs? args = null, CustomResourceOptions? opts = null)
type: databricks:Share
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ShareArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ShareArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ShareArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ShareArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ShareArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var shareResource = new Databricks.Share("shareResource", new()
{
CreatedAt = 0,
CreatedBy = "string",
Name = "string",
Objects = new[]
{
new Databricks.Inputs.ShareObjectArgs
{
DataObjectType = "string",
Name = "string",
AddedAt = 0,
AddedBy = "string",
CdfEnabled = false,
Comment = "string",
HistoryDataSharingStatus = "string",
Partitions = new[]
{
new Databricks.Inputs.ShareObjectPartitionArgs
{
Values = new[]
{
new Databricks.Inputs.ShareObjectPartitionValueArgs
{
Name = "string",
Op = "string",
RecipientPropertyKey = "string",
Value = "string",
},
},
},
},
SharedAs = "string",
StartVersion = 0,
Status = "string",
},
},
Owner = "string",
});
example, err := databricks.NewShare(ctx, "shareResource", &databricks.ShareArgs{
CreatedAt: pulumi.Int(0),
CreatedBy: pulumi.String("string"),
Name: pulumi.String("string"),
Objects: databricks.ShareObjectArray{
&databricks.ShareObjectArgs{
DataObjectType: pulumi.String("string"),
Name: pulumi.String("string"),
AddedAt: pulumi.Int(0),
AddedBy: pulumi.String("string"),
CdfEnabled: pulumi.Bool(false),
Comment: pulumi.String("string"),
HistoryDataSharingStatus: pulumi.String("string"),
Partitions: databricks.ShareObjectPartitionArray{
&databricks.ShareObjectPartitionArgs{
Values: databricks.ShareObjectPartitionValueArray{
&databricks.ShareObjectPartitionValueArgs{
Name: pulumi.String("string"),
Op: pulumi.String("string"),
RecipientPropertyKey: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
},
SharedAs: pulumi.String("string"),
StartVersion: pulumi.Int(0),
Status: pulumi.String("string"),
},
},
Owner: pulumi.String("string"),
})
var shareResource = new Share("shareResource", ShareArgs.builder()
.createdAt(0)
.createdBy("string")
.name("string")
.objects(ShareObjectArgs.builder()
.dataObjectType("string")
.name("string")
.addedAt(0)
.addedBy("string")
.cdfEnabled(false)
.comment("string")
.historyDataSharingStatus("string")
.partitions(ShareObjectPartitionArgs.builder()
.values(ShareObjectPartitionValueArgs.builder()
.name("string")
.op("string")
.recipientPropertyKey("string")
.value("string")
.build())
.build())
.sharedAs("string")
.startVersion(0)
.status("string")
.build())
.owner("string")
.build());
share_resource = databricks.Share("shareResource",
created_at=0,
created_by="string",
name="string",
objects=[databricks.ShareObjectArgs(
data_object_type="string",
name="string",
added_at=0,
added_by="string",
cdf_enabled=False,
comment="string",
history_data_sharing_status="string",
partitions=[databricks.ShareObjectPartitionArgs(
values=[databricks.ShareObjectPartitionValueArgs(
name="string",
op="string",
recipient_property_key="string",
value="string",
)],
)],
shared_as="string",
start_version=0,
status="string",
)],
owner="string")
const shareResource = new databricks.Share("shareResource", {
createdAt: 0,
createdBy: "string",
name: "string",
objects: [{
dataObjectType: "string",
name: "string",
addedAt: 0,
addedBy: "string",
cdfEnabled: false,
comment: "string",
historyDataSharingStatus: "string",
partitions: [{
values: [{
name: "string",
op: "string",
recipientPropertyKey: "string",
value: "string",
}],
}],
sharedAs: "string",
startVersion: 0,
status: "string",
}],
owner: "string",
});
type: databricks:Share
properties:
createdAt: 0
createdBy: string
name: string
objects:
- addedAt: 0
addedBy: string
cdfEnabled: false
comment: string
dataObjectType: string
historyDataSharingStatus: string
name: string
partitions:
- values:
- name: string
op: string
recipientPropertyKey: string
value: string
sharedAs: string
startVersion: 0
status: string
owner: string
Share Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Share resource accepts the following input properties:
- created_
at int - Time when the share was created.
- created_
by str - The principal that created the share.
- name str
- Name of share. Change forces creation of a new resource.
- objects
Sequence[Share
Object Args] - owner str
- User name/group name/sp application_id of the share owner.
Outputs
All input properties are implicitly available as output properties. Additionally, the Share resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Share Resource
Get an existing Share resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ShareState, opts?: CustomResourceOptions): Share
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[int] = None,
created_by: Optional[str] = None,
name: Optional[str] = None,
objects: Optional[Sequence[ShareObjectArgs]] = None,
owner: Optional[str] = None) -> Share
func GetShare(ctx *Context, name string, id IDInput, state *ShareState, opts ...ResourceOption) (*Share, error)
public static Share Get(string name, Input<string> id, ShareState? state, CustomResourceOptions? opts = null)
public static Share get(String name, Output<String> id, ShareState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- created_
at int - Time when the share was created.
- created_
by str - The principal that created the share.
- name str
- Name of share. Change forces creation of a new resource.
- objects
Sequence[Share
Object Args] - owner str
- User name/group name/sp application_id of the share owner.
Supporting Types
ShareObject, ShareObjectArgs
- Data
Object stringType - Type of the data object, currently
TABLE
,SCHEMA
,VOLUME
, andMODEL
are supported. - Name string
- Full name of the object, e.g.
catalog.schema.name
for a tables, volumes and models, orcatalog.schema
for schemas. - Added
At int - Added
By string - Cdf
Enabled bool - Whether to enable Change Data Feed (cdf) on the shared object. When this field is set, field
history_data_sharing_status
can not be set. - Comment string
- Description about the object.
- History
Data stringSharing Status Whether to enable history sharing, one of:
ENABLED
,DISABLED
. When a table has history sharing enabled, recipients can query table data by version, starting from the current table version. If not specified, clients can only query starting from the version of the object at the time it was added to the share. NOTE: The start_version should be less than or equal the current version of the object. When this field is set, fieldcdf_enabled
can not be set.To share only part of a table when you add the table to a share, you can provide partition specifications. This is specified by a number of
partition
blocks. Each entry inpartition
block takes a list ofvalue
blocks. The field is documented below.- Partitions
List<Share
Object Partition> - string
- A user-provided new name for the data object within the share. If this new name is not provided, the object's original name will be used as the
shared_as
name. Theshared_as
name must be unique within a Share. Change forces creation of a new resource. - Start
Version int - The start version associated with the object for cdf. This allows data providers to control the lowest object version that is accessible by clients.
- Status string
- Status of the object, one of:
ACTIVE
,PERMISSION_DENIED
.
- Data
Object stringType - Type of the data object, currently
TABLE
,SCHEMA
,VOLUME
, andMODEL
are supported. - Name string
- Full name of the object, e.g.
catalog.schema.name
for a tables, volumes and models, orcatalog.schema
for schemas. - Added
At int - Added
By string - Cdf
Enabled bool - Whether to enable Change Data Feed (cdf) on the shared object. When this field is set, field
history_data_sharing_status
can not be set. - Comment string
- Description about the object.
- History
Data stringSharing Status Whether to enable history sharing, one of:
ENABLED
,DISABLED
. When a table has history sharing enabled, recipients can query table data by version, starting from the current table version. If not specified, clients can only query starting from the version of the object at the time it was added to the share. NOTE: The start_version should be less than or equal the current version of the object. When this field is set, fieldcdf_enabled
can not be set.To share only part of a table when you add the table to a share, you can provide partition specifications. This is specified by a number of
partition
blocks. Each entry inpartition
block takes a list ofvalue
blocks. The field is documented below.- Partitions
[]Share
Object Partition - string
- A user-provided new name for the data object within the share. If this new name is not provided, the object's original name will be used as the
shared_as
name. Theshared_as
name must be unique within a Share. Change forces creation of a new resource. - Start
Version int - The start version associated with the object for cdf. This allows data providers to control the lowest object version that is accessible by clients.
- Status string
- Status of the object, one of:
ACTIVE
,PERMISSION_DENIED
.
- data
Object StringType - Type of the data object, currently
TABLE
,SCHEMA
,VOLUME
, andMODEL
are supported. - name String
- Full name of the object, e.g.
catalog.schema.name
for a tables, volumes and models, orcatalog.schema
for schemas. - added
At Integer - added
By String - cdf
Enabled Boolean - Whether to enable Change Data Feed (cdf) on the shared object. When this field is set, field
history_data_sharing_status
can not be set. - comment String
- Description about the object.
- history
Data StringSharing Status Whether to enable history sharing, one of:
ENABLED
,DISABLED
. When a table has history sharing enabled, recipients can query table data by version, starting from the current table version. If not specified, clients can only query starting from the version of the object at the time it was added to the share. NOTE: The start_version should be less than or equal the current version of the object. When this field is set, fieldcdf_enabled
can not be set.To share only part of a table when you add the table to a share, you can provide partition specifications. This is specified by a number of
partition
blocks. Each entry inpartition
block takes a list ofvalue
blocks. The field is documented below.- partitions
List<Share
Object Partition> - String
- A user-provided new name for the data object within the share. If this new name is not provided, the object's original name will be used as the
shared_as
name. Theshared_as
name must be unique within a Share. Change forces creation of a new resource. - start
Version Integer - The start version associated with the object for cdf. This allows data providers to control the lowest object version that is accessible by clients.
- status String
- Status of the object, one of:
ACTIVE
,PERMISSION_DENIED
.
- data
Object stringType - Type of the data object, currently
TABLE
,SCHEMA
,VOLUME
, andMODEL
are supported. - name string
- Full name of the object, e.g.
catalog.schema.name
for a tables, volumes and models, orcatalog.schema
for schemas. - added
At number - added
By string - cdf
Enabled boolean - Whether to enable Change Data Feed (cdf) on the shared object. When this field is set, field
history_data_sharing_status
can not be set. - comment string
- Description about the object.
- history
Data stringSharing Status Whether to enable history sharing, one of:
ENABLED
,DISABLED
. When a table has history sharing enabled, recipients can query table data by version, starting from the current table version. If not specified, clients can only query starting from the version of the object at the time it was added to the share. NOTE: The start_version should be less than or equal the current version of the object. When this field is set, fieldcdf_enabled
can not be set.To share only part of a table when you add the table to a share, you can provide partition specifications. This is specified by a number of
partition
blocks. Each entry inpartition
block takes a list ofvalue
blocks. The field is documented below.- partitions
Share
Object Partition[] - string
- A user-provided new name for the data object within the share. If this new name is not provided, the object's original name will be used as the
shared_as
name. Theshared_as
name must be unique within a Share. Change forces creation of a new resource. - start
Version number - The start version associated with the object for cdf. This allows data providers to control the lowest object version that is accessible by clients.
- status string
- Status of the object, one of:
ACTIVE
,PERMISSION_DENIED
.
- data_
object_ strtype - Type of the data object, currently
TABLE
,SCHEMA
,VOLUME
, andMODEL
are supported. - name str
- Full name of the object, e.g.
catalog.schema.name
for a tables, volumes and models, orcatalog.schema
for schemas. - added_
at int - added_
by str - cdf_
enabled bool - Whether to enable Change Data Feed (cdf) on the shared object. When this field is set, field
history_data_sharing_status
can not be set. - comment str
- Description about the object.
- history_
data_ strsharing_ status Whether to enable history sharing, one of:
ENABLED
,DISABLED
. When a table has history sharing enabled, recipients can query table data by version, starting from the current table version. If not specified, clients can only query starting from the version of the object at the time it was added to the share. NOTE: The start_version should be less than or equal the current version of the object. When this field is set, fieldcdf_enabled
can not be set.To share only part of a table when you add the table to a share, you can provide partition specifications. This is specified by a number of
partition
blocks. Each entry inpartition
block takes a list ofvalue
blocks. The field is documented below.- partitions
Sequence[Share
Object Partition] - str
- A user-provided new name for the data object within the share. If this new name is not provided, the object's original name will be used as the
shared_as
name. Theshared_as
name must be unique within a Share. Change forces creation of a new resource. - start_
version int - The start version associated with the object for cdf. This allows data providers to control the lowest object version that is accessible by clients.
- status str
- Status of the object, one of:
ACTIVE
,PERMISSION_DENIED
.
- data
Object StringType - Type of the data object, currently
TABLE
,SCHEMA
,VOLUME
, andMODEL
are supported. - name String
- Full name of the object, e.g.
catalog.schema.name
for a tables, volumes and models, orcatalog.schema
for schemas. - added
At Number - added
By String - cdf
Enabled Boolean - Whether to enable Change Data Feed (cdf) on the shared object. When this field is set, field
history_data_sharing_status
can not be set. - comment String
- Description about the object.
- history
Data StringSharing Status Whether to enable history sharing, one of:
ENABLED
,DISABLED
. When a table has history sharing enabled, recipients can query table data by version, starting from the current table version. If not specified, clients can only query starting from the version of the object at the time it was added to the share. NOTE: The start_version should be less than or equal the current version of the object. When this field is set, fieldcdf_enabled
can not be set.To share only part of a table when you add the table to a share, you can provide partition specifications. This is specified by a number of
partition
blocks. Each entry inpartition
block takes a list ofvalue
blocks. The field is documented below.- partitions List<Property Map>
- String
- A user-provided new name for the data object within the share. If this new name is not provided, the object's original name will be used as the
shared_as
name. Theshared_as
name must be unique within a Share. Change forces creation of a new resource. - start
Version Number - The start version associated with the object for cdf. This allows data providers to control the lowest object version that is accessible by clients.
- status String
- Status of the object, one of:
ACTIVE
,PERMISSION_DENIED
.
ShareObjectPartition, ShareObjectPartitionArgs
ShareObjectPartitionValue, ShareObjectPartitionValueArgs
- Name string
- The name of the partition column.
- Op string
- The operator to apply for the value, one of:
EQUAL
,LIKE
- Recipient
Property stringKey - The key of a Delta Sharing recipient's property. For example
databricks-account-id
. When this field is set, fieldvalue
can not be set. - Value string
- The value of the partition column. When this value is not set, it means null value. When this field is set, field
recipient_property_key
can not be set.
- Name string
- The name of the partition column.
- Op string
- The operator to apply for the value, one of:
EQUAL
,LIKE
- Recipient
Property stringKey - The key of a Delta Sharing recipient's property. For example
databricks-account-id
. When this field is set, fieldvalue
can not be set. - Value string
- The value of the partition column. When this value is not set, it means null value. When this field is set, field
recipient_property_key
can not be set.
- name String
- The name of the partition column.
- op String
- The operator to apply for the value, one of:
EQUAL
,LIKE
- recipient
Property StringKey - The key of a Delta Sharing recipient's property. For example
databricks-account-id
. When this field is set, fieldvalue
can not be set. - value String
- The value of the partition column. When this value is not set, it means null value. When this field is set, field
recipient_property_key
can not be set.
- name string
- The name of the partition column.
- op string
- The operator to apply for the value, one of:
EQUAL
,LIKE
- recipient
Property stringKey - The key of a Delta Sharing recipient's property. For example
databricks-account-id
. When this field is set, fieldvalue
can not be set. - value string
- The value of the partition column. When this value is not set, it means null value. When this field is set, field
recipient_property_key
can not be set.
- name str
- The name of the partition column.
- op str
- The operator to apply for the value, one of:
EQUAL
,LIKE
- recipient_
property_ strkey - The key of a Delta Sharing recipient's property. For example
databricks-account-id
. When this field is set, fieldvalue
can not be set. - value str
- The value of the partition column. When this value is not set, it means null value. When this field is set, field
recipient_property_key
can not be set.
- name String
- The name of the partition column.
- op String
- The operator to apply for the value, one of:
EQUAL
,LIKE
- recipient
Property StringKey - The key of a Delta Sharing recipient's property. For example
databricks-account-id
. When this field is set, fieldvalue
can not be set. - value String
- The value of the partition column. When this value is not set, it means null value. When this field is set, field
recipient_property_key
can not be set.
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricks
Terraform Provider.