ALTER APPLICATION SERVICE

statementpartialNative apps, listings & sharing

docs.snowflake.com ↗

Object: APPLICATION SERVICE

Modifies the configuration or lifecycle state of an existing Application Service. You can suspend, resume, disable, enable, or upgrade the service, and you can set or unset properties.

Syntax

supportedpartialnot supportednot scored

ALTER APPLICATION SERVICE [ IF EXISTS ] <name> { SUSPEND | RESUME }

ALTER APPLICATION SERVICE [ IF EXISTS ] <name> { DISABLE | ENABLE }

ALTER APPLICATION SERVICE [ IF EXISTS ] <name>
  UPGRADE [ TO VERSION <version_alias> ]

ALTER APPLICATION SERVICE [ IF EXISTS ] <name> SET
  [ AUTO_RESUME = { TRUE | FALSE } ]
  [ AUTO_SUSPEND_SECS = <num> ]
  [ EXTERNAL_ACCESS_INTEGRATIONS = ( <integration_name> [ , ... ] ) ]
  [ QUERY_WAREHOUSE = <warehouse_name> ]
  [ MIN_INSTANCES = <num> ]
  [ MAX_INSTANCES = <num> ]
  [ COMMENT = '<string_literal>' ]

ALTER APPLICATION SERVICE [ IF EXISTS ] <name> UNSET
  {
    AUTO_RESUME                  |
    AUTO_SUSPEND_SECS            |
    EXTERNAL_ACCESS_INTEGRATIONS |
    QUERY_WAREHOUSE              |
    MIN_INSTANCES                |
    MAX_INSTANCES                |
    COMMENT
  }
  [ , ... ]

Parameters

NameRequiredDescription
nameSpecifies the identifier for the Application Service to alter. 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. For more information, see Identifier requirements.
{ SUSPEND | RESUME }Suspends or resumes the service. When the service is suspended, Snowflake stops its containers and stops billing for compute. When you resume the service, Snowflake starts containers using the currently deployed package version. SUSPEND and RESUME apply to a service on managed compute. A service on managed compute runs until you suspend it.
{ DISABLE | ENABLE }Disables or enables a service on serverless compute. No request can start a disabled service. While disabled, the service keeps its Application Service object, deployed package, configuration, privilege grants, and endpoint URL. Enabling recreates the serverless runtime with the same endpoint. Preview Feature — Open Available to all accounts. You can’t upgrade, redeploy, or change the configuration of a disabled service. Enable it first. A serverless service that stopped after its AUTO_SUSPEND_SECS idle period isn’t disabled: the next request starts it again.
UPGRADE [ TO VERSION version_alias ]Upgrades the service to a different version of its package. If TO VERSION is omitted and the service was created with a version alias, such as LATEST, Snowflake re-resolves the alias to its current target version and upgrades to that version. If TO VERSION is omitted and the service was created with a concrete version name, the command returns an error asking you to specify a version. If TO VERSION is specified, you can pass a version name, such as VERSION$4, or an alias, such as LATEST. If the resolved target version is the same as the running version, the upgrade is a no-op.
SET ...Sets one or more properties on the service. Properties not listed in the SET clause are unchanged. See CREATE APPLICATION SERVICE for parameter descriptions.
UNSET ...Removes a property, resetting it to the default.

Usage notes

Access control requirements

A role used to execute this operation must have the following privileges at a minimum: Privilege | Object | Notes OPERATE | Application Service | Required for SUSPEND, RESUME, DISABLE, ENABLE, UPGRADE, SET, and UNSET. READ | Artifact repository | Required for UPGRADE to resolve the target package version. Operating on an object in a schema requires at least one privilege on the parent database and at least one privilege on the parent schema. For instructions on creating a custom role with a specified set of privileges, see Creating custom roles. For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

Known gaps

Parts not fully supported, and recorded divergences from Snowflake.

See also

Referenced by