snowflake.core.service | Snowflake Documentation (original) (raw)

Manages Snowpark Container Services.

Example

new_service_def = Service( ... name="MYSERVICE", ... compute_pool="MYCOMPUTEPOOL", ... spec="@~/myservice_spec.yml", ... min_instances=1, ... max_instances=1, ... ) services = root.databases["MYDB"].schemas["MYSCHEMA"].services myservice = services.create(new_service_def) myservice_snapshot = myservice.fetch() service_data = services.iter(like="%SERVICE") myservice.suspend() myservice.resume() service_status = myservice.get_service_status() logs = myservice.get_service_logs() myservice.delete() an_existing_service = services["an_existing_service"] an_existing_service.suspend()

Refer to snowflake.core.Root to create the root.

Functions

ServiceSpec(spec) Infers whether a specification is a stage file or inline text.

Classes

GrantOf(*[, created_on, role, granted_to, ...]) A model object representing the GrantOf resource.
Service(*, name[, status, ...]) A model object representing the Service resource.
ServiceCollection(schema) Represents the collection operations on the Snowflake Snowpark Container Service resource.
ServiceResource(name, collection) Represents a reference to a Snowflake Snowpark Container Service.
ServiceSpecification() A model object representing the ServiceSpec resource.
ServiceSpecInlineText(*, spec_text) A model object representing the ServiceSpecInlineText resource.
ServiceSpecStageFile(*, stage, spec_file) A model object representing the ServiceSpecStageFile resource.
JobService(*, name[, status, ...]) A model object representing the JobService resource.
ServiceContainer(*[, database_name, ...]) A model object representing the ServiceContainer resource.
ServiceEndpoint(*[, name, port, portRange, ...]) A model object representing the ServiceEndpoint resource.
ServiceInstance(*[, database_name, ...]) A model object representing the ServiceInstance resource.
ServiceRole(*[, created_on, name, comment]) A model object representing the ServiceRole resource.
ServiceRoleGrantTo(*[, created_on, ...]) A model object representing the ServiceRoleGrantTo resource.