UpdateWhiteIps
Updates the VPC private network access whitelist of an Elasticsearch instance.
Operation description
Precautions
You cannot update the information when the instance status is activating, invalid, or frozen (inactive).
- You can update the whitelist by using an IP whitelist or an IP whitelist group. You cannot use both methods at the same time. Except for InstanceId and clientToken, the parameters supported by the two methods are different. The details are as follows:
IP whitelist: esIPWhitelist
IP whitelist group: modifyMode and whiteIpGroup
You cannot configure private IP addresses in the public access whitelist, and you cannot configure public IP addresses in the private network access whitelist.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
elasticsearch:UpdateWhiteIps |
update |
*Instance
|
None | None |
Request syntax
PATCH /openapi/instances/{InstanceId}/white-ips HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
es-cn-npk2154oi000b**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| clientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain a maximum of 64 ASCII characters. |
5A2CFF0E-5718-45B5-9D4D-70B3FF**** |
| modifyMode |
string |
No |
The modification method. Valid values:
|
Cover |
| body |
object |
No |
The request body. |
|
| esIPWhitelist |
array |
No |
The IP address information in the whitelist. |
|
|
string |
No |
The IP address whitelist. This parameter is available when whiteIpGroup is empty. The value of this parameter updates the IP address whitelist configuration in the default whitelist group. Important You cannot configure esIPWhitelist and whiteIpGroup at the same time.
|
["10.61.xx.xx", "106.11.xx.xx”] |
|
| whiteIpGroup |
object |
No |
Updates the whitelist configuration of the instance by using a whitelist group. You can update only one whitelist group. Important You cannot configure esIPWhitelist and whiteIpGroup at the same time.
|
|
| groupName |
string |
No |
The name of the whitelist group. This parameter is required if the whiteIpGroup parameter is specified. |
test_group |
| ips |
array |
No |
The list of IP addresses in the whitelist group. |
|
|
string |
No |
The IP addresses in the whitelist group. This parameter is required if the whiteIpGroup parameter is specified. |
["10.2.xx.xx", "10.3.xx.xx"] |
|
| whiteIpType |
string |
No |
The type of the IP address whitelist. Set the value to PRIVATE_ES, which indicates a private network access whitelist. |
PRIVATE_ES |
When modifyMode is set to Cover, if ips is empty, the whitelist group is deleted. If groupName is not in the list of existing whitelist group names, a new whitelist group is created.
When modifyMode is set to Delete, you must retain at least one IP address in ips after the deletion.
When modifyMode is set to Append, you must ensure that the whitelist group name already exists. Otherwise, a NotFound error is returned.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| RequestId |
string |
The request ID. |
8D58B014-BBD7-4D80-B219-00B9D5C6860C |
| Result |
object |
The returned result. |
|
| esIPWhitelist |
array |
[Deprecated] The private network access whitelist. |
|
|
string |
The updated whitelist. |
["106.11.xx.xx", "10.61.xx.xx"] |
|
| networkConfig |
object |
The network configuration. |
|
| whiteIpGroupList |
array<object> |
The list of whitelist groups. |
|
|
object |
The whitelist group information. |
||
| groupName |
string |
The name of the whitelist group. By default, the default group is included. |
test_group |
| ips |
array |
The IP address information in the whitelist group. |
|
|
string |
The list of IP addresses in the whitelist group. |
["10.2.xx.xx", "10.3.xx.xx"] |
|
| whiteIpType |
string |
The whitelist type. The value is fixed to PRIVATE_ES, which indicates a private network access whitelist. |
PRIVATE_ES |
In the following response example, only the parameters in the returned data list are guaranteed to be included. The unmentioned parameters are for reference only. For parameter descriptions, refer to ListInstance. Do not forcibly rely on these parameters in your programs.
Examples
Success response
JSON format
{
"RequestId": "8D58B014-BBD7-4D80-B219-00B9D5C6860C",
"Result": {
"esIPWhitelist": [
"[\"106.11.xx.xx\", \"10.61.xx.xx\"]"
],
"networkConfig": {
"whiteIpGroupList": [
{
"groupName": "test_group",
"ips": [
"[\"10.2.xx.xx\", \"10.3.xx.xx\"]"
],
"whiteIpType": "PRIVATE_ES"
}
]
}
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.