alibabacloud-analyticdb-postgresql-supabase-ops
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseADBPG Supabase Project Management
ADBPG Supabase项目管理
Manage the full lifecycle of Supabase projects based on AnalyticDB PostgreSQL (ADBPG).
Architecture:
ADBPG (AnalyticDB PostgreSQL) + Supabase + VPC + VSwitch管理基于AnalyticDB PostgreSQL(ADBPG)的Supabase项目全生命周期。
架构:
ADBPG (AnalyticDB PostgreSQL) + Supabase + VPC + VSwitchScope — Alibaba Cloud ADBPG only (not Supabase CLI)
适用范围 — 仅支持阿里云ADBPG(不包含Supabase CLI)
- This skill controls projects provisioned on Alibaba Cloud via GPDB / APIs.
aliyun gpdb - Do not use the standalone CLI (
supabase,supabase login, etc.) for create/list/pause/resume here — that targets Supabase Cloud or self-hosted stacks, not ADBPG-managed Supabase instances.supabase projects list - All lifecycle and query operations in this skill are with
aliyun gpdb ….--user-agent AlibabaCloud-Agent-Skills
- 本工具通过 GPDB / API 管控部署在阿里云上的项目。
aliyun gpdb - 禁止在此处使用独立的 CLI(如
supabase、supabase login等)执行创建/列表/暂停/恢复操作 — 该CLI面向Supabase Cloud或自托管部署栈,不适用于ADBPG托管的Supabase实例。supabase projects list - 本工具中所有生命周期和查询操作均使用 命令,并携带
aliyun gpdb …参数。--user-agent AlibabaCloud-Agent-Skills
ProjectId format (spb-
)
spb-ProjectId格式(spb-
前缀)
spb-- from create/list/get APIs uses the prefix
ProjectIdplus an alphanumeric suffix (e.g.spb-). Use this exact value inspb-2zen7c8752x12328.--project-id - If the user’s string does not match any instance, run in the right
list-supabase-projectsand match--biz-region-idor the returnedProjectName.ProjectId
- 创建/列表/查询接口返回的 使用前缀
ProjectId加字母数字后缀(例如spb-)。请在spb-2zen7c8752x12328参数中使用该完整值。--project-id - 如果用户提供的字符串无法匹配任何实例,请在正确的 下执行
--biz-region-id,匹配list-supabase-projects或返回的ProjectName。ProjectId
Prerequisites
前置条件
Pre-check: Aliyun CLI >= 3.3.1 required Runto verify >= 3.3.1. If not installed or version too low, see references/cli-installation-guide.md for installation instructions. Then [MUST] runaliyun versionto enable automatic plugin installation.aliyun configure set --auto-plugin-install true
预检查:要求Aliyun CLI版本 >= 3.3.1 运行确认版本不低于3.3.1。如果未安装或版本过低,请参考references/cli-installation-guide.md的安装说明。 之后必须运行aliyun version开启自动插件安装功能。aliyun configure set --auto-plugin-install true
Credential Verification
凭证校验
Pre-check: Alibaba Cloud Credentials RequiredSecurity Rules:
- NEVER read, echo, or print AK/SK values (e.g.,
is FORBIDDEN)echo $ALIBABA_CLOUD_ACCESS_KEY_ID- NEVER ask the user to input AK/SK directly in the conversation or command line
- NEVER use
with literal credential valuesaliyun configure set- ONLY use
to check credential statusaliyun configure listbashaliyun configure listCheck the output for a valid profile (AK, STS, or OAuth identity).If no valid profile exists, STOP here.
- Obtain credentials from Alibaba Cloud Console
- Configure credentials outside of this session (via
in terminal or environment variables in shell profile)aliyun configure- Return and re-run after
shows a valid profilealiyun configure list
预检查:需要阿里云凭证安全规则:
- 严禁读取、回显或打印AK/SK值(例如禁止执行
)echo $ALIBABA_CLOUD_ACCESS_KEY_ID- 严禁要求用户在对话或命令行中直接输入AK/SK
- 严禁使用
搭配明文凭证值aliyun configure set- 仅可使用
检查凭证状态aliyun configure listbashaliyun configure list检查输出中是否存在有效配置文件(AK、STS或OAuth身份)。如果不存在有效配置文件,请在此处停止操作。
- 从阿里云控制台获取凭证
- 在本次会话外配置凭证(通过终端的
命令或shell配置文件中的环境变量)aliyun configure- 待
显示有效配置文件后,返回并重新执行操作aliyun configure list
RAM Permissions
RAM权限
Ensure the current account has the required permissions before executing operations. See references/ram-policies.md for details.
Permission Pre-check: Use skill to check current user permissions, compare against , and abort with prompt if any permission is missing.
ram-permission-diagnosereferences/ram-policies.md执行操作前请确保当前账号具备所需权限。详情请参考references/ram-policies.md。
权限预检查:使用工具检查当前用户权限,与对比,如果缺少任何权限则终止操作并提示用户。
ram-permission-diagnosereferences/ram-policies.mdParameter Confirmation
参数确认
IMPORTANT: Parameter Confirmation — Before executing any command or API call, ALL user-customizable parameters (e.g., RegionId, ProjectId, instance names, CIDR blocks, passwords, VPC/VSwitch IDs, etc.) MUST be confirmed with the user. For create, the skill supplies recommended defaults (and optional auto-discovery). You must present that full plan and obtain explicit user approval (or replaced values) before running.create-supabase-project
重要提示:参数确认 — 执行任何命令或API调用前,所有用户可自定义参数(例如RegionId、ProjectId、实例名称、CIDR块、密码、VPC/VSwitch ID等)必须与用户确认。 对于创建操作,工具会提供推荐默认值(以及可选的自动发现功能)。你必须向用户展示完整方案,并在运行前获得用户明确批准(或用户替换后的参数值)。create-supabase-project
Final execution confirmation (read-only vs mutating)
最终执行确认(只读 vs 变更操作)
- No separate final “execute” step — only for read-only information retrieval: ,
aliyun gpdb list-supabase-projects,aliyun gpdb get-supabase-project,get-supabase-project-api-keys, and discovery-only calls such asget-supabase-project-dashboard-account,aliyun vpc describe-vpcs,aliyun vpc describe-vswitches(same class as list / describe: no resource state change).aliyun gpdb describe-regions - Final user confirmation [MUST] — before the CLI runs, for every mutating operation: create, pause, resume, reset password, modify security IPs. Show what will execute and key parameters (e.g. , new password hint without logging secret, new whitelist). Obtain explicit approval.
project-id - After create, provisioning poll via does not need a new confirmation — the user already approved create; polling is verification only.
get-supabase-project
CreateSupabaseProject is defined in the official API reference. Full CLI mapping, VPC/VSwitch discovery, name/password rules: references/create-supabase-project-parameters.md.
| Parameter | Required/Optional | Description | Default / recommendation |
|---|---|---|---|
| ProjectId | Required (non-create) | Instance ID from API/list ( | — |
| BizRegionId | Optional (create) | Region ID ( | |
| ProjectName | Required (create) | Project name | Derive from user scenario; user may replace |
| ZoneId | Required (create) | Availability zone ID | |
| VpcId | Required (create) | VPC ID | User input or from discovery (see Create Project) |
| VSwitchId | Required (create) | VSwitch ID (must match | User input or recommend max |
| AccountPassword | Required (create) / reset | Database password | User input or generate per API rules; user may replace |
| SecurityIPList | Required (create) / modify | IP whitelist | |
| ProjectSpec | Required (create) | Instance spec | |
| StorageSize | Optional (create) | Storage (GB) | |
| DiskPerformanceLevel | Optional (create) | PL0 / PL1 | |
| PayType / UsedTime / Period | Optional (create) | Billing | |
| ClientToken | Optional (create) | Idempotency | Omit unless user retries same create |
- 无需单独的最终“执行”步骤 — 仅适用于只读信息查询:、
aliyun gpdb list-supabase-projects、aliyun gpdb get-supabase-project、get-supabase-project-api-keys,以及仅用于发现的调用,例如**get-supabase-project-dashboard-account、aliyun vpc describe-vpcs、aliyun vpc describe-vswitches**(与list/describe属于同一类别:不会改变资源状态)。aliyun gpdb describe-regions - 必须获得用户最终确认 — 对于所有变更操作,在CLI运行前:创建、暂停、恢复、重置密码、修改安全IP。向用户展示将要执行的内容和关键参数(例如、不泄露明文的新密码提示、新的白名单),获得明确批准。
project-id - 创建完成后,通过**进行资源 provisioning 轮询**不需要新的确认 — 用户已经批准创建操作,轮询仅用于校验。
get-supabase-project
CreateSupabaseProject 定义在官方API参考中。完整CLI映射、VPC/VSwitch发现、名称/密码规则请参考:references/create-supabase-project-parameters.md。
| 参数 | 必填/可选 | 描述 | 默认值/推荐值 |
|---|---|---|---|
| ProjectId | 非创建操作必填 | 来自API/列表的实例ID( | — |
| BizRegionId | 创建时可选 | 区域ID(API中的 | |
| ProjectName | 创建时必填 | 项目名称 | 根据用户场景生成,用户可替换 |
| ZoneId | 创建时必填 | 可用区ID | |
| VpcId | 创建时必填 | VPC ID | 用户输入或自动发现(参见创建项目章节) |
| VSwitchId | 创建时必填 | VSwitch ID(必须与 | 用户输入或推荐可用区中 |
| AccountPassword | 创建/重置时必填 | 数据库密码 | 用户输入或按照API规则生成,用户可替换 |
| SecurityIPList | 创建/修改时必填 | IP白名单 | |
| ProjectSpec | 创建时必填 | 实例规格 | |
| StorageSize | 创建时可选 | 存储容量(GB) | |
| DiskPerformanceLevel | 创建时可选 | PL0 / PL1 | |
| PayType / UsedTime / Period | 创建时可选 | 计费方式 | 默认** |
| ClientToken | 创建时可选 | 幂等校验 | 除非用户重试相同创建操作,否则可省略 |
Timeout Configuration
超时配置
Timeout Settings
- Default CLI read timeout is often ~60 seconds per HTTP read — usually enough for
, because creation is asynchronous: the API accepts the request and returnscreate-supabase-projectquickly; it does not block until the instance is ready.ProjectId- 3–5 minutes is the typical time for background provisioning to finish — not the duration of the create HTTP response. Use Success Verification (poll
untilget-supabase-projectisStatus) to wait for that phase.running- Create success criterion: after
returnscreate-supabase-project, the instance is not ready untilProjectIdreportsget-supabase-project=Status(API uses lowercase) — that state means provisioning succeeded and the project is usable.running- If any command hits read timeouts in practice, raise
for that call (e.g.--read-timeout).--read-timeout 120
超时设置
- 默认CLI读取超时通常为每次HTTP请求约60秒 — 通常足够支撑**
调用,因为创建是异步的:API接收请求后会快速返回create-supabase-project**,不会阻塞直到实例就绪。ProjectId- 3-5分钟是后台资源部署的典型耗时 — 这不是创建HTTP响应的时长。使用成功校验(轮询
直到get-supabase-project为Status)等待该阶段完成。running- 创建成功标准:
返回**create-supabase-project后,实例并未就绪,直到ProjectId返回get-supabase-project=Status(API返回小写) — 该状态表示部署成功**,项目可正常使用。running- 实际运行中如果任何命令遇到读取超时,可以为该调用增加
参数(例如--read-timeout)。--read-timeout 120
Core Workflow
核心工作流
All commands use format, must include .
aliyun gpdb <command>--user-agent AlibabaCloud-Agent-SkillsPer Final execution confirmation: read-only list / get / describe may run without a final execute prompt; create, pause, resume, reset password, modify IPs require explicit final user confirmation before invocation.
所有命令使用格式,必须包含。
aliyun gpdb <命令>--user-agent AlibabaCloud-Agent-Skills根据**最终执行确认要求:只读的list / get / describe操作无需最终执行提示即可运行;创建、暂停、恢复、重置密码、修改IP操作在调用前需要用户明确的最终确认**。
List Projects
列出项目
bash
aliyun gpdb list-supabase-projects \
--biz-region-id cn-beijing \
--max-results 20 \
--user-agent AlibabaCloud-Agent-Skills- Risk: Low | Read-only — no final execution confirmation
bash
aliyun gpdb list-supabase-projects \
--biz-region-id cn-beijing \
--max-results 20 \
--user-agent AlibabaCloud-Agent-Skills- 风险:低 | 只读操作 — 无需最终执行确认
Get Project Details
获取项目详情
bash
aliyun gpdb get-supabase-project \
--project-id spb-xxxxx \
--user-agent AlibabaCloud-Agent-Skills- Risk: Low | Read-only — no final execution confirmation
bash
aliyun gpdb get-supabase-project \
--project-id spb-xxxxx \
--user-agent AlibabaCloud-Agent-Skills- 风险:低 | 只读操作 — 无需最终执行确认
Get API Keys
获取API密钥
bash
aliyun gpdb get-supabase-project-api-keys \
--project-id spb-xxxxx \
--user-agent AlibabaCloud-Agent-Skills- Risk: Low | Read-only — no final execution confirmation
- Policy: Fulfilling a request to read keys via this official Alibaba Cloud API (with RAM/account access) is not the same as scraping secrets from an unrelated codebase. Decline only when the task is clearly exfiltration from repos or third-party systems; otherwise run , return keys minimally (no logging full secrets), and remind the user to rotate if exposed.
get-supabase-project-api-keys
bash
aliyun gpdb get-supabase-project-api-keys \
--project-id spb-xxxxx \
--user-agent AlibabaCloud-Agent-Skills- 风险:低 | 只读操作 — 无需最终执行确认
- 策略:通过该阿里云官方API(具备RAM/账号访问权限)读取密钥的请求,与从无关代码库中窃取密钥不同。仅当任务明确是从代码仓库或第三方系统导出密钥时才拒绝,否则运行****,最小化返回密钥信息(不完整记录明文密钥),并提醒用户如果密钥暴露请轮换。
get-supabase-project-api-keys
Get Dashboard Account
获取控制台账号
bash
aliyun gpdb get-supabase-project-dashboard-account \
--project-id spb-xxxxx \
--user-agent AlibabaCloud-Agent-Skills- Risk: Low | Read-only — no final execution confirmation
bash
aliyun gpdb get-supabase-project-dashboard-account \
--project-id spb-xxxxx \
--user-agent AlibabaCloud-Agent-Skills- 风险:低 | 只读操作 — 无需最终执行确认
Create Project
创建项目
Automated workflow — When user provides intent like "帮我在北京 i 创建 ADBPG Supabase 项目", run these steps:
自动化工作流 — 当用户提供类似“帮我在北京 i 创建 ADBPG Supabase 项目”的意图时,执行以下步骤:
Step 1: Auto-discover all information (no user input needed yet)
步骤1:自动发现所有信息(暂时无需用户输入)
- Region + Zone — Use user-specified values or defaults (,
cn-beijing).cn-beijing-i - ProjectName — Run to get 1-3 candidates (timestamp-based).
scripts/generate-project-name.sh - Password — Run to generate a compliant password.
scripts/generate-password.py - VPC/VSwitch discovery — Run to get the VSwitch with the most available IPs.
scripts/discover-vswitch.sh --biz-region-id <region> --zone-id <zone> - SecurityIPList — Default .
127.0.0.1 - Optional flags — Use defaults: ,
2C2GGB,20,POSTPAY.PL0 - ClientToken — Generate one UUID.
- 区域 + 可用区 — 使用用户指定的值或默认值(、
cn-beijing)。cn-beijing-i - ProjectName — 运行获取1-3个候选名称(基于时间戳)。
scripts/generate-project-name.sh - 密码 — 运行生成符合规则的密码。
scripts/generate-password.py - VPC/VSwitch发现 — 运行获取可用IP最多的VSwitch。
scripts/discover-vswitch.sh --biz-region-id <区域> --zone-id <可用区> - SecurityIPList — 默认。
127.0.0.1 - 可选参数 — 使用默认值:、
2C2GGB、20、POSTPAY。PL0 - ClientToken — 生成一个UUID。
Step 2: Present creation plan (single confirmation)
步骤2:展示创建方案(单次确认)
Display the full parameter table to the user with options:
=== Create Supabase Project Plan ===
Project Name: <generated-or-user-confirmed>
Region: <biz-region-id>
Zone: <zone-id>
VPC: <vpc-id from discovery>
VSwitch: <vswitch-id from discovery> (Available IPs: <count>)
Instance Spec: 2C2G
Storage: 20 GB
Pay Type: POSTPAY
Security IP: 127.0.0.1
Password: <generated, shown once or masked>
=================================
Select an option:
1. Confirm and create (default)
2. Modify parameters
3. Cancel
Press Enter for [1], or type option number:向用户展示完整参数表和选项:
=== 创建Supabase项目方案 ===
项目名称: <生成或用户确认的名称>
区域: <biz-region-id>
可用区: <zone-id>
VPC: <自动发现的vpc-id>
VSwitch: <自动发现的vswitch-id> (可用IP: <数量>)
实例规格: 2C2G
存储: 20 GB
计费方式: POSTPAY
安全IP: 127.0.0.1
密码: <生成的密码,仅展示一次或掩码处理>
=================================
选择选项:
1. 确认并创建(默认)
2. 修改参数
3. 取消
按回车键选择[1],或输入选项编号:Step 3: Execute after confirmation
步骤3:确认后执行
If user selects "1" or presses Enter (confirm), run:
bash
aliyun gpdb create-supabase-project \
--biz-region-id <BizRegionId> \
--zone-id <ZoneId> \
--project-name <ProjectName> \
--account-password ‘<Password>’ \
--security-ip-list "127.0.0.1" \
--vpc-id <VpcId> \
--vswitch-id <VSwitchId> \
--project-spec 2C2G \
--storage-size 20 \
--disk-performance-level PL0 \
--pay-type POSTPAY \
--client-token "<ClientToken>" \
--user-agent AlibabaCloud-Agent-SkillsThen proceed to Success Verification (polling) as described below.
Async create — HTTP retries (before you have )
ProjectId- Goal: absorb transient CLI/network/API errors without double-creating a different resource.
- Reuse the same on every create attempt in this session for this intended project.
--client-token - Retry create (max 3 attempts total, including the first) only if the response has no and the error looks transient: e.g. throttling, connection reset, read timeout,
ProjectId. Backoff: 5s → 15s → 45s between attempts.ServiceUnavailable - Do not blindly retry create for business errors (e.g. , invalid parameter) — stop, explain, fix with the user.
VSwitchIp.NotEnough - If any attempt returns → stop calling create; switch to provisioning poll (Success Verification).
ProjectId - If create times out but might have succeeded server-side → poll by name/region (e.g.
get-supabase-projectfiltered bylist-supabase-projects) before issuing another create with the same token/name.ProjectName
bash
undefined如果用户选择“1”或按回车键确认,运行:
bash
aliyun gpdb create-supabase-project \
--biz-region-id <BizRegionId> \
--zone-id <ZoneId> \
--project-name <ProjectName> \
--account-password ‘<Password>’ \
--security-ip-list "127.0.0.1" \
--vpc-id <VpcId> \
--vswitch-id <VSwitchId> \
--project-spec 2C2G \
--storage-size 20 \
--disk-performance-level PL0 \
--pay-type POSTPAY \
--client-token "<ClientToken>" \
--user-agent AlibabaCloud-Agent-Skills然后执行下文所述的成功校验(轮询)。
异步创建 — HTTP重试(未获取到前)
ProjectId- 目标:处理临时的CLI/网络/API错误,避免重复创建不同资源。
本次会话中针对该目标项目的所有创建尝试复用相同的**。 仅当响应中没有**--client-token且错误属于临时错误时,重试创建(总共最多3次,包含首次尝试):例如限流、连接重置、读取超时、ProjectId。重试间隔:5秒 → 15秒 → 45秒。 不要盲目为业务错误重试创建(例如ServiceUnavailable、无效参数) — 停止操作、解释错误、与用户一起修复问题。 如果任何尝试返回**VSwitchIp.NotEnough** → 停止调用创建接口;切换到部署轮询(成功校验)。 如果创建超时但服务端可能已执行成功 → 下次创建相同token/名称的项目前,按名称/区域轮询ProjectId(例如按get-supabase-project过滤ProjectName结果)。list-supabase-projects
bash
undefinedCLIENT_TOKEN: generate once (e.g. uuidgen) before first attempt; reuse on safe create retries.
CLIENT_TOKEN: 首次尝试前生成一次(例如uuidgen);安全重试创建时复用该值。
aliyun gpdb create-supabase-project
--biz-region-id cn-beijing
--zone-id cn-beijing-i
--project-name my_supabase
--account-password '<user-or-generated>'
--security-ip-list "127.0.0.1"
--vpc-id vpc-xxxxx
--vswitch-id vsw-xxxxx
--project-spec 2C2G
--storage-size 20
--disk-performance-level PL0
--pay-type POSTPAY
--client-token "$CLIENT_TOKEN"
--user-agent AlibabaCloud-Agent-Skills
--biz-region-id cn-beijing
--zone-id cn-beijing-i
--project-name my_supabase
--account-password '<user-or-generated>'
--security-ip-list "127.0.0.1"
--vpc-id vpc-xxxxx
--vswitch-id vsw-xxxxx
--project-spec 2C2G
--storage-size 20
--disk-performance-level PL0
--pay-type POSTPAY
--client-token "$CLIENT_TOKEN"
--user-agent AlibabaCloud-Agent-Skills
- **Risk**: High | **Final user confirmation** — full parameter plan approved before execution
- Password: at least 3 of uppercase, lowercase, digits, specials from `!@#$%^&*()_+-=`; length 8–32 (per API)
- Project name: letters/numbers/hyphens/underscores; must start with letter or `_`; length 1–128aliyun gpdb create-supabase-project
--biz-region-id cn-beijing
--zone-id cn-beijing-i
--project-name my_supabase
--account-password '<用户提供或生成的密码>'
--security-ip-list "127.0.0.1"
--vpc-id vpc-xxxxx
--vswitch-id vsw-xxxxx
--project-spec 2C2G
--storage-size 20
--disk-performance-level PL0
--pay-type POSTPAY
--client-token "$CLIENT_TOKEN"
--user-agent AlibabaCloud-Agent-Skills
--biz-region-id cn-beijing
--zone-id cn-beijing-i
--project-name my_supabase
--account-password '<用户提供或生成的密码>'
--security-ip-list "127.0.0.1"
--vpc-id vpc-xxxxx
--vswitch-id vsw-xxxxx
--project-spec 2C2G
--storage-size 20
--disk-performance-level PL0
--pay-type POSTPAY
--client-token "$CLIENT_TOKEN"
--user-agent AlibabaCloud-Agent-Skills
- **风险**:高 | **需要用户最终确认** — 执行前已批准完整参数方案
- 密码要求:至少包含大写、小写、数字、`!@#$%^&*()_+-=`特殊字符中的3种;长度8-32位(符合API要求)
- 项目名称:支持字母、数字、连字符、下划线;必须以字母或`_`开头;长度1-128位Pause Project
暂停项目
bash
aliyun gpdb pause-supabase-project \
--project-id spb-xxxxx \
--user-agent AlibabaCloud-Agent-Skills- Risk: Medium | Final user confirmation required before execution
- Service unavailable after pause, but data is retained
bash
aliyun gpdb pause-supabase-project \
--project-id spb-xxxxx \
--user-agent AlibabaCloud-Agent-Skills- 风险:中 | 执行前需要用户最终确认
- 暂停后服务不可用,但数据会保留
Resume Project
恢复项目
bash
aliyun gpdb resume-supabase-project \
--project-id spb-xxxxx \
--user-agent AlibabaCloud-Agent-Skills- Risk: Medium | Final user confirmation required before execution (mutating)
bash
aliyun gpdb resume-supabase-project \
--project-id spb-xxxxx \
--user-agent AlibabaCloud-Agent-Skills- 风险:中 | 执行前需要用户最终确认(变更操作)
Reset Database Password
重置数据库密码
bash
aliyun gpdb reset-supabase-project-password \
--project-id spb-xxxxx \
--account-password 'NewPass456!' \
--user-agent AlibabaCloud-Agent-Skills- Risk: Medium | Final user confirmation required before execution
- Existing connections using old password will be disconnected
bash
aliyun gpdb reset-supabase-project-password \
--project-id spb-xxxxx \
--account-password 'NewPass456!' \
--user-agent AlibabaCloud-Agent-Skills- 风险:中 | 执行前需要用户最终确认
- 使用旧密码的现有连接会被断开
Modify Security IPs
修改安全IP
bash
aliyun gpdb modify-supabase-project-security-ips \
--project-id spb-xxxxx \
--security-ip-list "10.0.0.1,10.0.0.2/24" \
--user-agent AlibabaCloud-Agent-Skills- Risk: Medium | Final user confirmation required before execution
- Multiple IPs separated by commas, CIDR format supported
bash
aliyun gpdb modify-supabase-project-security-ips \
--project-id spb-xxxxx \
--security-ip-list "10.0.0.1,10.0.0.2/24" \
--user-agent AlibabaCloud-Agent-Skills- 风险:中 | 执行前需要用户最终确认
- 多个IP用逗号分隔,支持CIDR格式
Success Verification
成功校验
Use the steps below first; extended tables and edge cases are in references/verification-method.md.
优先使用以下步骤;扩展表格和边缘场景请参考references/verification-method.md。
After create (create-supabase-project
)
create-supabase-project创建完成后(create-supabase-project
)
create-supabase-project-
Capturefrom the create response (format
ProjectId+ suffix). The create call returns after the request is accepted, not when provisioning finishes. If create fails or times out, list or get to see if the project already exists before another create (samespb-if retrying create per Create Project).--client-token -
Provisioning poll untilor terminal failure — async work often finishes in 3–5 minutes but can run longer under load. Use a two-tier wait:
running- Tier A — primary: every 30 seconds, call , up to 20 attempts (~10 minutes).
get-supabase-project - Tier B — extension (optional): if is still a non-terminal provisioning state (e.g. creating / pending — exact strings depend on API), inform the user and add up to 10 more attempts (~5 minutes) before giving up.
Status
- Tier A — primary: every 30 seconds, call
-
Per-poll retry (transient): For each scheduled poll, if get fails with network/read timeout or throttling, retry the same get up to 3 times with 5 seconds between tries, then continue the outer loop (still count as one poll cycle).
-
Interpret:
Status- → create / provisioning succeeded; instance is ready — report success to the user.
running - Terminal failure (if API returns explicit failure/cancelled states) → stop polling; report error code/message; do not assume success.
- Empty / unknown / in-progress → keep polling within Tier A/B limits.
bash
PROJECT_ID="spb-xxxxx"
STATUS=""
MAX_PRIMARY=20
SLEEP=30
for attempt in $(seq 1 "$MAX_PRIMARY"); do
RAW=""
for inner in 1 2 3; do
RAW=$(aliyun gpdb get-supabase-project \
--project-id "$PROJECT_ID" \
--read-timeout 90 \
--user-agent AlibabaCloud-Agent-Skills \
2>/dev/null) && break
sleep 5
done
STATUS=$(echo "$RAW" | jq -r '.Status // empty')
[ "$STATUS" = "running" ] && break
sleep "$SLEEP"
done-
从创建响应中捕获(格式为**
ProjectId+ 后缀**)。创建调用在请求被接收后就会返回,而非部署完成时。如果创建失败或超时,再次创建前请先执行列表或查询操作确认项目是否已存在(如果按照创建项目章节重试创建,请使用相同的**spb-**)。--client-token -
部署轮询直到状态为或最终失败 — 异步操作通常在3-5分钟内完成,但负载高时可能耗时更长。使用两级等待机制:
running- 第一级 — 主轮询:每30秒调用一次**,最多20次**(约10分钟)。
get-supabase-project - 第二级 — 扩展轮询(可选):如果仍为非最终部署状态(例如creating / pending — 具体字符串取决于API),告知用户并最多追加10次尝试(约5分钟),仍未完成则放弃。
Status
- 第一级 — 主轮询:每30秒调用一次**
-
单轮询重试(临时错误):对于每次计划的轮询,如果get调用因网络/读取超时或限流失败,最多重试3次相同的get调用,间隔5秒,之后继续外层循环(仍计为一次轮询周期)。
-
解读:
Status- → 创建/部署成功;实例就绪 — 向用户报告成功。
running - 最终失败(如果API返回明确的失败/取消状态) → 停止轮询;报告错误代码/消息;不要默认操作成功。
- 空 / 未知 / 进行中 → 在第一/二级轮询限制内继续轮询。
bash
PROJECT_ID="spb-xxxxx"
STATUS=""
MAX_PRIMARY=20
SLEEP=30
for attempt in $(seq 1 "$MAX_PRIMARY"); do
RAW=""
for inner in 1 2 3; do
RAW=$(aliyun gpdb get-supabase-project \
--project-id "$PROJECT_ID" \
--read-timeout 90 \
--user-agent AlibabaCloud-Agent-Skills \
2>/dev/null) && break
sleep 5
done
STATUS=$(echo "$RAW" | jq -r '.Status // empty')
[ "$STATUS" = "running" ] && break
sleep "$SLEEP"
doneOptional: extend with user consent +10 polls if still provisioning
可选:如果仍在部署中,经用户同意后追加10次轮询
[ "$STATUS" = "running" ] || exit 1
If `jq` is unavailable, inspect the **get** output for `Status` each time; same retry and tier rules apply.[ "$STATUS" = "running" ] || exit 1
如果无法使用`jq`,每次检查**get**输出中的`Status`即可;重试和分级规则相同。After other operations
其他操作完成后
| Operation | Verify with | Success hint |
|---|---|---|
| List | | |
| Get / API keys / dashboard | matching | Expected fields in JSON, no error code |
| Pause / resume | | |
| Reset password / modify IPs | | Whitelist or success response as applicable; password change is also validated by reconnecting (see reference doc) |
| 操作 | 校验方式 | 成功提示 |
|---|---|---|
| 列表 | | JSON中存在 |
| 查询 / API密钥 / 控制台账号 | 对应的 | JSON中存在预期字段,无错误代码 |
| 暂停 / 恢复 | | |
| 重置密码 / 修改IP | | 白名单符合预期或返回成功响应;密码变更也可通过重连验证(参见参考文档) |
Best Practices
最佳实践
- Read-only list/get/describe (see Final execution confirmation) may run without a final execute prompt; never run create/pause/resume/reset-password/modify-IPs without explicit final user confirmation
- If users lack VPC/VSwitch IDs, discover with (and optionally
vpc describe-vswitches) before createvpc describe-vpcs - Must issue warning before pausing projects (service will become unavailable)
- Do not recommend setting whitelist to 0.0.0.0/0 due to security risks
- is always
ProjectId— if the user’s id is wrong or unknown, usespb-…to resolve by name or idlist-supabase-projects - Never substitute CLI for
supabaseon this productaliyun gpdb - Pausing projects saves costs while data is preserved
- All commands must include
--user-agent AlibabaCloud-Agent-Skills - After create, always run provisioning poll (or confirm terminal failure) — do not treat “create returned ProjectId” as “instance ready”
- 只读的list/get/describe操作(参见最终执行确认)无需最终执行提示即可运行;严禁在未获得用户明确最终确认的情况下运行创建/暂停/恢复/重置密码/修改IP操作
- 如果用户没有VPC/VSwitch ID,创建前通过(可选搭配
vpc describe-vswitches)自动发现vpc describe-vpcs - 暂停项目前必须发出警告(服务将不可用)
- 出于安全风险考虑,不推荐将白名单设置为0.0.0.0/0
- 始终为**
ProjectId格式 — 如果用户提供的ID错误或未知,使用spb-…**按名称或ID匹配list-supabase-projects - 针对该产品,严禁用**CLI替代
supabase**命令aliyun gpdb - 暂停项目可节省成本,同时保留数据
- 所有命令必须包含
--user-agent AlibabaCloud-Agent-Skills - 创建完成后,必须执行部署轮询(或确认最终失败) — 不要将“创建返回ProjectId”等同于“实例就绪”
Reference Documents
参考文档
| Document | Description |
|---|---|
| references/cli-installation-guide.md | CLI Installation Guide |
| references/ram-policies.md | RAM Permission Requirements |
| references/related-apis.md | Related API List |
| references/verification-method.md | Operation Verification Methods |
| references/acceptance-criteria.md | Acceptance Criteria |
| references/create-supabase-project-parameters.md | Create API parameters, defaults, VPC/VSwitch discovery |
| 文档 | 描述 |
|---|---|
| references/cli-installation-guide.md | CLI安装指南 |
| references/ram-policies.md | RAM权限要求 |
| references/related-apis.md | 相关API列表 |
| references/verification-method.md | 操作校验方法 |
| references/acceptance-criteria.md | 验收标准 |
| references/create-supabase-project-parameters.md | 创建API参数、默认值、VPC/VSwitch发现规则 |