doc-exports/docs/rds/api-ref/rds_05_0009.html
Wang , Deng Ke 21e968a153 rds api 2.0.38sp24 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com>
Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
2023-01-12 13:50:31 +00:00

12 KiB

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.

Constraints

An EIP cannot be bound to or unbound from a DB instance that is being created, modified, restored, or rebooted.

URI

  • URI format

    PUT https://{Endpoint}/v3/{project_id}/instances/{instance_id}/public-ip

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    For details about how to obtain the project ID, see Obtaining a Project ID.

    instance_id

    Yes

    Specifies the DB instance ID.

Request

  • Parameter description
    Table 2 Parameter description

    Name

    Mandatory

    Type

    Description

    public_ip

    No

    String

    NOTICE:

    When is_bind is true, public_ip is mandatory.

    Specifies the EIP to be bound. The value must be in the standard IP address format.

    public_ip_id

    No

    String

    NOTICE:

    When is_bind is true, public_ip_id is mandatory.

    Specifies the EIP ID. The value must be in the standard UUID format.

    is_bind

    Yes

    Boolean

    • true: Bind an EIP.
    • false: Unbind an EIP.
  • Request example
    {
        "public_ip":"10.145.51.214",
        "public_ip_id":"8403e9cd-a7fa-4288-8b15-c7ceac1etest",
        "is_bind":true
    }

Response

Status Code

Error Code

For details, see Error Codes.