databricks.Grant
Explore with Pulumi AI
Import
The resource can be imported using combination of securable type (table
, catalog
, foreign_connection
, …), it’s name and principal
:
bash
$ pulumi import databricks:index/grant:Grant this catalog/abc/user_name
Create Grant Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Grant(name: string, args: GrantArgs, opts?: CustomResourceOptions);
@overload
def Grant(resource_name: str,
args: GrantArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Grant(resource_name: str,
opts: Optional[ResourceOptions] = None,
principal: Optional[str] = None,
privileges: Optional[Sequence[str]] = None,
pipeline: Optional[str] = None,
function: Optional[str] = None,
metastore: Optional[str] = None,
model: Optional[str] = None,
catalog: Optional[str] = None,
foreign_connection: Optional[str] = None,
external_location: Optional[str] = None,
recipient: Optional[str] = None,
schema: Optional[str] = None,
share: Optional[str] = None,
storage_credential: Optional[str] = None,
table: Optional[str] = None,
volume: Optional[str] = None)
func NewGrant(ctx *Context, name string, args GrantArgs, opts ...ResourceOption) (*Grant, error)
public Grant(string name, GrantArgs args, CustomResourceOptions? opts = null)
type: databricks:Grant
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 GrantArgs
- 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 GrantArgs
- 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 GrantArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GrantArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GrantArgs
- 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 grantResource = new Databricks.Grant("grantResource", new()
{
Principal = "string",
Privileges = new[]
{
"string",
},
Pipeline = "string",
Function = "string",
Metastore = "string",
Model = "string",
Catalog = "string",
ForeignConnection = "string",
ExternalLocation = "string",
Recipient = "string",
Schema = "string",
Share = "string",
StorageCredential = "string",
Table = "string",
Volume = "string",
});
example, err := databricks.NewGrant(ctx, "grantResource", &databricks.GrantArgs{
Principal: pulumi.String("string"),
Privileges: pulumi.StringArray{
pulumi.String("string"),
},
Pipeline: pulumi.String("string"),
Function: pulumi.String("string"),
Metastore: pulumi.String("string"),
Model: pulumi.String("string"),
Catalog: pulumi.String("string"),
ForeignConnection: pulumi.String("string"),
ExternalLocation: pulumi.String("string"),
Recipient: pulumi.String("string"),
Schema: pulumi.String("string"),
Share: pulumi.String("string"),
StorageCredential: pulumi.String("string"),
Table: pulumi.String("string"),
Volume: pulumi.String("string"),
})
var grantResource = new Grant("grantResource", GrantArgs.builder()
.principal("string")
.privileges("string")
.pipeline("string")
.function("string")
.metastore("string")
.model("string")
.catalog("string")
.foreignConnection("string")
.externalLocation("string")
.recipient("string")
.schema("string")
.share("string")
.storageCredential("string")
.table("string")
.volume("string")
.build());
grant_resource = databricks.Grant("grantResource",
principal="string",
privileges=["string"],
pipeline="string",
function="string",
metastore="string",
model="string",
catalog="string",
foreign_connection="string",
external_location="string",
recipient="string",
schema="string",
share="string",
storage_credential="string",
table="string",
volume="string")
const grantResource = new databricks.Grant("grantResource", {
principal: "string",
privileges: ["string"],
pipeline: "string",
"function": "string",
metastore: "string",
model: "string",
catalog: "string",
foreignConnection: "string",
externalLocation: "string",
recipient: "string",
schema: "string",
share: "string",
storageCredential: "string",
table: "string",
volume: "string",
});
type: databricks:Grant
properties:
catalog: string
externalLocation: string
foreignConnection: string
function: string
metastore: string
model: string
pipeline: string
principal: string
privileges:
- string
recipient: string
schema: string
share: string
storageCredential: string
table: string
volume: string
Grant 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 Grant resource accepts the following input properties:
- Principal string
- Privileges List<string>
- Catalog string
- External
Location string - Foreign
Connection string - Function string
- Metastore string
- Model string
- Pipeline string
- Recipient string
- Schema string
- string
- Storage
Credential string - Table string
- Volume string
- Principal string
- Privileges []string
- Catalog string
- External
Location string - Foreign
Connection string - Function string
- Metastore string
- Model string
- Pipeline string
- Recipient string
- Schema string
- string
- Storage
Credential string - Table string
- Volume string
- principal String
- privileges List<String>
- catalog String
- external
Location String - foreign
Connection String - function String
- metastore String
- model String
- pipeline String
- recipient String
- schema String
- String
- storage
Credential String - table String
- volume String
- principal string
- privileges string[]
- catalog string
- external
Location string - foreign
Connection string - function string
- metastore string
- model string
- pipeline string
- recipient string
- schema string
- string
- storage
Credential string - table string
- volume string
- principal str
- privileges Sequence[str]
- catalog str
- external_
location str - foreign_
connection str - function str
- metastore str
- model str
- pipeline str
- recipient str
- schema str
- str
- storage_
credential str - table str
- volume str
- principal String
- privileges List<String>
- catalog String
- external
Location String - foreign
Connection String - function String
- metastore String
- model String
- pipeline String
- recipient String
- schema String
- String
- storage
Credential String - table String
- volume String
Outputs
All input properties are implicitly available as output properties. Additionally, the Grant 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 Grant Resource
Get an existing Grant 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?: GrantState, opts?: CustomResourceOptions): Grant
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
catalog: Optional[str] = None,
external_location: Optional[str] = None,
foreign_connection: Optional[str] = None,
function: Optional[str] = None,
metastore: Optional[str] = None,
model: Optional[str] = None,
pipeline: Optional[str] = None,
principal: Optional[str] = None,
privileges: Optional[Sequence[str]] = None,
recipient: Optional[str] = None,
schema: Optional[str] = None,
share: Optional[str] = None,
storage_credential: Optional[str] = None,
table: Optional[str] = None,
volume: Optional[str] = None) -> Grant
func GetGrant(ctx *Context, name string, id IDInput, state *GrantState, opts ...ResourceOption) (*Grant, error)
public static Grant Get(string name, Input<string> id, GrantState? state, CustomResourceOptions? opts = null)
public static Grant get(String name, Output<String> id, GrantState 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.
- Catalog string
- External
Location string - Foreign
Connection string - Function string
- Metastore string
- Model string
- Pipeline string
- Principal string
- Privileges List<string>
- Recipient string
- Schema string
- string
- Storage
Credential string - Table string
- Volume string
- Catalog string
- External
Location string - Foreign
Connection string - Function string
- Metastore string
- Model string
- Pipeline string
- Principal string
- Privileges []string
- Recipient string
- Schema string
- string
- Storage
Credential string - Table string
- Volume string
- catalog String
- external
Location String - foreign
Connection String - function String
- metastore String
- model String
- pipeline String
- principal String
- privileges List<String>
- recipient String
- schema String
- String
- storage
Credential String - table String
- volume String
- catalog string
- external
Location string - foreign
Connection string - function string
- metastore string
- model string
- pipeline string
- principal string
- privileges string[]
- recipient string
- schema string
- string
- storage
Credential string - table string
- volume string
- catalog str
- external_
location str - foreign_
connection str - function str
- metastore str
- model str
- pipeline str
- principal str
- privileges Sequence[str]
- recipient str
- schema str
- str
- storage_
credential str - table str
- volume str
- catalog String
- external
Location String - foreign
Connection String - function String
- metastore String
- model String
- pipeline String
- principal String
- privileges List<String>
- recipient String
- schema String
- String
- storage
Credential String - table String
- volume String
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricks
Terraform Provider.