ServerAttachedCIDR
1. API Description
This API is used to query available CIDR blocks for the instance.
2. Input Parameters
The following request parameter list only provides API request parameters.
Parameter Name
Required
Type
Description
instanceId
Yes
String
ID of the instance.
You can find the instanceId in the response by calling InstanceDetails.
cidrBlockType
No
String
Type of CIDR block. The optional values are as follows:
IPv4
IPv6
3. Output Parameters
Parameter Name
Type
Description
requestId
String
The unique request ID, which is returned for each request. RequestId is required for locating a problem.
instanceAvailableCidrBlocks
Array of InstanceAvailableCidrBlock
List of available CIDR blocks for the instance.
4. Code Example
Query available IPv4 CIDR blocks for instance 123456.
POST / HTTP/1.1
Host: console.harmonynetworks.net/api/v2/bmc
Content-Type: application/json
X-ZC-Action: ServerAttachedCIDR
<Common Request Params>
Request:
{
"instanceId": "123456",
"cidrBlockType": "IPV4"
}
Response:
{
"requestId": "TD558E499-305A-45CF-A416-8BAD3DCFFFA4",
"response": {
"requestId": "TD558E499-305A-45CF-A416-8BAD3DCFFFA4",
"instanceAvailableCidrBlocks": [
{
"cidrBlockId": "d6ea77ad-fd05-4383-b973-93703bddaa79",
"zoneId": "SEL-A",
"cidrBlockType": "IPV4",
"cidrBlock": "1.1.1.48/29",
"availableIps": [
"1.1.1.50",
"1.1.1.51",
"1.1.1.52",
"1.1.1.53",
"1.1.1.54"
],
"availableIpCount": 5
},
{
"cidrBlockId": "50a242cb-172d-4ebe-824b-f484bbfee803",
"zoneId": "SEL-A",
"cidrBlockType": "IPV4",
"cidrBlock": "2.2.2.56/29",
"availableIps": [
"2.2.2.58",
"2.2.2.59",
"2.2.2.60",
"2.2.2.61",
"2.2.2.62"
],
"availableIpCount": 5
}
]
}
}5. Error Codes
No error codes related to the API business logic. For other error codes, see Common Error Codes.
Last updated