Queries the gateway and subnet mask of an elastic IP address (EIP).
Usage notes
You can query only EIPs that are associated with secondary elastic network interfaces (ENIs) in multi-EIP-to-ENI mode.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeEipGatewayInfo | The operation that you want to perform. Set the value to DescribeEipGatewayInfo. |
InstanceId | String | Yes | eni-bp1d66qjxb3qoin3**** | The ID of the secondary ENI that is associated with the EIP. |
RegionId | String | Yes | cn-zhangjiakou | The region to which the EIP that you want to query belongs. You can call the DescribeRegions operation to query the most recent region list. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | 200 | The status code of the operation. |
Message | String | successful | The result of the operation. |
RequestId | String | C0FD0EED-F90D-4479-803D-DD62335357E5 | The request ID. |
EipInfos | Array of EipInfo | The detailed information about the EIP. |
|
EipInfo | |||
Ip | String | 47.XX.XX.236 | The IP address of the EIP. |
IpGw | String | 47.XX.XX.1 | The IP address of the gateway that is associated with the EIP. |
IpMask | String | 255.255.255.0 | The subnet mask of the EIP. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeEipGatewayInfo
&InstanceId=eni-bp1d66qjxb3qoin3****
&RegionId=cn-zhangjiakou
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeEipGatewayInfoResponse>
<Code>200</Code>
<Message>successful</Message>
<RequestId>C0FD0EED-F90D-4479-803D-DD62335357E5 </RequestId>
<EipInfos>
<Ip>47.XX.XX.236</Ip>
<IpGw>47.XX.XX.1</IpGw>
<IpMask>255.255.255.0</IpMask>
</EipInfos>
</DescribeEipGatewayInfoResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Code" : "200",
"Message" : "successful",
"RequestId" : "C0FD0EED-F90D-4479-803D-DD62335357E5\t",
"EipInfos" : [ {
"Ip" : "47.XX.XX.236",
"IpGw" : "47.XX.XX.1",
"IpMask" : "255.255.255.0"
} ]
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
403 | Forbidden | User not authorized to operate on the specified resource. | You are unauthorized to perform the operation on the specified resource. Acquire the required permissions and try again. |
For a list of error codes, see Service error codes.