import * as pulumi from "@pulumi/pulumi"; import * as outputs from "./types/output"; /** * Data source to retrieve a specific Auth0 role by `roleId` or `name`. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * * // An Auth0 Role loaded using its name. * const some_role_by_name = auth0.getRole({ * name: "my-role", * }); * // An Auth0 Role loaded using its ID. * const some_role_by_id = auth0.getRole({ * roleId: "abcdefghkijklmnopqrstuvwxyz0123456789", * }); * // An organization-level Auth0 Role loaded using the role name. Several * // organizations can own a role of the same name, so the type and the ID of the * // organization owning it are needed to find the right one. (EA only) * const some_organization_role_by_name = auth0.getRole({ * name: "my-organization-role", * type: "organization", * ownerId: "org_abcdefghkijklmn", * }); * ``` */ export declare function getRole(args?: GetRoleArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getRole. */ export interface GetRoleArgs { /** * The name of the role. If not provided, `roleId` must be set. */ name?: string; /** * The ID of the organization owning the role. Only used to narrow down the search when looking the role up by `name`, alongside a `type` of `organization`. (EA only) */ ownerId?: string; /** * The ID of the role. If not provided, `name` must be set. */ roleId?: string; /** * Whether to skip role permissions. Setting this to `true` will skip paginated API calls to /api/v2/roles/{id}/permissions. */ skipPermissions?: boolean; /** * Whether to skip users assigned to this role (max 1000). Setting this to `true` will skip paginated API calls to /api/v2/roles/{id}/users. */ skipUsers?: boolean; /** * The type of the role, either `tenant` or `organization`. Only used to narrow down the search when looking the role up by `name`. (EA only) */ type?: string; } /** * A collection of values returned by getRole. */ export interface GetRoleResult { /** * The description of the role. */ readonly description: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * The name of the role. If not provided, `roleId` must be set. */ readonly name?: string; /** * The ID of the organization owning the role. Only used to narrow down the search when looking the role up by `name`, alongside a `type` of `organization`. (EA only) */ readonly ownerId?: string; /** * Configuration settings for permissions (scopes) attached to the role. Skips populating if `skipPermissions` is `true`. */ readonly permissions: outputs.GetRolePermission[]; /** * The ID of the role. If not provided, `name` must be set. */ readonly roleId?: string; /** * Whether to skip role permissions. Setting this to `true` will skip paginated API calls to /api/v2/roles/{id}/permissions. */ readonly skipPermissions?: boolean; /** * Whether to skip users assigned to this role (max 1000). Setting this to `true` will skip paginated API calls to /api/v2/roles/{id}/users. */ readonly skipUsers?: boolean; /** * The type of the role, either `tenant` or `organization`. Only used to narrow down the search when looking the role up by `name`. (EA only) */ readonly type?: string; /** * List of user IDs assigned to this role. Retrieves a maximum of 1000 user IDs. Skips populating if `skipUsers` is `true`. */ readonly users: string[]; } /** * Data source to retrieve a specific Auth0 role by `roleId` or `name`. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * * // An Auth0 Role loaded using its name. * const some_role_by_name = auth0.getRole({ * name: "my-role", * }); * // An Auth0 Role loaded using its ID. * const some_role_by_id = auth0.getRole({ * roleId: "abcdefghkijklmnopqrstuvwxyz0123456789", * }); * // An organization-level Auth0 Role loaded using the role name. Several * // organizations can own a role of the same name, so the type and the ID of the * // organization owning it are needed to find the right one. (EA only) * const some_organization_role_by_name = auth0.getRole({ * name: "my-organization-role", * type: "organization", * ownerId: "org_abcdefghkijklmn", * }); * ``` */ export declare function getRoleOutput(args?: GetRoleOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getRole. */ export interface GetRoleOutputArgs { /** * The name of the role. If not provided, `roleId` must be set. */ name?: pulumi.Input; /** * The ID of the organization owning the role. Only used to narrow down the search when looking the role up by `name`, alongside a `type` of `organization`. (EA only) */ ownerId?: pulumi.Input; /** * The ID of the role. If not provided, `name` must be set. */ roleId?: pulumi.Input; /** * Whether to skip role permissions. Setting this to `true` will skip paginated API calls to /api/v2/roles/{id}/permissions. */ skipPermissions?: pulumi.Input; /** * Whether to skip users assigned to this role (max 1000). Setting this to `true` will skip paginated API calls to /api/v2/roles/{id}/users. */ skipUsers?: pulumi.Input; /** * The type of the role, either `tenant` or `organization`. Only used to narrow down the search when looking the role up by `name`. (EA only) */ type?: pulumi.Input; } //# sourceMappingURL=getRole.d.ts.map