Sandbox management

Updated at:

A sandbox is the task execution environment for DataWorks Data Agent. You do not need to understand underlying cloud resource concepts to run tasks in a sandbox. Administrators can manage sandbox costs and permissions through the sandbox management feature.

What is a sandbox

When Data Agent runs tasks, it needs an execution environment that can run code, read and write files, and access data sources. A sandbox encapsulates the underlying compute resources and runtime environment into an object that you can use directly: you do not need to understand cloud resource concepts such as VPCs or vSwitches, and can simply select a sandbox in your session to start working. Administrators can manage the costs and permissions of all sandboxes in the console.

Data Agent provides two types of sandboxes for different use cases:

  • Session sandbox: A temporary execution environment that is automatically created and released with the session. No manual operations are required. Currently, only the Data Integration, Data Governance, Data Quality, Operation Center, and Semantic Graph modules are supported.

  • Persistent sandbox: A long-lived execution environment for the main Data Agent. It supports custom configurations such as CU and network, and can be started and stopped repeatedly.

For details about the two sandbox types and related terms, see the core concepts below.

Core concepts

Term

Description

Sandbox

Encapsulates the underlying compute resources and runtime environment into an object that you can use directly. It is the object that you select in a session to execute tasks.

Session sandbox

A temporary sandbox used when a module enables Data Agent. The system creates it when a session starts and releases it when the session ends. Currently, only the Data Integration, Data Governance, Data Quality, Operation Center, and Semantic Graph modules are supported.

Persistent sandbox

A long-lived sandbox (including the default sandbox and user-created custom sandboxes). When creating a persistent sandbox, you can specify the CU allocation, VPC, and vSwitch, and start or stop it repeatedly. With idle auto-stop enabled, billing ceases while the sandbox is stopped, and the configuration and files are preserved when it restarts. Persistent sandboxes are designed for the main Data Agent.

Default sandbox

A persistent sandbox automatically created by the system when a user first enters Data Agent (default: 4 CUs, 30-minute idle timeout). It eliminates manual configuration for the first task. After creation, it behaves identically to a user-created persistent sandbox and can be modified or deleted.

CU

Compute Unit. The compute capacity and billing unit of a sandbox.

Idle auto-stop

Automatically stops the sandbox instance and ceases billing after a specified period of inactivity. The minimum value is 10 minutes. Set to 0 or leave blank to disable.

Create sandboxes

There are three ways to obtain a sandbox: session sandboxes are automatically created with your sessions; a default persistent sandbox is automatically created when you first enter the main Data Agent; and you can manually create a custom persistent sandbox if you need custom specifications.

Session sandbox (automatically created)

A session sandbox is automatically created when a module enables Data Agent, with no manual operations required: when you start a session under a module's Data Agent, the system automatically creates a session sandbox as the task execution environment; the sandbox is released when the session ends.

Important

Session sandboxes currently support only the Data Integration, Data Governance, Data Quality, Operation Center, and Semantic Graph modules.

Default persistent sandbox (automatically created)

Important

The persistent sandbox feature (both default and custom sandboxes) is currently available only in the China (Chengdu) region. Other regions will be opened gradually and announced separately.

When you enter Data Agent for the first time after enabling it, if no sandbox is available under your account, the system automatically creates a default persistent sandbox (default: 4 CUs, 30-minute idle auto-stop) in the background to handle your first task. No manual configuration is required. The default sandbox is fully equivalent to a user-created persistent sandbox. You can modify its name, CU allocation, or idle timeout, or delete it at any time.

Custom persistent sandbox (manually created)

If the default sandbox does not meet your requirements (for example, you need more CUs or a custom network configuration), you can manually create a custom persistent sandbox.

