I'm trying to automate the addition of VCC tenants via the Enterprise Manager API. I've successfully managed being able to pull out the information necessary to add in the tenant connected to the existing vCD Organization; however, when I POST the XML to the API, I'm getting an unexpected error:
Message="Backup server id cannot be empty." StatusCode="400" Status="BadRequest"
I have received this message before, but I actually didn't have the <BackupServerUid> field being properly filled in. I've since fixed that, but I'm getting the same error from the API.
I'm POSTing the following XML body to the /api/cloud/tenants page of the Enterprise Manager with the correct session cookie and Content-Type: application/xml in the headers:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<CreateCloudTenantSpec xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Name>Tenant Name</Name>
<Description>Created by VCC Automated Deployment Script.</Description>
<Password>StrongPassword1234</Password>
<Enabled>true</Enabled>
<LeaseOptions Enabled="false" />
<Resources>
<BackupResource>
<Name>Tenant-Name-repo</Name>
<RepositoryUid>urn:veeam:Repository:xxxx</RepositoryUid>
<QuotaMb>100</QuotaMb>
</BackupResource>
</Resources>
<BackupServerUid>urn:veeam:BackupServer:xxxx</BackupServerUid>
<MaxConcurrentTasks>4</MaxConcurrentTasks>
<TenantType>vCD</TenantType>
<OrganizationRef>urn:vCloud:Organization:xxxx.urn:vcloud:org:xxxx</OrganizationRef>
<VCloudComputeResources>
<VCloudComputeResource>
<VirtualDataCenterRef>urn:vCloud:OrgVdc:xxxx.urn:vcloud:xxxx</VirtualDataCenterRef>
<Enabled>true</Enabled>
<AllocationModel>AllocationPool</AllocationModel>
<UseNetworkFailoverResources>false</UseNetworkFailoverResources>
</VCloudComputeResource>
</VCloudComputeResources>
</CreateCloudTenantSpec>
Am I misunderstanding the error message? Is there another field I'm missing?
Thanks!
-- Rob