Category: service
Use Alibaba Cloud PTS OpenAPI to support:
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -U alibabacloud_pts20201020 alibabacloud_tea_openapi
ALICLOUD_ACCESS_KEY_IDALICLOUD_ACCESS_KEY_SECRETALICLOUD_REGION_ID1) Environment variables: ALICLOUD_ACCESS_KEY_ID / ALICLOUD_ACCESS_KEY_SECRET / ALICLOUD_REGION_ID
2) Shared credentials file: ~/.alibabacloud/credentials
If region/environment is unclear, confirm with user before mutating operations.
1) Identify target region, test scene identifiers, and operation scope.
2) Run API discovery to confirm API names and required parameters.
3) Execute read-only APIs first (List / Get / Describe*).
4) Execute mutating operations only after confirming rollback and change window.
5) Save outputs and evidence to output/aliyun-pts-manage/.
PTS2020-10-20https://api.aliyun.com/meta/v1/products/PTS/versions/2020-10-20/api-docs.jsonpython skills/observability/pts/aliyun-pts-manage/scripts/list_openapi_meta_apis.py
Optional arguments:
python skills/observability/pts/aliyun-pts-manage/scripts/list_openapi_meta_apis.py \
--product-code PTS \
--version 2020-10-20 \
--output-dir output/aliyun-pts-manage
List scenes (read-only):
python skills/observability/pts/aliyun-pts-manage/scripts/list_pts_scenes.py \
--region cn-hangzhou \
--page-number 1 \
--page-size 10 \
--output output/aliyun-pts-manage/scenes.txt
Start one scene (mutating):
python skills/observability/pts/aliyun-pts-manage/scripts/start_pts_scene.py \
--region cn-hangzhou \
--scene-id <scene-id> \
--wait \
--output output/aliyun-pts-manage/start-result.json
Stop one scene (mutating):
python skills/observability/pts/aliyun-pts-manage/scripts/stop_pts_scene.py \
--region cn-hangzhou \
--scene-id <scene-id> \
--wait \
--output output/aliyun-pts-manage/stop-result.json
ListPtsScene, GetPtsScene, ListOpenJMeterScenes, GetOpenJMeterSceneCreatePtsScene, SavePtsScene, ModifyPtsScene, DeletePtsScene, DeletePtsScenesStartPtsScene, StopPtsScene, StartTestingJMeterScene, StopTestingJMeterSceneStartDebugPtsScene, StopDebugPtsScene, StartDebuggingJMeterScene, StopDebuggingJMeterSceneListPtsReports, GetPtsReportDetails, GetPtsSceneRunningData, GetPtsSceneRunningStatusSee references/api_quick_map.md for grouped API lists.
scripts/list_openapi_meta_apis.py: fetch metadata and generate API inventory files.scripts/list_pts_scenes.py: list PTS scenes with pagination.scripts/start_pts_scene.py: start a scene and optionally poll running status.scripts/stop_pts_scene.py: stop a scene and optionally poll until non-running.Write generated files and execution evidence to:
output/aliyun-pts-manage/
mkdir -p output/aliyun-pts-manage
for f in skills/observability/pts/aliyun-pts-manage/scripts/*.py; do
python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/aliyun-pts-manage/validate.txt
Pass criteria: command exits 0 and output/aliyun-pts-manage/validate.txt is generated.
output/aliyun-pts-manage/.references/sources.mdreferences/api_quick_map.mdreferences/templates.md共 1 个版本