snowflake.getDatabaseRoles
Explore with Pulumi AI
!> 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:
- 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
.
- 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
.
- 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
.
- 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
.
- 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
.
- 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
.
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 List<GetDatabase Roles Database Role Show Output> - Holds the output of SHOW DATABASE ROLES.
- Show
Outputs []GetDatabase Roles Database Role Show Output - Holds the output of SHOW DATABASE ROLES.
- show
Outputs List<GetDatabase Roles Database Role Show Output> - Holds the output of SHOW DATABASE ROLES.
- show
Outputs GetDatabase Roles Database Role Show Output[] - Holds the output of SHOW DATABASE ROLES.
- show_
outputs Sequence[GetDatabase Roles Database Role Show Output] - Holds the output of SHOW DATABASE ROLES.
- show
Outputs List<Property Map> - Holds the output of SHOW DATABASE ROLES.
GetDatabaseRolesDatabaseRoleShowOutput
- Comment string
- Created
On string - Database
Name string - Granted
Database intRoles - Granted
To intDatabase Roles - Granted
To intRoles - Is
Current bool - Is
Default bool - Is
Inherited bool - Name string
- Owner string
- Owner
Role stringType
- Comment string
- Created
On string - Database
Name string - Granted
Database intRoles - Granted
To intDatabase Roles - Granted
To intRoles - Is
Current bool - Is
Default bool - Is
Inherited bool - Name string
- Owner string
- Owner
Role stringType
- comment String
- created
On String - database
Name String - granted
Database IntegerRoles - granted
To IntegerDatabase Roles - granted
To IntegerRoles - is
Current Boolean - is
Default Boolean - is
Inherited Boolean - name String
- owner String
- owner
Role StringType
- comment string
- created
On string - database
Name string - granted
Database numberRoles - granted
To numberDatabase Roles - granted
To numberRoles - is
Current boolean - is
Default boolean - is
Inherited boolean - name string
- owner string
- owner
Role stringType
- comment str
- created_
on str - database_
name str - granted_
database_ introles - granted_
to_ intdatabase_ roles - granted_
to_ introles - is_
current bool - is_
default bool - is_
inherited bool - name str
- owner str
- owner_
role_ strtype
- comment String
- created
On String - database
Name String - granted
Database NumberRoles - granted
To NumberDatabase Roles - granted
To NumberRoles - is
Current Boolean - is
Default Boolean - is
Inherited Boolean - name String
- owner String
- owner
Role StringType
GetDatabaseRolesLimit
Package Details
- Repository
- Snowflake pulumi/pulumi-snowflake
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
snowflake
Terraform Provider.