Assigning Instances
Function
Before calling this API, ensure that the tenant has purchased an instance. This API is used to assign a cloud phone to a user specified by the tenant. The user ID needs to be specified.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
koophone:cloudphoneResource:instanceAssign
Write
cloudphoneResource *
-
-
-
URI
POST /v1/instances/assign
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
x-request-id |
Yes |
String |
Unique ID of a request. |
|
X-Auth-Token |
Yes |
String |
Tenant-level token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
user_instances |
Yes |
Array of user_instances objects |
User instance binding relationship list. The list can contain a maximum of 100 columns. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
0: successful. KOOPHONE.API.0000: The tenant does not exist. KOOPHONE.API.1000: The request parameter is incorrect. KOOPHONE.API.1001: Insufficient instance permissions. KPAPI.2209: No device can be assigned. KOOPHONE.API.9999: Internal service error. |
|
error_msg |
String |
Error description. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
0: successful. KOOPHONE.API.0000: The tenant does not exist. KOOPHONE.API.1000: The request parameter is incorrect. KOOPHONE.API.1001: Insufficient instance permissions. KPAPI.2209: No device can be assigned. KOOPHONE.API.9999: Internal service error. |
|
error_msg |
String |
Error description. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
0: successful. KOOPHONE.API.0000: The tenant does not exist. KOOPHONE.API.1000: The request parameter is incorrect. KOOPHONE.API.1001: Insufficient instance permissions. KPAPI.2209: No device can be assigned. KOOPHONE.API.9999: Internal service error. |
|
error_msg |
String |
Error description. |
Example Requests
/instances/assign
{
"user_instances" : [ {
"instance_id" : "a44uhlf7",
"user_id" : "1123422"
} ]
}
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Normal response. |
|
400 |
Request error. |
|
500 |
Internal error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot