ALTER EVENT ROUTING TABLE¶
Alters an event routing table used to route events to a centralized location. You can make the following changes to an event routing table:
Specify a new set of rules using
SET RULESCreate a new rule or replace a single rule using
SET RULEDelete a rule using
UNSET RULERename a rule using
MODIFY RULE ... RENAMERename the event routing table
For information about event routing tables, see Configure centralized event sharing for an app.
See also
CREATE EVENT ROUTING TABLE, DROP EVENT ROUTING TABLE, SHOW EVENT ROUTING TABLES, SHOW RULES IN EVENT ROUTING TABLE, ALTER ORGANIZATION SET EVENT ROUTING TABLE, ALTER ORGANIZATION UNSET EVENT ROUTING TABLE, SHOW EVENT ROUTING TABLE ON ORGANIZATION
Syntax¶
Parameters¶
table_nameSpecifies the identifier (name) for the event routing table to alter. If the identifier contains spaces or special characters, enclose the entire string in double quotes. Identifiers enclosed in double quotes are also case-sensitive.
FORCESpecifies that the operation should be performed even if the event routing table is currently activated for an organization. If you omit FORCE and the table is currently activated, the command fails. FORCE is not required for renaming commands.
SET RULESReplaces all existing rules with a new set of rules. Each rule has the following parameters:
rule_name(required)Specifies the name of the rule. The rule name must be unique within the event routing table. If
REGIONSis set toALL, the name must bedefault. Default rules can’t be enclosed in double quotes. Other rule names can be enclosed in double quotes to preserve letter case.REGIONS = ('region1', 'region2', ...)(required)Specifies the regions from which events are routed. You can specify individual regions or use
ALLto specify all regions. For information about available regions, see Region IDs.DESTINATION_ACCOUNT = organization.account_name(required)Specifies the destination account to route events to. Organization is not required. The account must be in the organization.
REGION_GROUP = region_group(optional)Specifies the region group. The only supported value is
PUBLIC.
SET RULECreates or replaces a single rule. Accepts the same parameters as
SET RULES.UNSET RULE <rule_name>Deletes a rule from the event routing table.
rule_name(required)Specifies the name of the rule to delete. If only one rule remains in the event routing table, it can’t be unset.
MODIFY RULE rule_name RENAME TO new_rule_nameRenames a rule.
rule_name(required)Specifies the name of the rule to rename.
new_rule_name(required)Specifies the new name for the rule.
RENAME TO new_table_nameRenames the event routing table.
new_table_name(required)Specifies the new name for the event routing table.
Access control requirements¶
Role |
Notes |
|---|---|
ORGADMIN |
Required to run this command. If the organization account has the GLOBALORGADMIN role enabled, only GLOBALORGADMIN can run this command. |
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.
Usage notes¶
Use
FORCEto modify an event routing table that is currently activated for an organization. Tables are activated by the commandALTER ORGANIZATION SET EVENT ROUTING TABLE FOR ALL APPLICATION LISTINGS. If you omit FORCE and the table is activated, the command fails. FORCE is not required for renaming commands.SET RULESreplaces all existing rules. To add or update a single rule without affecting others, useSET RULEinstead.If only one rule remains in the event routing table, you can’t use
UNSET RULEto remove it.
Examples¶
Replace all rules in org_table with a new set of rules:
Create or replace a rule called AWS_EU_WEST_RULE on org_table that routes
events from AWS_EU_WEST_1 to account2 in the organization:
Delete the rule AWS_EU_WEST_RULE from org_table:
Rename the rule AWS_US_EAST_RULE to RULE_1 on org_table:
Rename the event routing table org_table to org_table_2: