skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
aliyun/alibabacloud-aiops-skills241 installs

alibabacloud-flink-instance-manage

Use when asked to create or query Alibaba Cloud Flink instances, create or list Flink namespaces, list supported Flink regions or availability zones, or query Flink resource tags. For Flink AI service, use only when the operation directly targets the account's regional service to query its status or free quota and usage, activate or deactivate the service, or query or change its closure protection (deletion protection).

How do I install this agent skill?

npx skills add https://github.com/aliyun/alibabacloud-aiops-skills --skill alibabacloud-flink-instance-manage
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill is a professional tool for managing Alibaba Cloud Flink resources and AI services. It follows security best practices by using official SDKs, requiring explicit user confirmation for all write operations, and providing comprehensive guidance on secure credential management and RAM policies.

  • Socketpass

    No alerts

  • Snykwarn

    Risk: MEDIUM · 1 issue

  • ZeroLeakspass

    Score: 93/100 · 2 sections analyzed

What does this agent skill do?

Alibaba Cloud Flink Instance Manage

Use one script to manage Alibaba Cloud Flink instances, namespaces, and regional Flink AI services.

Scope and Entrypoint

  • Always run operations through:
    python scripts/instance_ops.py <command> [options]
    
  • Instance, namespace, and discovery commands include create, create_namespace, describe, describe_regions, describe_zones, describe_namespaces, and list_tags.
  • AI service commands include get_flink_ai_service, get_flink_ai_service_free_quota, open_flink_ai_service, close_flink_ai_service, and modify_ai_service_protection.
  • Instance or namespace updates and deletions, Flink SQL and job operations, AI assistant conversations, intelligent patrol, and other cloud products are outside this skill's scope.

Trigger Rules

Match the requested action and its target to a command below. For Flink AI service, the action must match a service management command and directly target the regional service or its closure protection. Route by the requested action when Flink AI service is mentioned as the location of a feature. Use the Flink workspace operations skill for ordinary job troubleshooting and the Flink AI operations skill for cloud AI assistant conversations, assistant diagnosis, and intelligent patrol or its reports.

  • Positive intent examples:
    • "Create a Flink instance in cn-beijing"
    • "List Flink instances and status"
    • "Describe namespaces for instance f-cn-xxx"
  • Chinese trigger examples:
    • "查询 Flink 实例标签"
    • "Flink 可用区有哪些"
    • "查询杭州的 Flink AI 服务是否开通"
    • "查看 Flink AI 服务的免费额度使用情况"
    • "在上海开通 Flink AI 服务"
    • "关闭北京的 Flink AI 服务"
    • "开启 Flink AI 服务的关闭保护"
  • Negative intent examples:
    • ECS/Kafka/OSS/DataWorks operations
    • Generic questions (weather, translation, etc.)
    • Flink SQL, job authoring or runtime tuning, and ordinary job troubleshooting such as checkpoint timeouts. Use the Flink workspace operations skill.
    • Cloud AI assistant conversations or diagnosis. Use the Flink AI operations skill for requests such as "用 Flink AI 服务里的云端智能助手诊断我的作业为什么检查点超时。"
    • Intelligent patrol or patrol reports. Use the Flink AI operations skill for requests such as "查询 Flink AI 服务里的智能巡检报告。"
  • Ambiguous prompts:
    • Ask one clarification question: instance/namespace management vs SQL/job operations.
    • Clarify whether "开启 AI" refers to activating the regional Flink AI service, using the AI assistant, or configuring patrol.

Intent to Command Mapping

Initialize SKILL_SESSION_ID and SKILL_VERSION before running an AI service command. Session setup

