All Products
Search
Document Center

Elastic Desktop Service:CreatePolicyGroup

Last Updated:Mar 13, 2025

Creates a cloud computer policy.

Operation description

A cloud computer policy is a collection of rules to manage cloud computers in performance and security. For example, you can create a basic policy that involves the disk mapping, USB redirection, watermarking features and rules such as DNS rules. For more information, see Policy overview.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecd:CreatePolicyGroupcreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID. You can call the DescribeRegions operation to query the regions supported by Elastic Desktop Service (EDS).

cn-hangzhou
ClipboardstringNo

The permissions on the clipboard.

Valid values:

  • read: specifies one-way transfer. You can copy files only from local devices to cloud computers.
  • readwrite: specifies two-way transfer. You can copy files between local devices and cloud computers.
  • write: specifies one-way transfer. You can only copy files from cloud computers to local devices.
  • off (default): disables both one-way and two-way transfer. Files cannot be copied between local devices and cloud computers.
off
LocalDrivestringNo

The permissions on local disk mapping.

Valid values:

  • read: read-only. Local disk mapping is available on cloud computers. However, you can only read (copy) local files but cannot modify the files.
  • readwrite: read and write. Local disk mapping is available on cloud computers. You can read (copy) and write (modify) local files.
  • off (default): disabled. Local disk mapping is unavailable on cloud computers.
off
UsbRedirectstringNo

Specifies whether to enable USB redirection.

Valid values:

  • off: USB redirection is disabled. This value is the default value.

  • on: USB redirection is enabled.

off
VisualQualitystringNo

The policy for image display quality.

Valid values:

  • high

  • low

  • lossless

  • medium: adaptive. This value is the default value.

medium
Html5AccessstringNo

Specifies whether to allow web client access.

Note We recommend that you use the ClientType-related parameters to control the Alibaba Cloud Workspace client type for cloud computer logon.``

Valid values:

  • off (default)
  • on
off
Html5FileTransferstringNo

The file transfer feature on the web client.

Valid values:

  • all: Files can be uploaded and downloaded between local computers and the web client.
  • download: Files on the web client can be downloaded to local computers.
  • upload: Files on local computers can be uploaded to the web client.
  • off (default): Files cannot be transferred between the web client and local computers.
off
WatermarkstringNo

The watermarking feature.

Valid values:

  • blind: Invisible watermarks are applied.
  • off (default): The watermarking feature is disabled.
  • on: Visible watermarks are applied.
off
NamestringNo

The name of the policy.

testPolicyGroupName
WatermarkTypestringNo

The watermark content. You can select up to three items as the watermark content. Separate multiple items with commas (,).

Note If you set this parameter to Custom, specify WatermarkCustomText

Valid values:

  • EndUserId: the username.
  • Custom: the custom text.
  • DesktopIp: the IP address of the cloud computer.
  • ClientIp: the IP address of the Alibaba Cloud Workspace client.
  • HostName: the rightmost 15 digits of the cloud computer ID.
  • ClientTime: the current time displayed on the cloud computer.
EndUserId
WatermarkTransparencystringNo

The transparency of the watermark.

Valid values:

  • LIGHT

  • DARK

  • MIDDLE

LIGHT
PreemptLoginstringNo

The cloud computer preemption feature.

Note To ensure user experience and data security, when a cloud computer is used by an end user, other end users cannot connect to the cloud computer. By default, this parameter is set to off, which cannot be modified.

Valid values:

  • off (default): Multiple end users cannot connect to the same cloud computer at the same time.
off
DomainListstringNo

Specifies whether the access control for domain names is enabled. Domain names support wildcards (*). Separate multiple domain names with commas (,).

Valid values:

  • off
  • on
off
PrinterRedirectionstringNo

The policy for printer redirection.

Valid values:

  • off: Printer redirection is disabled.

  • on: Printer redirection is enabled.

on
PreemptLoginUserarrayNo

The usernames that are allowed to connect to the cloud computer in use. You can specify up to five usernames.

Note To ensure user experience and data security, other end users cannot connect to the cloud computer that is used by an end user.
stringNo

The username that can preempt to connect to the cloud computer in use.

Alice
AuthorizeSecurityPolicyRulearray<object>No

The security group rules.

objectNo

The security group rule.

TypestringNo

The direction of the security group rule.

