If you want to remove a cloud template version, you make a POST request. The body of the input indicates the version to remove.

If you have a versioned and released cloud template in VMware Aria Automation Service Broker, it appears in the catalog source. If you do not want that cloud template version to be available for deployment, you must remove it from the catalog.

Prerequisites

Procedure

  1. Assign the cloud template ID variable.
    cloud_template_id='<your_cloud_template_id>'
  2. Assign the cloud template version variable.
    cloud_template_version='<your_cloud_template_version>'

    your_cloud_template_version is the version that you want to remove.

  3. Remove a version of your cloud template from the catalog.
    curl -X POST \
      $url/blueprint/api/blueprints/$cloud_template_id/versions/$cloud_template_version/action/unrelease?apiVersion=$api_version \
      -H "Authorization: Bearer $access_token" \
      -H 'Content-Type: application/json' | jq "."
  4. To see the change in the Automation Service Broker UI, select the Content & Policies tab.
    1. Select Content Sources.
    2. Select the name of the content source with your cloud template.
    3. On the Content Source Details screen that appears, click Save and Import.

Results

The cloud template version you specified is removed from the Automation Service Broker catalog. Any other released cloud template versions remain listed.

Example: Remove a Cloud Template Version

Remove version 5 of your cloud template with ID fa6b42d5-ac46-451d-8917-b2f7e527b785.

Assign variables.

$ url='https://appliance.domain.com'
$ api_version='2019-09-12'
$ cloud_template_id='fa6b42d5-ac46-451d-8917-b2f7e527b785'
$ cloud_template_version='v5'

Remove the cloud template version.

$ curl -X POST \
  $url/blueprint/api/blueprints/$cloud_template_id/versions/$cloud_template_version/action/unrelease?apiVersion=$api_version \
  -H "Authorization: Bearer $access_token" \
  -H 'Content-Type: application/json' | jq "."

A snippet of the response shows the cloud template version with a VERSIONED status.

...        
  "blueprintId": "1f170637-81a3-4257-b1cd-b2219ee8034c",
  "name": "MyExampleCloudTemplate",
  "description": "Basic Cloud Machine cloud template",
  "version": "v5",
  "tags": [],
  "content": "formatVersion: 1\ninputs:\n  flavor:\n    type: string\n    title: Flavor\n    description: Flavor Mapping Name\n  image:\n    type: string\n    title: Image\n    description: Image Mapping Name\n  count:\n    type: integer\n    minimum: 1\n    default: 1\n    maximum: 2\n    title: Number of Instances\nresources:\n  BasicCloudMachine:\n    type: Cloud.Machine\n    properties:\n      name: BasicCloudMachine\n      flavor: '${input.flavor}'      \n      image: '${input.image}'\n      count: '${input.count}'\n      tags: [\n        {\n          \"key\": \"env\",\n          \"value\": \"prod\"\n        }\n      ]\n",
  "status": "VERSIONED",
  "versionDescription": "Creating a version from the current draft",
  "versionChangeLog": "Creating a version v5",
  "valid": true
}