2.0

Creating a Resource Bundle
Use this call to create a resource bundle.
The call in this example uses an iterative process that is common in REST APIs, where you make a call to
retrieve data that you will need in the next call.
The first call retrieves data about the resource pools.
GET https://example.aurora.com\
/datadirector/api\
/resourcepools?forsysrb=false
The second call retrieves network information.
GET https://example.aurora.com\
/datadirector/api/resourcepool\
/null:ResourcePool:resgroup-9680\
/networks
The third call retrieves information about the base DB template.
GET https://example.aurora.com\
/datadirector/api/basedbtemplates
From this response, we learn that the template ID is 5.
The final call in the sequence contains a 'payload' of data that you submit to a web service, using information
obtained from our previous calls. This is often included as application code in an application such as Python
or JavaScript.
POST https://example.aurora.com\
/datadirector/api/resourcebundles
{
"networkSetting": {
"instance": [{
"networkRefId": "null:Network:network-1464",
"ipAllocType": "DHCP"
}]
},
"dataDataStoreRefId": "null:Datastore:datastore-3803",
"name": "AuroraRB",
"minStorageAlpha": 1.0,
"dataStorageSize": 100000,
"backupDataStoreRefId": "null:Datastore:datastore-3803",
"baseDbTemplateId": {
"instance": [{
"templateId": 5
}]
},
"resourcePoolRefId": "null:ResourcePool:resgroup-9673",
"backupStorageSize": 100000
}
The following is an example of the corresponding response.
202 Accepted
location: https://example.aurora.com\
/datadirector/api/task/57
Chapter 4 Hello vFabric Data Director: a Simplified RESTful Workflow
VMware, Inc. 19