This API is used to bind or unbind an EIP.
PATH: /rds/v1/{project_id}/instances/{instanceId}/action
Method: POST
Name |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID of a tenant in a region. |
instanceId |
Yes |
Specifies the primary node ID of the DB instance. NOTE:
This field is not the DB instance ID. You are advised to use API v3 and the DB instance ID to perform related operations. |
First, invoke the VPC API to query EIPs by referring to section "Querying Elastic IP Addresses" in the Virtual Private Cloud API Reference. If no EIP is available for the tenant, invoke the VPC API to create an EIP by referring to section "Applying for an Elastic IP Address" in the Virtual Private Cloud API Reference.
EIPs cannot be bound to or unbound from primary/standby DB instances of earlier versions.
Name |
Mandatory |
Type |
Description |
---|---|---|---|
setPublicIp |
Yes |
Dictionary data structure. For details, see Table 3. |
Returns EIP information. |
Name |
Mandatory |
Type |
Description |
---|---|---|---|
action |
Yes |
String |
If this parameter is enablePublicAccess, the EIP is bound to the target DB instance. If this parameter is disablePublicAccess, the EIP is unbound from the target DB instance. |
publicIP |
Yes |
String |
Specifies the EIP obtained by invoking the VPC API. This parameter is not contained in the request when unbinding the EIP. |
publicIPId |
Yes |
String |
Specifies the EIP ID obtained by invoking the VPC API. This parameter is not contained in the request when unbinding the EIP. |
{}
For details, see Abnormal Request Results.