Queries the gateway address and subnet mask of an EIP.

You can only query the gateway address and subnet mask of an EIP that is associated with a secondary Elastic Network Interface (ENI) in the multi-EIP to ENI mode.

Debug

Use OpenAPI Explorer to perform debug operations and generate SDK code examples.

Request parameters

Parameter Type Required? Example value Description
Action String Yes DescribeEipGatewayInfo

The name of this action. Value: DescribeEipGatewayInfo

InstanceId String Yes eni-bp1d66qjxb3qoin3xxxx

The ID of the ENI with which the EIP is associated.

RegionId String Yes cn-zhangjiakou

The region ID of the EIP. To query the region ID, call DescribeRegions.

Response parameters

Parameter Type Example value Description
Code String 200

The status code of the request.

EipInfos

The details of the EIP.

Ip String 47.xx.xx.236

The IP address of the EIP.

IpGw String 47.xx.xx.1

The gateway address of the EIP.

IpMask String 255.255.255.0

The subnet mask of the EIP.

Message String successful

The message indicating whether the request is successful.

RequestId String C0FD0EED-F90D-4479-803D-DD62335357E5

The ID of the request.

Examples

Request example


http(s)://vpc.aliyuncs.com/? Action=DescribeEipGatewayInfo
&InstanceId=eni-bp1d66qjxb3qoin3****
&RegionId=cn-zhangjiakou
&<CommonParameters>

Response examples

XML format

<DescribeEipGatewayInfoResponse>
  <Message>successful</Message>
  <RequestId>0ED8D006-F706-4D23-88ED-E11ED28DCAC0</RequestId>
  <EipInfos>
    <EipInfo>
      <IP>47.xx.xx. 236</IP>
      <IpMask>255.255.255.0</IpMask>
      <IpGw>47.xx.xx. 1</IpGw>
    </EipInfo>
  </EipInfos>
  <Code>200</Code>
</DescribeEipGatewayInfoResponse>

JSON format

{
	"Message":"successful",
	"RequestId":"0ED8D006-F706-4D23-88ED-E11ED28DCAC0",
	"EipInfos":{
		"EipInfo":[
			{
				"IpMask":"255.255.255.0",
				"IP":"47.xx.xx. 236",
				"IpGw":"47.xx.xx. 1"
			}
		]
	},
	"Code":"200"
}

Error codes

HTTP status code Error code Error message Description
403 Forbbiden User not authorized to operate on the specified resource. You are not authorized to operate on this resource.

See common error codes.