View All IP Reservations
/paas/api/v1.1/network/{identityDomainId}/services/MySQLCS/ipreservations
Returns information about the IP reservations created for MySQL Cloud Service in the given identity domain. Both used and unused IP reservations are returned.
Use the optional ?networkType
query parameter to get details of all the IP reservations or only those that can be assigned to instances associated with IP networks.
Request
-
identityDomainId: string
Identity domain ID for the MySQL Cloud Service account.
-
networkType(optional): string
Allowed values (case-sensitive):
ALL
: Get details of all the IP reservations.IPNetwork
: Get details of only those IP reservations that can be assigned to instances attached to IP networks.
-
X-ID-TENANT-NAME: string
Identity domain ID for the MySQL Cloud Service account.
Response
- application/json
200 Response
object
-
activities(optional):
array activities
Groups details about ongoing and failed activity messages, if available.
-
ipReservations(optional):
array ipReservations
Groups all IP reservations.
array
object
-
activity(optional):
array activity
Groups messages and errors for ongoing and failed activities.
array
object
-
errors(optional):
string
Error encountered for an ongoing or failed activity.
-
message(optional):
string
Message of an ongoing or failed activity.
object
-
accountId(optional):
string
The identity domain ID and service type of the service. For example,
myidentitydomain_MySQLCS
, whereMySQLCS
is the service type of MySQL Cloud Service. -
computeSiteName(optional):
string
Location of the IP reservation.
-
creationTime(optional):
string
Date and time the IP reservatione was created.
-
hostName(optional):
string
Name of the Managed Server or Load Balancer node that is using the named IP reservation. This attribute is returned only when the IP reservation is in use.
-
id(optional):
string
Id of the IP reservation.
-
ipAddress(optional):
string
The public IP address for the IP reservation.
-
name(optional):
string
Name of the IP reservation.
-
networkType(optional):
string
Indicates whether the IP reservation is intended for instances attached to IP networks or the shared network.
-
serviceName(optional):
string
Name of the MySQL Cloud Service instance where the named IP reservation is used. This attribute is returned only when the IP reservation is in use.
-
status(optional):
string
Status of the IP reservation. Valid values:
INITIALIZING
,UNUSED
,USED
.
Examples
The following example shows how to view all IP reservations created for MySQL Cloud Service, by submitting a GET request on the REST resource using cURL.
Note: The command in this example uses the URL structure https://rest_server_url/resource-path
, where rest_server_url
is the REST server to contact for your identity domain (or Cloud Account). See Send Requests.
cURL Command
-
To get the details of all the IP reservations:
curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/network/ExampleIdentityDomain/services/mysqlcs/ipreservations?networkType=ALL
-
To get the details of the IP reservations that can be assigned to only instances attached to the shared network:
curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/network/ExampleIdentityDomain/services/mysqlcs/ipreservations
-
To get the details of the IP reservations that can be assigned to only instances attached to IP networks:
curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/network/ExampleIdentityDomain/services/mysqlcs/ipreservations?networkType=IPNetwork
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK
Date: Wed, 22 Mar 2017 21:24:07 GMT
Content-Language: en
Content-Type: application/json
Example of Response Body
The following is an example of the response returned in JSON format, showing USED and UNUSED IP reservations. This sample response is for a request that did not include the optional networkType
query parameter. So it includes only those IP reservations that can be assigned to instances attached to the shared network.
{
"ipReservations":[
{
"id":3201,
"name":"ipres01",
"ipAddress":"10.11.111.11",
"status":"UNUSED",
"accountId":"exampleidentitydomain_MySQLCS",
"computeSiteName":"uscom-central-1",
"creationTime":"2017-03-22T21:19:46.179+0000"
},
{
"id":3202,
"name":"ipres02",
"ipAddress":"10.22.222.22",
"status":"USED",
"accountId":"exampleidentitydomain_MySQLCS",
"computeSiteName":"uscom-central-1",
"serviceName":"ExampleInstance",
"hostName":"exampleinstance-wls-3",
"creationTime":"2017-03-22T21:20:25.080+0000"
},
{
"id":3203,
"name":"ipres04",
"ipAddress":"10.33.333.33",
"status":"UNUSED",
"accountId":"exampleidentitydomain_MySQLCS",
"computeSiteName":"uscom-central-1",
"creationTime":"2017-03-22T21:23:25.080+0000"
},
{
"id":2151,
"name":"someipname",
"ipAddress":"10.44.444.444",
"status":"UNUSED",
"accountId":"exampleidentitydomain_MySQLCS",
"computeSiteName":"uscom-central-1",
"creationTime":"2017-03-03T06:51:18.268+0000"
},
{
"id":6961,
"name":"foripnetwork",
"ipAddress":"10.44.444.444",
"status":"UNUSED",
"accountId":"exampleidentitydomain_MySQLCS",
"computeSiteName":"uscom-central-1",
"creationTime":"2017-03-03T06:51:18.268+0000"
}],
"activities":[]
}