alterShareAccounts

Last updated: January 27, 2026

Manages account access to a Snowflake share by adding, setting, or removing accounts.

Note: This change type does not support automatic rollback or database inspection features (snapshot, diff, diff-changelog, and generate-changelog commands).

Available attributes

Attribute

Type

Description

Required

shareName

String

Name of the share to alter

Yes

ifExists

Boolean

Don't error if the share doesn't exist

No

addAccounts

AccountsOperation

Adds new accounts to the share (nested element)*

No

setAccounts

AccountsOperation

Replaces all accounts with new list (nested element)*

No

removeAccounts

AccountsOperation

Removes specific accounts from the share (nested element)*

No

* Exactly one of addAccounts, setAccounts, or removeAccounts must be specified.

AccountsOperation attributes

Attribute

Type

Description

Required

Applicable to

accounts

List<Account>

List of account identifiers

Yes

All operations

shareRestrictions

Boolean

Enable/disable share restrictions

No

ADD, SET only

Account identifier formats

Snowflake supports multiple account identifier formats:

Format

Example

Legacy account locator

AB12345

Organization.account

MYORG.MYACCOUNT

Account locator with region

xy12345.us-east-1

Full cloud/region format

xy12345.us-east-1.aws

Operation semantics

Operation

Behavior

ADD ACCOUNTS

Adds accounts to existing list (accumulative)

SET ACCOUNTS

Replaces entire account list (destructive)

REMOVE ACCOUNTS

Removes specific accounts from list (selective)

Share restrictions

The `shareRestrictions` parameter controls whether consumer accounts can reshare data:

  • true: Prevents accounts from resharing data to other accounts

  • false: Allows accounts to reshare data (default Snowflake behavior)

  • Only applicable to `ADD ACCOUNTS` and `SET ACCOUNTS` operations

loading

loading

loading

loading