Tag rules let workspace administrators enforce consistent tagging across DLC, DSW, and EAS. Administrators define required tag keys, predefined values, descriptions, and the applicable product scope. When a rule is active, ML developers must tag DLC jobs, DSW instances, and EAS services at creation time — tags are validated automatically. Consistent tags support cost allocation, job distribution analysis, and resource consumption reporting.
Define tag rules
Only workspace owners and administrators can edit tag rules.
Go to the workspace details page, and in the upper-right corner, click Configure Workspace > General Configurations.
Scroll down to the Label Configuration section, and click Modify Configuration to enter edit mode.

Add tag rules as needed, then click Save. Configured rules take effect for the selected product scope. On the corresponding sub-product pages, these tags are required by default. If a tag is missing or non-compliant, the submission fails. ML developers can also add custom tags on top of the required ones, as long as the tag key and tag value requirements are met.
Tag Key requirements: Can't start with
aliyunoracs:, can't containhttp://orhttps://, and must be no longer than 128 characters. Only letters, digits, hyphens (-), Chinese characters, and periods (.) are allowed; underscores (_) are not.Value requirements: Can't contain
http://orhttps://, and must be no longer than 256 characters. Separate multiple enumerated values with commas.Value Constraints: When enabled, users must select from the predefined values and can't enter custom values. Enable this option to enforce consistent tagging across the team.
Applicable Services: Select which sub-products (DLC, DSW, or EAS) this rule applies to. At least one must be selected.
Apply tags
Apply tags according to the workspace tag rules when submitting a DLC job or creating a DSW or EAS instance. The following steps use DLC job submission as an example:
Go to the DLC console and click Create Task.
On the job configuration page, locate the Tag section, and fill in the key-value pairs according to the workspace tag rules.
You can also add custom tags during job creation, such as the self-define-key tag in the screenshot.

After filling in all required tags, submit the job.
Tag rules are validated at submission. If a required tag is missing or the value doesn't match the rule, the submission fails with an error message.
Filter jobs by tag
Use tag-based filtering on the DLC job list to break down job distribution and resource usage by scenario, model type, or other criteria.
Go to the DLC console job list page.
In the search bar, select Tag as the filter condition, enter the tag key and value, and click search. The list shows only jobs that match the criteria.

The list updates to show only jobs matching the specified tags:

Appendix
API reference
To configure tag rules in bulk or integrate with automation pipelines, use the following code examples. Replace the region, workspace ID, and AccessKey ID and Secret values before running the code.
Configure tag rules in bulk
The UpdateConfigs API supports bulk configuration of preset tag rules and is suited for applying the same tag configuration across multiple workspaces.
Sample request body structure:
{
"Configs": [
{
"ConfigKey": "predefinedTags",
"ConfigValue": "[{\"Type\":\"Tag\",\"Key\":\"scenario\",\"Value\":\"{\\\"Products\\\":\\\"DLC,DSW,EAS\\\",\\\"Values\\\":\\\"train,evluate,inference\\\",\\\"ValueFlexible\\\":false,\\\"Description\\\":\\\"select scenario\\\"}\"}]",
"Labels": [
{
"Key": "system.categoryName",
"Value": "CommonTagConfig"
}
]
}
]
}
Specify tags when submitting a DLC job
When submitting a DLC job via the CreateJob API, specify tags in the Settings.Tags field. All required tags must be filled in. Values must be selected from the predefined options, except for tags where ValueFlexible is true, which accept custom input.
Filter DLC jobs by tag
The ListJobs API supports tag-based filtering via the Tags query parameter (JSON string format). Multiple tags use AND logic — all specified tags must match for a job to appear in the results.
View tag change history
ActionTrail records all changes to tag rules, including the operator, timestamp, and what was changed.
Log in to the ActionTrail console, go to Advanced query, set the service name to PAI and the event name to UpdateConfigs, then filter for records where ConfigKey is predefinedTags to view the tag rule change history.
