SoftLayer Network Subnet::getSubnetForIpAddress
From SoftLayer Development Network Wiki
getSubnetForIpAddress is a member of the SoftLayer_Network_Subnet service.
Contents |
Overview
Retrieve the subnet associated with an IP address. You may only retrieve subnets assigned to your SoftLayer customer account.
Return Type
getSubnetForIpAddress returns the SoftLayer_Network_Subnet data type.
Headers
Required Headers
getSubnetForIpAddress requires the following headers set:
Optional Headers
getSubnetForIpAddress takes the following optional headers:
Parameters
getSubnetForIpAddress takes the following parameters:
ipAddress
The IP address to search for.
- type: string
Error Handling
getSubnetForIpAddress throws the following exceptions:
- SoftLayer_Exception
- Throw the exception "You must provide a valid IP address." if the ipAddress parameter is not a valid IPv4 address.
- SoftLayer_Exception
- Throw the exception "Unable to determine a subnet for the specified address of {ipAddress}" if the API is unable to locate a subnet associated with the given IP address.

