tccli 3.0.1327.1__py2.py3-none-any.whl → 3.0.1329.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tccli/__init__.py +1 -1
- tccli/services/apm/v20210622/api.json +10 -1
- tccli/services/apm/v20210622/examples.json +2 -2
- tccli/services/bh/v20230418/api.json +9 -0
- tccli/services/cbs/v20170312/api.json +15 -15
- tccli/services/ccc/v20200210/api.json +36 -0
- tccli/services/cdb/v20170320/api.json +21 -3
- tccli/services/cdn/v20180606/examples.json +1 -1
- tccli/services/cdwch/v20200915/api.json +3 -3
- tccli/services/cdwch/v20200915/examples.json +1 -1
- tccli/services/cfs/v20190719/api.json +1 -1
- tccli/services/chc/chc_client.py +53 -0
- tccli/services/chc/v20230418/api.json +62 -0
- tccli/services/chc/v20230418/examples.json +8 -0
- tccli/services/cvm/v20170312/api.json +2 -2
- tccli/services/cwp/v20180228/api.json +92 -1
- tccli/services/dbbrain/v20210527/api.json +4 -4
- tccli/services/dcdb/v20180411/examples.json +1 -1
- tccli/services/dts/v20211206/api.json +3 -3
- tccli/services/emr/v20190103/api.json +175 -10
- tccli/services/ess/ess_client.py +126 -20
- tccli/services/ess/v20201111/api.json +136 -2
- tccli/services/ess/v20201111/examples.json +22 -0
- tccli/services/essbasic/v20210526/api.json +3 -3
- tccli/services/gs/gs_client.py +729 -146
- tccli/services/gs/v20191118/api.json +758 -29
- tccli/services/gs/v20191118/examples.json +88 -0
- tccli/services/hai/hai_client.py +53 -0
- tccli/services/hai/v20230812/api.json +62 -0
- tccli/services/hai/v20230812/examples.json +8 -0
- tccli/services/ioa/ioa_client.py +53 -0
- tccli/services/ioa/v20220601/api.json +263 -0
- tccli/services/ioa/v20220601/examples.json +8 -0
- tccli/services/iotexplorer/v20190423/api.json +57 -6
- tccli/services/iotexplorer/v20190423/examples.json +1 -1
- tccli/services/lighthouse/v20200324/api.json +1 -1
- tccli/services/lke/v20231130/api.json +315 -4
- tccli/services/lke/v20231130/examples.json +4 -4
- tccli/services/mariadb/v20170312/api.json +10 -10
- tccli/services/ocr/v20181119/api.json +76 -11
- tccli/services/partners/v20180321/api.json +7 -7
- tccli/services/sqlserver/v20180328/api.json +29 -2
- tccli/services/ssl/v20191205/api.json +79 -0
- tccli/services/ssl/v20191205/examples.json +6 -6
- tccli/services/tcss/v20201101/api.json +58 -3
- tccli/services/tcss/v20201101/examples.json +2 -2
- tccli/services/tem/tem_client.py +53 -0
- tccli/services/tem/v20210701/api.json +107 -0
- tccli/services/tem/v20210701/examples.json +8 -0
- tccli/services/teo/v20220901/api.json +807 -74
- tccli/services/teo/v20220901/examples.json +2 -2
- tccli/services/tke/tke_client.py +53 -0
- tccli/services/tke/v20220501/api.json +61 -0
- tccli/services/tke/v20220501/examples.json +8 -0
- tccli/services/trtc/trtc_client.py +216 -4
- tccli/services/trtc/v20190722/api.json +431 -2
- tccli/services/trtc/v20190722/examples.json +32 -0
- tccli/services/vclm/v20240523/api.json +173 -0
- tccli/services/vclm/v20240523/examples.json +16 -0
- tccli/services/vclm/vclm_client.py +106 -0
- tccli/services/vm/v20210922/api.json +16 -20
- tccli/services/vod/v20180717/api.json +13 -11
- tccli/services/vod/v20180717/examples.json +4 -4
- tccli/services/vpc/v20170312/api.json +10 -1
- tccli/services/waf/v20180125/api.json +2 -2
- tccli/services/wedata/v20210820/api.json +952 -0
- tccli/services/wedata/v20210820/examples.json +8 -0
- tccli/services/wedata/wedata_client.py +53 -0
- {tccli-3.0.1327.1.dist-info → tccli-3.0.1329.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1327.1.dist-info → tccli-3.0.1329.1.dist-info}/RECORD +73 -73
- {tccli-3.0.1327.1.dist-info → tccli-3.0.1329.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1327.1.dist-info → tccli-3.0.1329.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1327.1.dist-info → tccli-3.0.1329.1.dist-info}/license_files/LICENSE +0 -0
@@ -914,7 +914,7 @@
|
|
914
914
|
{
|
915
915
|
"document": "查询安全防护配置",
|
916
916
|
"input": "POST / HTTP/1.1\nHost: teo.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeSecurityPolicy\n<公共请求参数>\n\n{\n \"Entity\": \"Host\",\n \"Host\": \"www.example.com\",\n \"ZoneId\": \"zone-xxqr76cy\"\n}",
|
917
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"cb5d2c0e-295e-412a-891a-9f8ab6057b4a\",\n \"SecurityPolicy\": {\n \"CustomRules\": {\n \"Rules\": [\n {\n \"Id\": \"1492837231\",\n \"Name\": \"ASimpleIPRule\",\n \"Condition\": \"${http.request.ip} in ['1.1.1.1', '10.10.10.0/24'] or ${http.request.ip.asn} in ['132203']\",\n \"Action\": {\n \"Name\": \"Deny\"\n },\n \"Enabled\": \"on\",\n \"RuleType\": \"PreciseMatchRule\",\n \"Priority\": 50\n }\n ]\n },\n \"ManagedRules\": {\n \"Enabled\": \"on\",\n \"AutoUpdate\": {\n \"AutoUpdateToLatestVersion\": \"off\",\n \"RulesetVersion\": \"2023-12-21T12:00:32Z\"\n },\n \"SemanticAnalysis\": \"on\",\n \"DetectionOnly\": \"on\",\n \"ManagedRuleGroups\": [\n {\n \"GroupId\": \"wafmanagedrulegroup-vulnerability-scanners\",\n \"SensitivityLevel\": \"loose\",\n \"Action\": {\n \"Name\": \"Monitor\"\n },\n \"MetaData\": {\n \"GroupDetail\": \"扫描器攻击漏洞防护\",\n \"GroupName\": \"扫描器攻击漏洞防护\",\n \"RuleDetails\": [\n {\n \"RuleId\": \"4401215444\",\n \"RiskLevel\": \"extreme\",\n \"Description\": \"针对dedecms历史sql注入漏洞的防护规则\",\n \"Tags\": [],\n \"RuleVersion\": \"2023-12-21T12:00:32Z\"\n },\n {\n \"RuleId\": \"4401214877\",\n \"RiskLevel\": \"medium\",\n \"Description\": \"拦截常见扫描器的xss验证payload\",\n \"Tags\": [],\n \"RuleVersion\": \"2023-12-21T12:00:32Z\"\n }\n ]\n }\n }\n ]\n }\n }\n }\n}",
|
917
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"cb5d2c0e-295e-412a-891a-9f8ab6057b4a\",\n \"SecurityPolicy\": {\n \"ExceptionRules\": {\n \"Rules\": [\n {\n \"Id\": \"1492837231\",\n \"Name\": \"ExampleSkipModule\",\n \"Condition\": \"${http.request.uri.path} in ['/api/v3/test','/api/v3/submit'] and ${http.request.method} in ['POST']\",\n \"SkipScope\": \"WebSecurityModules\",\n \"WebSecurityModulesForException\": [\n \"websec-mod-custom-rules\",\n \"websec-mod-rate-limiting\"\n ],\n \"Enabled\": \"On\"\n },\n {\n \"Id\": \"1492837231\",\n \"Name\": \"SampleSkipManagedRule\",\n \"Condition\": \"${http.request.uri.path} in ['/api/v3/test','/api/v3/submit'] and ${http.request.method} in ['POST']\",\n \"SkipScope\": \"ManagedRules\",\n \"SkipOption\": \"SkipOnAllRequestFields\",\n \"ManagedRulesForException\": [\n \"4401215074\",\n \"4368124487\"\n ],\n \"Enabled\": \"On\"\n },\n {\n \"Id\": \"1492837231\",\n \"Name\": \"SampleSkipManagedRule\",\n \"Condition\": \"${http.request.uri.path} in ['/api/v3/test','/api/v3/submit'] and ${http.request.method} in ['POST']\",\n \"SkipScope\": \"ManagedRules\",\n \"SkipOption\": \"SkipOnAllRequestFields\",\n \"ManagedRuleGroupsForException\": [\n \"wafgroup-sql-injection-attacks\"\n ],\n \"Enabled\": \"On\"\n },\n {\n \"Id\": \"1492837231\",\n \"Name\": \"SampleSkipManagedRuleForField\",\n \"Condition\": \"${http.request.uri.path} in ['/api/v3/test','/api/v3/submit'] and ${http.request.method} in ['POST']\",\n \"SkipScope\": \"ManagedRules\",\n \"ManagedRulesForException\": [\n \"4401215074\",\n \"4368124487\"\n ],\n \"SkipOption\": \"SkipOnSpecifiedRequestFields\",\n \"RequestFieldsForException\": [\n {\n \"Scope\": \"cookie\",\n \"Condition\": \"\",\n \"TargetField\": \"key\"\n },\n {\n \"Scope\": \"cookie\",\n \"Condition\": \"${key} in ['session-id']\",\n \"TargetField\": \"value\"\n },\n {\n \"Scope\": \"cookie\",\n \"Condition\": \"${key} in ['account-id'] and ${value} like ['prefix-*']\",\n \"TargetField\": \"value\"\n },\n {\n \"Scope\": \"header\",\n \"Condition\": \"\",\n \"TargetField\": \"key\"\n },\n {\n \"Scope\": \"header\",\n \"Condition\": \"${key} in ['x-trace-id']\",\n \"TargetField\": \"value\"\n },\n {\n \"Scope\": \"header\",\n \"Condition\": \"${key} like ['x-auth-*'] and ${value} like ['Bearer *']\",\n \"TargetField\": \"value\"\n },\n {\n \"Scope\": \"uri.query\",\n \"Condition\": \"\",\n \"TargetField\": \"key\"\n },\n {\n \"Scope\": \"uri.query\",\n \"Condition\": \"${key} in ['action']\",\n \"TargetField\": \"value\"\n },\n {\n \"Scope\": \"uri.query\",\n \"Condition\": \"${key} in ['action'] and ${value} in ['upload', 'delete']\",\n \"TargetField\": \"value\"\n },\n {\n \"Scope\": \"uri\",\n \"Condition\": \"\",\n \"TargetField\": \"query\"\n },\n {\n \"Scope\": \"uri\",\n \"Condition\": \"\",\n \"TargetField\": \"path\"\n },\n {\n \"Scope\": \"uri\",\n \"Condition\": \"\",\n \"TargetField\": \"fullpath\"\n },\n {\n \"Scope\": \"body.json\",\n \"Condition\": \"\",\n \"TargetField\": \"key\"\n },\n {\n \"Scope\": \"body.json\",\n \"Condition\": \"${key} in ['user.id']\",\n \"TargetField\": \"value\"\n },\n {\n \"Scope\": \"body.json\",\n \"Condition\": \"${key} in ['user.id'] and ${value} in ['1234', '5678']\",\n \"TargetField\": \"value\"\n },\n {\n \"Scope\": \"body\",\n \"Condition\": \"\",\n \"TargetField\": \"fullbody\"\n },\n {\n \"Scope\": \"body\",\n \"Condition\": \"\",\n \"TargetField\": \"multipart\"\n }\n ],\n \"Enabled\": \"On\"\n }\n ]\n },\n \"CustomRules\": {\n \"Rules\": [\n {\n \"Id\": \"1492837231\",\n \"Name\": \"ASimpleIPRule\",\n \"Condition\": \"${http.request.ip} in ['1.1.1.1', '10.10.10.0/24'] or ${http.request.ip.asn} in ['132203']\",\n \"Action\": {\n \"Name\": \"Deny\"\n },\n \"Enabled\": \"on\",\n \"RuleType\": \"PreciseMatchRule\",\n \"Priority\": 50\n }\n ]\n },\n \"HttpDDoSProtection\": {\n \"AdaptiveFrequencyControl\": {\n \"Enabled\": \"on\",\n \"Sensitivity\": \"Loose\",\n \"Action\": {\n \"Name\": \"Monitor\"\n }\n },\n \"ClientFiltering\": {\n \"Enabled\": \"on\",\n \"Action\": {\n \"Name\": \"Monitor\"\n }\n },\n \"BandwidthAbuseDefense\": {\n \"Enabled\": \"on\",\n \"Action\": {\n \"Name\": \"Monitor\"\n }\n },\n \"SlowAttackDefense\": {\n \"Enabled\": \"on\",\n \"Action\": {\n \"Name\": \"Monitor\"\n },\n \"MinimalRequestBodyTransferRate\": {\n \"MinimalAvgTransferRateThreshold\": \"50bps\",\n \"CountingPeriod\": \"60s\"\n },\n \"RequestBodyTransferTimeout\": {\n \"IdleTimeout\": \"5s\"\n }\n }\n },\n \"RateLimitingRules\": {\n \"Rules\": [\n {\n \"Enabled\": \"on\",\n \"Name\": \"SampleHttpDdosRule\",\n \"Condition\": \"${http.request.uri.path} in ['/api/v3/test','/api/v3/submit']\",\n \"CountBy\": [\n \"http.request.ip\",\n \"http.request.cookies['UserSession']\"\n ],\n \"MaxRequestThreshold\": 1000,\n \"CountingPeriod\": \"2m\",\n \"ActionDuration\": \"20h\",\n \"Action\": {\n \"Name\": \"ManagedChallenge\"\n },\n \"Id\": \"2181399690\",\n \"Priority\": 100\n }\n ]\n },\n \"ManagedRules\": {\n \"Enabled\": \"on\",\n \"AutoUpdate\": {\n \"AutoUpdateToLatestVersion\": \"off\",\n \"RulesetVersion\": \"2023-12-21T12:00:32Z\"\n },\n \"SemanticAnalysis\": \"on\",\n \"DetectionOnly\": \"on\",\n \"ManagedRuleGroups\": [\n {\n \"GroupId\": \"wafmanagedrulegroup-vulnerability-scanners\",\n \"SensitivityLevel\": \"loose\",\n \"Action\": {\n \"Name\": \"Monitor\"\n },\n \"MetaData\": {\n \"GroupDetail\": \"扫描器攻击漏洞防护\",\n \"GroupName\": \"扫描器攻击漏洞防护\",\n \"RuleDetails\": [\n {\n \"RuleId\": \"4401215444\",\n \"RiskLevel\": \"extreme\",\n \"Description\": \"针对dedecms历史sql注入漏洞的防护规则\",\n \"Tags\": [],\n \"RuleVersion\": \"2023-12-21T12:00:32Z\"\n },\n {\n \"RuleId\": \"4401214877\",\n \"RiskLevel\": \"medium\",\n \"Description\": \"拦截常见扫描器的xss验证payload\",\n \"Tags\": [],\n \"RuleVersion\": \"2023-12-21T12:00:32Z\"\n }\n ]\n }\n }\n ]\n }\n }\n }\n}",
|
918
918
|
"title": "查询安全防护配置"
|
919
919
|
}
|
920
920
|
],
|
@@ -1427,7 +1427,7 @@
|
|
1427
1427
|
"ModifySecurityPolicy": [
|
1428
1428
|
{
|
1429
1429
|
"document": "修改eotest.com站点下a.eotest.com域名策略",
|
1430
|
-
"input": "POST / HTTP/1.1\nHost: teo.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifySecurityPolicy\n<公共请求参数>\n\n{\n \"ZoneId\": \"zone-fa89j239a\",\n \"Entity\": \"Host\",\n \"Host\": \"a.eotest.com\",\n \"SecurityConfig\": {},\n \"SecurityPolicy\": {\n \"CustomRules\": {\n \"Rules\": [\n {\n \"Id\": \"1492837231\",\n \"Name\": \"SampleBasicACLRule\",\n \"Condition\": \"${http.request.ip} in ['1.1.1.1', '10.10.10.0/24', ${security.ip_group['123'@'zone-2xsnpvkhdjes']} ]\",\n \"Action\": {\n \"Name\": \"Deny\"\n },\n \"Priority\": 10,\n \"Enabled\": \"on\"\n }\n ]\n },\n \"ManagedRules\": {\n \"Enabled\": \"on\",\n \"AutoUpdate\": {\n \"AutoUpdateToLatestVersion\": \"off\",\n \"RulesetVersion\": \"2023-12-21T12:00:32Z\"\n },\n \"SemanticAnalysis\": \"on\",\n \"DetectionOnly\": \"on\",\n \"ManagedRuleGroups\": [\n {\n \"GroupId\": \"wafmanagedrulegroup-vulnerability-scanners\",\n \"SensitivityLevel\": \"wafmanagedrule-sensitivity-level-extreme\",\n \"Action\": {\n \"Name\": \"Monitor\"\n }\n }\n ]\n }\n }\n}",
|
1430
|
+
"input": "POST / HTTP/1.1\nHost: teo.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifySecurityPolicy\n<公共请求参数>\n\n{\n \"ZoneId\": \"zone-fa89j239a\",\n \"Entity\": \"Host\",\n \"Host\": \"a.eotest.com\",\n \"SecurityConfig\": {},\n \"SecurityPolicy\": {\n \"ExceptionRules\": {\n \"Rules\": [\n {\n \"Id\": \"1492837231\",\n \"Name\": \"ExampleSkipModule\",\n \"Condition\": \"${http.request.uri.path} in ['/api/v3/test','/api/v3/submit'] and ${http.request.method} in ['POST']\",\n \"SkipScope\": \"WebSecurityModules\",\n \"WebSecurityModulesForException\": [\n \"websec-mod-custom-rules\",\n \"websec-mod-rate-limiting\"\n ],\n \"Enabled\": \"On\"\n },\n {\n \"Id\": \"1492837231\",\n \"Name\": \"SampleSkipManagedRule\",\n \"Condition\": \"${http.request.uri.path} in ['/api/v3/test','/api/v3/submit'] and ${http.request.method} in ['POST']\",\n \"SkipScope\": \"ManagedRules\",\n \"SkipOption\": \"SkipOnAllRequestFields\",\n \"ManagedRulesForException\": [\n \"4401215074\",\n \"4368124487\"\n ],\n \"Enabled\": \"On\"\n },\n {\n \"Id\": \"1492837231\",\n \"Name\": \"SampleSkipManagedRule\",\n \"Condition\": \"${http.request.uri.path} in ['/api/v3/test','/api/v3/submit'] and ${http.request.method} in ['POST']\",\n \"SkipScope\": \"ManagedRules\",\n \"SkipOption\": \"SkipOnAllRequestFields\",\n \"ManagedRuleGroupsForException\": [\n \"wafgroup-sql-injection-attacks\"\n ],\n \"Enabled\": \"On\"\n },\n {\n \"Id\": \"1492837231\",\n \"Name\": \"SampleSkipManagedRuleForField\",\n \"Condition\": \"${http.request.uri.path} in ['/api/v3/test','/api/v3/submit'] and ${http.request.method} in ['POST']\",\n \"SkipScope\": \"ManagedRules\",\n \"ManagedRulesForException\": [\n \"4401215074\",\n \"4368124487\"\n ],\n \"SkipOption\": \"SkipOnSpecifiedRequestFields\",\n \"RequestFieldsForException\": [\n {\n \"Scope\": \"cookie\",\n \"Condition\": \"\",\n \"TargetField\": \"key\"\n },\n {\n \"Scope\": \"cookie\",\n \"Condition\": \"${key} in ['session-id']\",\n \"TargetField\": \"value\"\n },\n {\n \"Scope\": \"cookie\",\n \"Condition\": \"${key} in ['account-id'] and ${value} like ['prefix-*']\",\n \"TargetField\": \"value\"\n },\n {\n \"Scope\": \"header\",\n \"Condition\": \"\",\n \"TargetField\": \"key\"\n },\n {\n \"Scope\": \"header\",\n \"Condition\": \"${key} in ['x-trace-id']\",\n \"TargetField\": \"value\"\n },\n {\n \"Scope\": \"header\",\n \"Condition\": \"${key} like ['x-auth-*'] and ${value} like ['Bearer *']\",\n \"TargetField\": \"value\"\n },\n {\n \"Scope\": \"uri.query\",\n \"Condition\": \"\",\n \"TargetField\": \"key\"\n },\n {\n \"Scope\": \"uri.query\",\n \"Condition\": \"${key} in ['action']\",\n \"TargetField\": \"value\"\n },\n {\n \"Scope\": \"uri.query\",\n \"Condition\": \"${key} in ['action'] and ${value} in ['upload', 'delete']\",\n \"TargetField\": \"value\"\n },\n {\n \"Scope\": \"uri\",\n \"Condition\": \"\",\n \"TargetField\": \"query\"\n },\n {\n \"Scope\": \"uri\",\n \"Condition\": \"\",\n \"TargetField\": \"path\"\n },\n {\n \"Scope\": \"uri\",\n \"Condition\": \"\",\n \"TargetField\": \"fullpath\"\n },\n {\n \"Scope\": \"body.json\",\n \"Condition\": \"\",\n \"TargetField\": \"key\"\n },\n {\n \"Scope\": \"body.json\",\n \"Condition\": \"${key} in ['user.id']\",\n \"TargetField\": \"value\"\n },\n {\n \"Scope\": \"body.json\",\n \"Condition\": \"${key} in ['user.id'] and ${value} in ['1234', '5678']\",\n \"TargetField\": \"value\"\n },\n {\n \"Scope\": \"body\",\n \"Condition\": \"\",\n \"TargetField\": \"fullbody\"\n },\n {\n \"Scope\": \"body\",\n \"Condition\": \"\",\n \"TargetField\": \"multipart\"\n }\n ],\n \"Enabled\": \"On\"\n }\n ]\n },\n \"CustomRules\": {\n \"Rules\": [\n {\n \"Id\": \"1492837231\",\n \"Name\": \"SampleBasicACLRule\",\n \"Condition\": \"${http.request.ip} in ['1.1.1.1', '10.10.10.0/24', ${security.ip_group['123'@'zone-2xsnpvkhdjes']} ]\",\n \"Action\": {\n \"Name\": \"Deny\"\n },\n \"Priority\": 10,\n \"Enabled\": \"on\"\n }\n ]\n },\n \"HttpDDoSProtection\": {\n \"AdaptiveFrequencyControl\": {\n \"Enabled\": \"on\",\n \"Sensitivity\": \"Loose\",\n \"Action\": {\n \"Name\": \"Monitor\"\n }\n },\n \"ClientFiltering\": {\n \"Enabled\": \"on\",\n \"Action\": {\n \"Name\": \"Monitor\"\n }\n },\n \"BandwidthAbuseDefense\": {\n \"Enabled\": \"on\",\n \"Action\": {\n \"Name\": \"Monitor\"\n }\n },\n \"SlowAttackDefense\": {\n \"Enabled\": \"on\",\n \"Action\": {\n \"Name\": \"Monitor\"\n },\n \"MinimalRequestBodyTransferRate\": {\n \"Enabled\": \"on\",\n \"MinimalAvgTransferRateThreshold\": \"50bps\",\n \"CountingPeriod\": \"60s\"\n },\n \"RequestBodyTransferTimeout\": {\n \"Enabled\": \"on\",\n \"IdleTimeout\": \"5s\"\n }\n }\n },\n \"RateLimitingRules\": {\n \"Rules\": [\n {\n \"Enabled\": \"on\",\n \"Name\": \"SampleHttpDdosRule\",\n \"Condition\": \"${http.request.uri.path} in ['/api/v3/test','/api/v3/submit']\",\n \"CountBy\": [\n \"http.request.ip\",\n \"http.request.cookies['UserSession']\"\n ],\n \"MaxRequestThreshold\": 1000,\n \"CountingPeriod\": \"2m\",\n \"ActionDuration\": \"20h\",\n \"Action\": {\n \"Name\": \"ManagedChallenge\"\n },\n \"Id\": \"2181399690\",\n \"Priority\": 100\n }\n ]\n },\n \"ManagedRules\": {\n \"Enabled\": \"on\",\n \"AutoUpdate\": {\n \"AutoUpdateToLatestVersion\": \"off\",\n \"RulesetVersion\": \"2023-12-21T12:00:32Z\"\n },\n \"SemanticAnalysis\": \"on\",\n \"DetectionOnly\": \"on\",\n \"ManagedRuleGroups\": [\n {\n \"GroupId\": \"wafmanagedrulegroup-vulnerability-scanners\",\n \"SensitivityLevel\": \"wafmanagedrule-sensitivity-level-extreme\",\n \"Action\": {\n \"Name\": \"Monitor\"\n }\n }\n ]\n }\n }\n}",
|
1431
1431
|
"output": "{\n \"Response\": {\n \"RequestId\": \"08b32010-ab25-42a4-b923-777c481da684\"\n }\n}",
|
1432
1432
|
"title": "修改域名策略"
|
1433
1433
|
},
|
tccli/services/tke/tke_client.py
CHANGED
@@ -4335,6 +4335,58 @@ def doCreateReservedInstances(args, parsed_globals):
|
|
4335
4335
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4336
4336
|
|
4337
4337
|
|
4338
|
+
def doDeleteClusterMachines(args, parsed_globals):
|
4339
|
+
g_param = parse_global_arg(parsed_globals)
|
4340
|
+
|
4341
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4342
|
+
cred = credential.CVMRoleCredential()
|
4343
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4344
|
+
cred = credential.STSAssumeRoleCredential(
|
4345
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4346
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4347
|
+
)
|
4348
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4349
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4350
|
+
else:
|
4351
|
+
cred = credential.Credential(
|
4352
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4353
|
+
)
|
4354
|
+
http_profile = HttpProfile(
|
4355
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4356
|
+
reqMethod="POST",
|
4357
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4358
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4359
|
+
)
|
4360
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4361
|
+
if g_param[OptionsDefine.Language]:
|
4362
|
+
profile.language = g_param[OptionsDefine.Language]
|
4363
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4364
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
4365
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4366
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4367
|
+
model = models.DeleteClusterMachinesRequest()
|
4368
|
+
model.from_json_string(json.dumps(args))
|
4369
|
+
start_time = time.time()
|
4370
|
+
while True:
|
4371
|
+
rsp = client.DeleteClusterMachines(model)
|
4372
|
+
result = rsp.to_json_string()
|
4373
|
+
try:
|
4374
|
+
json_obj = json.loads(result)
|
4375
|
+
except TypeError as e:
|
4376
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4377
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4378
|
+
break
|
4379
|
+
cur_time = time.time()
|
4380
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4381
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4382
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4383
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4384
|
+
else:
|
4385
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4386
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4387
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4388
|
+
|
4389
|
+
|
4338
4390
|
def doRebootMachines(args, parsed_globals):
|
4339
4391
|
g_param = parse_global_arg(parsed_globals)
|
4340
4392
|
|
@@ -12647,6 +12699,7 @@ ACTION_MAP = {
|
|
12647
12699
|
"ModifyClusterTags": doModifyClusterTags,
|
12648
12700
|
"DescribeClusterEndpointStatus": doDescribeClusterEndpointStatus,
|
12649
12701
|
"CreateReservedInstances": doCreateReservedInstances,
|
12702
|
+
"DeleteClusterMachines": doDeleteClusterMachines,
|
12650
12703
|
"RebootMachines": doRebootMachines,
|
12651
12704
|
"ForwardTKEEdgeApplicationRequestV3": doForwardTKEEdgeApplicationRequestV3,
|
12652
12705
|
"DescribeBatchModifyTagsStatus": doDescribeBatchModifyTagsStatus,
|
@@ -14,6 +14,13 @@
|
|
14
14
|
"output": "CreateNodePoolResponse",
|
15
15
|
"status": "online"
|
16
16
|
},
|
17
|
+
"DeleteClusterMachines": {
|
18
|
+
"document": "删除原生节点池节点",
|
19
|
+
"input": "DeleteClusterMachinesRequest",
|
20
|
+
"name": "删除原生节点池节点",
|
21
|
+
"output": "DeleteClusterMachinesResponse",
|
22
|
+
"status": "online"
|
23
|
+
},
|
17
24
|
"DeleteHealthCheckPolicy": {
|
18
25
|
"document": "删除健康检测策略",
|
19
26
|
"input": "DeleteHealthCheckPolicyRequest",
|
@@ -694,6 +701,60 @@
|
|
694
701
|
],
|
695
702
|
"usage": "both"
|
696
703
|
},
|
704
|
+
"DeleteClusterMachinesRequest": {
|
705
|
+
"document": "DeleteClusterMachines请求参数结构体",
|
706
|
+
"members": [
|
707
|
+
{
|
708
|
+
"disabled": false,
|
709
|
+
"document": "集群 ID",
|
710
|
+
"example": "cls-xxxxxxxx",
|
711
|
+
"member": "string",
|
712
|
+
"name": "ClusterId",
|
713
|
+
"required": true,
|
714
|
+
"type": "string"
|
715
|
+
},
|
716
|
+
{
|
717
|
+
"disabled": false,
|
718
|
+
"document": "节点名列表",
|
719
|
+
"example": "[np-xxxxxxxx-7j9rt]",
|
720
|
+
"member": "string",
|
721
|
+
"name": "MachineNames",
|
722
|
+
"required": true,
|
723
|
+
"type": "list"
|
724
|
+
},
|
725
|
+
{
|
726
|
+
"disabled": false,
|
727
|
+
"document": "删除节点时是否缩容节点池,true为缩容",
|
728
|
+
"example": "true",
|
729
|
+
"member": "bool",
|
730
|
+
"name": "EnableScaleDown",
|
731
|
+
"required": false,
|
732
|
+
"type": "bool"
|
733
|
+
},
|
734
|
+
{
|
735
|
+
"disabled": false,
|
736
|
+
"document": "集群实例删除时的策略:terminate(销毁实例,仅支持按量计费云主机实例)retain(仅移除,保留实例)",
|
737
|
+
"example": "terminate",
|
738
|
+
"member": "string",
|
739
|
+
"name": "InstanceDeleteMode",
|
740
|
+
"required": false,
|
741
|
+
"type": "string"
|
742
|
+
}
|
743
|
+
],
|
744
|
+
"type": "object"
|
745
|
+
},
|
746
|
+
"DeleteClusterMachinesResponse": {
|
747
|
+
"document": "DeleteClusterMachines返回参数结构体",
|
748
|
+
"members": [
|
749
|
+
{
|
750
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
751
|
+
"member": "string",
|
752
|
+
"name": "RequestId",
|
753
|
+
"type": "string"
|
754
|
+
}
|
755
|
+
],
|
756
|
+
"type": "object"
|
757
|
+
},
|
697
758
|
"DeleteHealthCheckPolicyRequest": {
|
698
759
|
"document": "DeleteHealthCheckPolicy请求参数结构体",
|
699
760
|
"members": [
|
@@ -16,6 +16,14 @@
|
|
16
16
|
"title": "创建 TKE 节点池"
|
17
17
|
}
|
18
18
|
],
|
19
|
+
"DeleteClusterMachines": [
|
20
|
+
{
|
21
|
+
"document": "",
|
22
|
+
"input": "POST / HTTP/1.1\nHost: tke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteClusterMachines\n<公共请求参数>\n\n{\n \"MachineNames\": [\n \"np-5tx2l4dc-hbbv6\"\n ],\n \"ClusterId\": \"cls-l9l1o3y0\",\n \"EnableScaleDown\": false\n}",
|
23
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"71e54a99-9be0-4983-82ff-54dce2191c4a\"\n }\n}",
|
24
|
+
"title": "删除原生节点池节点"
|
25
|
+
}
|
26
|
+
],
|
19
27
|
"DeleteHealthCheckPolicy": [
|
20
28
|
{
|
21
29
|
"document": "",
|
@@ -693,7 +693,7 @@ def doStartAIConversation(args, parsed_globals):
|
|
693
693
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
694
694
|
|
695
695
|
|
696
|
-
def
|
696
|
+
def doDeleteVoicePrint(args, parsed_globals):
|
697
697
|
g_param = parse_global_arg(parsed_globals)
|
698
698
|
|
699
699
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -722,11 +722,11 @@ def doDescribeAIConversation(args, parsed_globals):
|
|
722
722
|
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
723
723
|
client._sdkVersion += ("_CLI_" + __version__)
|
724
724
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
725
|
-
model = models.
|
725
|
+
model = models.DeleteVoicePrintRequest()
|
726
726
|
model.from_json_string(json.dumps(args))
|
727
727
|
start_time = time.time()
|
728
728
|
while True:
|
729
|
-
rsp = client.
|
729
|
+
rsp = client.DeleteVoicePrint(model)
|
730
730
|
result = rsp.to_json_string()
|
731
731
|
try:
|
732
732
|
json_obj = json.loads(result)
|
@@ -1525,6 +1525,58 @@ def doDescribeTRTCMarketScaleData(args, parsed_globals):
|
|
1525
1525
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1526
1526
|
|
1527
1527
|
|
1528
|
+
def doRegisterVoicePrint(args, parsed_globals):
|
1529
|
+
g_param = parse_global_arg(parsed_globals)
|
1530
|
+
|
1531
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1532
|
+
cred = credential.CVMRoleCredential()
|
1533
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1534
|
+
cred = credential.STSAssumeRoleCredential(
|
1535
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1536
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1537
|
+
)
|
1538
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1539
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1540
|
+
else:
|
1541
|
+
cred = credential.Credential(
|
1542
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1543
|
+
)
|
1544
|
+
http_profile = HttpProfile(
|
1545
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1546
|
+
reqMethod="POST",
|
1547
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1548
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1549
|
+
)
|
1550
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1551
|
+
if g_param[OptionsDefine.Language]:
|
1552
|
+
profile.language = g_param[OptionsDefine.Language]
|
1553
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1554
|
+
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
1555
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1556
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1557
|
+
model = models.RegisterVoicePrintRequest()
|
1558
|
+
model.from_json_string(json.dumps(args))
|
1559
|
+
start_time = time.time()
|
1560
|
+
while True:
|
1561
|
+
rsp = client.RegisterVoicePrint(model)
|
1562
|
+
result = rsp.to_json_string()
|
1563
|
+
try:
|
1564
|
+
json_obj = json.loads(result)
|
1565
|
+
except TypeError as e:
|
1566
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1567
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1568
|
+
break
|
1569
|
+
cur_time = time.time()
|
1570
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1571
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1572
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1573
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1574
|
+
else:
|
1575
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1576
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1577
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1578
|
+
|
1579
|
+
|
1528
1580
|
def doStopWebRecord(args, parsed_globals):
|
1529
1581
|
g_param = parse_global_arg(parsed_globals)
|
1530
1582
|
|
@@ -1629,6 +1681,58 @@ def doCreateCloudRecording(args, parsed_globals):
|
|
1629
1681
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1630
1682
|
|
1631
1683
|
|
1684
|
+
def doDescribeAIConversation(args, parsed_globals):
|
1685
|
+
g_param = parse_global_arg(parsed_globals)
|
1686
|
+
|
1687
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1688
|
+
cred = credential.CVMRoleCredential()
|
1689
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1690
|
+
cred = credential.STSAssumeRoleCredential(
|
1691
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1692
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1693
|
+
)
|
1694
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1695
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1696
|
+
else:
|
1697
|
+
cred = credential.Credential(
|
1698
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1699
|
+
)
|
1700
|
+
http_profile = HttpProfile(
|
1701
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1702
|
+
reqMethod="POST",
|
1703
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1704
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1705
|
+
)
|
1706
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1707
|
+
if g_param[OptionsDefine.Language]:
|
1708
|
+
profile.language = g_param[OptionsDefine.Language]
|
1709
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1710
|
+
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
1711
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1712
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1713
|
+
model = models.DescribeAIConversationRequest()
|
1714
|
+
model.from_json_string(json.dumps(args))
|
1715
|
+
start_time = time.time()
|
1716
|
+
while True:
|
1717
|
+
rsp = client.DescribeAIConversation(model)
|
1718
|
+
result = rsp.to_json_string()
|
1719
|
+
try:
|
1720
|
+
json_obj = json.loads(result)
|
1721
|
+
except TypeError as e:
|
1722
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1723
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1724
|
+
break
|
1725
|
+
cur_time = time.time()
|
1726
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1727
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1728
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1729
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1730
|
+
else:
|
1731
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1732
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1733
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1734
|
+
|
1735
|
+
|
1632
1736
|
def doDescribeScaleInfo(args, parsed_globals):
|
1633
1737
|
g_param = parse_global_arg(parsed_globals)
|
1634
1738
|
|
@@ -2253,6 +2357,58 @@ def doDescribeRecordStatistic(args, parsed_globals):
|
|
2253
2357
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2254
2358
|
|
2255
2359
|
|
2360
|
+
def doDescribeVoicePrint(args, parsed_globals):
|
2361
|
+
g_param = parse_global_arg(parsed_globals)
|
2362
|
+
|
2363
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2364
|
+
cred = credential.CVMRoleCredential()
|
2365
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2366
|
+
cred = credential.STSAssumeRoleCredential(
|
2367
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2368
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2369
|
+
)
|
2370
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2371
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2372
|
+
else:
|
2373
|
+
cred = credential.Credential(
|
2374
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2375
|
+
)
|
2376
|
+
http_profile = HttpProfile(
|
2377
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2378
|
+
reqMethod="POST",
|
2379
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2380
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2381
|
+
)
|
2382
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2383
|
+
if g_param[OptionsDefine.Language]:
|
2384
|
+
profile.language = g_param[OptionsDefine.Language]
|
2385
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2386
|
+
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
2387
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2388
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2389
|
+
model = models.DescribeVoicePrintRequest()
|
2390
|
+
model.from_json_string(json.dumps(args))
|
2391
|
+
start_time = time.time()
|
2392
|
+
while True:
|
2393
|
+
rsp = client.DescribeVoicePrint(model)
|
2394
|
+
result = rsp.to_json_string()
|
2395
|
+
try:
|
2396
|
+
json_obj = json.loads(result)
|
2397
|
+
except TypeError as e:
|
2398
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2399
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2400
|
+
break
|
2401
|
+
cur_time = time.time()
|
2402
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2403
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2404
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2405
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2406
|
+
else:
|
2407
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2408
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2409
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2410
|
+
|
2411
|
+
|
2256
2412
|
def doDismissRoomByStrRoomId(args, parsed_globals):
|
2257
2413
|
g_param = parse_global_arg(parsed_globals)
|
2258
2414
|
|
@@ -2669,6 +2825,58 @@ def doDescribePicture(args, parsed_globals):
|
|
2669
2825
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2670
2826
|
|
2671
2827
|
|
2828
|
+
def doUpdateVoicePrint(args, parsed_globals):
|
2829
|
+
g_param = parse_global_arg(parsed_globals)
|
2830
|
+
|
2831
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2832
|
+
cred = credential.CVMRoleCredential()
|
2833
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2834
|
+
cred = credential.STSAssumeRoleCredential(
|
2835
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2836
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2837
|
+
)
|
2838
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2839
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2840
|
+
else:
|
2841
|
+
cred = credential.Credential(
|
2842
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2843
|
+
)
|
2844
|
+
http_profile = HttpProfile(
|
2845
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2846
|
+
reqMethod="POST",
|
2847
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2848
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2849
|
+
)
|
2850
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2851
|
+
if g_param[OptionsDefine.Language]:
|
2852
|
+
profile.language = g_param[OptionsDefine.Language]
|
2853
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2854
|
+
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
2855
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2856
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2857
|
+
model = models.UpdateVoicePrintRequest()
|
2858
|
+
model.from_json_string(json.dumps(args))
|
2859
|
+
start_time = time.time()
|
2860
|
+
while True:
|
2861
|
+
rsp = client.UpdateVoicePrint(model)
|
2862
|
+
result = rsp.to_json_string()
|
2863
|
+
try:
|
2864
|
+
json_obj = json.loads(result)
|
2865
|
+
except TypeError as e:
|
2866
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2867
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2868
|
+
break
|
2869
|
+
cur_time = time.time()
|
2870
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2871
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2872
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2873
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2874
|
+
else:
|
2875
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2876
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2877
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2878
|
+
|
2879
|
+
|
2672
2880
|
def doDescribeTRTCMarketQualityData(args, parsed_globals):
|
2673
2881
|
g_param = parse_global_arg(parsed_globals)
|
2674
2882
|
|
@@ -3005,7 +3213,7 @@ ACTION_MAP = {
|
|
3005
3213
|
"DescribeStreamIngest": doDescribeStreamIngest,
|
3006
3214
|
"DescribeTRTCMarketScaleMetricData": doDescribeTRTCMarketScaleMetricData,
|
3007
3215
|
"StartAIConversation": doStartAIConversation,
|
3008
|
-
"
|
3216
|
+
"DeleteVoicePrint": doDeleteVoicePrint,
|
3009
3217
|
"DescribeRecordingUsage": doDescribeRecordingUsage,
|
3010
3218
|
"StartStreamIngest": doStartStreamIngest,
|
3011
3219
|
"UpdateStreamIngest": doUpdateStreamIngest,
|
@@ -3021,8 +3229,10 @@ ACTION_MAP = {
|
|
3021
3229
|
"StartMCUMixTranscode": doStartMCUMixTranscode,
|
3022
3230
|
"StartAITranscription": doStartAITranscription,
|
3023
3231
|
"DescribeTRTCMarketScaleData": doDescribeTRTCMarketScaleData,
|
3232
|
+
"RegisterVoicePrint": doRegisterVoicePrint,
|
3024
3233
|
"StopWebRecord": doStopWebRecord,
|
3025
3234
|
"CreateCloudRecording": doCreateCloudRecording,
|
3235
|
+
"DescribeAIConversation": doDescribeAIConversation,
|
3026
3236
|
"DescribeScaleInfo": doDescribeScaleInfo,
|
3027
3237
|
"DescribeRelayUsage": doDescribeRelayUsage,
|
3028
3238
|
"DescribeUserInfo": doDescribeUserInfo,
|
@@ -3035,6 +3245,7 @@ ACTION_MAP = {
|
|
3035
3245
|
"DismissRoom": doDismissRoom,
|
3036
3246
|
"DescribeCloudRecording": doDescribeCloudRecording,
|
3037
3247
|
"DescribeRecordStatistic": doDescribeRecordStatistic,
|
3248
|
+
"DescribeVoicePrint": doDescribeVoicePrint,
|
3038
3249
|
"DismissRoomByStrRoomId": doDismissRoomByStrRoomId,
|
3039
3250
|
"DescribeTrtcRoomUsage": doDescribeTrtcRoomUsage,
|
3040
3251
|
"ModifyPicture": doModifyPicture,
|
@@ -3043,6 +3254,7 @@ ACTION_MAP = {
|
|
3043
3254
|
"DescribeTRTCRealTimeQualityData": doDescribeTRTCRealTimeQualityData,
|
3044
3255
|
"DescribeWebRecord": doDescribeWebRecord,
|
3045
3256
|
"DescribePicture": doDescribePicture,
|
3257
|
+
"UpdateVoicePrint": doUpdateVoicePrint,
|
3046
3258
|
"DescribeTRTCMarketQualityData": doDescribeTRTCMarketQualityData,
|
3047
3259
|
"ControlAIConversation": doControlAIConversation,
|
3048
3260
|
"StopPublishCdnStream": doStopPublishCdnStream,
|