snowflake.GrantDatabaseRole
Explore with Pulumi AI
Import
format is database_role_name (string) | object_type (ROLE|DATABASE ROLE|SHARE) | grantee_name (string)
$ pulumi import snowflake:index/grantDatabaseRole:GrantDatabaseRole example '"ABC"."test_db_role"|ROLE|"test_parent_role"'
Create GrantDatabaseRole Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GrantDatabaseRole(name: string, args: GrantDatabaseRoleArgs, opts?: CustomResourceOptions);
@overload
def GrantDatabaseRole(resource_name: str,
args: GrantDatabaseRoleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GrantDatabaseRole(resource_name: str,
opts: Optional[ResourceOptions] = None,
database_role_name: Optional[str] = None,
parent_database_role_name: Optional[str] = None,
parent_role_name: Optional[str] = None,
share_name: Optional[str] = None)
func NewGrantDatabaseRole(ctx *Context, name string, args GrantDatabaseRoleArgs, opts ...ResourceOption) (*GrantDatabaseRole, error)
public GrantDatabaseRole(string name, GrantDatabaseRoleArgs args, CustomResourceOptions? opts = null)
public GrantDatabaseRole(String name, GrantDatabaseRoleArgs args)
public GrantDatabaseRole(String name, GrantDatabaseRoleArgs args, CustomResourceOptions options)
type: snowflake:GrantDatabaseRole
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 GrantDatabaseRoleArgs
- 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 GrantDatabaseRoleArgs
- 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 GrantDatabaseRoleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GrantDatabaseRoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GrantDatabaseRoleArgs
- 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 grantDatabaseRoleResource = new Snowflake.GrantDatabaseRole("grantDatabaseRoleResource", new()
{
DatabaseRoleName = "string",
ParentDatabaseRoleName = "string",
ParentRoleName = "string",
ShareName = "string",
});
example, err := snowflake.NewGrantDatabaseRole(ctx, "grantDatabaseRoleResource", &snowflake.GrantDatabaseRoleArgs{
DatabaseRoleName: pulumi.String("string"),
ParentDatabaseRoleName: pulumi.String("string"),
ParentRoleName: pulumi.String("string"),
ShareName: pulumi.String("string"),
})
var grantDatabaseRoleResource = new GrantDatabaseRole("grantDatabaseRoleResource", GrantDatabaseRoleArgs.builder()
.databaseRoleName("string")
.parentDatabaseRoleName("string")
.parentRoleName("string")
.shareName("string")
.build());
grant_database_role_resource = snowflake.GrantDatabaseRole("grantDatabaseRoleResource",
database_role_name="string",
parent_database_role_name="string",
parent_role_name="string",
share_name="string")
const grantDatabaseRoleResource = new snowflake.GrantDatabaseRole("grantDatabaseRoleResource", {
databaseRoleName: "string",
parentDatabaseRoleName: "string",
parentRoleName: "string",
shareName: "string",
});
type: snowflake:GrantDatabaseRole
properties:
databaseRoleName: string
parentDatabaseRoleName: string
parentRoleName: string
shareName: string
GrantDatabaseRole 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 GrantDatabaseRole resource accepts the following input properties:
- Database
Role stringName - The fully qualified name of the database role which will be granted to share or parent role.
- Parent
Database stringRole Name - The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
- Parent
Role stringName - The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
- string
- The fully qualified name of the share on which privileges will be granted.
- Database
Role stringName - The fully qualified name of the database role which will be granted to share or parent role.
- Parent
Database stringRole Name - The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
- Parent
Role stringName - The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
- string
- The fully qualified name of the share on which privileges will be granted.
- database
Role StringName - The fully qualified name of the database role which will be granted to share or parent role.
- parent
Database StringRole Name - The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
- parent
Role StringName - The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
- String
- The fully qualified name of the share on which privileges will be granted.
- database
Role stringName - The fully qualified name of the database role which will be granted to share or parent role.
- parent
Database stringRole Name - The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
- parent
Role stringName - The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
- string
- The fully qualified name of the share on which privileges will be granted.
- database_
role_ strname - The fully qualified name of the database role which will be granted to share or parent role.
- parent_
database_ strrole_ name - The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
- parent_
role_ strname - The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
- str
- The fully qualified name of the share on which privileges will be granted.
- database
Role StringName - The fully qualified name of the database role which will be granted to share or parent role.
- parent
Database StringRole Name - The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
- parent
Role StringName - The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
- String
- The fully qualified name of the share on which privileges will be granted.
Outputs
All input properties are implicitly available as output properties. Additionally, the GrantDatabaseRole 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 GrantDatabaseRole Resource
Get an existing GrantDatabaseRole 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?: GrantDatabaseRoleState, opts?: CustomResourceOptions): GrantDatabaseRole
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
database_role_name: Optional[str] = None,
parent_database_role_name: Optional[str] = None,
parent_role_name: Optional[str] = None,
share_name: Optional[str] = None) -> GrantDatabaseRole
func GetGrantDatabaseRole(ctx *Context, name string, id IDInput, state *GrantDatabaseRoleState, opts ...ResourceOption) (*GrantDatabaseRole, error)
public static GrantDatabaseRole Get(string name, Input<string> id, GrantDatabaseRoleState? state, CustomResourceOptions? opts = null)
public static GrantDatabaseRole get(String name, Output<String> id, GrantDatabaseRoleState 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.
- Database
Role stringName - The fully qualified name of the database role which will be granted to share or parent role.
- Parent
Database stringRole Name - The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
- Parent
Role stringName - The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
- string
- The fully qualified name of the share on which privileges will be granted.
- Database
Role stringName - The fully qualified name of the database role which will be granted to share or parent role.
- Parent
Database stringRole Name - The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
- Parent
Role stringName - The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
- string
- The fully qualified name of the share on which privileges will be granted.
- database
Role StringName - The fully qualified name of the database role which will be granted to share or parent role.
- parent
Database StringRole Name - The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
- parent
Role StringName - The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
- String
- The fully qualified name of the share on which privileges will be granted.
- database
Role stringName - The fully qualified name of the database role which will be granted to share or parent role.
- parent
Database stringRole Name - The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
- parent
Role stringName - The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
- string
- The fully qualified name of the share on which privileges will be granted.
- database_
role_ strname - The fully qualified name of the database role which will be granted to share or parent role.
- parent_
database_ strrole_ name - The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
- parent_
role_ strname - The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
- str
- The fully qualified name of the share on which privileges will be granted.
- database
Role StringName - The fully qualified name of the database role which will be granted to share or parent role.
- parent
Database StringRole Name - The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
- parent
Role StringName - The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
- 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.