1. Packages
  2. Snowflake
  3. API Docs
  4. getDatabaseRoles
Snowflake v0.59.0 published on Friday, Sep 20, 2024 by Pulumi

snowflake.getDatabaseRoles

Explore with Pulumi AI

snowflake logo
Snowflake v0.59.0 published on Friday, Sep 20, 2024 by Pulumi

    !> V1 release candidate This data source was reworked and is a release candidate for the V1. We do not expect significant changes in it before the V1. We will welcome any feedback and adjust the data source if needed. Any errors reported will be resolved with a higher priority. We encourage checking this data source out before the V1 release. Please follow the migration guide to use it.

    Datasource used to get details of filtered database roles. Filtering is aligned with the current possibilities for SHOW DATABASE ROLES query (like and limit are supported). The results of SHOW is encapsulated in show_output collection.

    Using getDatabaseRoles

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getDatabaseRoles(args: GetDatabaseRolesArgs, opts?: InvokeOptions): Promise<GetDatabaseRolesResult>
    function getDatabaseRolesOutput(args: GetDatabaseRolesOutputArgs, opts?: InvokeOptions): Output<GetDatabaseRolesResult>
    def get_database_roles(in_database: Optional[str] = None,
                           like: Optional[str] = None,
                           limit: Optional[GetDatabaseRolesLimit] = None,
                           opts: Optional[InvokeOptions] = None) -> GetDatabaseRolesResult
    def get_database_roles_output(in_database: Optional[pulumi.Input[str]] = None,
                           like: Optional[pulumi.Input[str]] = None,
                           limit: Optional[pulumi.Input[GetDatabaseRolesLimitArgs]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseRolesResult]
    func GetDatabaseRoles(ctx *Context, args *GetDatabaseRolesArgs, opts ...InvokeOption) (*GetDatabaseRolesResult, error)
    func GetDatabaseRolesOutput(ctx *Context, args *GetDatabaseRolesOutputArgs, opts ...InvokeOption) GetDatabaseRolesResultOutput

    > Note: This function is named GetDatabaseRoles in the Go SDK.

    public static class GetDatabaseRoles 
    {
        public static Task<GetDatabaseRolesResult> InvokeAsync(GetDatabaseRolesArgs args, InvokeOptions? opts = null)
        public static Output<GetDatabaseRolesResult> Invoke(GetDatabaseRolesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDatabaseRolesResult> getDatabaseRoles(GetDatabaseRolesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: snowflake:index/getDatabaseRoles:getDatabaseRoles
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InDatabase string
    The database from which to return the database roles from.
    Like string
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    Limit GetDatabaseRolesLimit
    Limits the number of rows returned. If the limit.from is set, then the limit wll start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern with starts_with or like.
    InDatabase string
    The database from which to return the database roles from.
    Like string
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    Limit GetDatabaseRolesLimit
    Limits the number of rows returned. If the limit.from is set, then the limit wll start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern with starts_with or like.
    inDatabase String
    The database from which to return the database roles from.
    like String
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    limit GetDatabaseRolesLimit
    Limits the number of rows returned. If the limit.from is set, then the limit wll start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern with starts_with or like.
    inDatabase string
    The database from which to return the database roles from.
    like string
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    limit GetDatabaseRolesLimit
    Limits the number of rows returned. If the limit.from is set, then the limit wll start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern with starts_with or like.
    in_database str
    The database from which to return the database roles from.
    like str
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    limit GetDatabaseRolesLimit
    Limits the number of rows returned. If the limit.from is set, then the limit wll start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern with starts_with or like.
    inDatabase String
    The database from which to return the database roles from.
    like String
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    limit Property Map
    Limits the number of rows returned. If the limit.from is set, then the limit wll start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern with starts_with or like.

    getDatabaseRoles Result

    The following output properties are available:

    DatabaseRoles List<GetDatabaseRolesDatabaseRole>
    Holds the aggregated output of all database role details queries.
    Id string
    The provider-assigned unique ID for this managed resource.
    InDatabase string
    The database from which to return the database roles from.
    Like string
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    Limit GetDatabaseRolesLimit
    Limits the number of rows returned. If the limit.from is set, then the limit wll start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern with starts_with or like.
    DatabaseRoles []GetDatabaseRolesDatabaseRole
    Holds the aggregated output of all database role details queries.
    Id string
    The provider-assigned unique ID for this managed resource.
    InDatabase string
    The database from which to return the database roles from.
    Like string
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    Limit GetDatabaseRolesLimit
    Limits the number of rows returned. If the limit.from is set, then the limit wll start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern with starts_with or like.
    databaseRoles List<GetDatabaseRolesDatabaseRole>
    Holds the aggregated output of all database role details queries.
    id String
    The provider-assigned unique ID for this managed resource.
    inDatabase String
    The database from which to return the database roles from.
    like String
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    limit GetDatabaseRolesLimit
    Limits the number of rows returned. If the limit.from is set, then the limit wll start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern with starts_with or like.
    databaseRoles GetDatabaseRolesDatabaseRole[]
    Holds the aggregated output of all database role details queries.
    id string
    The provider-assigned unique ID for this managed resource.
    inDatabase string
    The database from which to return the database roles from.
    like string
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    limit GetDatabaseRolesLimit
    Limits the number of rows returned. If the limit.from is set, then the limit wll start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern with starts_with or like.
    database_roles Sequence[GetDatabaseRolesDatabaseRole]
    Holds the aggregated output of all database role details queries.
    id str
    The provider-assigned unique ID for this managed resource.
    in_database str
    The database from which to return the database roles from.
    like str
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    limit GetDatabaseRolesLimit
    Limits the number of rows returned. If the limit.from is set, then the limit wll start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern with starts_with or like.
    databaseRoles List<Property Map>
    Holds the aggregated output of all database role details queries.
    id String
    The provider-assigned unique ID for this managed resource.
    inDatabase String
    The database from which to return the database roles from.
    like String
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    limit Property Map
    Limits the number of rows returned. If the limit.from is set, then the limit wll start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern with starts_with or like.

    Supporting Types

    GetDatabaseRolesDatabaseRole

    ShowOutputs List<GetDatabaseRolesDatabaseRoleShowOutput>
    Holds the output of SHOW DATABASE ROLES.
    ShowOutputs []GetDatabaseRolesDatabaseRoleShowOutput
    Holds the output of SHOW DATABASE ROLES.
    showOutputs List<GetDatabaseRolesDatabaseRoleShowOutput>
    Holds the output of SHOW DATABASE ROLES.
    showOutputs GetDatabaseRolesDatabaseRoleShowOutput[]
    Holds the output of SHOW DATABASE ROLES.
    show_outputs Sequence[GetDatabaseRolesDatabaseRoleShowOutput]
    Holds the output of SHOW DATABASE ROLES.
    showOutputs List<Property Map>
    Holds the output of SHOW DATABASE ROLES.

    GetDatabaseRolesDatabaseRoleShowOutput

    comment String
    createdOn String
    databaseName String
    grantedDatabaseRoles Integer
    grantedToDatabaseRoles Integer
    grantedToRoles Integer
    isCurrent Boolean
    isDefault Boolean
    isInherited Boolean
    name String
    owner String
    ownerRoleType String

    GetDatabaseRolesLimit

    Rows int
    The maximum number of rows to return.
    From string
    Specifies a case-sensitive pattern that is used to match object name. After the first match, the limit on the number of rows will be applied.
    Rows int
    The maximum number of rows to return.
    From string
    Specifies a case-sensitive pattern that is used to match object name. After the first match, the limit on the number of rows will be applied.
    rows Integer
    The maximum number of rows to return.
    from String
    Specifies a case-sensitive pattern that is used to match object name. After the first match, the limit on the number of rows will be applied.
    rows number
    The maximum number of rows to return.
    from string
    Specifies a case-sensitive pattern that is used to match object name. After the first match, the limit on the number of rows will be applied.
    rows int
    The maximum number of rows to return.
    from_ str
    Specifies a case-sensitive pattern that is used to match object name. After the first match, the limit on the number of rows will be applied.
    rows Number
    The maximum number of rows to return.
    from String
    Specifies a case-sensitive pattern that is used to match object name. After the first match, the limit on the number of rows will be applied.

    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.59.0 published on Friday, Sep 20, 2024 by Pulumi