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

snowflake.getRoles

Explore with Pulumi AI

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

    !> V1 release candidate This datasource 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 roles. Filtering is aligned with the current possibilities for SHOW ROLES query (like and in_class are all supported). The results of SHOW are encapsulated in one output collection.

    Using getRoles

    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 getRoles(args: GetRolesArgs, opts?: InvokeOptions): Promise<GetRolesResult>
    function getRolesOutput(args: GetRolesOutputArgs, opts?: InvokeOptions): Output<GetRolesResult>
    def get_roles(in_class: Optional[str] = None,
                  like: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetRolesResult
    def get_roles_output(in_class: Optional[pulumi.Input[str]] = None,
                  like: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetRolesResult]
    func GetRoles(ctx *Context, args *GetRolesArgs, opts ...InvokeOption) (*GetRolesResult, error)
    func GetRolesOutput(ctx *Context, args *GetRolesOutputArgs, opts ...InvokeOption) GetRolesResultOutput

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

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

    The following arguments are supported:

    InClass string
    Filters the SHOW GRANTS output by class name.
    Like string
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    InClass string
    Filters the SHOW GRANTS output by class name.
    Like string
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    inClass String
    Filters the SHOW GRANTS output by class name.
    like String
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    inClass string
    Filters the SHOW GRANTS output by class name.
    like string
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    in_class str
    Filters the SHOW GRANTS output by class name.
    like str
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    inClass String
    Filters the SHOW GRANTS output by class name.
    like String
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).

    getRoles Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Roles List<GetRolesRole>
    Holds the aggregated output of all role details queries.
    InClass string
    Filters the SHOW GRANTS output by class name.
    Like string
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    Id string
    The provider-assigned unique ID for this managed resource.
    Roles []GetRolesRole
    Holds the aggregated output of all role details queries.
    InClass string
    Filters the SHOW GRANTS output by class name.
    Like string
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    id String
    The provider-assigned unique ID for this managed resource.
    roles List<GetRolesRole>
    Holds the aggregated output of all role details queries.
    inClass String
    Filters the SHOW GRANTS output by class name.
    like String
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    id string
    The provider-assigned unique ID for this managed resource.
    roles GetRolesRole[]
    Holds the aggregated output of all role details queries.
    inClass string
    Filters the SHOW GRANTS output by class name.
    like string
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    id str
    The provider-assigned unique ID for this managed resource.
    roles Sequence[GetRolesRole]
    Holds the aggregated output of all role details queries.
    in_class str
    Filters the SHOW GRANTS output by class name.
    like str
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).
    id String
    The provider-assigned unique ID for this managed resource.
    roles List<Property Map>
    Holds the aggregated output of all role details queries.
    inClass String
    Filters the SHOW GRANTS output by class name.
    like String
    Filters the output with case-insensitive pattern, with support for SQL wildcard characters (% and _).

    Supporting Types

    GetRolesRole

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

    GetRolesRoleShowOutput

    assignedToUsers Integer
    comment String
    createdOn String
    grantedRoles Integer
    grantedToRoles Integer
    isCurrent Boolean
    isDefault Boolean
    isInherited Boolean
    name String
    owner String
    assignedToUsers number
    comment string
    createdOn string
    grantedRoles number
    grantedToRoles number
    isCurrent boolean
    isDefault boolean
    isInherited boolean
    name string
    owner string
    assignedToUsers Number
    comment String
    createdOn String
    grantedRoles Number
    grantedToRoles Number
    isCurrent Boolean
    isDefault Boolean
    isInherited Boolean
    name String
    owner String

    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