DESCRIBE SERVICE

Describes the properties of a Snowpark Container Services service (including job services). Use this command for both a service and a service running like a job.

DESCRIBE can be abbreviated to DESC.

See also:

CREATE SERVICE , ALTER SERVICE, DROP SERVICE , SHOW SERVICES

Syntax

DESC[RIBE] SERVICE <name>
Copy

Parameters

name

Specifies the identifier for the service to describe.

If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

For more information, see Identifier requirements.

Output

The command output provides service properties and metadata in the following columns:

Column

Description

name

Snowpark Container Services service name.

status

One of the following values, which indicates the current status of the service:

  • PENDING

  • RUNNING

  • FAILED

  • DONE

  • SUSPENDING

  • SUSPENDED

  • DELETING

  • DELETED

  • INTERNAL_ERROR

database_name

Database in which the service is created.

schema_name

Schema in which the service is created.

owner

Role that owns the service.

compute_pool

Compute pool name where Snowflake runs the service.

spec

Service specification file. Output includes this column only if you are using the service’s owner role when executing the command.

dns_name

Snowflake-assiged DNS name of the service. The DNS name enables service-to-service communications (see Tutorial 3).

min_instances

Minimum number of service instances Snowflake should run.

max_instances

Maximum number of service instances that Snowflake can scale when needed.

auto_resume

If true, Snowflake auto-resumes the service, if suspended, when service function is called or when an incoming request (ingres) is received (see Using a service).

external_access_integrations

List of external access integrations associated with the service. For more information, see Network egress.

created_on

Timestamp when the service was created.

updated_on

Timestamp when the service was last updated.

resumed_on

Timestamp when the service was last resumed.

comment

Service related comment.

owner_role_type

The type of role that owns the object, either ROLE or DATABASE_ROLE.

query_warehouse

When a service container connects to Snowflake to execute a query and does not explicitly specify a warehouse to use, Snowflake uses this warehouse as default.

is_job

true if the service is a job service; false otherwise.

Access control requirements

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

Privilege

Object

Notes

MONITOR

Service

Note that operating on any object in a schema also requires the USAGE privilege on the parent database and schema.

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.

Usage notes

  • To post-process the output of this command, you can use the RESULT_SCAN function, which treats the output as a table that can be queried.

Examples

The following example describes the service named my_service_with_ebs_volume:

DESCRIBE SERVICE my_service_with_ebs_volume;
Copy
+----------------------------+---------+---------------+-------------+-----------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+---------------+---------------+-------------+------------------------------+-------------------------------+-------------------------------+------------+---------+-----------------+-----------------+--------+
| name                       | status  | database_name | schema_name | owner     | compute_pool          | spec                                                                                                                                                            | dns_name                                                                       | min_instances | max_instances | auto_resume | external_access_integrations | created_on                    | updated_on                    | resumed_on | comment | owner_role_type | query_warehouse | is_job |
|----------------------------+---------+---------------+-------------+-----------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+---------------+---------------+-------------+------------------------------+-------------------------------+-------------------------------+------------+---------+-----------------+-----------------+--------|
| MY_SERVICE_WITH_EBS_VOLUME | RUNNING | TUTORIAL_DB   | DATA_SCHEMA | TEST_ROLE | TUTORIAL_COMPUTE_POOL | ---                                                                                                                                                             | my-service-with-ebs-volume.data-schema.tutorial-db.snowflakecomputing.internal |             1 |             1 | true        | NULL                         | 2024-05-09 21:29:36.096 -0700 | 2024-05-09 21:29:37.228 -0700 | NULL       | NULL    | ROLE            | NULL            | false  |
|                            |         |               |             |           |                       | spec:                                                                                                                                                           |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |   containers:                                                                                                                                                   |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |   - name: "echo"                                                                                                                                                |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |     image: "orgname-acctname.registry.snowflakecomputing.com/tutorial_db/data_schema/tutorial_repository/my_echo_service_image:latest"                          |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |     sha256: "@sha256:70421668b2635b2996c6d5bc80627cf6d98c0716948b5f60d198d6411d4b4681"                                                                          |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |     readinessProbe:                                                                                                                                             |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |       port: 8080                                                                                                                                                |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |       path: "/healthcheck"                                                                                                                                      |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |     volumeMounts:                                                                                                                                               |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |     - name: "block-vol1"                                                                                                                                        |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |       mountPath: "/opt/block/path"                                                                                                                              |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |   volumes:                                                                                                                                                      |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |   - name: "block-vol1"                                                                                                                                          |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |     source: "block"                                                                                                                                             |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |     size: "10Gi"                                                                                                                                                |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |   endpoints:                                                                                                                                                    |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |   - name: "echoendpoint"                                                                                                                                        |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |     port: 8080                                                                                                                                                  |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |     public: true                                                                                                                                                |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
|                            |         |               |             |           |                       |                                                                                                                                                                 |                                                                                |               |               |             |                              |                               |                               |            |         |                 |                 |        |
+----------------------------+---------+---------------+-------------+-----------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------+---------------+---------------+-------------+------------------------------+-------------------------------+-------------------------------+------------+---------+-----------------+-----------------+--------+