Delete a Product Snapshot

You can use the
VMware Aria Suite Lifecycle
API to delete a product snapshot created using
VMware Aria Suite Lifecycle
.
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.
  1. Assign the snapshot ID variable.
    snapshotId = '<
    your_snapshot_ID
    >'
  2. 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 a
    VMware Aria Automation Config
    snapshot, 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" }
  3. Assign the variable for the
    requestId
    .
    requestId = "a3f77209-0005-44b3-9eb5-ac1a1ba19394"
  4. Use the
    requestId
    to 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 Lifecycle
    has deleted the snapshot.
    ... }, "outputMap": {}, "state": "COMPLETED", "executionId": "59430b9d-44cc-47a1-90ec-777481edb9z9", ...