User intentCommand
Query all instances in a regiondescribe --region_id <REGION>
Create instancecreate ... --confirm
Query namespaces under an instancedescribe_namespaces --region_id <REGION> --instance_id <ID>
Create namespacecreate_namespace ... --confirm
Query supported regions/zonesdescribe_regions / describe_zones --region_id <REGION>
Query tagslist_tags --region_id <REGION> --resource_type <TYPE> [--resource_ids ...]
Query Flink AI service statusget_flink_ai_service --region_id <REGION>
Query Flink AI service free quotaget_flink_ai_service_free_quota --region_id <REGION>
Activate Flink AI serviceopen_flink_ai_service --region_id <REGION> --confirm
Deactivate Flink AI serviceclose_flink_ai_service --region_id <REGION> --confirm
Change closure protectionmodify_ai_service_protection --region_id <REGION> --deletion_protection <BOOL> --confirm

Operating Rules

  1. Confirm write operations
    • Confirm the target and parameters before creating instances or namespaces. Pass --confirm when running the command.
    • For AI service activation, deactivation, and either direction of a closure protection change, follow the AI service write authorization procedure.
  2. Verify changes with a follow-up query
    • After the API accepts the request, query the resource to verify that it reached the requested state.
  3. Retry policy is strict
    • Maximum 2 attempts for the same command (initial + one corrected retry).
  4. No automatic operation switching
    • If an operation fails, do not switch to a different operation without user approval.
  5. Lifecycle target lock
    • In create -> create_namespace flow, namespace must target the same newly created InstanceId unless user approves fallback.
  6. Namespace pre-check is required
    • Before create_namespace, check instance status/resources and existing namespace allocation.
  7. No secret exposure
    • Do not output or request plaintext AK/SK. Use default credential chain guidance.
  8. Do not invent parameters
    • Never fabricate VPC/VSwitch/instance IDs.
  9. Keep auditable confirmation evidence
    • Lifecycle outputs must contain SafetyCheckRequired or explicit --confirm evidence.
  10. 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.
  1. 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.

RAM Authorization

Check the required permissions in the RAM reference.

[MUST] Permission Failure Handling: When any command or API call fails due to permission errors at any point during execution, follow this process:

  1. Read references/ram-policies.md to get the full list of permissions required by this SKILL
  2. Use ram-permission-diagnose skill to guide the user through requesting the necessary permissions
  3. Pause and wait until the user confirms that the required permissions have been granted

Observability (MUST follow for every aliyun command)

Before any cloud API invocation, read references/manifest.json from this skill's root and use only its top-level non-empty string version as {skill-version}. If the file is missing, invalid, or the field is absent/empty/not a string, STOP and report the error. NEVER invent, guess, or reuse a version from another skill.

Bind version and session to the current skill name and skill root. Before this skill's first cloud API invocation in a conversation, generate a fresh random 32-character lowercase hexadecimal session ID. Reuse that session ID for this skill throughout the conversation; each skill MUST use a distinct session ID. NEVER copy one from documentation, examples, another skill, or a previous conversation, and NEVER send the literal {session-id} placeholder. When switching skills or returning to this skill, reread this skill's manifest; never cross-skill reuse either value.

Rule: Every aliyun CLI command that calls a cloud API MUST include the --user-agent flag. Local utility commands (e.g. configure, plugin, version) do not support this flag and should be excluded.

Markdown examples may omit the flag for brevity. The Agent MUST append the exact flag below to every actual execution, including commands generated or extended at runtime; do not repeat UA boilerplate in every example block.

--user-agent "AlibabaCloud-Agent-Skills/alibabacloud-flink-instance-manage/{session-id} skill-version/{skill-version}"

The entire UA value MUST be double-quoted because it contains a space. Do not skip, alter, or omit it on any aliyun API command.

Initialize the Session

Run the following from the skill root before this skill's first cloud API request in a conversation.

SKILL_VERSION="$(python3 -c '
import json
with open("references/manifest.json", encoding="utf-8") as manifest:
    data = json.load(manifest)
version = data.get("version") if isinstance(data, dict) else None
if not isinstance(version, str) or not version.strip():
    raise SystemExit("Invalid skill version in references/manifest.json")