Valid values:

  • outflow: outbound.
  • inflow: inbound.
inflow
PolicystringNo

The authorization of the security group rule.

Valid values:

  • drop: denies all access requests. If no messages of access denied are returned, the requests timed out or failed.
  • accept (default): accepts all requests.
accept
PortRangestringNo

The port range of the security group rule. The value range of this parameter varies based on the value of the IpProtocol parameter.

  • If the IpProtocol parameter is set to TCP or UDP, the port range is 1 to 65535. Separate the start port number and the end port number with a forward slash (/). Example: 1/200.
  • If the IpProtocol parameter is set to ICMP, set the value to -1/-1.
  • If the IpProtocol parameter is set to GRE, set the value to -1/-1.
  • If the IpProtocol parameter is set to ALL, set the value to -1/-1.

For more information about the common ports applied in EDS, see Common ports.

22/22
DescriptionstringNo

The description of the security group rule.

test
IpProtocolstringNo

The protocol type of the security group rule.

Valid values:

  • TCP: the Transmission Control Protocol (TCP) protocol.
  • UDP: the User Datagram Protocol (UDP) protocol.
  • ALL: all protocols.
  • GRE: the Generic Routing Encapsulation (GRE) protocol.
  • ICMP: the Internet Control Message Protocol (ICMP) for IPv4.
tcp
PrioritystringNo

The priority of the security group rule. A smaller value indicates a higher priority.
Valid values: 1 to 60.
Default value: 1.

1
CidrIpstringNo

The object to which the security group rule applies. The value is an IPv4 CIDR block.

47.100.XX.XX/16
AuthorizeAccessPolicyRulearray<object>No

The client IP address whitelist. After you configure the whitelist, end users can access cloud computers only from the IP addresses in the whitelist.

objectNo

The client IP address that you want to add to the whitelist.

DescriptionstringNo

The description of the client IP address whitelist.

North China Branch
CidrIpstringNo

The client CIDR block from which end users can connect to cloud computers. The value is an IPv4 CIDR block.

47.100.XX.XX/16
ClientTypearray<object>No

The logon method control rules to limit the type of the Alibaba Cloud Workspace client used by end users to connect to cloud computers.

objectNo

The logon method control rule.

StatusstringNo

Specifies whether to allow end users to use a specific type of the client to connect to cloud computers.

Note If you do not specify the ClientType parameter, all types of the client are allowed by default.

Valid values:

  • OFF
  • ON
ON
ClientTypestringNo

The type of the Alibaba Cloud Workspace client.

Note If you do not specify the ClientType parameter, all types of the client are allowed by default.

Valid values:

  • html5: web client
  • android: Android client
  • ios: iOS client
  • windows: Windows client
  • macos: macOS client
windows
GpuAccelerationstringNo

Specifies whether to enable the Image Quality Control feature. If you have high requirements on the performance and user experience in scenarios such as professional design, we recommend that you enable this feature.

Valid values:

  • off
  • on
off
UsbSupplyRedirectRulearray<object>No

The USB redirection rules.

objectNo

The USB redirection rule.

VendorIdstringNo

The ID of the vendor. For more information, see Valid USB Vendor IDs (VIDs).

04**
ProductIdstringNo

The ID of the service.

08**
DescriptionstringNo

The description of the rule.

Test rule
UsbRedirectTypelongNo

The type of USB redirection.

Valid values:

  • 1: allows USB redirection

  • 2: forbids USB redirection

1
DeviceClassstringNo

The class of the device. If you set the usbRuleType parameter to 1, you must specify this parameter. For more information, see Defined Class Codes.

0Eh
DeviceSubclassstringNo

The subclass of the device. If you set the usbRuleType parameter to 1, you must specify this parameter. For more information, see Defined Class Codes.

xxh
UsbRuleTypelongNo

The type of the USB redirection rule.

Valid values:

  • 1: by device class

  • 2: by device vendor

1
DomainResolveRuleTypestringNo

The type of the domain name resolution policy.

Valid values:

  • OFF

  • ON

OFF
DomainResolveRulearray<object>No

The details of the domain name resolution rule.

objectNo

The domain name resolution rule.

DomainstringNo

The domain name.

*.baidu.com
PolicystringNo

Specifies whether to allow the domain name resolution rule.

Valid values:

  • allow: allows the rule.
  • block: denies the rule.
allow
DescriptionstringNo

