1. Packages
  2. Packages
  3. Databricks Provider
  4. API Docs
  5. Grants
Viewing docs for Databricks v0.4.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
databricks logo
Viewing docs for Databricks v0.4.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Create Grants Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Grants(name: string, args: GrantsArgs, opts?: CustomResourceOptions);
    @overload
    def Grants(resource_name: str,
               args: GrantsArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Grants(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               grants: Optional[Sequence[GrantsGrantArgs]] = None,
               catalog: Optional[str] = None,
               external_location: Optional[str] = None,
               schema: Optional[str] = None,
               storage_credential: Optional[str] = None,
               table: Optional[str] = None,
               view: Optional[str] = None)
    func NewGrants(ctx *Context, name string, args GrantsArgs, opts ...ResourceOption) (*Grants, error)
    public Grants(string name, GrantsArgs args, CustomResourceOptions? opts = null)
    public Grants(String name, GrantsArgs args)
    public Grants(String name, GrantsArgs args, CustomResourceOptions options)
    
    type: databricks:Grants
    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 GrantsArgs
    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 GrantsArgs
    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 GrantsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GrantsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GrantsArgs
    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 grantsResource = new Databricks.Grants("grantsResource", new()
    {
        GrantDetails = new[]
        {
            new Databricks.Inputs.GrantsGrantArgs
            {
                Principal = "string",
                Privileges = new[]
                {
                    "string",
                },
            },
        },
        Catalog = "string",
        ExternalLocation = "string",
        Schema = "string",
        StorageCredential = "string",
        Table = "string",
        View = "string",
    });
    
    example, err := databricks.NewGrants(ctx, "grantsResource", &databricks.GrantsArgs{
    	Grants: databricks.GrantsGrantArray{
    		&databricks.GrantsGrantArgs{
    			Principal: pulumi.String("string"),
    			Privileges: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	Catalog:           pulumi.String("string"),
    	ExternalLocation:  pulumi.String("string"),
    	Schema:            pulumi.String("string"),
    	StorageCredential: pulumi.String("string"),
    	Table:             pulumi.String("string"),
    	View:              pulumi.String("string"),
    })
    
    var grantsResource = new Grants("grantsResource", GrantsArgs.builder()
        .grants(GrantsGrantArgs.builder()
            .principal("string")
            .privileges("string")
            .build())
        .catalog("string")
        .externalLocation("string")
        .schema("string")
        .storageCredential("string")
        .table("string")
        .view("string")
        .build());
    
    grants_resource = databricks.Grants("grantsResource",
        grants=[{
            "principal": "string",
            "privileges": ["string"],
        }],
        catalog="string",
        external_location="string",
        schema="string",
        storage_credential="string",
        table="string",
        view="string")
    
    const grantsResource = new databricks.Grants("grantsResource", {
        grants: [{
            principal: "string",
            privileges: ["string"],
        }],
        catalog: "string",
        externalLocation: "string",
        schema: "string",
        storageCredential: "string",
        table: "string",
        view: "string",
    });
    
    type: databricks:Grants
    properties:
        catalog: string
        externalLocation: string
        grants:
            - principal: string
              privileges:
                - string
        schema: string
        storageCredential: string
        table: string
        view: string
    

    Grants Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Grants resource accepts the following input properties:

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Grants 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 Grants Resource

    Get an existing Grants 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?: GrantsState, opts?: CustomResourceOptions): Grants
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            catalog: Optional[str] = None,
            external_location: Optional[str] = None,
            grants: Optional[Sequence[GrantsGrantArgs]] = None,
            schema: Optional[str] = None,
            storage_credential: Optional[str] = None,
            table: Optional[str] = None,
            view: Optional[str] = None) -> Grants
    func GetGrants(ctx *Context, name string, id IDInput, state *GrantsState, opts ...ResourceOption) (*Grants, error)
    public static Grants Get(string name, Input<string> id, GrantsState? state, CustomResourceOptions? opts = null)
    public static Grants get(String name, Output<String> id, GrantsState state, CustomResourceOptions options)
    resources:  _:    type: databricks:Grants    get:      id: ${id}
    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.

    Supporting Types

    GrantsGrant, GrantsGrantArgs

    Principal string
    Privileges List<string>
    Principal string
    Privileges []string
    principal String
    privileges List<String>
    principal string
    privileges string[]
    principal str
    privileges Sequence[str]
    principal String
    privileges List<String>

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Viewing docs for Databricks v0.4.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.