instances
Creates, updates, deletes, gets or lists an instances
resource.
Overview
Name | instances |
Type | Resource |
Id | snowflake.service.instances |
Fields
The following fields are returned by SELECT
queries:
- list_service_instances
successful
Name | Datatype | Description |
---|---|---|
instance_id | string | ID of the service instance (this is the index of the service instance starting from 0). |
database_name | string | A 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_name | string | A 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_name | string | A 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_time | string | The time when Snowflake started creating the service instance. |
service_status | string | The current status of the service. |
spec_digest | string | The unique and immutable identifier that represents the service specification content. |
start_time | string | The time when Snowflake acknowledged the service instance is running on a node. |
status | string | The current status of the service instance. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list_service_instances | select | database_name , schema_name , name , endpoint | List 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.
Name | Datatype | Description |
---|---|---|
database_name | string | Identifier (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. |
endpoint | string | Organization and Account Name (default: orgid-acctid) |
name | string | Identifier (i.e. name) for the resource. |
schema_name | string | Identifier (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_service_instances
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;