Cloud Desktop API, REST: Desktop.Create
Creates desktop in the specified folder.
HTTP request
POST https://cloud-desktop.api.cloud.yandex.net/cloud-desktop/v1/desktops
Body parameters
{
"desktopGroupId": "string",
"users": [
{
"subjectId": "string",
"subjectType": "string"
}
]
}
Field |
Description |
desktopGroupId |
string Required field. ID of the desktop group. |
users[] |
List of users. |
User
Field |
Description |
subjectId |
string Required field. Identity of the access binding. |
subjectType |
string Required field. Type of the access binding, e.g. userAccount, serviceAccount, system. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": "boolean",
"metadata": {
"desktopId": "string"
},
// Includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": {
"id": "string",
"folderId": "string",
"desktopGroupId": "string",
"createdAt": "string",
"status": "string",
"name": "string",
"resources": {
"memory": "string",
"cores": "string",
"coreFraction": "string"
},
"networkInterfaces": [
{
"networkId": "string",
"subnetId": "string"
}
],
"users": [
{
"subjectId": "string",
"subjectType": "string"
}
]
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field |
Description |
id |
string ID of the operation. |
description |
string Description of the operation. 0-256 characters long. |
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
createdBy |
string ID of the user or service account who initiated the operation. |
modifiedAt |
string (date-time) The time when the Operation resource was last modified. String in RFC3339 To work with values in this field, use the APIs described in the |
done |
boolean If the value is |
metadata |
Service-specific metadata associated with the operation. |
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
CreateDesktopMetadata
Field |
Description |
desktopId |
string ID of the desktop that is being created. |
Status
The error result of the operation in case of failure or cancellation.
Field |
Description |
code |
integer (int32) Error code. An enum value of google.rpc.Code |
message |
string An error message. |
details[] |
object A list of messages that carry the error details. |
Desktop
A desktop resource.
Field |
Description |
id |
string Desktop ID. |
folderId |
string ID of the folder that the desktop belongs to. |
desktopGroupId |
string ID of the desktop group that the desktop belongs to. |
createdAt |
string (date-time) Creation timestamp in RFC3339 String in RFC3339 To work with values in this field, use the APIs described in the |
status |
enum (Status) Status of the desktop.
|
name |
string Name of the desktop. |
resources |
Resources of the desktop. |
networkInterfaces[] |
|
users[] |
Resources
Field |
Description |
memory |
string (int64) |
cores |
string (int64) |
coreFraction |
string (int64) |
NetworkInterface
Field |
Description |
networkId |
string Required field. |
subnetId |
string Required field. |
User
Field |
Description |
subjectId |
string Required field. Identity of the access binding. |
subjectType |
string Required field. Type of the access binding, e.g. userAccount, serviceAccount, system. |