ModifyWhiteIps

Updated at:

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

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:ModifyWhiteIps

update

*Instance

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

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: Elasticsearch cluster.

  • KIBANA: Kibana cluster.

WORKER

networkType

string

No

The network type. This parameter is required if whiteIpList is specified. Valid values:

  • PRIVATE: private network.

  • PUBLIC: public network.

PUBLIC

modifyMode

string

No

The modification mode. Valid values:

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

  • Append: Adds the IP addresses specified in the ips parameter to the original IP whitelist.

  • Delete: Removes the IP addresses specified in the ips parameter from the original IP whitelist. At least one IP address must be retained.

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:

  • PRIVATE_KIBANA: Kibana private access whitelist.

  • PRIVATE_ES: Elasticsearch private access whitelist.

  • PUBLIC_ES: Elasticsearch public access whitelist.

  • PUBLIC_KIBANA: Kibana public access whitelist.

Valid values:

  • PRIVATE_KIBANA :

    Kibana private access whitelist.

  • PRIVATE_ES :

    Elasticsearch private access whitelist.

  • PUBLIC_ES :

    Elasticsearch public access whitelist.

  • PUBLIC_KIBANA :

    Kibana public access whitelist.

PRIVATE_ES

Important Adding and deleting whitelist groups is implemented by calling with modifyMode set to Cover. Delete and Append cannot add or delete whitelist groups. They can only modify the IP address list within a whitelist group. Details are as follows:
  • 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: The whitelist is updated.

  • false: The whitelist failed to be updated.

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.