Skip to main content

instances

Creates, updates, deletes, gets or lists an instances resource.

Overview

Nameinstances
TypeResource
Idsnowflake.service.instances

Fields

The following fields are returned by SELECT queries:

successful

NameDatatypeDescription
instance_idstringID of the service instance (this is the index of the service instance starting from 0).
database_namestringA Snowflake object identifier. 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. (pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$, example: TEST_NAME)
schema_namestringA Snowflake object identifier. 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. (pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$, example: TEST_NAME)
service_namestringA Snowflake object identifier. 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. (pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$, example: TEST_NAME)
creation_timestringThe time when Snowflake started creating the service instance.
service_statusstringThe current status of the service.
spec_digeststringThe unique and immutable identifier that represents the service specification content.
start_timestringThe time when Snowflake acknowledged the service instance is running on a node.
statusstringThe current status of the service instance.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_service_instancesselectdatabase_name, schema_name, name, endpointList all the instances of the service

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
database_namestringIdentifier (i.e. name) for the database to which the resource belongs. You can use the /api/v2/databases GET request to get a list of available databases.
endpointstringOrganization and Account Name (default: orgid-acctid)
namestringIdentifier (i.e. name) for the resource.
schema_namestringIdentifier (i.e. name) for the schema to which the resource belongs. You can use the /api/v2/databases/{database}/schemas GET request to get a list of available schemas for the specified database.

SELECT examples

List all the instances of the service

SELECT
instance_id,
database_name,
schema_name,
service_name,
creation_time,
service_status,
spec_digest,
start_time,
status
FROM snowflake.service.instances
WHERE database_name = '{{ database_name }}' -- required
AND schema_name = '{{ schema_name }}' -- required
AND name = '{{ name }}' -- required
AND endpoint = '{{ endpoint }}' -- required;