建立租戶
產品版本:10.11
最後修改日期:2024年7月31日
建立或編輯租戶。
NAKIVO Backup & Replication 必須以多租戶模式運作。請參閱《使用者指南》中的「多租戶模式」章節。
終點
https://<Director_IP_address>:4443/c/router
請求範例
curl --request POST \
--url https://<Director_IP_address>:4443/c/router \
--header "content-type: application/json" \
--cookie cookies.txt \
--data '{
"action":"MultitenancyManagement",
"method":"save",
"data":[
{
"sessionUuid":null,
"tenantInfoDto":{
"tenant":{
"id":null,
"name":"test name",
"allocatedPhysicalServers":0,
"allocatedPhysicalWorkstations":1,
"allocatedOffice365Users":1,
"allocatedOracleDatabases":0,
"allocatedBackupStorage":0,
"usedBackupStorage":0,
"email":"email@email.com",
"phone":"12345",
"website":"www.nakivo.com",
"address":"Some address",
"allocated":3,
"allocatedEc2Instances":0,
"showName":true,
"labels":[
]
},
"tenantInventory":{
"itemObjectList":[
],
"nodes":{
"VMWARE":[
],
"HYPERV":[
],
"PHYSICAL":[
]
}
},
"users":[
{
"id":null,
"username":"user1",
"name":"User 1",
"userType":"NORMAL",
"generatePassword":false,
"password":"1",
"email":"user1@local.com",
"description":"Description for user 1",
"roleId":6,
"action":"ADD_LOCAL"},
{
"id":null,
"username":"user2",
"name":"User 2",
"userType":"NORMAL",
"generatePassword":false,
"password":"123",
"roleId":5,
"action":"ADD_LOCAL"}
],
"transporters":[],
"repositories":[]
}
}
],
"type":"rpc",
"tid":1}'
請求欄位
|
領域
|
類型
|
值(們)
|
Description |
|---|---|---|---|
|
|
字串 |
|
所呼叫的動作 |
|
|
字串 |
|
被呼叫的方法 |
|
|
陣列 |
|
參數。請參閱 |
|
|
字串 |
|
通訊協定類型 |
|
|
整數 |
|
交易編號。用於讓客戶端和伺服器雙方識別該請求 |
資料
|
領域
|
類型
|
Description
|
|---|---|---|
|
|
字串 | 一個透過偽隨機演算法生成的值,用於區分不同的工作階段。此唯一值用於設定租戶影像建立工作階段;該值可以為 null。詳情請參閱「建立會話」 |
|
|
陣列 |
有關租戶的資料 |
|
|
陣列 |
租戶將獲救。請參閱下方的租戶表 |
租戶
|
領域
|
類型
|
Description
|
|---|---|---|
|
|
整數 |
租戶的身份識別碼。若建立新的租戶,此欄位必須為空 |
|
|
字串 |
租戶姓名 |
|
|
int |
將分配給租戶的實體伺服器授權數量 |
|
|
int |
將分配給租戶的實體工作站授權數量 |
|
|
int |
將分配給租戶的 Microsoft Office 365 授權數量 |
|
|
int |
將分配給租戶的 Oracle 資料庫 授權數量 |
|
|
int |
分配給租戶的備份儲存空間容量 |
|
|
int |
租戶所佔用的備份儲存空間容量 |
|
|
字串 |
租戶的聯絡email地址 |
|
|
字串 |
租戶的聯絡電話號碼 |
|
|
字串 |
租戶的網址 |
|
|
字串 |
租戶的地址 |
|
|
int |
將分配給租戶的授權——機器或插槽 |
|
|
int |
將分配給租戶的授權——EC2 執行個體 |
|
|
布林值 |
若顯示租戶名稱,則為 true。否則為 false |
|
|
陣列 |
租戶的標籤 |
租戶清單
|
領域
|
類型
|
Description
|
|---|---|---|
|
itemObjectList |
|
|
|
節點 |
|
|
|
VMWARE |
|
|
|
HYPERV |
|
|
|
體能 |
|
|
使用者
|
領域 |
類型 |
Description |
|---|---|---|
|
|
整數 |
使用者的 ID。 Null 是一位新用戶。 |
|
|
字串 |
使用者的使用者名稱 |
|
|
字串 |
使用者名稱 |
|
|
字串 |
使用者類型 僅接受「NORMAL」 |
|
|
布林值 |
True 會生成密碼,並透過 email 發送給使用者 |
|
|
字串 |
要為新使用者設定的密碼。若 ‘generatePassword’ = true,則可為 null |
|
|
字串 |
租戶的email地址 若 generatePassword = true,則此欄位為必填 |
|
|
字串 |
使用者說明。 |
|
|
字串 |
指派給租戶的角色 ID |
|
|
字串 |
可能的值:「ADD_LOCAL」 |
回應範例
{
"action": "MultitenancyManagement",
"method": "save",
"tid": "1",
"type": "rpc",
"message": null,
"where": null,
"cause": null,
"data": 1
}
注意!!!
已建立的租戶 ID 為 1。
回應欄位
|
領域
|
價值
|
Description
|
|---|---|---|
|
|
字串 | 若請求失敗,請顯示此訊息 |
|
|
字串 | 關於發生問題的方法的說明 |
|
|
字串 | 故障原因 |
|
|
整數 | 已建立或已編輯的租戶的 ID |