aicore-admin-resources
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRules
规则
- Always run first when credentials are unknown or when any script fails with an auth error.
check_setup.py - must end in
AICORE_BASE_URL— this is the single most common misconfiguration./v2 - Never display or log the client secret or token value in clear text. Print only what the user needs (e.g. the resource group, not the full config).
- X.509 certificate auth is an alternative to client secret — both are supported.
- 当凭据未知或任何脚本因认证错误而失败时,始终先运行 。
check_setup.py - 必须以
AICORE_BASE_URL结尾——这是最常见的配置错误。/v2 - 切勿以明文显示或记录 client secret 或 token 值。仅打印用户所需的信息(例如 resource group,而非完整配置)。
- X.509 certificate auth 是 client secret 的替代方案——两种方式均受支持。
Check Setup
检查设置
Verifies credentials and prints the active resource group:
bash
uv run scripts/check_setup.pyExpected output on success:
json
{
"status": "ok",
"resource_group": "<your-resource-group>",
"base_url": "https://api.ai.<region>...",
"auth_url": "https://..."
}If this fails, read for step-by-step credential configuration.
references/SETUP.md验证凭据并打印当前活动的 resource group:
bash
uv run scripts/check_setup.py成功时的预期输出:
json
{
"status": "ok",
"resource_group": "<your-resource-group>",
"base_url": "https://api.ai.<region>...",
"auth_url": "https://..."
}如果检查失败,请阅读 ,了解分步配置凭据的详细说明。
references/SETUP.mdGet Auth Token
获取 Auth Token
Prints a raw Bearer token to stdout — useful for curl testing:
bash
export TOKEN=$(uv run scripts/get_token.py)Always capture the token into a variable. Never run standalone or with — that prints the raw JWT into the conversation. The success message already goes to stderr cleanly; capture gives only the bare token.
get_token.py2>&1$()将原始 Bearer token 打印到 stdout——这对于 curl 测试很有用:
bash
export TOKEN=$(uv run scripts/get_token.py)始终将 token 捕获到变量中。切勿单独运行 ,也不要与 一起运行——否则会将原始 JWT 打印到对话中。成功消息会简洁地输出到 stderr;使用 捕获只会得到纯 token。
get_token.py2>&1$()Configure Credentials
配置凭据
Three options — see for the full guide:
references/SETUP.md| Option | Command / Action |
|---|---|
| Interactive CLI (recommended) | |
| Environment variables | Set |
| Profile config file | Create |
共有三种选项——有关完整指南,请参阅 :
references/SETUP.md| 选项 | 命令 / 操作 |
|---|---|
| 交互式 CLI(推荐) | |
| 环境变量 | 设置 |
| Profile 配置文件 | 创建 |
Common Errors
常见错误
| Error | Fix |
|---|---|
| Re-run |
| Append |
| Create it in AI Core Launchpad or contact admin |
| Set the required env vars or run |
| 错误 | 修复方式 |
|---|---|
| 401 Unauthorized | 重新运行 |
| 404 Not Found | 将 |
| Resource group not found | 在 AI Core Launchpad 中创建,或联系管理员 |
| No credentials found | 设置必需的环境变量,或运行 |
Switch Profiles (Multi-Landscape)
切换 Profile(多 Landscape)
When working across multiple landscapes, credentials live as files under (default: ). Because the shell environment is clean on each agent run, the profile must be set before the agent starts or inline with each command.
config_<profile>.jsonAICORE_HOME~/.aicoreOption 1 — set in your shell before starting the agent:
bash
export AICORE_HOME=/path/to/credentials # only needed if not ~/.aicore
export AICORE_PROFILE=<profile>在多个 landscape 之间工作时,凭据以 文件的形式存放在 (默认:)下。由于每次 Agent 运行时 shell 环境都是干净的,因此必须在 Agent 启动前设置 profile,或在每条命令中内联设置。
config_<profile>.jsonAICORE_HOME~/.aicore选项 1 — 在启动 Agent 前于 shell 中设置:
bash
export AICORE_HOME=/path/to/credentials # only needed if not ~/.aicore
export AICORE_PROFILE=<profile>then start the agent — it inherits the env vars
then start the agent — it inherits the env vars
**Option 2 — source and run in one shell (for agent use):**
```bash
source scripts/set_profile.sh <profile> && uv run scripts/check_setup.pyOption 3 — inline per command:
bash
AICORE_PROFILE=<profile> uv run scripts/check_setup.pyTo list available profiles:
bash
source scripts/set_profile.sh
**选项 2 — 在同一个 shell 中加载并运行(供 Agent 使用):**
```bash
source scripts/set_profile.sh <profile> && uv run scripts/check_setup.py选项 3 — 对每条命令内联设置:
bash
AICORE_PROFILE=<profile> uv run scripts/check_setup.py要列出可用的 profile:
bash
source scripts/set_profile.shManage Resource Groups
管理 Resource Groups
bash
undefinedbash
undefinedList all resource groups:
List all resource groups:
uv run scripts/list_resource_groups.py
uv run scripts/list_resource_groups.py
Show detailed view (includes labels):
Show detailed view (includes labels):
uv run scripts/list_resource_groups.py --response-format detailed
uv run scripts/list_resource_groups.py --response-format detailed
JSON output:
JSON output:
uv run scripts/list_resource_groups.py --json
uv run scripts/list_resource_groups.py --json
Inspect a single resource group:
Inspect a single resource group:
uv run scripts/list_resource_groups.py --resource-group-id <id>
uv run scripts/list_resource_groups.py --resource-group-id <id>
Create a resource group:
Create a resource group:
uv run scripts/create_resource_group.py --id <id>
uv run scripts/create_resource_group.py --id <id>
Create with labels (keys must be prefixed ext.ai.sap.com/ or scenarios.ai.sap.com/):
Create with labels (keys must be prefixed ext.ai.sap.com/ or scenarios.ai.sap.com/):
uv run scripts/create_resource_group.py --id <id> --label ext.ai.sap.com/team=data --label ext.ai.sap.com/env=prod
uv run scripts/create_resource_group.py --id <id> --label ext.ai.sap.com/team=data --label ext.ai.sap.com/env=prod
Update labels (replaces the full label set):
Update labels (replaces the full label set):
uv run scripts/patch_resource_group.py --id <id> --label ext.ai.sap.com/team=data
uv run scripts/patch_resource_group.py --id <id> --label ext.ai.sap.com/team=data
Delete a resource group (--confirm is required):
Delete a resource group (--confirm is required):
uv run scripts/delete_resource_group.py --id <id> --confirm
Note: Resource group IDs must be 3–10 lowercase alphanumeric characters (hyphens allowed, not at start/end). Label keys must use the prefix `ext.ai.sap.com/` or `scenarios.ai.sap.com/` — bare keys like `team=data` will be rejected with a 400 error. Deletion may return 409 ("Conflicting ongoing action") immediately after creation while provisioning completes — retry after a short wait.
---uv run scripts/delete_resource_group.py --id <id> --confirm
注意:Resource group ID 必须为 3–10 个小写字母数字字符(允许使用连字符,但不能位于开头或结尾)。Label key 必须使用前缀 `ext.ai.sap.com/` 或 `scenarios.ai.sap.com/`——诸如 `team=data` 这样的裸 key 将被拒绝并返回 400 错误。创建后,在预配完成之前立即删除可能会返回 409("Conflicting ongoing action")——请稍等片刻后重试。
---Handoffs
任务移交
- Ready to manage deployments? → invoke
aicore-lifecycle-management - Need to list available models? → invoke
genai-hub-foundation-models
- 准备管理 deployments? → 调用
aicore-lifecycle-management - 需要列出可用 models? → 调用
genai-hub-foundation-models
When to Load Reference Files
何时加载参考文件
| Trigger | Load |
|---|---|
| Any credential/auth error or setup question | |
| 触发条件 | 加载 |
|---|---|
| 任何凭据或认证错误、设置问题 | |