You can call this operation to change the policies configured for cloud desktops.

Description

The cloud desktop must be in the Running (Running) state.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyDesktopsPolicyGroup

The operation that you want to perform. Set the value to ModifyDesktopsPolicyGroup.

DesktopId.N RepeatList Yes ecd-ia2zw38bi6cm7****

The ID of cloud desktop N whose policy you want to change. You can specify one or more desktop IDs. The value is a JSON array.

PolicyGroupId String Yes pg-gx2x1dhsmthe9****

The ID of the policy.

RegionId String Yes cn-hangzhou

The region ID of the cloud desktop.

Response parameters

Parameter Type Example Description
ModifyResults Array of ModifyResult

The change results.

Code String success

The change result. A value of success indicates that the policy is changed. If the policy is not changed, an error message is returned.

DesktopId String ecd-7w78ozhjcwa3u****

The ID of the cloud desktop.

Message String The specified param DesktopId ecd-ia2zw38bi6cm7**** is not found.

The error message. This parameter is empty if the Code value is success.

RequestId String D3A17B8E-066B-421F-87DC-0B6451D89751

The ID of the request.

Examples

Sample requests

https://ecd.cn-hangzhou.aliyuncs.com/?Action=ModifyDesktopsPolicyGroup
&DesktopId.1=ecd-ia2zw38bi6cm7****
&PolicyGroupId=pg-gx2x1dhsmthe9****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<ModifyDesktopsPolicyGroupResponse>
      <RequestId>D3A17B8E-066B-421F-87DC-0B6451D89751</RequestId>
      <ModifyResults>
            <DesktopId>ecd-7w78ozhjcwa3u****</DesktopId>
            <Code>success</Code>
      </ModifyResults>
</ModifyDesktopsPolicyGroupResponse>

JSON format

{
	"RequestId": "D3A17B8E-066B-421F-87DC-0B6451D89751",
	"ModifyResults": [{
		"DesktopId": "ecd-7w78ozhjcwa3u****",
		"Code": "success"
	}]
}

Error codes

For a list of error codes, visit the API Error Center.