The description of domain name resolution rule.

system policy
RecordingstringNo

Specifies whether to enable the screen recording feature.

Valid values:

  • byaction_cmd_ft: enables the operation-triggered screen recording upon command execution and file transfer.
  • ALLTIME: enables the whole-process screen recording. That is, the recording starts when cloud computers are connected and ends when the cloud computers are disconnected.
  • session: enables the screen recording for session lifecycle listening.
  • PERIOD: enables the interval-based screen recording. You must specify an interval between the start time and end time of this type of recording.
  • byaction_commands: enables the operation-triggered screen recording upon command execution.
  • OFF: disables the screen recording feature.
  • byaction_file_transfer: enables the operation-triggered screen recording upon file transfer.
OFF
RecordingStartTimestringNo

The time when the screen recording starts. The value is in the HH:MM:SS format. The value is meaningful only when you set the Recording parameter to PERIOD.

08:00:00
RecordingEndTimestringNo

The time when the screen recording ends. The value is in the HH:MM:SS format. The value is meaningful only when you set the Recording parameter to PERIOD.

08:59:00
RecordingFpslongNo

The frame rate of screen recording. Unit: fps.

Valid values:

  • 2
  • 5
  • 10
  • 15
2
RecordingExpireslongNo

The retention period of the screen recording file. Valid values: 1 to 180. Unit: days.

15
CameraRedirectstringNo

Specifies whether to enable the webcam redirection feature.

Valid values:

  • off: Webcam redirection is disabled.

  • on: Webcam redirection is enabled. This value is the default value.

on
NetRedirectstringNo

Specifies whether to enable the network redirection feature.

Note This feature is in invitational preview and is not available to the public.

Valid values:

  • off (default): The network redirection feature is disabled.

  • on: The network redirection feature is enabled.

off
AppContentProtectionstringNo

Specifies whether to enable the anti-screenshot feature.

Valid values:

  • off: Anti-screenshot is disabled. This value is the default value.

  • on: Anti-screenshot is enabled.

off
RecordContentstringNo

Specifies whether to enable the custom screen recording feature.

Valid values:

  • off: Custom screen recording is disabled. This value is the default value.

  • on: Custom screen recording is enabled.

OFF
RecordContentExpireslongNo

The duration in which the custom screen recording is valid. Default value: 30. Unit: days.

30
RemoteCoordinatestringNo

The permission to control the keyboard and the mouse during remote assistance.

Valid values:

  • optionalControl: By default, this feature is disabled. You can enable it by applying permissions.

  • fullControl: The permission is granted.

  • disableControl: The permission is revoked.

fullControl
RecordingDurationintegerNo

The file length of the screen recording. Unit: minutes. Screen recording files are split based on the specified file length and uploaded to Object Storage Service (OSS) buckets. When a screen recording file reaches 300 MB in size, the system preferentially performs rolling update for the file.

Valid values:

  • 10
  • 20
  • 30
  • 60
15
ScopestringNo

The effective scope of the policy.

Valid values:

  • IP: The policy takes effect based on the IP address.
  • GLOBAL: The policy takes effect globally.
GLOBAL
ScopeValuearrayNo

This parameter is required when the Scope parameter is set to IP.````

stringNo

The effective scope specified by a CIDR block.

47.100.XX.XX/24
RecordingAudiostringNo

Specifies whether to record audio files generated from cloud computers.

Valid values:

  • off: records only video files.
  • on: records video and audio files.
on
InternetCommunicationProtocolstringNo

The protocol for network communication.

Valid values:

  • TCP (default): TCP
  • BOTH: TCP and UDP
both
VideoRedirectstringNo

Specifies whether to enable the multimedia redirection switch.

Valid values:

  • off
  • on
on
WatermarkTransparencyValueintegerNo

The watermark opacity. A larger value indicates more opaque watermarks. Valid values: 10 to 100.

10
WatermarkColorintegerNo

The font color in red, green, and blue (RGB) of the watermark. Valid values: 0 to 16777215.

0
WatermarkDegreedoubleNo

The watermark rotation. Valid values: -10 to -30.

-10
WatermarkFontSizeintegerNo

The watermark font size. Valid values: 10 to 20.

10
WatermarkFontStylestringNo

The watermark font style.

Valid values:

  • plain
  • bold
plain
WatermarkRowAmountintegerNo

