SHOW ROLES IN SERVICE

Lists all the service roles associated with a service. These are the roles defined in the service specification. For more information, see Managing access to service endpoints.

See also:

REVOKE SERVICE ROLE, GRANT SERVICE ROLE, SHOW GRANTS

Syntax

SHOW ROLES IN SERVICE <name>
Copy

Parameters

name

Name of the service.

Access control requirements

A role used to execute this SQL command must have the following privileges at a minimum:

Privilege

Object

Notes

USAGE

Service

For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.

For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

Output

The command output provides the following columns:

Column

Description

created_on

Date and time when the service role was created

name

Service role name

comment

Comment, if any, for the service role

Examples

List the service roles in the echo_service service.

SHOW ROLES IN SERVICE echo_service;
Copy
+-------------------------------+-------------------------+------------+
| created_on                    |   name                      |  comment   |
+-------------------------------+-------------------------+------------+
| 2024-04-29 14:58:50.063 -0700 |   ALL_ENDPOINTS_USAGE   |            |
+-------------------------------+-------------------------+------------+