ModifyWhiteIps
Calls ModifyWhiteIps to update the access whitelist of a specified instance.
Operation description
Before you begin
You cannot update information for an instance whose instance status is activating, invalid, or freeze (inactive).
- You can update the whitelist in two ways: IP whitelist list and IP whitelist group. The two methods cannot be used at the same time, and they support different parameters (except for InstanceId and clientToken):
IP whitelist list: whiteIpList, nodeType, networkType
IP whitelist group: modifyMode, whiteIpGroup
The public access whitelist does not support private IP addresses, and the private network access whitelist does not support public IP addresses.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
elasticsearch:ModifyWhiteIps |
update |
*Instance
|
None | None |
Request syntax
PATCH /openapi/instances/{InstanceId}/actions/modify-white-ips HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
es-cn-0pp1jxvcl000z**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| clientToken |
string |
No |
A unique token generated by the client to guarantee the idempotency of the request. The maximum length is 64 ASCII characters. |
5A2CFF0E-5718-45B5-9D4D-70B3FF**** |
| body |
object |
No |
The request body parameters. |
|
| nodeType |
string |
No |
The node type. This parameter is required if whiteIpList is specified. Valid values:
|
WORKER |
| networkType |
string |
No |
The network type. This parameter is required if whiteIpList is specified. Valid values:
|
PUBLIC |
| modifyMode |
string |
No |
The modification mode. Valid values:
|
Cover |
| whiteIpList |
array |
No |
The IP address whitelist. This parameter is available when whiteIpGroup is empty and updates the default group whitelist. |
|
|
string |
No |
The IP address whitelist. This parameter is available when whiteIpGroup is empty. The value of this parameter updates the IP whitelist configuration in the Default whitelist group. Important You cannot configure whiteIpList and whiteIpGroup at the same time.
|
192.168.xx.xx |
|
| whiteIpGroup |
object |
No |
Updates the instance whitelist configuration by using the whitelist group method. Only one whitelist group can be updated at a time. Important You cannot configure whiteIpList and whiteIpGroup at the same time.
|
|
| groupName |
string |
No |
The name of the whitelist group. This parameter is required if whiteIpGroup is specified. |
test_group |
| ips |
array |
No |
The list of IP addresses in the whitelist group. This parameter is required if whiteIpGroup is specified. |
|
|
string |
No |
The list of IP addresses in the whitelist group. This parameter is required if whiteIpGroup is specified. |
192.168.xx.xx |
|
| whiteIpType |
string |
No |
The type of the IP whitelist. Valid values:
Valid values:
|
PRIVATE_ES |
If modifyMode is set to Cover and 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.
If modifyMode is set to Delete, at least one IP address must be retained after the deletion.
If modifyMode is set to Append, the whitelist group name must already exist. Otherwise, a NotFound error is returned.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| Result |
boolean |
The result. Valid values:
|
true |
| RequestId |
string |
The request ID. |
5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1DERFG |
Examples
Success response
JSON format
{
"Result": true,
"RequestId": "5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1DERFG"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.