How Do I Create a VMware Cloud Director Instance

As a Provider Administrator, you can create a VMware Cloud Director instance by using the VMware Cloud Director service API.

Prerequisites

Procedure

  1. Prepare a JSON template with the required information for your VMware Cloud Director instance.
    The template must contain a name, an upgrade path, the environment ID (URN), and a password that you set.
    {"name": "name-of-your-instance",
    "upgradeCategory": "upgrade-path",
    "environmentId": "environmentUrn",
    "password": "cloud-director-instance-password",
    "instanceParams": {
    	}
    }
  2. Run a POST request with the contents of the JSON template in the body of the request.
    POST https://operatorUrl/environment/environmentUrn/instances

    Here operatorUrl is the operator URL, for example vcdc-operator-prod-us-west-2.vdp.vmware.com.

Results

The response creates a VMware Cloud Director instance in the environment that you specified.

Example: Create a VMware Cloud Director Instance

This example creates a VMware Cloud Director instance in the environment with ID (URN) urn:vcdc:environment:00000000-0000-0000-0000-000000000000.
POST https://vcdc-operator-prod-us-west-2.vdp.vmware.com/environment/urn:vcdc:environment:00000000-0000-0000-0000-000000000000/instances

Enter the required information in the POST request.

{"name": "VMware-Cloud-Director-test",
"upgradeCategory": "sp-release:production",
"environmentId": "urn:vcdc:environment:00000000-0000-0000-0000-000000000000",
"password": "testPa$$w0rd",
"instanceParams": {
	}
}
Use the bearer token in the Authorization header of the request.
Authorization: 
Bearer eyJh…I1NiIs

The response returns the following information about the newly created VMware Cloud Director instance.

{
  "id": "urn:vcdc:task:22222222-2222-2222-2222-22222222222",
  "name": "Creating instance VMware-Cloud-Director-test",
  "entityId": "urn:vcdc:vcdInstance:33333333-3333-3333-3333-33333333333",
  "entityName": "VMware-Cloud-Director-test",
  "ownerId": "urn:vcdc:organization:12345678-1234-1234-1234-123456789abc",
  "userId": "[email protected]",
  "steps": null,
  "status": "IN_PROGRESS",
  "startTime": null,
  "endTime": null,
  "queuedTime": "2020-06-09T12:52:03.311063Z",
  "message": "Instance creation starting",
  "output": {}
}