Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: Dong, Qiu Jian <qiujiandong1@huawei.com> Co-committed-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
20 KiB
Modifying the Access Information of a Specified Cluster
Function
This API is used to modify the access information of a specified cluster.
URI
PUT /api/v3/projects/{project_id}/clusters/{cluster_id}/mastereip
Table 1 describes the parameters of the API.
Request
Request parameters:
Table 2 describes the request parameters.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
action |
Yes |
String |
Whether to bind an elastic IP address to the cluster or unbind an elastic IP address from the cluster. The value is bind or unbind (case insensitive). NOTE:
id needs to be configured only when action is set to bind. |
spec |
No |
Information about the elastic IP address. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
Yes |
String |
ID of the elastic IP address. |
Example request:
- Binding an elastic IP address to the cluster
{ "spec": { "action": "bind", "spec": { "id": "0ef26920-3527-405d-a7b4-27106618c2d7" } } }
- Unbinding an elastic IP address from the cluster
{ "spec": { "action": "unbind" } }
Response
Response parameters:
Table 5 describes the response parameters.
Parameter |
Type |
Description |
---|---|---|
metadata |
json |
Metadata. |
spec |
- |
|
status |
Cluster endpoint. |
Parameter |
Type |
Description |
---|---|---|
action |
String |
Whether an EIP is bound to or unbound from the cluster. The value is bind or unbind (case insensitive). |
spec |
Information about the elastic IP address. |
|
elasticIp |
String |
Elastic IP address. |
Parameter |
Type |
Description |
---|---|---|
privateEndpoint |
String |
Address for access within the VPC. |
publicEndpoint |
String |
Address for access outside the VPC. |
Example response:
{ "metadata": {}, "spec": { "action": "bind", "spec": { "id": "0ef26920-3527-405d-a7b4-27106618c2d7", "eip": { "bandwidth": { "size": 5, "sharetype": "PER" } }, "IsDynamic": false }, "elasticIp": "10.154.50.11" }, "status": { "privateEndpoint": "https://172.16.0.86:5443", "publicEndpoint": "https://10.154.50.11:5443" } }
Status Code
Table 8 describes the status code of the API.
Status Code |
Description |
---|---|
200 |
The progress of the specified job is successfully obtained. |
For details about error status codes, see Status Code.