Procedure

  1. In the main Data Agent session input bar, click the sandbox selector, and then click Create Sandbox.

  2. In the dialog box that appears, configure the following parameters:

    Parameter

    Required

    Description

    Sandbox Name

    Yes

    The display name of the sandbox. Default: Sandbox_data_dev. Can be modified after creation.

    Idle Auto-stop

    No

    The number of minutes of inactivity before the sandbox automatically stops. Default: 30 minutes. Minimum: 10 minutes. Set to 0 or leave blank to disable. Billing stops when the sandbox is auto-stopped, but configuration and files are preserved.

    Specifications (CU)

    Yes

    The compute unit allocation for the sandbox. Default: 4 CUs. Cannot exceed the per-sandbox CU limit set by the administrator.

  3. Click Create.

Note

Creating a custom persistent sandbox requires the administrator to grant you sandbox creation permissions. If the create option is grayed out, contact your administrator.

Use sandboxes

When running tasks in a main Data Agent session, you can select a suitable persistent sandbox through the sandbox selector. Session sandboxes are automatically created and assigned by the system, with no selection required.

Select and switch sandboxes in a session

When working in the main Data Agent session, you can view and switch between available persistent sandboxes using the sandbox selector at the bottom of the input bar:

  • Sandbox list: The drop-down list shows all available persistent sandboxes, including their names, running states, and CU specifications.

  • Status indicators: Colors indicate sandbox states — green for running, gray for stopped, yellow pulse for starting/stopping/resizing, red for failed, and orange for deleting.

  • Create entry: Click Create Sandbox in the drop-down list to quickly create a new persistent sandbox.

Manage sandboxes

On the Sandbox Management page, you can view and manage your own sandboxes and view sandbox monitoring data. Administrators can also view all team sandboxes and configure resource policies.

Log on to the DataWorks console. In the left-side navigation pane, choose Sandbox Management > Sandbox to go to the sandbox list page.

Sandbox lifecycle

In the sandbox list, you can view the current state of each sandbox. During its lifecycle, a sandbox can be in the following states:

State

Description

Creating

The sandbox is provisioning underlying resources. Automatically transitions to Starting when complete.

Starting

The sandbox is starting up the execution environment. Transitions to Running when ready.

Running

The sandbox is ready and can accept and execute tasks. Monitoring data such as CPU, memory, and disk usage is available.

Stopping

The sandbox is shutting down, typically triggered by a manual stop or idle auto-stop.

Stopped

The sandbox has stopped running and is no longer billed. Configuration and files are preserved. Can be restarted at any time.

Deleting

The sandbox is being deleted and underlying resources are being released. After deletion, the sandbox is removed from the list.

Resizing

The sandbox is changing its CU specification. Resizing essentially rebuilds the underlying sandbox and restarts with the new specification when complete.

Failed

The sandbox failed to create or start. Check the error message or contact your administrator.

Note

A running sandbox automatically stops after the configured idle timeout (default: 30 minutes). No charges are incurred while the sandbox is stopped. When a stopped sandbox is selected again or a new task is initiated, it automatically restarts with its configuration and context preserved.

View the sandbox list

Under the Sandbox tab, you can view three key metrics: Total sandboxes (the total number of persistent sandboxes in the team), Running sandboxes (the number of sandboxes currently running), and Total CU usage (the sum of CUs across all running sandboxes).

The sandbox list below displays the name, owner, state, CU, and last activity time of each sandbox. You can search sandboxes by name or owner and perform the following actions:

Action

Description

View

Opens the sandbox details page, where you can view basic information, monitoring metrics, session list, and operation logs.

Stop/Start

Manually stops a running sandbox. Billing ceases while the sandbox is stopped, and its configuration and files are preserved. A stopped sandbox can be started again to resume task handling.

Delete

Permanently deletes the sandbox and releases underlying resources. This action cannot be undone. A running sandbox must be stopped before it can be deleted.

View sandbox details

In the sandbox list, click View to open the sandbox details page. On this page, you can view the following information:

  • Basic information: Sandbox name, ID, owner, state, billing method, current CU usage, creation date, idle timeout, VPC, and vSwitch.

  • Monitoring metrics: Displays real-time values for CPU usage, memory usage, and disk usage, along with historical trend charts. You can customize the time range. A delete shortcut is available in the upper-right corner of the page.

  • Session list: Lists sessions currently running on the sandbox (session name, initiator, CU usage, start time, etc.) with options to view or terminate sessions.

  • Operation logs: Records the history of sandbox operations such as creation, start/stop, resizing, and transfer. Logs are retained for 90 days.

