UpdateDigitalEmployee
Updates a digital employee.
Operation description
Updates a digital employee.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
starops:UpdateDigitalEmployee |
update |
*DigitalEmployee
|
None | None |
Request syntax
PATCH /digital-employee/{name} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| name |
string |
Yes |
The name of the digital employee. |
test |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The digital employee structure. |
|
| defaultRule |
string |
No |
The default rules for the digital employee. |
test |
| description |
string |
No |
The description of the digital employee. |
test |
| displayName |
string |
No |
The display name of the digital employee. |
test |
| roleArn |
string |
No |
The ARN of the RAM role. |
acs:ram::12345678912:role/testrole |
| knowledges |
object |
No |
The list of knowledge bases. |
|
| bailian |
array<object> |
No |
The list of Model Studio knowledge bases. |
|
|
object |
No |
The list of Model Studio knowledge bases. |
||
| workspaceId |
string |
No |
The ID of the Model Studio workspace. |
llm-xxxx |
| indexId |
string |
No |
The ID of the Model Studio index. |
index-xxxx |
| region |
string |
No |
The region of the knowledge base. |
cn-beijing |
| attributes |
string |
No |
The attributes of the knowledge base. |
test |
| sop |
array<object> |
No |
The list of SOP knowledge bases. |
|
|
object |
No |
The SOP knowledge base. |
{ "type": "oss", "basePath": "docs/", "region": "cn-hangzhou", "endpoint": "oss-cn-hangzhou.aliyuncs.com", "bucket": "my-sop-bucket", "description": "sls sop" } |
|
| attributes |
object |
No |
The attributes. |
|
|
string |
No |
The attributes. |
{} |
|
| toolPolicy |
object |
No |
The security policy configuration for tool calling by the digital employee. |
{"aliyun":{"enable":true,"denyPolicy":["ecs:RunCommand","ecs:Delete*"],"autoPassPolicy":["log:Get*","log:List*"],"statements":[{"decision":"user_ack","product":"Sls","apiVersion":"2020-12-30","actions":["log:GetProject","log:CreateDashboard"]}]}} |
| global |
object |
No |
The global auto-approval rules for tool calling. |
|
| autoPassPolicy |
array |
No |
The array of auto-approval policies. |
[{"version":"v1.0.0","fullCommand":"starops tool list"},{"version":"v1.0.0","commandPrefix":["starops sls"]}] |
| AutoPassPolicy |
No |
The definition of the auto-approval policy. |
||
| aliyun |
object |
No |
The security policy configuration for Aliyun CLI tool calling. |
{"enable":true,"denyPolicy":["ecs:RunCommand","ecs:Delete*"],"autoPassPolicy":["log:Get*","log:List*"],"statements":[{"decision":"user_ack","product":"Sls","apiVersion":"2020-12-30","actions":["log:GetProject","log:CreateDashboard"]}]} |
| enable |
boolean |
No |
Specifies whether to enable the policy. |
true |
statements
deprecated
|
array<object> |
No |
The list of Aliyun CLI tool policy statements. |
[{"decision":"user_ack","product":"Sls","apiVersion":"2020-12-30","actions":["log:GetProject","log:CreateDashboard"]}] |
|
object |
No |
The list of Aliyun CLI tool policy statements. |
{"decision":"user_ack","product":"Sls","apiVersion":"2020-12-30","actions":["log:GetProject","log:CreateDashboard"]} |
|
| decision |
string |
No |
The execution policy. Valid values:
|
user_ack |
| product |
string |
No |
The code of the cloud service. |
Cms |
apiVersion
deprecated
|
string |
No |
[Deprecated] The API version. |
2024-03-30 |
| actions |
array |
No |
RAM action |
["log:GetProject","log:CreateDashboard"] |
|
string |
No |
The RAM action. The format is product:ApiName, product:Prefix*, or product:*. |
cms:GetWorkspace |
|
| denyPolicy |
array |
No |
The list of denied RAM actions. The format is , product:ApiName, or product:Prefix. |
["ecs:RunCommand","ecs:Delete*"] |
|
string |
No |
The denied RAM action. The format is , product:ApiName, or product:Prefix. |
ecs:Delete* |
|
| autoPassPolicy |
array |
No |
The list of auto-approved RAM actions. The format is , product:ApiName, or product:Prefix. |
["log:Get*","log:List*"] |
|
string |
No |
The auto-approved RAM action. The format is , product:ApiName, or product:Prefix. |
log:Get* |
|
| hooks |
array |
No |
The hook configuration. |
|
| Hook |
No |
The hook definition struct. |
||
| sandboxNetworkPolicy |
object |
No |
The list of allowed CIDR blocks or IP addresses. |
{"allowFqdns":["api.example.com"],"allowCidrs":["1.2.3.0/24","8.8.8.8"],"enableAcl":false} |
| allowFqdns |
array |
No |
The list of allowed FQDNs. |
|
|
string |
No |
The list of allowed FQDNs. |
api.example.com |
|
| allowCidrs |
array |
No |
The list of allowed CIDR blocks or IP addresses. |
|
|
string |
No |
The list of allowed CIDR blocks or IP addresses. |
8.8.8.8 |
|
| enableAcl |
boolean |
No |
Specifies whether to enable the sandbox network ACL. |
false |
Hook configuration
Configure digital employee hooks by using toolPolicy.hooks. Each item corresponds to an event and a handler, and is loaded and executed in the order of the array. Hooks with the same name are executed independently. A hook is executed only when enable is set to true and the scope, event, and tool name match. An empty array indicates that no digital employee hooks are loaded.
schemaVersion: The configuration protocol version. Set the value tov1.name: The non-empty name. Only letters, digits, underscores (_), and hyphens (-) are allowed.scope: The scope. Valid values:all(Chat and Mission),chat, andmission.event: The event. Valid values:TurnStart,TurnEnd,ToolStart, andToolEnd.match: The array of tool names. This parameter is only used forToolStartandToolEnd. Exact matching is performed based on the actual name, and wildcards are not supported. An empty array does not limit the tools. This field is ignored for other events.execution.type: The execution type. Valid values:prompt,bash,python3, andhint. Forinstruction, enter a prompt, a Bash script, a Python 3 script, or text appended to the context accordingly. The value must be non-empty UTF-8 text.execution.timeoutSeconds: The timeout period in seconds. Valid values: 1 to 30. All attempts and waits share this timeout period.execution.maxRetry: The number of additional attempts after a failure. Valid values: 0 to 3.execution.failResult: The fallback action when the handler return value is still invalid after retries. Valid values:allowandreject.
Global auto-approval policy
Configure command auto-approval rules by using toolPolicy.global.autoPassPolicy. Each rule must specify version: "v1.0.0" and use one of the following two matching methods:
fullCommand: The non-empty full command for exact matching.commandPrefix: The array of command prefixes. It must and can only contain one non-empty prefix.
You cannot configure fullCommand and commandPrefix at the same time, nor can you omit both. The rules here use the command format, whereas toolPolicy.aliyun.autoPassPolicy uses RAM action strings. The two formats are different.
The following is a configuration example for these two parts in toolPolicy:
{
"global": {
"autoPassPolicy": [
{
"version": "v1.0.0",
"fullCommand": "starops tool list"
},
{
"version": "v1.0.0",
"commandPrefix": [
"starops sls"
]
}
]
},
"hooks": [
{
"schemaVersion": "v1",
"name": "tool-reminder",
"enable": true,
"scope": "all",
"event": "ToolStart",
"match": [
"Bash"
],
"execution": {
"type": "hint",
"instruction": "Confirm the target resources and parameters before you run the tool.",
"timeoutSeconds": 10,
"maxRetry": 0,
"failResult": "reject"
}
}
]
}
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| requestId |
string |
The request ID. |
0CEC5375-C554-562B-A65F-*** |
Examples
Success response
JSON format
{
"requestId": "0CEC5375-C554-562B-A65F-***\n"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.