UpdatePublicNetwork
Enables or disables the public endpoint of a specified Elasticsearch instance.
Operation description
When you invoke this operation, note the following:
You cannot update information when the instance status is activating, invalid, or freeze (inactive).
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
elasticsearch:UpdatePublicNetwork |
update |
*Instance
|
|
None |
Request syntax
PATCH /openapi/instances/{InstanceId}/public-network HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
es-cn-nif1q9o8r0008**** |
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**** |
| body |
string |
No |
The public network access switch configuration for the instance. |
{"enablePublic":true} |
Request body
You can also include the enablePublic parameter in the request body. This parameter is optional and defaults to false. The value is of the Boolean type. A value of true indicates that public access is enabled, and a value of false indicates that public access is disabled. Example:
{
"enablePublic": true
}
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
2A88ECA1-D827-4581-AD39-05149586**** |
| Result |
object |
The returned result. |
|
| enablePublic |
boolean |
The status of the public access switch. |
false |
In the following response example, only the parameters in the returned data list are guaranteed to be included. 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": "2A88ECA1-D827-4581-AD39-05149586****",
"Result": {
"enablePublic": false
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.