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 |
|---|---|---|---|
| String | Name of the share to alter | Yes |
| Boolean | Don't error if the share doesn't exist | No |
| AccountsOperation | Adds new accounts to the share (nested element)* | No |
| AccountsOperation | Replaces all accounts with new list (nested element)* | No |
| 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 |
|---|---|---|---|---|
| List<Account> | List of account identifiers | Yes | All operations |
| Boolean | Enable/disable share restrictions | No | ADD, SET only |
Account identifier formats
Snowflake supports multiple account identifier formats:
Format | Example |
|---|---|
Legacy account locator |
|
Organization.account |
|
Account locator with region |
|
Full cloud/region format |
|
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 accountsfalse: Allows accounts to reshare data (default Snowflake behavior)Only applicable to `ADD ACCOUNTS` and `SET ACCOUNTS` operations