Snowflake v1.2.0 published on Monday, Apr 14, 2025 by Pulumi
snowflake.getDatabaseRoles
Explore with Pulumi AI
Data source 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)
public static Output<GetDatabaseRolesResult> getDatabaseRoles(GetDatabaseRolesArgs args, InvokeOptions options)
fn::invoke:
function: snowflake:index/getDatabaseRoles:getDatabaseRoles
arguments:
# arguments dictionary
The following arguments are supported:
- In
Database This property is required. 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
Get
Database Roles Limit - 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 withstarts_with
orlike
.
- In
Database This property is required. 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
Get
Database Roles Limit - 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 withstarts_with
orlike
.
- in
Database This property is required. 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
Get
Database Roles Limit - 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 withstarts_with
orlike
.
- in
Database This property is required. 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
Get
Database Roles Limit - 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 withstarts_with
orlike
.
- in_
database This property is required. 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
Get
Database Roles Limit - 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 withstarts_with
orlike
.
- in
Database This property is required. 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 withstarts_with
orlike
.
getDatabaseRoles Result
The following output properties are available:
- Database
Roles List<GetDatabase Roles Database Role> - Holds the aggregated output of all database role details queries.
- Id string
- The provider-assigned unique ID for this managed resource.
- In
Database 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
Get
Database Roles Limit - 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 withstarts_with
orlike
.
- Database
Roles []GetDatabase Roles Database Role - Holds the aggregated output of all database role details queries.
- Id string
- The provider-assigned unique ID for this managed resource.
- In
Database 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
Get
Database Roles Limit - 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 withstarts_with
orlike
.
- database
Roles List<GetDatabase Roles Database Role> - Holds the aggregated output of all database role details queries.
- id String
- The provider-assigned unique ID for this managed resource.
- in
Database 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
Get
Database Roles Limit - 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 withstarts_with
orlike
.
- database
Roles GetDatabase Roles Database Role[] - Holds the aggregated output of all database role details queries.
- id string
- The provider-assigned unique ID for this managed resource.
- in
Database 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
Get
Database Roles Limit - 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 withstarts_with
orlike
.
- database_
roles Sequence[GetDatabase Roles Database Role] - 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
Get
Database Roles Limit - 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 withstarts_with
orlike
.
- database
Roles List<Property Map> - Holds the aggregated output of all database role details queries.
- id String
- The provider-assigned unique ID for this managed resource.
- in
Database 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 withstarts_with
orlike
.
Supporting Types
GetDatabaseRolesDatabaseRole
- Show
Outputs This property is required. List<GetDatabase Roles Database Role Show Output> - Holds the output of SHOW DATABASE ROLES.
- Show
Outputs This property is required. []GetDatabase Roles Database Role Show Output - Holds the output of SHOW DATABASE ROLES.
- show
Outputs This property is required. List<GetDatabase Roles Database Role Show Output> - Holds the output of SHOW DATABASE ROLES.
- show
Outputs This property is required. GetDatabase Roles Database Role Show Output[] - Holds the output of SHOW DATABASE ROLES.
- show_
outputs This property is required. Sequence[GetDatabase Roles Database Role Show Output] - Holds the output of SHOW DATABASE ROLES.
- show
Outputs This property is required. List<Property Map> - Holds the output of SHOW DATABASE ROLES.
GetDatabaseRolesDatabaseRoleShowOutput
- Comment
This property is required. string - Created
On This property is required. string - Database
Name This property is required. string - Granted
Database Roles This property is required. int - Granted
To Database Roles This property is required. int - Granted
To Roles This property is required. int - Is
Current This property is required. bool - Is
Default This property is required. bool - Is
Inherited This property is required. bool - Name
This property is required. string - Owner
This property is required. string - Owner
Role Type This property is required. string
- Comment
This property is required. string - Created
On This property is required. string - Database
Name This property is required. string - Granted
Database Roles This property is required. int - Granted
To Database Roles This property is required. int - Granted
To Roles This property is required. int - Is
Current This property is required. bool - Is
Default This property is required. bool - Is
Inherited This property is required. bool - Name
This property is required. string - Owner
This property is required. string - Owner
Role Type This property is required. string
- comment
This property is required. String - created
On This property is required. String - database
Name This property is required. String - granted
Database Roles This property is required. Integer - granted
To Database Roles This property is required. Integer - granted
To Roles This property is required. Integer - is
Current This property is required. Boolean - is
Default This property is required. Boolean - is
Inherited This property is required. Boolean - name
This property is required. String - owner
This property is required. String - owner
Role Type This property is required. String
- comment
This property is required. string - created
On This property is required. string - database
Name This property is required. string - granted
Database Roles This property is required. number - granted
To Database Roles This property is required. number - granted
To Roles This property is required. number - is
Current This property is required. boolean - is
Default This property is required. boolean - is
Inherited This property is required. boolean - name
This property is required. string - owner
This property is required. string - owner
Role Type This property is required. string
- comment
This property is required. str - created_
on This property is required. str - database_
name This property is required. str - granted_
database_ roles This property is required. int - granted_
to_ database_ roles This property is required. int - granted_
to_ roles This property is required. int - is_
current This property is required. bool - is_
default This property is required. bool - is_
inherited This property is required. bool - name
This property is required. str - owner
This property is required. str - owner_
role_ type This property is required. str
- comment
This property is required. String - created
On This property is required. String - database
Name This property is required. String - granted
Database Roles This property is required. Number - granted
To Database Roles This property is required. Number - granted
To Roles This property is required. Number - is
Current This property is required. Boolean - is
Default This property is required. Boolean - is
Inherited This property is required. Boolean - name
This property is required. String - owner
This property is required. String - owner
Role Type This property is required. String
GetDatabaseRolesLimit
Package Details
- Repository
- Snowflake pulumi/pulumi-snowflake
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
snowflake
Terraform Provider.