POST /lcm/api/v1/action/create/environment creates or imports a vRealize Suite environment. Only products with versions in the policy are supported for import using the API.
Prerequisites
Satisfy the following conditions before performing any tasks for this use case.
- Use POST /lcm/api/v1/login to log in to vRealize Suite Lifecycle Manager.
- Verify that you have a valid authentication token that matches your login credentials. See Request an Authentication Token .
- Verify that you have added a data center and the request has completed successfully. See Create a Data Center.
- Verify that you have added a vCenter to the data center and the request has completed successfully. See Add a vCenter .
curl Command
The following example imports a
vRealize Suite environment with all available products and nodes.
curl -X POST "https://LCM-Hostname/lcm/api/v1/action/create/environment" \ -H "accept: application/json" \ -H "x-xenon-auth-token: $token" \ -H "content-type: application/json" \ -d '{ "requestId": null, "environmentId": "", "infrastructure": { "sourceLink": "", "properties": { "dataCenterName": "Datacenter Name", "vcHostname": "vCenter Server Host name", "environmentName": "vRS Small Import Brownfield Env", "enableTelemetry": "true", "vcPassword": "", "defaultPassword": "", "adminEmail": "", "vcUsername": "", "acceptEULA": "false", "masterCertificateChain": "" } }, "encoded": false, "products": [ { "sourceLink": null, "id": "vra", "version": "7.5.0", "clusterVIP": [ { "type": "vra", "hostname": "", "ipAddress": "" }, { "type": "iaas-web", "hostname": "", "ipAddress": "" }, { "type": "iaas-manager", "hostname": "", "ipAddress": "" } ], "properties": { "cafeRootPassword": "", "vidmPassword": "", "isImport": "true", "vratenantUser": "", "cafeHostName": "", "iaasUserName": "", "ssoTenant": "", "vratenantPassword": "", "iaasPassword": "" }, "nodes": [], "contents": [] }, { "sourceLink": null, "id": "vrbc", "version": "7.5.0", "clusterVIP": [], "properties": { "isImport": "true", "vrbVidmAdminPassword": "", "vrbCafeSsoTenant": "", "vrbHostName": "", "vrbCafeSsoPassword": "", "isStandalone": "", "vrbCafeHost": "", "vrbCafeSsoAdminUser": "", "vrbVidmAdminUserName": "", "vrbRootPassword": "", "isVrbVidmEnabled": "", "vrbVidmHostName": "" }, "nodes": [], "contents": [] }, { "sourceLink": null, "id": "vrli", "version": "4.7.1", "clusterVIP": [], "properties": { "vrliHostName": "", "vrliRootPassword": "", "isImport": "true", "vrliAdminPassword": "" }, "nodes": [], "contents": [] }, { "sourceLink": null, "id": "vrops", "version": "7.0.0", "clusterVIP": [], "properties": { "isImport": "true", "vropsRootPassword": "", "masterNodeAddress": "", "adminPassword": "" }, "nodes": [], "contents": [] } ] }
JSON Output
When the operation completes successfully, the JSON output includes:
- id = Create environment request ID
- status = Create environment status