Bulk configure IP whitelists with a template
If you manage multiple ApsaraDB RDS for SQL Server instances that require the same IP whitelist, you can use a whitelist template. This feature lets you create a set of whitelist rules and apply them to multiple instances.
Prerequisites
A public endpoint is enabled for the ApsaraDB RDS for SQL Server instance.
Limits
-
An ApsaraDB RDS for SQL Server instance supports up to 1,000 whitelist rules. If you exceed this limit when you modify an IP whitelist or associate a whitelist template, the operation fails.
Note-
The total number of whitelist rules for an ApsaraDB RDS for SQL Server instance includes rules configured directly on the instance and those inherited from associated whitelist templates.
-
A whitelist rule can be a specific IP address or a CIDR block.
-
A single whitelist template can be associated with up to 500 instances.
Usage notes
-
Changes to a whitelist template take effect immediately on the template itself. The changes are applied to the IP whitelist groups of all associated instances in about one minute.
-
If a whitelist template is already associated with multiple instances, modifying the template affects all associated instances. Assess the potential impact before you proceed.
-
Deleting a whitelist template removes the corresponding IP whitelist group from all associated instances, which may interrupt connections from the IP addresses in that group. If the template is associated with only a few instances, we recommend that you disassociate it from each instance before you delete the template.
Billing
This feature is free of charge.
Procedure
Configure a whitelist template
-
Go to the ApsaraDB RDS console. In the navigation pane on the left, click Whitelist Template.
-
Configure the whitelist template:
-
Create a template: Click Create Whitelist Template. In the panel that appears, enter a template name and IP addresses for the whitelist, and then click OK.
Note-
Template names must be unique within the same account.
-
Setting the whitelist to 0.0.0.0/0 opens your instance to the internet. Use this setting with caution. If you use it for connection testing, remove it immediately after the test is complete.
-
If you set the whitelist to only 127.0.0.1, all external access is denied. If other IP addresses or CIDR blocks are also configured, the 127.0.0.1 entry has no effect.
-
When this template is applied to an instance, the new whitelist rules take effect in about one minute.
-
-
Modify a template: In the Actions column of the target whitelist template, click Modify. In the panel that appears, make the desired changes and then click OK.
ImportantAfter a whitelist template is created, you cannot change its name.
-
Associate instances (by Instance ID/Instance Name):
-
In the All Instances panel on the left, you can select instances in bulk or use the Search box to find the instances to associate.
-
Select the instances and click
to move them to the Selected Instances panel on the right. To remove an instance, click
.
NoteYou can associate up to 20 instances at a time.
-
-
Edit the whitelist: Modify or add IP addresses to the whitelist as needed.
NoteAfter a whitelist template is modified, the changes are applied to all associated instances in about one minute.
-
-
Delete a template: In the Actions column of the target whitelist template, click Delete. In the confirmation dialog box that appears, click Delete.
NoteWhen you delete a whitelist template, the corresponding whitelist groups are also deleted from all associated instances.
-
Manage whitelist template associations
-
Go to the ApsaraDB RDS console. In the navigation pane on the left, click Instances.
-
Click the ID of the target instance. In the navigation pane on the left, click Whitelist and SecGroup.
-
On the Whitelist Template tab, manage the associations.
-
Associate a template: Click Associate Whitelist Template. In the panel that appears, select the target whitelist template and click OK.
NoteAfter the association is successful, the whitelist group from the template appears in the whitelist group list.
-
Disassociate a template: In the whitelist group list, click Disassociate next to the target whitelist group. In the confirmation dialog box, click OK.
-
Related topics
-
If you need to configure a whitelist for a single instance, see Configure an IP whitelist.
-
For frequently asked questions about whitelist configurations, see Whitelist FAQ.
-
You can also use API operations to configure and manage whitelist templates:
API
Description
-
To create a whitelist template
-
IpWhitelist
-
TemplateName
-
-
To modify a whitelist template
-
IpWhitelist
-
TemplateId
-
-
To delete a whitelist template
-
IpWhitelist: Set to an empty string.
-
TemplateId
-
TemplateId
-
Fuzzy search
-
TemplateName: Enter a keyword from the template ID or name.
-
FuzzySearch: Set to true.
-
MaxRecordsPerPage
-
PageNumbers
-
-
Batch query
FuzzySearch: Set to false.
MaxRecordsPerPage
PageNumbers
-
TemplateId
-
InsName
-
TemplateId
-
InsName
TemplateId
InsName
-