UpdatePrivateNetworkWhiteIps

Updated at:

Updates the VPC private network access whitelist of a specified instance.

Operation description

Precautions

  • When the instance status is activating, invalid, or inactive, you cannot update the VPC private network access whitelist of the instance.

  • You can update the whitelist by using an IP address whitelist or an IP address 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. Details:
    • IP address whitelist: privateNetworkIpWhiteList

    • IP address whitelist group: modifyMode and whiteIpGroup

  • You cannot configure private IP addresses in a public access whitelist, and you cannot configure public IP addresses in a private network access whitelist.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

elasticsearch:UpdateWhiteIps

update

*Instance

acs:elasticsearch:{#regionId}:{#accountId}:instances/{#InstanceId}

None None

Request syntax

POST /openapi/instances/{InstanceId}/private-network-white-ips HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

es-cn-tl329rbpc0001****

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 only ASCII characters and cannot exceed 64 characters in length.

5A2CFF0E-5718-45B5-9D4D-70B3FF****

modifyMode

string

No

The modification method. Valid values:

  • Cover (default): overwrites the original IP address whitelist with the value of the ips parameter.

  • Append: adds the IP addresses specified by the ips parameter to the original IP address whitelist.

  • Delete: deletes the IP addresses specified by the ips parameter from the original IP address whitelist. You must retain at least one IP address.

Cover

body

string

No

The VPC private network access whitelist or whitelist group configuration of the instance.

{"privateNetworkIpWhiteList":["0.0.XX.XX","10.2.XX.XX","192.168.XX.XX/25"]}

RequestBody

ParameterTypeRequiredExampleDescription
privateNetworkIpWhiteListListNo["0.0.XX.XX","10.2.XX.XX","192.168.XX.XX/25"]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.
You cannot configure privateNetworkIpWhiteList and whiteIpGroup at the same time.

whiteIpGroupObjectNoUpdates the whitelist configuration of the instance by using a whitelist group. You can update only one whitelist group.
You cannot configure privateNetworkIpWhiteList and whiteIpGroup at the same time.

└ groupNameStringNotest_group_nameThe name of the whitelist group. This parameter is required if you specify the whiteIpGroup parameter.
└ ipsListNo["0.0.0.0", "10.2.XX.XX"]The list of IP addresses in the whitelist group. This parameter is required if you specify the whiteIpGroup parameter.
Important Whitelist groups are added and deleted by calling the operation with modifyMode set to Cover. The Delete and Append values do not support adding or deleting whitelist groups, but only modify the list of IP addresses in a whitelist group. Details:
  • When modifyMode is set to Cover, if ips is empty, the whitelist group is deleted. If the value of 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 after deletion.

  • When modifyMode is set to Append, ensure that the specified whitelist group already exists. Otherwise, a NotFound error is returned.

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

6DEBE5EE-0368-4757-8F82-EF9C3972****

Result

object

The returned result.

privateNetworkIpWhiteList

array

The VPC private network access whitelist.

string

The VPC private network access whitelist.

["192.168.XX.XX/25"]

Note

In the following response example, only the parameters included in the returned data list are guaranteed to be returned. The unmentioned parameters are for reference only. For parameter descriptions, see ListInstance. Do not hardcode dependencies on these parameters in your code.

Examples

Success response

JSON format

{
  "RequestId": "6DEBE5EE-0368-4757-8F82-EF9C3972****",
  "Result": {
    "privateNetworkIpWhiteList": [
      "[\"192.168.XX.XX/25\"]"
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.