snowflake.core.service.ServiceResource¶
- class snowflake.core.service.ServiceResource(name: str, collection: ServiceCollection)¶
Bases:
SchemaObjectReferenceMixin
[ServiceCollection
]Attributes
- database¶
- fully_qualified_name¶
- root¶
- schema¶
Methods
- __init__(name: str, collection: ServiceCollection) None ¶
- delete() None ¶
Delete the service.
- drop() None ¶
Drop the service.
- get_endpoints() Iterable[ServiceEndpoint] ¶
Show the endpoints corresponding to this service.
- get_service_logs(instance_id: str, container_name: str, num_lines: int | None = None) str ¶
Get the service logs of the service.
- Parameters:
instance_id – Service instance ID.
container_name – Container name.
num_lines – (Optional) Number of the most recent log lines to retrieve.
get_service_status()
returns theinstance_id
andcontainer_name
as a part of its results.
- get_service_status(timeout: int = 0) List[Dict[str, Any]] ¶
Get the status of the service.
- Parameters:
timeout –
Number of seconds to wait for the service to reach a steady state (for example, READY) before returning the status. If the service does not reach steady state within the specified time, Snowflake returns the current state.
If not specified or 0, Snowflake returns the current state immediately.
Default: 0 seconds.
- resume() None ¶
Resumes the service.
- suspend() None ¶
Suspend the service.