[{"label":"Latest (V1)","version":"latest"}]
horizon-cloud-nextgen

Add Version

Description

Submit request to add version to existing Image.

Currently this is allowed only for an Image having source type AZURE_SIG or AZURE_CUSTOM_VM.

1. Source AZURE_SIG : Copy published Image from Azure SIG and add it as MAJOR / MINOR version to the existing image. Ensure Azure RBAC Access is granted on source Image for target provider instance. In case source image is prepared by the Partner org using Image Management APIs, provide ‘mspOrgId’ in assetDetails to copy source image metadata and application scan data. In case of externally prepared Image, make sure to provide appropriate attributes in assetDetails including ‘isClientAccessLicenseApplicable’ and ‘multiSession’ apart from mandatory attributes. Refer notes on request model for more details. Once Image status is AVAILABLE, it can be used to create templates.

2. Source AZURE_CUSTOM_VM : Import Custom VM (Customer created VM) from Azure and add it as MAJOR / MINOR version to the existing image. Once Image status is IMPORT_COMPLETE, it can be customized and published as a new version. Refer notes on request model for more details.

This operation will occur in background.

Request

Request

URL

URL


post
https://cloud.vmwarehorizon.com/imagemgmt/v1/images/{imageId}/versions
Copy

Path Parameters

Path Parameters

string
imageId Required

imageId


Request Body

Request Body

VersionCreateTO of mimetype application/json Required

versionCreateTO

{
    "gpuType": "NONE, AMD, NVIDIA",
    "osType": "WINDOWS, LINUX",
    "providerLabel": "AZURE,AKKA,VSPHERE",
    "sourceType": "AZURE_SIG / AZURE_CUSTOM_VM",
    "versionType": "MAJOR, MINOR"
}
assetDetails Optional

string
description Optional

Description of new Version.


string
gpuType Optional

Indicates if the new version is of GPU or a non-GPU type. It must match the GPU type of Image.

Possible values are: AMDNONENVIDIA


array of MarkerTO
markers Optional

Markers to be added to the Version.


string
orgId Optional

Org Id


string
os Optional

Display name of the OS from image-sources api


string
osType Optional

OS type of the image. It must match the OS Type of Image.

Possible values are: CLIENTLINUXSERVERWINDOWSWVD


string
providerInstanceId Optional

Provider instance id that gives provider specific region details


string
providerLabel Optional

ProviderType for this VM

Possible values are: AKKAAZUREVSPHEREZEROCLOUD


string
sourceType Optional

Source type of new Version.

Possible values are: AKKA_CUSTOM_VMAKKA_MARKET_PLACEAKKA_SIGAZURE_CUSTOM_VMAZURE_MARKET_PLACEAZURE_SIGCOPIED_FROM_VERSIONIMPORTED_VMSUPLOADEDVSPHERE_CATALOG


string
sourceVersionId Optional

Source Version used for creating new version. Its needed when versionType is MINOR


string
versionType Optional

Version Type of new Version. Only Major and Minor are supported currently. Version type and version number of source decides the new version number.

Possible values are: MAJORMINORPATCH

Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

Response Body

Response Body

201 Created

Returns VersionCreateResponseTO of type application/json

Successfully created a new version record.Provisioning of resources in provider will happen in background.

{
	"assetDetails": {
		"assetType": "AKKA_IMAGE_IN_RG",
		"data": {}
	},
	"assetId": "string",
	"assetStatus": "AGENT_INSTALLATION_FAILED",
	"assetType": "AKKA_IMAGE_IN_RG",
	"imageDescription": "string",
	"imageId": "string",
	"imageName": "string",
	"imageStatus": "AVAILABLE",
	"markers": [
		{
			"createdAt": "string",
			"errorCode": "UPDATES_FAILED",
			"errorDetails": "string",
			"errorDetailsParameters": {
				"key": "string"
			},
			"id": "0123456789",
			"imageId": "0123456789",
			"name": "HRLite,HRPro",
			"nextVersionId": "0123456789",
			"orgId": "0123456789",
			"status": "IN_PROGRESS",
			"templateCount": 0,
			"updatedAt": "string",
			"versionId": "0123456789"
		}
	],
	"orgId": "string",
	"sourceAssetId": "string",
	"sourceImageId": "string",
	"sourceImageType": "AKKA_CUSTOM_VM",
	"sourceType": "AKKA_CUSTOM_VM",
	"sourceVersionId": "string",
	"versionDescription": "string",
	"versionHistory": [
		"string"
	],
	"versionId": "string",
	"versionName": "string",
	"versionStatus": "AVAILABLE",
	"versionType": "MAJOR"
}
assetDetails Optional