Note

CU specification changes take effect on the next start. Idle timeout changes take effect immediately after saving.

Configure policies

In the left-side navigation pane, click Configure Policies. Administrators can set sandbox resource limits for team members. You can configure the following two types of policies:

  • Per-account default policy: Set team-level boundaries. Click Edit to modify the following parameters:

    Parameter

    Description

    Maximum sandboxes

    The maximum number of sandboxes that each user can own.

    Maximum running CUs

    The maximum total CU across all running sandboxes for each user.

    Per-sandbox CU limit

    The maximum CU allowed for a single sandbox. This serves as the upper bound for sandbox creation and modification.

    Default idle timeout (minutes)

    The default idle timeout before a sandbox automatically stops. Billing stops after the sandbox is auto-stopped.

  • Per-account exception policy: Override the default policy parameters for specific users. Click Add Account Exception to add an exception. Users without exceptions use the per-account default policy.

Important

Changes to the default policy and per-account exceptions take effect immediately for subsequent sandbox creation and modification operations.

Allow sandbox CIDR blocks in the RAM IP whitelist

In addition to the sandbox resource policies in the console, if you use a RAM custom policy to allow RAM users to access DataWorks only from specific IP addresses (that is, you have enabled a RAM IP whitelist), add the sandbox CIDR blocks to the whitelist as well so that sandboxes can call DataWorks services and run tasks normally. A sandbox accesses DataWorks from IP addresses in its own CIDR blocks, so when the whitelist does not include these CIDR blocks, the requests fall within the scope of the Deny statement and the task cannot run because it does not pass the permission check.

Add the following CIDR blocks. You must add both:

CIDR block

Description

21.80.0.0/12

Data Agent sandbox egress CIDR block

21.224.0.0/12

Data Agent sandbox egress CIDR block

Note
  • Session sandboxes and persistent sandboxes both send requests from these CIDR blocks, so you do not need to allow individual sandboxes separately.

  • Starting, stopping, resizing, or deleting a sandbox does not change these CIDR blocks. After you allow them once, no further maintenance is required when sandboxes change.

Example

Append the sandbox CIDR blocks to your existing office network IP whitelist. In this example, 203.0.113.10 is the office network egress IP that is allowed to access DataWorks. Replace it with your actual IP:

{
    "Version": "1",
    "Statement": [
        {
            "Effect": "Deny",
            "Action": [
                "dataworks:*"
            ],
            "Resource": [
                "acs:dataworks:*:*:*"
            ],
            "Condition": {
                "NotIpAddress": {
                    "acs:SourceIp": [
                        "203.0.113.10",
                        "21.80.0.0/12",
                        "21.224.0.0/12"
                    ]
                }
            }
        }
    ]
}
Important

Append the sandbox CIDR blocks to your policy. Do not replace your existing office network IPs with the sandbox CIDR blocks, or you will lose access to DataWorks from your local environment. For information about how to create and grant a custom policy, see Restrict RAM user access by IP address.

Billing

Sandboxes use the existing Data Agent pay-as-you-go billing model. No separate billing statement is generated.

  • Running period: Billing starts when the sandbox is created or started and ends when it is stopped or deleted. Charges are based on actual running duration and CU specification.

  • Stopped period: No charges are incurred while the sandbox is stopped. Multiple start/stop cycles result in cumulative billing across active periods.

  • Idle auto-stop: When idle auto-stop is enabled, the sandbox automatically stops and billing ceases after the configured idle timeout, reducing costs from idle resources.

  • Specification changes: After changing the CU allocation, the new specification takes effect on the next start and is billed at the new unit price.

For detailed billing rules and pricing, see Data Agent fees.