{"id":28356,"library":"tencentcloud-sdk-python-ssa","title":"Tencent Cloud SSA SDK for Python","description":"The official Tencent Cloud SDK for the Security Situational Awareness (SSA) service, providing Python bindings to manage security incidents and risks. Current version: 3.0.1459. Updated frequently, often multiple times per month.","status":"active","version":"3.0.1459","language":"python","source_language":"en","source_url":"https://github.com/TencentCloud/tencentcloud-sdk-python","tags":["tencentcloud","ssa","security","situational-awareness"],"install":[{"cmd":"pip install tencentcloud-sdk-python-ssa","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core SDK required for authentication and base client","package":"tencentcloud-sdk-python-common","optional":false}],"imports":[{"note":"Correct import path includes versioned subpackage (v20180608). Common mistake: omitting the version.","wrong":"from tencentcloud.ssa import SsaClient","symbol":"SsaClient","correct":"from tencentcloud.ssa.v20180608 import ssa_client"},{"note":"Models are also under the versioned path.","wrong":"from tencentcloud.ssa import models","symbol":"models","correct":"from tencentcloud.ssa.v20180608 import models"}],"quickstart":{"code":"import os\nfrom tencentcloud.common import credential\nfrom tencentcloud.common.profile.client_profile import ClientProfile\nfrom tencentcloud.common.profile.http_profile import HttpProfile\nfrom tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException\nfrom tencentcloud.ssa.v20180608 import ssa_client, models\n\ntry:\n    cred = credential.Credential(\n        os.environ.get('TENCENTCLOUD_SECRET_ID', ''),\n        os.environ.get('TENCENTCLOUD_SECRET_KEY', '')\n    )\n    httpProfile = HttpProfile()\n    httpProfile.endpoint = \"ssa.tencentcloudapi.com\"\n    clientProfile = ClientProfile()\n    clientProfile.httpProfile = httpProfile\n    client = ssa_client.SsaClient(cred, \"ap-guangzhou\", clientProfile)\n\n    req = models.DescribeAlertListRequest()\n    req.PageIndex = 1\n    req.PageSize = 10\n    resp = client.DescribeAlertList(req)\n    print(resp.to_json_string())\nexcept TencentCloudSDKException as err:\n    print(err)","lang":"python","description":"Initialize client and describe alert list."},"warnings":[{"fix":"Use the import pattern: from tencentcloud.ssa.v20180608 import ...","message":"The import path includes a versioned subpackage (v20180608). This version string can change in future SDK releases. Always check the latest API version.","severity":"gotcha","affected_versions":"all"},{"fix":"Pass a valid Tencent Cloud region (e.g., 'ap-guangzhou') to SsaClient constructor.","message":"Region parameter is required for client initialization. Incorrect region may cause authentication or service errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Set endpoint via HttpProfile if needed.","message":"Endpoints default to ssa.tencentcloudapi.com, but may be overridden per region. Check official documentation for region-specific endpoints.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install tencentcloud-sdk-python-ssa and use correct import: from tencentcloud.ssa.v20180608 import ssa_client","cause":"The ssa package is not installed or import path is incorrect.","error":"ModuleNotFoundError: No module named 'tencentcloud.ssa'"},{"fix":"Add: from tencentcloud.ssa.v20180608 import models","cause":"Missing import of models submodule.","error":"AttributeError: module 'tencentcloud.ssa.v20180608' has no attribute 'models'"},{"fix":"Use a supported region, e.g., 'ap-guangzhou', 'ap-shanghai', 'ap-beijing'.","cause":"Region passed to client is not valid for SSA service.","error":"tencentcloud.common.exception.tencent_cloud_sdk_exception.TencentCloudSDKException: [TencentCloudSDKException] code: UnsupportedRegion error: the region is not supported"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}