Delete a Product Snapshot
You can use the
VMware Aria
Suite Lifecycle
API to delete a
product snapshot created using VMware Aria
Suite Lifecycle
. - Verify that all general prerequisites have been satisfied and that you have assigned your environment ID and product ID. See the prerequisites for Performing Day 2 operations usingVMware Aria Suite Lifecycle APIs.
- Verify that you have the ID of the snapshot that you want to revert to. See Create a Product Snapshot.
- If you are deleting a snapshot ofVMware Aria Automation Config, verify that the tenant ID variable is assigned. See Creating and Managing Product Snapshots.
To keep vCenter disk space consumption at a
reasonable level, delete snapshots that you no longer need. The following procedure
shows how to delete a
VMware
Aria Operations
snapshot. - Assign the snapshot ID variable.snapshotId = '<your_snapshot_ID>'
- Delete the snapshot and power on the virtual appliance. To improve performance and minimize storage consumption, consolidate disk files after deletion by setting"consolidate": true.curl -X DELETE \ '$url/lcm/lcops/api/environments/$environmentId/products/$productId/snapshot/inventory/revert' \ -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' \ -H 'Content-Type: application/json' \ -d '{ "consolidate": true, "productSnapshotId": "'$snapshotId'" }' | jq "."To delete aVMware Aria Automation Configsnapshot, include the tenant ID as a query parameter in your request, for example:curl -X DELETE \ '$url/lcm/lcops/api/environments/$environmentId/products/$productId/snapshot/inventory?tenantId=$tenantId' \ -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' \ -H 'Content-Type: application/json' \ -d '{ "consolidate": "true", "productSnapshotId": "'$snapshotId'" }' | jq "."The request triggers the API. The response shows the request ID.{ "requestId":"a3f77209-0005-44b3-9eb5-ac1a1ba19394" }
- Assign the variable for therequestId.requestId = "a3f77209-0005-44b3-9eb5-ac1a1ba19394"
- Use therequestIdto track your request.curl -X GET '$url /lcm/request/api/v2/requests/$requestId' -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' | jq "."After the request succeeds,VMware Aria Suite Lifecyclehas deleted the snapshot.... }, "outputMap": {}, "state": "COMPLETED", "executionId": "59430b9d-44cc-47a1-90ec-777481edb9z9", ...