The number of watermark rows.

Note This parameter is not available for public use.
5
EndUserApplyAdminCoordinatestringNo

Specifies whether to turn on the Contact Administrator for Help switch.

Valid values:

  • OFF
  • ON
ON
EndUserGroupCoordinatestringNo

Specifies whether to turn on the User Stream Collaboration switch.

Valid values:

  • OFF
  • ON
ON
WatermarkSecuritystringNo

Specifies whether to enable the security priority feature for invisible watermarks.

Valid values:

  • off
  • on
on
AdminAccessstringNo

Specifies whether end users have the administrator permissions.

Note This parameter is in invitational preview for specific users and not available to the public.
deny
WatermarkAntiCamstringNo

Specifies whether to enable the anti-screen photo feature for invisible watermarks.

Valid values:

  • off
  • on
off
WatermarkPowerstringNo

The watermark enhancement feature.

Valid values:

  • high
  • low
  • medium
medium
RecordingUserNotifystringNo

Specifies whether to enable the screen recording notification feature after end users log on to the Alibaba Cloud Workspace client.

Valid values:

  • off
  • on
off
RecordingUserNotifyMessagestringNo

The notification content of screen recording. By default, this parameter is left empty.

Your desktop is being recorded.
MaxReconnectTimeintegerNo

The maximum retry period for reconnecting to cloud computers when the cloud computers are disconnected due to none-human reasons. Valid values: 30 to 7200. Unit: seconds.

120
DeviceRedirectsarray<object>No

The device redirection rules.

objectNo

The device redirection rule.

DeviceTypestringNo

The peripheral type.

Valid values:

  • printer
  • scanner
  • camera
  • adb: the Android Debug Bridge (ADB) device.
camera
RedirectTypestringNo

The redirection type.

Valid values:

  • deviceRedirect: device redirection
  • usbRedirect: USB redirection
  • off: redirection disabled
deviceRedirect
DeviceRulesarray<object>No

The custom peripheral rules.

objectNo

The custom peripheral rule.

DeviceTypestringNo

The peripheral type.

Valid values:

  • usbKey
  • other
  • graphicsTablet
  • printer
  • cardReader
  • scanner
  • storage
  • camera
  • adb
  • networkInterfaceCard: the NIC device.
Enumeration Value:
  • usbKey: UKey.
  • other: .
  • graphicsTablet: .
  • printer: .
  • cardReader: .
  • scanner: .
  • storage: .
  • camera: .
  • adb: .
  • networkInterfaceCard: .
storage
DeviceNamestringNo

The device name.

sandisk
DeviceVidstringNo

The vendor ID (VID). For more information, see Valid USB VIDs.

0x0781
DevicePidstringNo

The product ID.

0x55b1
RedirectTypestringNo

The redirection type.

Valid values:

  • deviceRedirect: device redirection
  • usbRedirect: USB redirection
  • off: redirection disabled
usbRedirect
OptCommandstringNo

The link optimization command.

2:0
WyAssistantstringNo

Specifies whether to provide the AI Assistant function in the DesktopAssistant when the cloud computer is accessed from the Alibaba Cloud Workspace desktop clients (including the Windows client and the macOS client).

Note Desktop clients of V7.7 and higher versions required.

Valid values:

  • off: the AI Aisstant function is not provided.
  • on: the AI Aisstant function is provided.
on

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

PolicyGroupIdstring

The cloud computer policy ID.

pg-gx2x1dhsmthe9****
RequestIdstring

The ID of the request.

1CBAFFAB-B697-4049-A9B1-67E1FC5F****

Examples

Sample success responses

JSONformat

{
  "PolicyGroupId": "pg-gx2x1dhsmthe9****",
  "RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-02-14The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-08-15The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-08-05The request parameters of the API has changedView Change Details
2024-07-19The request parameters of the API has changedView Change Details
2024-07-01The request parameters of the API has changedView Change Details
2024-01-26The request parameters of the API has changedView Change Details
2024-01-05The request parameters of the API has changedView Change Details
2023-09-20The request parameters of the API has changedView Change Details
2023-07-31The request parameters of the API has changedView Change Details
2022-11-04The request parameters of the API has changedView Change Details
2022-10-08The request parameters of the API has changedView Change Details
2022-01-11The request parameters of the API has changedView Change Details
2021-11-30The request parameters of the API has changedView Change Details