Remove a Blueprint Version from a vRealize Automation Service Broker Catalog

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

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

Prerequisites

Procedure

  1. Assign the blueprint ID variable.
    blueprint_id='<your_blueprint_id>'
  2. Assign the blueprint version variable.
    blueprint_version='<your_blueprint_version>'

    your_blueprint_version is the version that you want to remove.

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

Results

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

Example: Remove a Blueprint Version

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

Assign variables.

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

Remove the blueprint version.

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

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

...        
  "blueprintId": "1f170637-81a3-4257-b1cd-b2219ee8034c",
  "name": "MyExampleBlueprint",
  "description": "Basic Cloud Machine blueprint",
  "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
}