Manage policies

更新时间:
复制 MD 格式

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

  1. Log on to the AgentBay console.

  2. In the left-side navigation pane, click Policy Management.

  3. On the Policy Management page, click Create Policy.

    image

  4. 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.

    Note

    The 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.

    Note

    The 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.

    Note

    When 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.

  1. On the Policy Management page, find the target policy and click Modify Policy in the Actions column.

  2. On the Modify Policy page, update the parameters as needed and click Confirm.

    Note

    Default 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:

  1. On the Policy Management page, find the target policy and click Associated API Key in the Actions column.

  2. In the dialog box, view the API Key Name and API Key Value.

Method 2:

  1. On the Policy Management page, click the policy ID of the target policy.

  2. On the Policy Details page, view the associated API KEYs.

Delete a policy

Delete policies that you no longer need.

  1. On the Policy Management page, find the target policy and click Delete in the Actions column.

  2. In the dialog box, click OK.

    Important

    Default system policies or policies bound to an API key cannot be deleted.