Binding and Unbinding an EIP
Function
This API is used to bind an EIP to a DB instance for public access or unbind an EIP from the DB instance as required.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about the request header parameters.
Authorization Information
- If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
|
Action |
Access Level |
Resource Type (*: required) |
Condition Key |
Alias |
Dependencies |
|---|---|---|---|---|---|
|
rds:instance:modifyPublicAccess |
write |
- |
- |
- |
- |
Constraints
An EIP cannot be bound to or unbound from a DB instance that is being created, modified, restored, frozen, or rebooted.
URI
- Parameter description
Table 1 Parameter description Name
Mandatory
Description
project_id
Yes
Definition
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
Constraints
N/A
Range
N/A
Default Value
N/A
instance_id
Yes
Definition
Instance ID.
Constraints
N/A
Range
N/A
Default Value
N/A
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
public_ip |
No |
String |
Definition EIP to be bound. Constraints This parameter is mandatory when is_bind is set to true. Range The value must be in the standard IP address format. Default Value N/A |
|
public_ip_id |
No |
String |
Definition EIP ID. Constraints This parameter is mandatory when is_bind is set to true. Range The value must be in the standard UUID format. Default Value N/A |
|
is_bind |
Yes |
Boolean |
Definition Binding or unbinding an EIP. Constraints N/A Range
Default Value N/A |
Example Request
- Bind an EIP to a DB instance.
PUT https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/public-ip { "public_ip":"xx.xx.xx.xx", "public_ip_id":"8403e9cd-a7fa-4288-8b15-c7ceac1etest", "is_bind":true } - Unbind an EIP from a DB instance.
{ "is_bind":false }
Response
- Normal response
- Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot