更新工作区
post /v1/organizations/workspaces/{workspace_id}
更新工作区
路径参数
workspace_id: string
请求体参数
-
data_residency: optional object { allowed_inference_geos, default_inference_geo }工作区的数据驻留配置。
-
allowed_inference_geos: optional array of string or "unrestricted"允许的推理地理位置值。使用 'unrestricted' 允许所有地理位置,或使用特定地理位置的列表。
-
array of string -
"unrestricted""unrestricted"
-
-
default_inference_geo: optional string当请求省略该参数时应用的默认推理地理位置。除非 allowed_inference_geos 为
"unrestricted",否则必须是 allowed_inference_geos 的成员。
-
-
name: optional string工作区的名称。
-
tags: optional map[string]用户自定义的字符串键值对标签。键不能以
anthropic开头。
返回值
-
Workspace object { id, archived_at, created_at, 5 more }-
id: string工作区的 ID。
-
archived_at: stringRFC 3339 格式的日期时间字符串,表示工作区被归档的时间。如果工作区未被归档,则为
null。 -
created_at: stringRFC 3339 格式的日期时间字符串,表示工作区的创建时间。
-
data_residency: object { allowed_inference_geos, default_inference_geo, workspace_geo }数据驻留配置。
-
allowed_inference_geos: array of string or "unrestricted"允许的推理地理位置值。'unrestricted' 表示允许所有地理位置。
-
array of string -
"unrestricted""unrestricted"
-
-
default_inference_geo: string当请求省略该参数时应用的默认推理地理位置。
-
workspace_geo: string工作区数据存储的地理区域。创建后不可更改。
-
-
display_color: string在 Anthropic 控制台中代表该工作区的十六进制颜色代码。
-
name: string工作区的名称。
-
tags: map[string]用户自定义的字符串键值对标签。键不能以
anthropic开头。 -
type: "workspace"对象类型。
对于工作区,始终为
"workspace"。"workspace"
-
示例
curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY" \
-d '{
"tags": {
"env": "prod",
"team": "platform"
}
}'
响应
{
"id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"archived_at": "2024-11-01T23:59:27.427722Z",
"created_at": "2024-10-30T23:58:27.427722Z",
"data_residency": {
"allowed_inference_geos": "unrestricted",
"default_inference_geo": "default_inference_geo",
"workspace_geo": "workspace_geo"
},
"display_color": "#6C5BB9",
"name": "Workspace Name",
"tags": {
"env": "prod",
"team": "platform"
},
"type": "workspace"
}