1. Packages
  2. Databricks
  3. API Docs
  4. Share
Databricks v1.36.0 published on Friday, Apr 19, 2024 by Pulumi

databricks.Share

Explore with Pulumi AI

databricks logo
Databricks v1.36.0 published on Friday, Apr 19, 2024 by Pulumi

    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)
    public Share(String name, ShareArgs args)
    public Share(String name, ShareArgs args, CustomResourceOptions options)
    
    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.

    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:

    CreatedAt int
    Time when the share was created.
    CreatedBy string
    The principal that created the share.
    Name string
    Name of share. Change forces creation of a new resource.
    Objects List<ShareObject>
    Owner string
    User name/group name/sp application_id of the share owner.
    CreatedAt int
    Time when the share was created.
    CreatedBy string
    The principal that created the share.
    Name string
    Name of share. Change forces creation of a new resource.
    Objects []ShareObjectArgs
    Owner string
    User name/group name/sp application_id of the share owner.
    createdAt Integer
    Time when the share was created.
    createdBy String
    The principal that created the share.
    name String
    Name of share. Change forces creation of a new resource.
    objects List<ShareObject>
    owner String
    User name/group name/sp application_id of the share owner.
    createdAt number
    Time when the share was created.
    createdBy string
    The principal that created the share.
    name string
    Name of share. Change forces creation of a new resource.
    objects ShareObject[]
    owner string
    User name/group name/sp application_id of the share owner.
    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[ShareObjectArgs]
    owner str
    User name/group name/sp application_id of the share owner.
    createdAt Number
    Time when the share was created.
    createdBy String
    The principal that created the share.
    name String
    Name of share. Change forces creation of a new resource.
    objects List<Property Map>
    owner String
    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.
    The following state arguments are supported:
    CreatedAt int
    Time when the share was created.
    CreatedBy string
    The principal that created the share.
    Name string
    Name of share. Change forces creation of a new resource.
    Objects List<ShareObject>
    Owner string
    User name/group name/sp application_id of the share owner.
    CreatedAt int
    Time when the share was created.
    CreatedBy string
    The principal that created the share.
    Name string
    Name of share. Change forces creation of a new resource.
    Objects []ShareObjectArgs
    Owner string
    User name/group name/sp application_id of the share owner.
    createdAt Integer
    Time when the share was created.
    createdBy String
    The principal that created the share.
    name String
    Name of share. Change forces creation of a new resource.
    objects List<ShareObject>
    owner String
    User name/group name/sp application_id of the share owner.
    createdAt number
    Time when the share was created.
    createdBy string
    The principal that created the share.
    name string
    Name of share. Change forces creation of a new resource.
    objects ShareObject[]
    owner string
    User name/group name/sp application_id of the share owner.
    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[ShareObjectArgs]
    owner str
    User name/group name/sp application_id of the share owner.
    createdAt Number
    Time when the share was created.
    createdBy String
    The principal that created the share.
    name String
    Name of share. Change forces creation of a new resource.
    objects List<Property Map>
    owner String
    User name/group name/sp application_id of the share owner.

    Supporting Types

    ShareObject, ShareObjectArgs

    DataObjectType string
    Type of the data object, currently TABLE, SCHEMA, VOLUME, and MODEL are supported.
    Name string
    Full name of the object, e.g. catalog.schema.name for a tables, volumes and models, or catalog.schema for schemas.
    AddedAt int
    AddedBy string
    CdfEnabled 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.
    HistoryDataSharingStatus string

    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, field cdf_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 in partition block takes a list of value blocks. The field is documented below.

    Partitions List<ShareObjectPartition>
    SharedAs 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. The shared_as name must be unique within a Share. Change forces creation of a new resource.
    StartVersion 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.
    DataObjectType string
    Type of the data object, currently TABLE, SCHEMA, VOLUME, and MODEL are supported.
    Name string
    Full name of the object, e.g. catalog.schema.name for a tables, volumes and models, or catalog.schema for schemas.
    AddedAt int
    AddedBy string
    CdfEnabled 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.
    HistoryDataSharingStatus string

    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, field cdf_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 in partition block takes a list of value blocks. The field is documented below.

    Partitions []ShareObjectPartition
    SharedAs 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. The shared_as name must be unique within a Share. Change forces creation of a new resource.
    StartVersion 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.
    dataObjectType String
    Type of the data object, currently TABLE, SCHEMA, VOLUME, and MODEL are supported.
    name String
    Full name of the object, e.g. catalog.schema.name for a tables, volumes and models, or catalog.schema for schemas.
    addedAt Integer
    addedBy String
    cdfEnabled 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.
    historyDataSharingStatus String

    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, field cdf_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 in partition block takes a list of value blocks. The field is documented below.

    partitions List<ShareObjectPartition>
    sharedAs 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. The shared_as name must be unique within a Share. Change forces creation of a new resource.
    startVersion 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.
    dataObjectType string
    Type of the data object, currently TABLE, SCHEMA, VOLUME, and MODEL are supported.
    name string
    Full name of the object, e.g. catalog.schema.name for a tables, volumes and models, or catalog.schema for schemas.
    addedAt number
    addedBy string
    cdfEnabled 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.
    historyDataSharingStatus string

    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, field cdf_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 in partition block takes a list of value blocks. The field is documented below.

    partitions ShareObjectPartition[]
    sharedAs 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. The shared_as name must be unique within a Share. Change forces creation of a new resource.
    startVersion 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_type str
    Type of the data object, currently TABLE, SCHEMA, VOLUME, and MODEL are supported.
    name str
    Full name of the object, e.g. catalog.schema.name for a tables, volumes and models, or catalog.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_sharing_status str

    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, field cdf_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 in partition block takes a list of value blocks. The field is documented below.

    partitions Sequence[ShareObjectPartition]
    shared_as 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. The shared_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.
    dataObjectType String
    Type of the data object, currently TABLE, SCHEMA, VOLUME, and MODEL are supported.
    name String
    Full name of the object, e.g. catalog.schema.name for a tables, volumes and models, or catalog.schema for schemas.
    addedAt Number
    addedBy String
    cdfEnabled 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.
    historyDataSharingStatus String

    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, field cdf_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 in partition block takes a list of value blocks. The field is documented below.

    partitions List<Property Map>
    sharedAs 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. The shared_as name must be unique within a Share. Change forces creation of a new resource.
    startVersion 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

    Values List<ShareObjectPartitionValue>
    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.
    Values []ShareObjectPartitionValue
    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.
    values List<ShareObjectPartitionValue>
    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.
    values ShareObjectPartitionValue[]
    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.
    values Sequence[ShareObjectPartitionValue]
    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.
    values List<Property Map>
    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.

    ShareObjectPartitionValue, ShareObjectPartitionValueArgs

    Name string
    The name of the partition column.
    Op string
    The operator to apply for the value, one of: EQUAL, LIKE
    RecipientPropertyKey string
    The key of a Delta Sharing recipient's property. For example databricks-account-id. When this field is set, field value 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
    RecipientPropertyKey string
    The key of a Delta Sharing recipient's property. For example databricks-account-id. When this field is set, field value 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
    recipientPropertyKey String
    The key of a Delta Sharing recipient's property. For example databricks-account-id. When this field is set, field value 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
    recipientPropertyKey string
    The key of a Delta Sharing recipient's property. For example databricks-account-id. When this field is set, field value 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_key str
    The key of a Delta Sharing recipient's property. For example databricks-account-id. When this field is set, field value 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
    recipientPropertyKey String
    The key of a Delta Sharing recipient's property. For example databricks-account-id. When this field is set, field value 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.
    databricks logo
    Databricks v1.36.0 published on Friday, Apr 19, 2024 by Pulumi