1. Packages
  2. Snowflake
  3. API Docs
  4. GrantDatabaseRole
Snowflake v0.55.0 published on Friday, Jun 7, 2024 by Pulumi

snowflake.GrantDatabaseRole

Explore with Pulumi AI

snowflake logo
Snowflake v0.55.0 published on Friday, Jun 7, 2024 by Pulumi

    Example Usage

    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.

    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

    The GrantDatabaseRole resource accepts the following input properties:

    DatabaseRoleName string
    The fully qualified name of the database role which will be granted to share or parent role.
    ParentDatabaseRoleName string
    The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
    ParentRoleName string
    The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
    ShareName string
    The fully qualified name of the share on which privileges will be granted.
    DatabaseRoleName string
    The fully qualified name of the database role which will be granted to share or parent role.
    ParentDatabaseRoleName string
    The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
    ParentRoleName string
    The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
    ShareName string
    The fully qualified name of the share on which privileges will be granted.
    databaseRoleName String
    The fully qualified name of the database role which will be granted to share or parent role.
    parentDatabaseRoleName String
    The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
    parentRoleName String
    The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
    shareName String
    The fully qualified name of the share on which privileges will be granted.
    databaseRoleName string
    The fully qualified name of the database role which will be granted to share or parent role.
    parentDatabaseRoleName string
    The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
    parentRoleName string
    The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
    shareName string
    The fully qualified name of the share on which privileges will be granted.
    database_role_name str
    The fully qualified name of the database role which will be granted to share or parent role.
    parent_database_role_name str
    The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
    parent_role_name str
    The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
    share_name str
    The fully qualified name of the share on which privileges will be granted.
    databaseRoleName String
    The fully qualified name of the database role which will be granted to share or parent role.
    parentDatabaseRoleName String
    The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
    parentRoleName String
    The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
    shareName 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.
    The following state arguments are supported:
    DatabaseRoleName string
    The fully qualified name of the database role which will be granted to share or parent role.
    ParentDatabaseRoleName string
    The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
    ParentRoleName string
    The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
    ShareName string
    The fully qualified name of the share on which privileges will be granted.
    DatabaseRoleName string
    The fully qualified name of the database role which will be granted to share or parent role.
    ParentDatabaseRoleName string
    The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
    ParentRoleName string
    The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
    ShareName string
    The fully qualified name of the share on which privileges will be granted.
    databaseRoleName String
    The fully qualified name of the database role which will be granted to share or parent role.
    parentDatabaseRoleName String
    The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
    parentRoleName String
    The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
    shareName String
    The fully qualified name of the share on which privileges will be granted.
    databaseRoleName string
    The fully qualified name of the database role which will be granted to share or parent role.
    parentDatabaseRoleName string
    The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
    parentRoleName string
    The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
    shareName string
    The fully qualified name of the share on which privileges will be granted.
    database_role_name str
    The fully qualified name of the database role which will be granted to share or parent role.
    parent_database_role_name str
    The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
    parent_role_name str
    The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
    share_name str
    The fully qualified name of the share on which privileges will be granted.
    databaseRoleName String
    The fully qualified name of the database role which will be granted to share or parent role.
    parentDatabaseRoleName String
    The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
    parentRoleName String
    The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
    shareName String
    The fully qualified name of the share on which privileges will be granted.

    Import

    format is database_role_name (string) | object_type (ROLE|DATABASE ROLE|SHARE) | grantee_name (string)

    $ pulumi import snowflake:index/grantDatabaseRole:GrantDatabaseRole \"test_db_role\"|ROLE|\"test_parent_role\""
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Snowflake pulumi/pulumi-snowflake
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the snowflake Terraform Provider.
    snowflake logo
    Snowflake v0.55.0 published on Friday, Jun 7, 2024 by Pulumi