If you no longer need reserved IP addresses, you can release them so that VMware Aria Automation can use them for deployment.
Prerequisites
- Verify that all general prerequisites and prerequisites for the Automation Assembler Infrastructure as a Service (IaaS) service have been satisfied. See Prerequisites for API Use Case Examples.
- Verify that you have the ID of the network IP range that includes the IP addresses that you want to release. See Query for IP Addresses.
- Verify that you know the IPv4 or IPv6 addresses that you want to release. The IP addresses must all be the same type. Releasing a mix of IPv4 and IPv6 addresses in the same request is not supported. See Allocate IP Addresses.
Procedure
Example: Release IP addresses within an IP range
To release IP addresses, make a request with the network IP range and specify the IP addresses to release.
Assign variables.
$ url='https://appliance.domain.com'
$ api_version='2021-07-15'
$ ip_range_id='4e6b700c-5d07-4247-b0c7-ae13d1d7188a'
Release two IPv4 addresses.
curl --location --request POST \
$url/iaas/api/network-ip-ranges/$ip_range_id/ip-addresses/release?apiVersion=$api_version \
-H "Authorization: Bearer $access_token" \
-H 'Content-Type: application/json' \
-d '{
"ipAddresses":["196.192.2.19", "196.192.2.20"]
}'
The response provides a selfLink for tracking.
{
"progress": 1,
"status": "INPROGRESS",
"name": "IP Address Release Task",
"id": "452bb595-ca0f-4685-8fcc-8bd6321bf7c6",
"selfLink": "/iaas/api/request-tracker/452bb595-ca0f-4685-8fcc-8bd6321bf7c6"
}
Assign the selfLink variable.
selfLink_id= '452bb595-ca0f-4685-8fcc-8bd6321bf7c6'
Track the request.
curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" "$url/iaas/api/request-tracker/$selfLink_id?apiVersion=$api_version" | jq "."
The IP addresses are released, when the response includes "status": "FINISHED".
{
"progress": 100,
"status": "FINISHED",
"resources": [
"/iaas/api/network-ip-ranges/4e6b700c-5d07-4247-b0c7-ae13d1d7188a/ip-addresses/3f08cabe-fedf-4e9b-96f6-d3bf69016cc4",
"/iaas/api/network-ip-ranges/4e6b700c-5d07-4247-b0c7-ae13d1d7188a/ip-addresses/ca287794-c06b-401c-9626-0b8f5f75d1c2"
],
"name": "IP Address Release Task",
"id": "452bb595-ca0f-4685-8fcc-8bd6321bf7c6",
"selfLink": "/iaas/api/request-tracker/452bb595-ca0f-4685-8fcc-8bd6321bf7c6"
}