string
assetId Optional

string
assetStatus Optional

Possible values are: AGENT_INSTALLATION_FAILEDALLOW_RDP_FAILEDAVAILABLECAPTURE_AND_IMAGE_UPLOAD_FAILEDCAPTURING_AND_UPLOADING_IMAGE_TO_SIGCLONE_FAILEDCOPYING_IMAGEDELETINGDELETION_FAILEDDELETION_RETRY_PENDINGDEPLOYING_VMDISABLEDENABLING_RDS_AND_ALLOW_RDP_FAILEDGENERALIZINGGENERALIZING_FAILEDIMPORT_COMPLETEIMPORT_FAILEDIMPORT_FAILED_TIMEOUTIMPORT_PENDINGIMPORT_RETRY_PENDINGINSTALLING_AGENTSPUBLISH_BACKUP_FAILEDPUBLISH_BACKUP_IN_PROGRESSPUBLISH_CLEANUP_FAILEDPUBLISH_CLEANUP_IN_PROGRESSPUBLISH_COMPLETEPUBLISH_FAILEDPUBLISH_IN_PROGRESSPUBLISH_RETRY_PENDINGREPLICATINGREPLICATION_COMPLETEREPLICATION_FAILEDREPLICATION_FAILED_TIMEOUTRESTARTING_VMSCANNING_APPSSHUTTING_DOWN_VMSYSPREPINGSYSPREP_FAILEDVALIDATION_FAILEDVALIDATION_IN_PROGRESS


string
assetType Optional

Possible values are: AKKA_IMAGE_IN_RGAKKA_VM_IN_RGAZURE_IMAGE_IN_RGAZURE_IMAGE_IN_SIGAZURE_IMAGE_REPLICA_IN_SIGAZURE_VM_IN_RGVSPHERE_MASTER_VM


string
imageDescription Optional

string
imageId Optional

string
imageName Optional

string
imageStatus Optional

Possible values are: AVAILABLEDELETINGDISABLEDFAILEDIMPORT_COMPLETEIN_PROGRESSPARTIALLY_AVAILABLEPENDING


array of MarkerTO
markers Optional

string
orgId Optional

string
sourceAssetId Optional

string
sourceImageId Optional

string
sourceImageType Optional

Possible values are: AKKA_CUSTOM_VMAKKA_MARKET_PLACEAKKA_SIGAZURE_CUSTOM_VMAZURE_MARKET_PLACEAZURE_SIGCOPIED_FROM_VERSIONIMPORTED_VMSUPLOADEDVSPHERE_CATALOG


string
sourceType Optional

Possible values are: AKKA_CUSTOM_VMAKKA_MARKET_PLACEAKKA_SIGAZURE_CUSTOM_VMAZURE_MARKET_PLACEAZURE_SIGCOPIED_FROM_VERSIONIMPORTED_VMSUPLOADEDVSPHERE_CATALOG


string
sourceVersionId Optional

string
versionDescription Optional

array of string
versionHistory Optional

string
versionId Optional

string
versionName Optional

string
versionStatus Optional

Possible values are: AVAILABLEDELETINGDISABLEDFAILEDFAILED_UNRECOVERABLEIMPORT_COMPLETEIMPORT_IN_PROGRESSPARTIALLY_AVAILABLEPENDINGPUBLISH_IN_PROGRESSREPLICATION_IN_PROGRESSVALIDATION_FAILEDVALIDATION_IN_PROGRESS


string
versionType Optional

Possible values are: MAJORMINORPATCH

Errors

Errors

ErrorResponse
400

Bad request


ErrorResponse
401

Unauthorized


ErrorResponse
403

Forbidden


ErrorResponse
404

Source Image or Version is not found for given imageId and versionId


ErrorResponse
409

Conflict


ErrorResponse
500

Failed to submit add version request

Code Samples

Code Samples

cURL Command

curl -X POST -H "Content-Type: application/json" -d '{"gpuType":"NONE, AMD, NVIDIA","osType":"WINDOWS, LINUX","providerLabel":"AZURE,AKKA,VSPHERE","sourceType":"AZURE_SIG / AZURE_CUSTOM_VM","versionType":"MAJOR, MINOR"}' https://cloud.vmwarehorizon.com/imagemgmt/v1/images/{imageId}/versions
Vendor Extensions

Vendor Extensions

This operation contains the following vendor extensions defined in the spec:
x-codegen-request-body-name: versionCreateTO


[{"label":"Latest (V1)","version":"latest"}]
horizon-cloud-nextgen
Feedback

Was this page helpful?