snowflake.GrantPrivilegesToShare
Explore with Pulumi AI
Import
OnView
$ pulumi import snowflake:index/grantPrivilegesToShare:GrantPrivilegesToShare example '<share_name>|<privileges>|OnView|<database_name>.<schema_name>.<view_name>'`
Create GrantPrivilegesToShare Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GrantPrivilegesToShare(name: string, args: GrantPrivilegesToShareArgs, opts?: CustomResourceOptions);
@overload
def GrantPrivilegesToShare(resource_name: str,
args: GrantPrivilegesToShareArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GrantPrivilegesToShare(resource_name: str,
opts: Optional[ResourceOptions] = None,
privileges: Optional[Sequence[str]] = None,
to_share: Optional[str] = None,
on_all_tables_in_schema: Optional[str] = None,
on_database: Optional[str] = None,
on_function: Optional[str] = None,
on_schema: Optional[str] = None,
on_table: Optional[str] = None,
on_tag: Optional[str] = None,
on_view: Optional[str] = None)
func NewGrantPrivilegesToShare(ctx *Context, name string, args GrantPrivilegesToShareArgs, opts ...ResourceOption) (*GrantPrivilegesToShare, error)
public GrantPrivilegesToShare(string name, GrantPrivilegesToShareArgs args, CustomResourceOptions? opts = null)
public GrantPrivilegesToShare(String name, GrantPrivilegesToShareArgs args)
public GrantPrivilegesToShare(String name, GrantPrivilegesToShareArgs args, CustomResourceOptions options)
type: snowflake:GrantPrivilegesToShare
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 GrantPrivilegesToShareArgs
- 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 GrantPrivilegesToShareArgs
- 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 GrantPrivilegesToShareArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GrantPrivilegesToShareArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GrantPrivilegesToShareArgs
- 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 grantPrivilegesToShareResource = new Snowflake.GrantPrivilegesToShare("grantPrivilegesToShareResource", new()
{
Privileges = new[]
{
"string",
},
ToShare = "string",
OnAllTablesInSchema = "string",
OnDatabase = "string",
OnFunction = "string",
OnSchema = "string",
OnTable = "string",
OnTag = "string",
OnView = "string",
});
example, err := snowflake.NewGrantPrivilegesToShare(ctx, "grantPrivilegesToShareResource", &snowflake.GrantPrivilegesToShareArgs{
Privileges: pulumi.StringArray{
pulumi.String("string"),
},
ToShare: pulumi.String("string"),
OnAllTablesInSchema: pulumi.String("string"),
OnDatabase: pulumi.String("string"),
OnFunction: pulumi.String("string"),
OnSchema: pulumi.String("string"),
OnTable: pulumi.String("string"),
OnTag: pulumi.String("string"),
OnView: pulumi.String("string"),
})
var grantPrivilegesToShareResource = new GrantPrivilegesToShare("grantPrivilegesToShareResource", GrantPrivilegesToShareArgs.builder()
.privileges("string")
.toShare("string")
.onAllTablesInSchema("string")
.onDatabase("string")
.onFunction("string")
.onSchema("string")
.onTable("string")
.onTag("string")
.onView("string")
.build());
grant_privileges_to_share_resource = snowflake.GrantPrivilegesToShare("grantPrivilegesToShareResource",
privileges=["string"],
to_share="string",
on_all_tables_in_schema="string",
on_database="string",
on_function="string",
on_schema="string",
on_table="string",
on_tag="string",
on_view="string")
const grantPrivilegesToShareResource = new snowflake.GrantPrivilegesToShare("grantPrivilegesToShareResource", {
privileges: ["string"],
toShare: "string",
onAllTablesInSchema: "string",
onDatabase: "string",
onFunction: "string",
onSchema: "string",
onTable: "string",
onTag: "string",
onView: "string",
});
type: snowflake:GrantPrivilegesToShare
properties:
onAllTablesInSchema: string
onDatabase: string
onFunction: string
onSchema: string
onTable: string
onTag: string
onView: string
privileges:
- string
toShare: string
GrantPrivilegesToShare 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 GrantPrivilegesToShare resource accepts the following input properties:
- Privileges List<string>
- The privileges to grant on the share. See available list of privileges: https://docs.snowflake.com/en/sql-reference/sql/grant-privilege-share#syntax
- string
- The fully qualified name of the share on which privileges will be granted.
- On
All stringTables In Schema - The fully qualified identifier for the schema for which the specified privilege will be granted for all tables.
- On
Database string - The fully qualified name of the database on which privileges will be granted.
- On
Function string - The fully qualified name of the function on which privileges will be granted.
- On
Schema string - The fully qualified name of the schema on which privileges will be granted.
- On
Table string - The fully qualified name of the table on which privileges will be granted.
- On
Tag string - The fully qualified name of the tag on which privileges will be granted.
- On
View string - The fully qualified name of the view on which privileges will be granted.
- Privileges []string
- The privileges to grant on the share. See available list of privileges: https://docs.snowflake.com/en/sql-reference/sql/grant-privilege-share#syntax
- string
- The fully qualified name of the share on which privileges will be granted.
- On
All stringTables In Schema - The fully qualified identifier for the schema for which the specified privilege will be granted for all tables.
- On
Database string - The fully qualified name of the database on which privileges will be granted.
- On
Function string - The fully qualified name of the function on which privileges will be granted.
- On
Schema string - The fully qualified name of the schema on which privileges will be granted.
- On
Table string - The fully qualified name of the table on which privileges will be granted.
- On
Tag string - The fully qualified name of the tag on which privileges will be granted.
- On
View string - The fully qualified name of the view on which privileges will be granted.
- privileges List<String>
- The privileges to grant on the share. See available list of privileges: https://docs.snowflake.com/en/sql-reference/sql/grant-privilege-share#syntax
- String
- The fully qualified name of the share on which privileges will be granted.
- on
All StringTables In Schema - The fully qualified identifier for the schema for which the specified privilege will be granted for all tables.
- on
Database String - The fully qualified name of the database on which privileges will be granted.
- on
Function String - The fully qualified name of the function on which privileges will be granted.
- on
Schema String - The fully qualified name of the schema on which privileges will be granted.
- on
Table String - The fully qualified name of the table on which privileges will be granted.
- on
Tag String - The fully qualified name of the tag on which privileges will be granted.
- on
View String - The fully qualified name of the view on which privileges will be granted.
- privileges string[]
- The privileges to grant on the share. See available list of privileges: https://docs.snowflake.com/en/sql-reference/sql/grant-privilege-share#syntax
- string
- The fully qualified name of the share on which privileges will be granted.
- on
All stringTables In Schema - The fully qualified identifier for the schema for which the specified privilege will be granted for all tables.
- on
Database string - The fully qualified name of the database on which privileges will be granted.
- on
Function string - The fully qualified name of the function on which privileges will be granted.
- on
Schema string - The fully qualified name of the schema on which privileges will be granted.
- on
Table string - The fully qualified name of the table on which privileges will be granted.
- on
Tag string - The fully qualified name of the tag on which privileges will be granted.
- on
View string - The fully qualified name of the view on which privileges will be granted.
- privileges Sequence[str]
- The privileges to grant on the share. See available list of privileges: https://docs.snowflake.com/en/sql-reference/sql/grant-privilege-share#syntax
- str
- The fully qualified name of the share on which privileges will be granted.
- on_
all_ strtables_ in_ schema - The fully qualified identifier for the schema for which the specified privilege will be granted for all tables.
- on_
database str - The fully qualified name of the database on which privileges will be granted.
- on_
function str - The fully qualified name of the function on which privileges will be granted.
- on_
schema str - The fully qualified name of the schema on which privileges will be granted.
- on_
table str - The fully qualified name of the table on which privileges will be granted.
- on_
tag str - The fully qualified name of the tag on which privileges will be granted.
- on_
view str - The fully qualified name of the view on which privileges will be granted.
- privileges List<String>
- The privileges to grant on the share. See available list of privileges: https://docs.snowflake.com/en/sql-reference/sql/grant-privilege-share#syntax
- String
- The fully qualified name of the share on which privileges will be granted.
- on
All StringTables In Schema - The fully qualified identifier for the schema for which the specified privilege will be granted for all tables.
- on
Database String - The fully qualified name of the database on which privileges will be granted.
- on
Function String - The fully qualified name of the function on which privileges will be granted.
- on
Schema String - The fully qualified name of the schema on which privileges will be granted.
- on
Table String - The fully qualified name of the table on which privileges will be granted.
- on
Tag String - The fully qualified name of the tag on which privileges will be granted.
- on
View String - The fully qualified name of the view on which privileges will be granted.
Outputs
All input properties are implicitly available as output properties. Additionally, the GrantPrivilegesToShare 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 GrantPrivilegesToShare Resource
Get an existing GrantPrivilegesToShare 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?: GrantPrivilegesToShareState, opts?: CustomResourceOptions): GrantPrivilegesToShare
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
on_all_tables_in_schema: Optional[str] = None,
on_database: Optional[str] = None,
on_function: Optional[str] = None,
on_schema: Optional[str] = None,
on_table: Optional[str] = None,
on_tag: Optional[str] = None,
on_view: Optional[str] = None,
privileges: Optional[Sequence[str]] = None,
to_share: Optional[str] = None) -> GrantPrivilegesToShare
func GetGrantPrivilegesToShare(ctx *Context, name string, id IDInput, state *GrantPrivilegesToShareState, opts ...ResourceOption) (*GrantPrivilegesToShare, error)
public static GrantPrivilegesToShare Get(string name, Input<string> id, GrantPrivilegesToShareState? state, CustomResourceOptions? opts = null)
public static GrantPrivilegesToShare get(String name, Output<String> id, GrantPrivilegesToShareState 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.
- On
All stringTables In Schema - The fully qualified identifier for the schema for which the specified privilege will be granted for all tables.
- On
Database string - The fully qualified name of the database on which privileges will be granted.
- On
Function string - The fully qualified name of the function on which privileges will be granted.
- On
Schema string - The fully qualified name of the schema on which privileges will be granted.
- On
Table string - The fully qualified name of the table on which privileges will be granted.
- On
Tag string - The fully qualified name of the tag on which privileges will be granted.
- On
View string - The fully qualified name of the view on which privileges will be granted.
- Privileges List<string>
- The privileges to grant on the share. See available list of privileges: https://docs.snowflake.com/en/sql-reference/sql/grant-privilege-share#syntax
- string
- The fully qualified name of the share on which privileges will be granted.
- On
All stringTables In Schema - The fully qualified identifier for the schema for which the specified privilege will be granted for all tables.
- On
Database string - The fully qualified name of the database on which privileges will be granted.
- On
Function string - The fully qualified name of the function on which privileges will be granted.
- On
Schema string - The fully qualified name of the schema on which privileges will be granted.
- On
Table string - The fully qualified name of the table on which privileges will be granted.
- On
Tag string - The fully qualified name of the tag on which privileges will be granted.
- On
View string - The fully qualified name of the view on which privileges will be granted.
- Privileges []string
- The privileges to grant on the share. See available list of privileges: https://docs.snowflake.com/en/sql-reference/sql/grant-privilege-share#syntax
- string
- The fully qualified name of the share on which privileges will be granted.
- on
All StringTables In Schema - The fully qualified identifier for the schema for which the specified privilege will be granted for all tables.
- on
Database String - The fully qualified name of the database on which privileges will be granted.
- on
Function String - The fully qualified name of the function on which privileges will be granted.
- on
Schema String - The fully qualified name of the schema on which privileges will be granted.
- on
Table String - The fully qualified name of the table on which privileges will be granted.
- on
Tag String - The fully qualified name of the tag on which privileges will be granted.
- on
View String - The fully qualified name of the view on which privileges will be granted.
- privileges List<String>
- The privileges to grant on the share. See available list of privileges: https://docs.snowflake.com/en/sql-reference/sql/grant-privilege-share#syntax
- String
- The fully qualified name of the share on which privileges will be granted.
- on
All stringTables In Schema - The fully qualified identifier for the schema for which the specified privilege will be granted for all tables.
- on
Database string - The fully qualified name of the database on which privileges will be granted.
- on
Function string - The fully qualified name of the function on which privileges will be granted.
- on
Schema string - The fully qualified name of the schema on which privileges will be granted.
- on
Table string - The fully qualified name of the table on which privileges will be granted.
- on
Tag string - The fully qualified name of the tag on which privileges will be granted.
- on
View string - The fully qualified name of the view on which privileges will be granted.
- privileges string[]
- The privileges to grant on the share. See available list of privileges: https://docs.snowflake.com/en/sql-reference/sql/grant-privilege-share#syntax
- string
- The fully qualified name of the share on which privileges will be granted.
- on_
all_ strtables_ in_ schema - The fully qualified identifier for the schema for which the specified privilege will be granted for all tables.
- on_
database str - The fully qualified name of the database on which privileges will be granted.
- on_
function str - The fully qualified name of the function on which privileges will be granted.
- on_
schema str - The fully qualified name of the schema on which privileges will be granted.
- on_
table str - The fully qualified name of the table on which privileges will be granted.
- on_
tag str - The fully qualified name of the tag on which privileges will be granted.
- on_
view str - The fully qualified name of the view on which privileges will be granted.
- privileges Sequence[str]
- The privileges to grant on the share. See available list of privileges: https://docs.snowflake.com/en/sql-reference/sql/grant-privilege-share#syntax
- str
- The fully qualified name of the share on which privileges will be granted.
- on
All StringTables In Schema - The fully qualified identifier for the schema for which the specified privilege will be granted for all tables.
- on
Database String - The fully qualified name of the database on which privileges will be granted.
- on
Function String - The fully qualified name of the function on which privileges will be granted.
- on
Schema String - The fully qualified name of the schema on which privileges will be granted.
- on
Table String - The fully qualified name of the table on which privileges will be granted.
- on
Tag String - The fully qualified name of the tag on which privileges will be granted.
- on
View String - The fully qualified name of the view on which privileges will be granted.
- privileges List<String>
- The privileges to grant on the share. See available list of privileges: https://docs.snowflake.com/en/sql-reference/sql/grant-privilege-share#syntax
- String
- The fully qualified name of the share on which privileges will be granted.
Package Details
- Repository
- Snowflake pulumi/pulumi-snowflake
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
snowflake
Terraform Provider.