print(version)
')" &&
SKILL_SESSION_ID="$(python3 -c 'import secrets; print(secrets.token_hex(16))')" &&
export SKILL_VERSION SKILL_SESSION_ID

If initialization fails, stop and report the error. Run subsequent commands in the same shell or pass both values when using a separate shell. When returning to this skill, rerun the version lookup and reuse the session ID generated for this skill in the current conversation.

Python SDK execution

Pass both scoped values to scripts/instance_ops.py to construct the same User-Agent. AI service commands require both values. Confirm the region before running the command.

SKILL_SESSION_ID="$SKILL_SESSION_ID" SKILL_VERSION="$SKILL_VERSION" \
  python3 scripts/instance_ops.py get_flink_ai_service --region_id "$FLINK_REGION"

Execution Protocol

IMPORTANT: Parameter Confirmation — Before executing any command or API call, ALL user-customizable parameters (e.g., RegionId, instance names, CIDR blocks, passwords, domain names, resource specifications, etc.) MUST be confirmed with the user. Do NOT assume or use default values without explicit user approval.

Step 1: Classify request

  • Match the requested Flink instance, namespace, tag, region, zone, or AI service operation to a command above.
  • 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.
  • AI service commands target the Alibaba Cloud account associated with the current credentials and the explicitly specified region. Validate the target using the AI service guide.

Step 3: Execute command

  • Query commands: run once unless transient query error.
  • Check for --confirm before running a write command.
  • For a real AI service write, apply the authorization procedure below before adding --confirm or sending the API request.

AI Service Write Authorization

  1. Query the current state in the user-confirmed region. Present the Alibaba Cloud account, region, current state, exact proposed operation, and its impact. For a protection change, include the current and requested protection settings.
  2. Ask the user to authorize that specific write and wait for an explicit affirmative response to the plan. The initial request starts this approval process. Keep the write pending if the reply is absent, ambiguous, or declines approval.
  3. Pass --confirm only for the approved write. Obtain separate approval for any subsequent write, including closing the service after disabling protection. Recheck the state before requesting approval to retry after an uncertain result.

Step 4: Verify changes with a follow-up query

  • For create: verify with describe --region_id <REGION>.
  • For create_namespace: verify with describe_namespaces --region_id <REGION> --instance_id <ID>.
  • After an AI service change, run get_flink_ai_service in the same region. Verify RUNNING after activation, CLOSED after deactivation, or the requested DeletionProtection value after changing protection.
  • 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
DocumentPurpose
references/parameter-validation.mdPre-execution validation checklist
references/e2e-playbooks.mdComplete execution sequences
references/common-failures.mdTypical mistakes and fixes
references/required-confirmation-model.mdConfirmation gate rules
references/instance-state-management.mdInstance state and readiness checks
references/output-handling.mdOutput parsing and retry policy
references/verification-method.mdVerification patterns after create/query
references/acceptance-criteria.mdCompletion checklist for normal operations
references/python-environment-setup.mdPython dependency and auth setup
references/cli-installation-guide.mdAliyun CLI diagnostics setup
references/ram-policies.mdRequired RAM permissions
references/related-apis.mdAPI and command mapping
references/flink-ai-service.mdAI service commands, billing, deactivation impact, and status verification

Output Format

The script writes operation results as JSON to stdout.

{
  "success": true,
  "operation": "<command>",
  "confirmation_check": {
    "required_flag": "--confirm",
    "provided": true,
    "status": "passed"
  },
  "data": {},
  "request_id": "..."
}

confirmation_check records the presence of --confirm for instance and namespace creation, AI service activation and deactivation, and closure protection changes. The agent obtains the human authorization separately for each real AI service write.

Exit code 0 indicates success and 1 indicates an operation error. Argument parsing errors print usage information to stderr and exit with code 2.

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/aliyun/alibabacloud-aiops-skills/alibabacloud-flink-instance-manage">View alibabacloud-flink-instance-manage on skillZs</a>