Create a Desktop Policy

Create a Desktop Policy

Format

Method

POST

URL

/tasks/create

Request content

DesktopPolicyCreate Object

Successful answer

TaskResult Object

Unexpected error

HTTP 500

DesktopPolicyCreate Object

Schema

type

String

Task type identifier. In this case, "dpolicy_create"

desktop_policy_id

String

Unique identifier of the Desktop Policy

pool_id

String

Unique identifier of the Pool where clones of this Desktop Policy will be created

template_id

String

Unique identifier of the template from which clones of this Desktop Policy will be created

desktop_protocol

String

Currently, only "vdi" is supported

sysprep_name

String

Name of the Sysprep answer file to inject in the clones created by this Desktop Policy

windows_domain

String

Domain name to use in the Sysprep answer file and SSO plugin

image_storage_id

String

Unique identifier of the Image Storage that contains Volume volume_id

volume_id

String

Unique identifier of the Volume where clone images will be stored. If empty, local storage is used, in /var/lib/flexvdi/volatile

precreation_guest_number

Integer

Number of precreated clones

precreation_disable_at

Integer

Number of maximum desktops to precreate

enable_usb_redir

String

Flag to allow USB redirection in new clones. One of "true" or "false"

enable_copy_paste_h2g

String

Flag to allow copy and paste from client to guest

enable_copy_paste_g2h

String

Flag to allow copy and paste from guest to client

enable_power_actions

String

Flag to allow power actions (reset, shutdown and power off) from the client

enable_printing

String

Flag to allow using the FollowMe Printing feature

enable_audio_playback

String

Flag to allow audio playback (from guest to client)

enable_audio_record

String

Flag to allow audio record (from client to guest)

enable_video_streaming

String

Flag to enable playing video

enable_multiple_clients

String

Flag to enable connecting multiple clients to the same desktop session

inactivity_timeout

Integer

Time (in seconds) of inactivity before disconnecting the client

first_operation_what

String

Name of the operation to perform on a clone after first_operation_when minutes since the user disconnected. One of "none", "stop", "shutdown", "pause", "suspend" or "destroy"

first_operation_when

Integer

Minutes since the user disconnected before performing action first_operation_what

second_operation_what

String

Name of second operation, see first_operation_what

second_operation_when

Integer

Minutes to second operation, see first_operation_when

third_operation_what

String

Name of third operation, see first_operation_what

third_operation_when

Integer

Minutes to third operation, see first_operation_when

copy_uuid

String

Obsolete. Leave as "false"

parameters

DesktopParameter Array

Since 3.0.3: List of parameter definition that are applied to the Guests of this Desktop Policy. If the "value" attribute is missing, the first value of the sequence is computed.

JSON example

{ "type": "dpolicy_create", "desktop_protocol": "vdi", "precreation_disable_at": 6, "first_operation_when": 10, "volume_id": "samsung_ssd", "third_operation_what": "none", "second_operation_what": "destroy", "image_storage_id": "internal", "sysprep_name": "legacy", "desktop_policy_id": "windows7_public", "copy_uuid": "false", "second_operation_when": 11, "windows_domain": "", "precreation_guest_number": 3, "third_operation_when": 0, "first_operation_what": "stop", "pool_id": "demo_public", "template_id": "windows7_020216", "enable_usb_redir":"false", "enable_copy_paste_h2g":"false", "enable_copy_paste_g2h":"false", "enable_power_actions":"false", "enable_printing":"false", "enable_audio_playback":"false", "enable_audio_record":"false", "enable_video_streaming":"false", "enable_multiple_clients":"false",  "inactivity_timeout": 0, "parameters": [{ "name": "ip_address", "pattern": "192.168.0.\\n{50,100}" }] }