snowflake.core.service.ServiceCollection

class snowflake.core.service.ServiceCollection(schema: SchemaResource)

Bases: SchemaObjectCollectionParent[ServiceResource]

Represents the collection operations of the Snowpark Container Service resource.

Attributes

database
root
schema

Methods

__init__(schema: SchemaResource)
create(service: Service, *, mode: CreateMode = CreateMode.error_if_exists) ServiceResource

Create a Snowpark Container service in Snowflake.

Parameters:
  • service – an instance of Service.

  • mode

    One of the following strings.

    CreateMode.error_if_exists: Throw an snowflake.core.exceptions.ConflictError if the service already exists in Snowflake. Equivalent to SQL create service <name> ....

    CreateMode.or_replace: Replace if the service already exists in Snowflake. Equivalent to SQL create or replace service <name> ....

    CreateMode.if_not_exists: Do nothing if the service already exists in Snowflake. Equivalent to SQL create service <name> if not exists...

    Default value is CreateMode.error_if_exists.

items() ItemsView[str, T]
iter(*, like: str | None = None, starts_with: str | None = None, limit: int | None = None) Iterator[Service]

Look up Snowpark Container services in Snowflake.

keys() KeysView[str]
values() ValuesView[T]
语言: 中文