Help Center
Choose product document...
Veeam Backup & Replication 9.5
RESTful API Reference

(PUT) /cloud/tenants/{ID}/subtenants/{ID}

Edits settings of a subtenant account with the specified ID.

Request

To edit settings of the subtenant account, you need to send the PUT HTTP request to the URL of the /cloud/tenants/{ID}/subtenants/{ID} resource.

HTTP Request

PUT http://<Enterprise-Manager>:9399/api/cloud/tenants/{ID}/subtenants/{ID}

Request Headers

The request contains the following headers:

Header

Required

Description

X-RestSvcSessionId

True

The request requires authorization. In the header, the client must send a session ID copied from the server reply to the request creating a new logon session. To learn more, see Authentication and Security.

Request Body

In the request body, the client must send parameters for the subtenant account whose settings must be updated. The body of the request must conform to the XML Schema Definition of Veeam Backup Enterprise Manager RESTful API.

The request body must contain the following elements:

Element

Type

Description

Modifiable

Min/Max Occurrence

Description

String

Description for the subtenant account.

Yes

0/1

Password

String

Password for the subtenant account.

Yes

0/1

Enabled

Boolean

Defines if the subtenant account must be in the enabled or disabled state.

Yes

0/1

RepositoryQuota

CloudSubtenantRepositoryQuotaInfoType

Parameters for the storage quota assigned to the subtenant account. To learn more, see Subtenant Quota Settings.

Yes

0/1

 

(PUT) /cloud/tenants/{ID}/subtenants/{ID} Note:

You cannot change the user name for the subtenant account.

For example:

<?xml version="1.0" encoding="utf-8"?>
<CloudSubtenant Href="http://localhost:9399/api/cloud/tenants/28ddf9b9-12fa-431a-a34c-a327f05c3920/subtenants/0eb0c130-d91a-4e05-9403-ac2ded0fc1ea" Type="CloudSubtenant" Id="0eb0c130-d91a-4e05-9403-ac2ded0fc1ea" 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>ABC Company User 01</Name>
 <Description>ABC Company PC User</Description>
 <Password/>
 <Enabled>true</Enabled>
 <RepositoryQuota Unlimited="true">
   <DisplayName>Cloud Vol User 01</DisplayName>
   <TenantResourceId>11c59670-23df-448c-a4b3-74c42669633e</TenantResourceId>
   <QuotaMb>10240</QuotaMb>
   <UsedQuotaMb>0</UsedQuotaMb>
 </RepositoryQuota>
</CloudSubtenant>

Subtenant Quota Settings

You can define the following parameters for the storage quota assigned to the subtenant account:

Element

Type

Description

Modifiable

Min/Max Occurrence

DisplayName

String

Friendly name of the storage quota assigned to the subtenant.

Yes

0/1

TenantResourceId

String

ID of the tenant storage quota on which the storage quota for the subtenant account must be created, for example: 11c59670-23df-448c-a4b3-74c42669633e.

Yes

0/1

QuotaMb

Int

Size of the storage quota assigned to the subtenant (in MB). Subtenant quota cannot be less than 1GB. Size of the subtenant quota must be defined if the False value is specified for the Unlimited attribute of the RepositoryQuota element.

Yes

1/1

 

(PUT) /cloud/tenants/{ID}/subtenants/{ID} Note:

To define whether the storage quota assigned to the subtenant must be unlimited or not, specify the necessary value for the Unlimited attribute of the RepositoryQuota element. Possible values:

  • True — the subtenant quota is not limited. The subtenant can use all storage space available within the tenant quota. The subtenant quota limit specified in the QuotaMb element is ignored.
  • False — the subtenant quota is limited. Size of the subtenant quota must be defined in the QuotaMb element.

For example:

<RepositoryQuota Unlimited="false">
 <DisplayName>Cloud Vol User 01</DisplayName>
 <TenantResourceId>11c59670-23df-448c-a4b3-74c42669633e</TenantResourceId>
 <QuotaMb>20480</QuotaMb>
 <UsedQuotaMb>0</UsedQuotaMb>
</RepositoryQuota>

Query Parameters

None.

Response

The server returns the following response to the client.

Response Codes

A successfully completed operation returns response code 202 Accepted.

Response Headers

The response to this request contains the following headers. The response may also include additional standard HTTP headers.

Header

Description

Content-length

The length of the response body.

Content-type

The media type and syntax of the request body message: application/xml.

Response Body

None.

Example

The example below updates the storage quota settings for the subtenant account with ID 0eb0c130-d91a-4e05-9403-ac2ded0fc1ea.

Request:

PUT http://localhost:9399/api/cloud/tenants/28ddf9b9-12fa-431a-a34c-a327f05c3920/subtenants/0eb0c130-d91a-4e05-9403-ac2ded0fc1ea

 

Request Header:

X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj

 

Request Body:

<?xml version="1.0" encoding="utf-8"?>
<CloudSubtenant Href="http://localhost:9399/api/cloud/tenants/28ddf9b9-12fa-431a-a34c-a327f05c3920/subtenants/0eb0c130-d91a-4e05-9403-ac2ded0fc1ea" Type="CloudSubtenant" Id="0eb0c130-d91a-4e05-9403-ac2ded0fc1ea" 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>ABC Company User 01</Name>
 <Description>ABC Company PC User</Description>
 <Password/>
 <Enabled>true</Enabled>
 <RepositoryQuota Unlimited="false">
   <DisplayName>Cloud Vol User 01</DisplayName>
   <TenantResourceId>11c59670-23df-448c-a4b3-74c42669633e</TenantResourceId>
   <QuotaMb>20480</QuotaMb>
   <UsedQuotaMb>0</UsedQuotaMb>
 </RepositoryQuota>
</CloudSubtenant>

 

Response:

202 Accepted

 

Response Body:

<Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="http://localhost:9399/api/tasks/task-1">
 <Links>
   <Link Rel="Delete" Type="Task" Href="http://localhost:9399/api/tasks/task-1" />
 </Links>
 <TaskId>task-1</TaskId>
 <State>Running</State>
 <Operation>EditCloudSubtenant</Operation>
</Task>

To trace the status of the operation, send the GET HTTP request to the URL of the received task resource:

Request:

GET http://localhost:9399/api/tasks/task-1

 

Request Header:

X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj

 

Response:

200 Success

 

Response Body:

<Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="http://localhost:9399/api/tasks/task-1">
 <Links>
   <Link Rel="Delete" Type="Task" Href="http://localhost:9399/api/tasks/task-1" />
 </Links>
 <TaskId>task-1</TaskId>
 <State>Finished</State>
 <Operation>EditCloudSubtenant</Operation>
 <Result Success="true">
   <Message>Ok</Message>
 </Result>
</Task>

 

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Backup Explorers User Guide

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide

Veeam Backup for Microsoft Office 365

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation