A policy is a set of rules that governs API key behavior. You can create custom policies and bind them to API keys.
Create a policy
-
Log on to the AgentBay console.
-
In the left-side navigation pane, click Policy Management.
-
On the Policy Management page, click Create Policy.

-
On the Policy Management page, configure the following parameters and click Confirm.
Parameter
Description
Basic Information
Policy Name
Custom policy name. Maximum: 128 characters.
Connection Settings
Release Inactive Desktop
If enabled, automatically releases an inactive desktop when both the MCP and user interaction idle timeouts are reached.
Release Desktop after MCP Interaction Terminates
Minutes to wait before releasing the desktop after MCP interaction stops. Valid values: 1 to 1000.
NoteThe desktop is released only when both the MCP and user interaction idle timeouts are reached.
Release Desktop after User Interaction Terminates
Minutes to wait before releasing the desktop after user interaction stops. Valid values: 3 to 1000.
NoteThe desktop is released only when both the MCP and user interaction idle timeouts are reached.
Max Runtime for a Single Session
Maximum runtime for a single desktop session, in minutes. Valid values: 1 to 1000.
Auto-creation Settings
Max. Cloud Desktops in Pool
Maximum number of cloud desktops in the pool.
NoteWhen the number of auto-created desktops reaches this limit, no more are created. Trial accounts are limited to 10.
Modify a policy
Modify existing policies to update their settings.
-
On the Policy Management page, find the target policy and click Modify Policy in the Actions column.
-
On the Modify Policy page, update the parameters as needed and click Confirm.
NoteDefault system policies cannot be modified.
View associated API KEYs
View API keys associated with a policy by using either of the following methods:
Method 1:
-
On the Policy Management page, find the target policy and click Associated API Key in the Actions column.
-
In the dialog box, view the API Key Name and API Key Value.
Method 2:
-
On the Policy Management page, click the policy ID of the target policy.
-
On the Policy Details page, view the associated API KEYs.
Delete a policy
Delete policies that you no longer need.
-
On the Policy Management page, find the target policy and click Delete in the Actions column.
-
In the dialog box, click OK.
ImportantDefault system policies or policies bound to an API key cannot be deleted.