Alibaba Cloud Flink Instance Manage
Operate Alibaba Cloud Flink VVP resources with a strict create/query scope through one wrapper script.
Scope and Entrypoint
Trigger Rules
Use this skill when prompts are about Flink instance/namespace lifecycle operations.
- Positive intent examples:
- "Create a Flink instance in cn-beijing"
- "List Flink instances and status"
- "Describe namespaces for instance f-cn-xxx"
- "查询 Flink 实例标签"
- "Flink 可用区有哪些"
- Negative intent examples:
- ECS/Kafka/OSS/DataWorks operations
- Generic questions (weather, translation, etc.)
- Flink SQL / Flink job authoring or runtime tuning
- Ambiguous prompts:
- Ask one clarification question: instance/namespace management vs SQL/job operations.
Intent to Command Mapping
| User intent |
Command |
| Query all instances in a region |
describe --region_id <REGION> |
| Create instance |
create ... --confirm |
| Query namespaces under an instance |
describe_namespaces --region_id <REGION> --instance_id <ID> |
| Create namespace |
create_namespace ... --confirm |
| Query supported regions/zones |
describe_regions / describe_zones --region_id <REGION> |
| Query tags |
list_tags --region_id <REGION> --resource_type <TYPE> [--resource_ids ...] |
Operating Rules
- Confirmation is mandatory for create commands
create and create_namespace must include --confirm.
- Verify create results with read-back
- Do not conclude success from create response alone.
- Retry policy is strict
- Maximum 2 attempts for the same command (initial + one corrected retry).
- No automatic operation switching
- If an operation fails, do not switch to a different operation without user approval.
- Lifecycle target lock
- In
create -> create_namespace flow, namespace must target the same newly created InstanceId unless user approves fallback.
- Namespace pre-check is required
- Before
create_namespace, check instance status/resources and existing namespace allocation.
- No secret exposure
- Do not output or request plaintext AK/SK. Use default credential chain guidance.
- Do not invent parameters
- Never fabricate VPC/VSwitch/instance IDs.
- Keep auditable confirmation evidence
- Lifecycle outputs must contain
SafetyCheckRequired or explicit --confirm evidence.
- No partial-completion claims for lifecycle flows
- For flows requiring both
create and create_namespace, overall status can be completed only when both create operations succeed.
- No automatic capacity scaling
- If
create_namespace fails due to insufficient resources, report it clearly and ask user to manually scale resources outside this skill scope.
Execution Protocol
Step 1: Classify request
- In-scope create/query for Flink instance/namespace/tag/region/zone -> continue.
- Out-of-scope or non-Flink -> reject or route with explanation.
Step 2: Validate parameters
- Apply
references/parameter-validation.md.
- If required parameters are missing, ask user or return clear remediation.
Step 3: Execute command
- Query commands: run once unless transient query error.
- Create commands: construct final command string and verify
--confirm is present before execution.
Step 4: Verify create outcomes
- For
create: verify with describe --region_id <REGION>.
- For
create_namespace: verify with describe_namespaces --region_id <REGION> --instance_id <ID>.
- Use up to 3 read checks with short backoff before concluding the create is not reflected yet.
- For chained
create -> create_namespace:
- poll
describe --region_id <REGION> on the same InstanceId every 30 seconds
- max wait: 10 minutes
- if still not
RUNNING, stop and provide next action (wait/retry later)
- do not switch to another instance without explicit user approval
- if namespace create fails, mark lifecycle chain as
failed/not_ready, not completed
- for
InsufficientResources, ask user to manually scale the instance and retry later
Key References
- Start here:
references/README.md
references/quick-start.md
references/trigger-recognition-guide.md
references/core-execution-flow.md
references/command-templates.md
| Document |
Purpose |
references/parameter-validation.md |
Pre-execution validation checklist |
references/e2e-playbooks.md |
Complete execution sequences |
references/common-failures.md |
Typical mistakes and fixes |
references/required-confirmation-model.md |
Confirmation gate rules |
references/instance-state-management.md |
Instance state and readiness checks |
references/output-handling.md |
Output parsing and retry policy |
references/verification-method.md |
Verification patterns after create/query |
references/acceptance-criteria.md |
Completion checklist for normal operations |
references/python-environment-setup.md |
Python dependency and auth setup |
references/cli-installation-guide.md |
Aliyun CLI diagnostics setup |
references/ram-policies.md |
Required RAM permissions |
references/related-apis.md |
API and command mapping |
Output Format
All commands return JSON:
{
"success": true,
"operation": "<command>",
"confirmation_check": {
"required_flag": "--confirm",
"provided": true,
"status": "passed"
},
"data": {},
"request_id": "..."
}
confirmation_check appears on create operations and is used for auditable safety evidence.
Exit codes: 0 = success, 1 = error.
1---
2name: alibabacloud-flink-instance-manage
3description: >
4 Manage Alibaba Cloud Flink VVP instances and namespaces through create/query
5 operations only. Use when user asks to create or query Flink instances,
6 namespaces, regions, zones, or tags in Chinese or English. Reject Flink SQL/job
7 requests, unrelated cloud services (ECS/Kafka/OSS/DataWorks), and all
8 update/delete operations.
9license: Apache-2.0
10compatibility: >
11 Requires Python dependencies from assets/requirements.txt, valid Alibaba Cloud
12 credentials, and network access to Flink OpenAPI (2021-10-28). Aliyun CLI is
13 optional and only used for environment diagnostics/credential inspection.
14metadata:
15 domain: aiops
16 owner: flink-team
17 contact: flink-team@alibaba-inc.com
18---
19
20# Alibaba Cloud Flink Instance Manage
21
22Operate Alibaba Cloud Flink VVP resources with a strict create/query scope through one wrapper script.
23
24## Scope and Entrypoint
25
26- Always run operations through:
27 ```bash
28 python scripts/instance_ops.py <command> [options]
29 ```
30- Allowed commands: `create`, `create_namespace`, `describe`, `describe_regions`, `describe_zones`, `describe_namespaces`, `list_tags`
31- Out of scope: update/delete, Flink SQL/job runtime operations, and non-Flink services
32
33## Trigger Rules
34
35Use this skill when prompts are about Flink instance/namespace lifecycle operations.
36
37- Positive intent examples:
38 - "Create a Flink instance in cn-beijing"
39 - "List Flink instances and status"
40 - "Describe namespaces for instance f-cn-xxx"
41 - "查询 Flink 实例标签"
42 - "Flink 可用区有哪些"
43- Negative intent examples:
44 - ECS/Kafka/OSS/DataWorks operations
45 - Generic questions (weather, translation, etc.)
46 - Flink SQL / Flink job authoring or runtime tuning
47- Ambiguous prompts:
48 - Ask one clarification question: instance/namespace management vs SQL/job operations.
49
50## Intent to Command Mapping
51
52| User intent | Command |
53|---|---|
54| Query all instances in a region | `describe --region_id <REGION>` |
55| Create instance | `create ... --confirm` |
56| Query namespaces under an instance | `describe_namespaces --region_id <REGION> --instance_id <ID>` |
57| Create namespace | `create_namespace ... --confirm` |
58| Query supported regions/zones | `describe_regions` / `describe_zones --region_id <REGION>` |
59| Query tags | `list_tags --region_id <REGION> --resource_type <TYPE> [--resource_ids ...]` |
60
61## Operating Rules
62
631. **Confirmation is mandatory for create commands**
64 - `create` and `create_namespace` must include `--confirm`.
652. **Verify create results with read-back**
66 - Do not conclude success from create response alone.
673. **Retry policy is strict**
68 - Maximum 2 attempts for the same command (initial + one corrected retry).
694. **No automatic operation switching**
70 - If an operation fails, do not switch to a different operation without user approval.
715. **Lifecycle target lock**
72 - In `create -> create_namespace` flow, namespace must target the same newly created `InstanceId` unless user approves fallback.
736. **Namespace pre-check is required**
74 - Before `create_namespace`, check instance status/resources and existing namespace allocation.
757. **No secret exposure**
76 - Do not output or request plaintext AK/SK. Use default credential chain guidance.
778. **Do not invent parameters**
78 - Never fabricate VPC/VSwitch/instance IDs.
799. **Keep auditable confirmation evidence**
80 - Lifecycle outputs must contain `SafetyCheckRequired` or explicit `--confirm` evidence.
8110. **No partial-completion claims for lifecycle flows**
82 - For flows requiring both `create` and `create_namespace`, overall status can be `completed` only when both create operations succeed.
8311. **No automatic capacity scaling**
84 - If `create_namespace` fails due to insufficient resources, report it clearly and ask user to manually scale resources outside this skill scope.
85
86## Execution Protocol
87
88### Step 1: Classify request
89- In-scope create/query for Flink instance/namespace/tag/region/zone -> continue.
90- Out-of-scope or non-Flink -> reject or route with explanation.
91
92### Step 2: Validate parameters
93- Apply `references/parameter-validation.md`.
94- If required parameters are missing, ask user or return clear remediation.
95
96### Step 3: Execute command
97- Query commands: run once unless transient query error.
98- Create commands: construct final command string and verify `--confirm` is present before execution.
99
100### Step 4: Verify create outcomes
101- For `create`: verify with `describe --region_id <REGION>`.
102- For `create_namespace`: verify with `describe_namespaces --region_id <REGION> --instance_id <ID>`.
103- Use up to 3 read checks with short backoff before concluding the create is not reflected yet.
104- For chained `create -> create_namespace`:
105 - poll `describe --region_id <REGION>` on the same `InstanceId` every 30 seconds
106 - max wait: 10 minutes
107 - if still not `RUNNING`, stop and provide next action (wait/retry later)
108 - do not switch to another instance without explicit user approval
109 - if namespace create fails, mark lifecycle chain as `failed`/`not_ready`, not `completed`
110 - for `InsufficientResources`, ask user to manually scale the instance and retry later
111
112## Key References
113
114- Start here:
115 - `references/README.md`
116 - `references/quick-start.md`
117 - `references/trigger-recognition-guide.md`
118 - `references/core-execution-flow.md`
119 - `references/command-templates.md`
120
121| Document | Purpose |
122|----------|---------|
123| `references/parameter-validation.md` | Pre-execution validation checklist |
124| `references/e2e-playbooks.md` | Complete execution sequences |
125| `references/common-failures.md` | Typical mistakes and fixes |
126| `references/required-confirmation-model.md` | Confirmation gate rules |
127| `references/instance-state-management.md` | Instance state and readiness checks |
128| `references/output-handling.md` | Output parsing and retry policy |
129| `references/verification-method.md` | Verification patterns after create/query |
130| `references/acceptance-criteria.md` | Completion checklist for normal operations |
131| `references/python-environment-setup.md` | Python dependency and auth setup |
132| `references/cli-installation-guide.md` | Aliyun CLI diagnostics setup |
133| `references/ram-policies.md` | Required RAM permissions |
134| `references/related-apis.md` | API and command mapping |
135
136## Output Format
137
138All commands return JSON:
139```json
140{
141 "success": true,
142 "operation": "<command>",
143 "confirmation_check": {
144 "required_flag": "--confirm",
145 "provided": true,
146 "status": "passed"
147 },
148 "data": {},
149 "request_id": "..."
150}
151```
152
153`confirmation_check` appears on create operations and is used for auditable safety evidence.
154
155Exit codes: `0` = success, `1` = error.