获取弹性IP信息-DescribeEIP

获取弹性IP信息

Request Parameters

Parameter nameTypeDescriptionRequired
Regionstring地域Yes
ProjectIdstring项目ID。不填写为默认项目,子帐号必须填写No
EIPIds.nstring弹性IP的资源ID如果为空, 则返回当前 Region中符合条件的的所有EIPNo
Offsetint数据偏移量, 默认为0No
Limitint数据分页值, 默认为20No

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
TotalCountint满足条件的弹性IP总数No
TotalBandwidthint满足条件的弹性IP带宽总和, 单位MbpsNo
EIPSetarray弹性IP列表, 每项参数详见 UnetEIPSetNo

UnetEIPSet

Parameter nameTypeDescriptionRequired
EIPIdstring弹性IP的资源IDNo
Weightint外网出口权重, 默认为50, 范围[0-100]No
BandwidthTypeint带宽模式, 枚举值为: 0: 非共享带宽模式, 1: 共享带宽模式No
Bandwidthint弹性IP的带宽, 单位为Mbps, 当BandwidthType=1时, 该处显示为共享带宽值. 当BandwidthType=0时, 该处显示这个弹性IP的带宽.No
Statusstring弹性IP的资源绑定状态, 枚举值为: used: 已绑定, free: 未绑定, freeze: 已冻结No
ChargeTypestring付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按小时付费; Trial, 试用. 按小时付费和试用这两种付费模式需要开通权限.No
CreateTimeint弹性IP的创建时间, 格式为Unix TimestampNo
ExpireTimeint弹性IP的到期时间, 格式为Unix TimestampNo
Resourceobject弹性IP的详细信息列表, 具体结构见下方 UnetEIPResourceSetNo
EIPAddrarray弹性IP的详细信息列表, 具体结构见下方 UnetEIPAddrSetNo
Namestring弹性IP的名称,缺省值为 "EIP"No
Tagstring弹性IP的业务组标识, 缺省值为 "Default"No
Remarkstring弹性IP的备注, 缺省值为 ""No
PayModestring弹性IP的计费模式, 枚举值为: "Bandwidth", 带宽计费; "Traffic", 流量计费; "ShareBandwidth",共享带宽模式. 默认为 "Bandwidth".No
ShareBandwidthSetobject共享带宽信息 参见 ShareBandwidthSetNo
Expirebool弹性IP是否到期No

UnetEIPAddrSet

Parameter nameTypeDescriptionRequired
OperatorNamestring运营商信息如: 国际: International, BGP: BGPNo
IPstringIP地址No

ShareBandwidthSet

Parameter nameTypeDescriptionRequired
ShareBandwidthint共享带宽带宽值No
ShareBandwidthNamestring共享带宽的资源名称No
ShareBandwidthIdstring共享带宽IDNo

UnetEIPResourceSet

Parameter nameTypeDescriptionRequired
ResourceTypestring已绑定的资源类型, 枚举值为: uhost, 云主机;natgw:NAT网关;ulb:负载均衡器;upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;vpngw:IPSec VPN;ucdr:云灾备;dbaudit:数据库审计。No
ResourceNamestring已绑定的资源名称No
ResourceIdstring已绑定资源的资源IDNo
EIPIdstring弹性IP的资源IDNo

Request Example

https://api.ucloud.cn/?Action=DescribeEIP
&Region=cn-bj2
&EIPIds.0=eip-XXXXX

Response Example

{
    "Action": "DescribeEIPResponse",
    "EIPSet": [
        {
            "Bandwidth": 20,
            "BandwidthType": 1,
            "ChargeType": "Month",
            "CreateTime": 1528785841,
            "EIPAddr": [
                {
                    "IP": "106.75.XX.XX",
                    "OperatorName": "BGP"
                }
            ],
            "EIPId": "eip-XXXXX",
            "Expire": false,
            "ExpireTime": 1530374400,
            "Name": "EIP",
            "PayMode": "ShareBandwidth",
            "Remark": "",
            "Resource": {
                "ResourceID": "uhost-XXXXXX",
                "ResourceName": "test",
                "ResourceType": "uhost",
                "Zone": "cn-sh2-01"
            },
            "ShareBandwidthSet": {
                "ShareBandwidth": 20,
                "ShareBandwidthId": "bwshare-XXXX",
                "ShareBandwidthName": "test"
            },
            "Status": "used",
            "Tag": "Default",
            "Weight": 50
        }
    ],
    "Request_uuid": "f33cf273-89ed-4215-a9c6-XXXXXXX",
    "RetCode": 0,
    "TotalBandwidth": 13,
    "TotalCount": 10
}