Alibaba Cloud Flink Instance Manage
Use this skill to operate Alibaba Cloud Flink instances, namespaces, and tags
through
.
Execution Entrypoint Lock (mandatory)
All resource operations in this skill must be executed through:
bash
python scripts/instance_ops.py <command> ...
Hard constraints:
- Do not execute resource mutations with raw product commands such as
or .
- Do not bypass by calling OpenAPI/SDK snippets directly
during task execution.
- and are allowed only as environment
diagnostics, not as operation execution entrypoints.
If
cannot run (for example
):
- Follow
references/python-environment-setup.md
to install dependencies and verify.
- Re-run
python scripts/instance_ops.py describe_regions
.
- If still blocked, stop and report the blocker; do not fallback to raw operations.
Core lifecycle fast-path (high priority)
When user asks an end-to-end lifecycle flow (create/tag/query/delete), execute this
strictly in order on the same instance context:
- (with ) -> capture created
- wait/read-back () until target instance is visible/operable
- -> verification
- -> verification
- verification for target instance
- (with ) -> absence verification
Hard rules for lifecycle flows:
- Do not switch to another pre-existing instance in the middle of a flow unless
user explicitly approves the switch.
- If target instance is still provisioning, poll with read checks first; do not
claim tag/delete success without readiness verification.
- If the same-instance chain cannot be completed, mark and report
blocker/remediation; never report completed with partial substitution.
0) Trigger gate (mandatory)
Apply this skill only when both are true:
- User intent is a Flink cloud resource operation (, ,
, , , , namespace ops, tag ops, cleanup).
- Request clearly targets Flink instance scope (for example Flink ,
namespace under a Flink instance, Flink instance tags, Flink instance billing
or spec changes, Flink instance lifecycle flow).
Do not trigger for unrelated prompts, generic coding questions, or tasks that do
not require Flink cloud operations.
Do not trigger for non-Flink Alibaba Cloud resources (for example ECS/RDS/SLB
instances, VPC-only operations, or generic "Aliyun instance" requests without
Flink context).
If request intent is ambiguous, ask one clarification question before running
any command.
1) Quick checks
- Verify toolchain and credentials before any resource operation.
- Use explicit user-provided parameters for region, instance, namespace, and spec.
- Run read operations first when a write operation depends on current resource state.
bash
aliyun version
aliyun configure list
Use
as the only resource-operation execution entrypoint.
For toolchain verification, run a read-only operation instead of
:
bash
python scripts/instance_ops.py describe_regions
If CLI is missing or outdated, read
references/cli-installation-guide.md
.
If permission errors appear, read
references/ram-policies.md
.
Credential setup (default credential chain only)
Do not export or hardcode AccessKey ID/Secret in scripts or shell commands.
Use Alibaba Cloud default credential chain instead:
bash
# Option A (recommended): use default CLI profile credentials
aliyun configure
aliyun configure list
Option B: when running on Alibaba Cloud compute environments, attach a RAM role
(ECS/ACK/FC/SAE, etc.) and rely on role-based temporary credentials.
2) Mandatory safety rules
For any write operation, confirmation flags are mandatory:
Use the single source of truth in
references/required-confirmation-model.md
(section 2.2) for the
command-to-flag mapping.
Additional guardrails (must follow):
- Never auto-switch write operation type after a failure.
- Any fallback that changes operation type requires explicit user approval first.
- Never substitute target resource (instance/namespace) in a lifecycle flow without
explicit user approval.
- Never assume default region; always require .
- Never claim success from write response only.
If a required flag is missing:
- Do not execute.
- Rebuild the command with the correct flag.
- Execute once.
Never use blind retries. Follow the retry policy in
references/output-handling.md
.
3) End-to-end execution protocol
Before running any mutating command (
,
,
,
namespace writes, tag writes):
- Read
references/required-confirmation-model.md
- Read
references/output-handling.md
- Use command examples in
references/core-execution-flow.md
- For create-namespace, tag, delete-cleanup, follow
references/e2e-playbooks.md
Execution steps:
- Plan: list target resources and expected final state.
- Execute: run write command with required confirmation flag.
- Verify: run follow-up read command and validate state change.
- Report: provide closure output including:
- command result ( / )
- verification evidence (read-back result)
- final status ( / ) with reason
4) Batch execution protocol
When user asks batch operations (or provides multiple IDs/names):
- Keep deterministic order (input order).
- Execute and verify each item independently.
- Continue processing remaining items after a single-item failure unless user
explicitly requires all-or-nothing.
- Return per-item summary:
item -> write result -> read-back verification
.
5) Idempotency and consistency rules
- Maximum attempts for same write command: 2 (initial + one corrected retry).
- can be treated as success only if read-back matches expected
target state.
- during delete/untag can be treated as success only if read-back
confirms absence.
- For eventual consistency, perform read-back up to 3 checks before deciding
retry/fail.
6) Completion gate (mandatory)
A write task is complete only when all checks pass:
- Write command returns (or validated idempotent equivalent).
- Follow-up read confirms expected state.
- Final output states what changed and how it was verified.
If any check fails, mark task as incomplete and provide remediation guidance.
7) References
references/quick-start.md
: compact command checklist
references/required-confirmation-model.md
: confirmation gate and flag mapping
references/core-execution-flow.md
: operation command flow and examples
references/e2e-playbooks.md
: end-to-end playbooks for key scenarios
references/output-handling.md
: output parsing and retry handling
references/related-apis.md
: API and CLI mapping
references/ram-policies.md
: required RAM permissions and policy guidance
references/verification-method.md
: post-execution verification steps
references/acceptance-criteria.md
: expected success and failure behaviors
references/python-environment-setup.md
: Python runtime and dependency setup
references/cli-installation-guide.md
: Aliyun CLI install and configuration