tccli 3.0.1214.1__py2.py3-none-any.whl → 3.0.1216.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/configure.py +46 -1
  3. tccli/services/__init__.py +0 -3
  4. tccli/services/ams/v20201229/examples.json +2 -2
  5. tccli/services/apm/v20210622/api.json +20 -0
  6. tccli/services/asr/v20190614/api.json +3 -3
  7. tccli/services/bi/v20220105/api.json +32 -4
  8. tccli/services/bi/v20220105/examples.json +1 -1
  9. tccli/services/billing/billing_client.py +53 -0
  10. tccli/services/billing/v20180709/api.json +304 -0
  11. tccli/services/billing/v20180709/examples.json +8 -0
  12. tccli/services/bsca/v20210811/api.json +222 -17
  13. tccli/services/bsca/v20210811/examples.json +4 -4
  14. tccli/services/ccc/ccc_client.py +53 -0
  15. tccli/services/ccc/v20200210/api.json +176 -18
  16. tccli/services/ccc/v20200210/examples.json +11 -3
  17. tccli/services/cdb/v20170320/api.json +22 -4
  18. tccli/services/cdb/v20170320/examples.json +1 -1
  19. tccli/services/cdn/v20180606/api.json +5 -3
  20. tccli/services/cdwdoris/v20211228/api.json +23 -2
  21. tccli/services/cfs/v20190719/api.json +3 -3
  22. tccli/services/cfw/v20190904/api.json +86 -52
  23. tccli/services/cfw/v20190904/examples.json +68 -56
  24. tccli/services/ciam/v20220331/api.json +316 -315
  25. tccli/services/ciam/v20220331/examples.json +49 -49
  26. tccli/services/ckafka/v20190819/api.json +1 -1
  27. tccli/services/cloudaudit/cloudaudit_client.py +30 -30
  28. tccli/services/cloudaudit/v20190319/api.json +215 -186
  29. tccli/services/cloudaudit/v20190319/examples.json +13 -13
  30. tccli/services/cls/v20201016/api.json +365 -66
  31. tccli/services/cls/v20201016/examples.json +9 -3
  32. tccli/services/csip/v20221121/api.json +4 -4
  33. tccli/services/cvm/v20170312/api.json +42 -0
  34. tccli/services/cwp/v20180228/api.json +865 -809
  35. tccli/services/cwp/v20180228/examples.json +98 -110
  36. tccli/services/cynosdb/v20190107/api.json +77 -29
  37. tccli/services/cynosdb/v20190107/examples.json +22 -22
  38. tccli/services/dasb/v20191018/api.json +77 -0
  39. tccli/services/dasb/v20191018/examples.json +5 -5
  40. tccli/services/dbbrain/v20191016/examples.json +1 -1
  41. tccli/services/dlc/v20210125/api.json +11 -0
  42. tccli/services/domain/v20180808/api.json +3 -3
  43. tccli/services/domain/v20180808/examples.json +3 -3
  44. tccli/services/eb/v20210416/api.json +15 -15
  45. tccli/services/eb/v20210416/examples.json +1 -1
  46. tccli/services/emr/v20190103/api.json +9 -0
  47. tccli/services/es/es_client.py +249 -37
  48. tccli/services/es/v20180416/api.json +521 -0
  49. tccli/services/es/v20180416/examples.json +32 -0
  50. tccli/services/ess/ess_client.py +53 -0
  51. tccli/services/ess/v20201111/api.json +155 -10
  52. tccli/services/ess/v20201111/examples.json +15 -1
  53. tccli/services/essbasic/essbasic_client.py +106 -0
  54. tccli/services/essbasic/v20210526/api.json +244 -13
  55. tccli/services/essbasic/v20210526/examples.json +22 -0
  56. tccli/services/gaap/v20180529/api.json +44 -26
  57. tccli/services/gaap/v20180529/examples.json +24 -30
  58. tccli/services/hunyuan/v20230901/examples.json +6 -0
  59. tccli/services/iotexplorer/v20190423/api.json +40 -0
  60. tccli/services/iss/v20230517/api.json +19 -0
  61. tccli/services/live/v20180801/api.json +35 -9
  62. tccli/services/mongodb/v20190725/api.json +6 -8
  63. tccli/services/mqtt/v20240516/api.json +2 -2
  64. tccli/services/mqtt/v20240516/examples.json +1 -1
  65. tccli/services/ocr/v20181119/api.json +2 -2
  66. tccli/services/organization/organization_client.py +352 -34
  67. tccli/services/organization/v20210331/api.json +451 -0
  68. tccli/services/organization/v20210331/examples.json +48 -0
  69. tccli/services/partners/partners_client.py +57 -4
  70. tccli/services/partners/v20180321/api.json +44 -0
  71. tccli/services/partners/v20180321/examples.json +8 -0
  72. tccli/services/region/v20220627/api.json +1 -1
  73. tccli/services/scf/scf_client.py +269 -4
  74. tccli/services/scf/v20180416/api.json +554 -0
  75. tccli/services/scf/v20180416/examples.json +46 -0
  76. tccli/services/ssl/v20191205/api.json +34 -5
  77. tccli/services/tat/v20201028/api.json +27 -25
  78. tccli/services/tat/v20201028/examples.json +4 -4
  79. tccli/services/tcss/v20201101/api.json +256 -14
  80. tccli/services/tcss/v20201101/examples.json +7 -7
  81. tccli/services/tdmq/v20200217/api.json +64 -63
  82. tccli/services/tdmq/v20200217/examples.json +2 -2
  83. tccli/services/tem/v20210701/api.json +144 -103
  84. tccli/services/tem/v20210701/examples.json +27 -27
  85. tccli/services/teo/teo_client.py +277 -12
  86. tccli/services/teo/v20220901/api.json +1023 -146
  87. tccli/services/teo/v20220901/examples.json +71 -1
  88. tccli/services/tke/tke_client.py +53 -0
  89. tccli/services/tke/v20180525/api.json +43 -0
  90. tccli/services/tke/v20180525/examples.json +8 -0
  91. tccli/services/tms/tms_client.py +4 -57
  92. tccli/services/tms/v20201229/api.json +0 -354
  93. tccli/services/tms/v20201229/examples.json +0 -8
  94. tccli/services/trtc/v20190722/api.json +221 -22
  95. tccli/services/vpc/v20170312/api.json +111 -34
  96. tccli/services/vpc/v20170312/examples.json +11 -3
  97. tccli/services/vpc/vpc_client.py +107 -54
  98. tccli/services/waf/v20180125/api.json +61 -0
  99. tccli/services/waf/v20180125/examples.json +8 -0
  100. tccli/services/waf/waf_client.py +53 -0
  101. tccli/services/wedata/v20210820/api.json +686 -0
  102. tccli/services/wedata/v20210820/examples.json +16 -0
  103. tccli/services/wedata/wedata_client.py +106 -0
  104. {tccli-3.0.1214.1.dist-info → tccli-3.0.1216.1.dist-info}/METADATA +6 -2
  105. {tccli-3.0.1214.1.dist-info → tccli-3.0.1216.1.dist-info}/RECORD +108 -112
  106. tccli/services/cr/__init__.py +0 -4
  107. tccli/services/cr/cr_client.py +0 -1626
  108. tccli/services/cr/v20180321/api.json +0 -2829
  109. tccli/services/cr/v20180321/examples.json +0 -235
  110. {tccli-3.0.1214.1.dist-info → tccli-3.0.1216.1.dist-info}/WHEEL +0 -0
  111. {tccli-3.0.1214.1.dist-info → tccli-3.0.1216.1.dist-info}/entry_points.txt +0 -0
  112. {tccli-3.0.1214.1.dist-info → tccli-3.0.1216.1.dist-info}/license_files/LICENSE +0 -0
@@ -173,6 +173,58 @@ def doCreatePayRelationForClient(args, parsed_globals):
173
173
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
174
174
 
175
175
 
176
+ def doAuditApplyClient(args, parsed_globals):
177
+ g_param = parse_global_arg(parsed_globals)
178
+
179
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
180
+ cred = credential.CVMRoleCredential()
181
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
182
+ cred = credential.STSAssumeRoleCredential(
183
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
184
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
185
+ )
186
+ 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):
187
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
188
+ else:
189
+ cred = credential.Credential(
190
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
191
+ )
192
+ http_profile = HttpProfile(
193
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
194
+ reqMethod="POST",
195
+ endpoint=g_param[OptionsDefine.Endpoint],
196
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
197
+ )
198
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
199
+ if g_param[OptionsDefine.Language]:
200
+ profile.language = g_param[OptionsDefine.Language]
201
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
202
+ client = mod.PartnersClient(cred, g_param[OptionsDefine.Region], profile)
203
+ client._sdkVersion += ("_CLI_" + __version__)
204
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
205
+ model = models.AuditApplyClientRequest()
206
+ model.from_json_string(json.dumps(args))
207
+ start_time = time.time()
208
+ while True:
209
+ rsp = client.AuditApplyClient(model)
210
+ result = rsp.to_json_string()
211
+ try:
212
+ json_obj = json.loads(result)
213
+ except TypeError as e:
214
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
215
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
216
+ break
217
+ cur_time = time.time()
218
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
219
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
220
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
221
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
222
+ else:
223
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
224
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
225
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
+
227
+
176
228
  def doAgentPayDeals(args, parsed_globals):
177
229
  g_param = parse_global_arg(parsed_globals)
178
230
 
@@ -589,7 +641,7 @@ def doModifyClientRemark(args, parsed_globals):
589
641
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
590
642
 
591
643
 
592
- def doAuditApplyClient(args, parsed_globals):
644
+ def doDescribeAgentRelateBigDealIds(args, parsed_globals):
593
645
  g_param = parse_global_arg(parsed_globals)
594
646
 
595
647
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -618,11 +670,11 @@ def doAuditApplyClient(args, parsed_globals):
618
670
  client = mod.PartnersClient(cred, g_param[OptionsDefine.Region], profile)
619
671
  client._sdkVersion += ("_CLI_" + __version__)
620
672
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
621
- model = models.AuditApplyClientRequest()
673
+ model = models.DescribeAgentRelateBigDealIdsRequest()
622
674
  model.from_json_string(json.dumps(args))
623
675
  start_time = time.time()
624
676
  while True:
625
- rsp = client.AuditApplyClient(model)
677
+ rsp = client.DescribeAgentRelateBigDealIds(model)
626
678
  result = rsp.to_json_string()
627
679
  try:
628
680
  json_obj = json.loads(result)
@@ -1019,6 +1071,7 @@ ACTION_MAP = {
1019
1071
  "AssignClientsToSales": doAssignClientsToSales,
1020
1072
  "DescribeAgentAuditedClients": doDescribeAgentAuditedClients,
1021
1073
  "CreatePayRelationForClient": doCreatePayRelationForClient,
1074
+ "AuditApplyClient": doAuditApplyClient,
1022
1075
  "AgentPayDeals": doAgentPayDeals,
1023
1076
  "DescribeAgentBills": doDescribeAgentBills,
1024
1077
  "DescribeRebateInfosNew": doDescribeRebateInfosNew,
@@ -1027,7 +1080,7 @@ ACTION_MAP = {
1027
1080
  "DescribeSalesmans": doDescribeSalesmans,
1028
1081
  "RemovePayRelationForClient": doRemovePayRelationForClient,
1029
1082
  "ModifyClientRemark": doModifyClientRemark,
1030
- "AuditApplyClient": doAuditApplyClient,
1083
+ "DescribeAgentRelateBigDealIds": doDescribeAgentRelateBigDealIds,
1031
1084
  "DescribeAgentClients": doDescribeAgentClients,
1032
1085
  "DescribeClientBalanceNew": doDescribeClientBalanceNew,
1033
1086
  "DescribeAgentPayDealsV2": doDescribeAgentPayDealsV2,
@@ -77,6 +77,13 @@
77
77
  "output": "DescribeAgentPayDealsV2Response",
78
78
  "status": "online"
79
79
  },
80
+ "DescribeAgentRelateBigDealIds": {
81
+ "document": "根据大订单号查询关联申请合并支付的其他订单号",
82
+ "input": "DescribeAgentRelateBigDealIdsRequest",
83
+ "name": "代理商查询合并支付的关联订单号",
84
+ "output": "DescribeAgentRelateBigDealIdsResponse",
85
+ "status": "online"
86
+ },
80
87
  "DescribeAgentSelfPayDealsV2": {
81
88
  "document": "查询代理商名下指定代客的自付订单(预付费)",
82
89
  "input": "DescribeAgentSelfPayDealsV2Request",
@@ -1902,6 +1909,43 @@
1902
1909
  ],
1903
1910
  "type": "object"
1904
1911
  },
1912
+ "DescribeAgentRelateBigDealIdsRequest": {
1913
+ "document": "DescribeAgentRelateBigDealIds请求参数结构体",
1914
+ "members": [
1915
+ {
1916
+ "disabled": false,
1917
+ "document": "大订单号",
1918
+ "example": "20241012848002188543031",
1919
+ "member": "string",
1920
+ "name": "BigDealId",
1921
+ "required": true,
1922
+ "type": "string"
1923
+ }
1924
+ ],
1925
+ "type": "object"
1926
+ },
1927
+ "DescribeAgentRelateBigDealIdsResponse": {
1928
+ "document": "DescribeAgentRelateBigDealIds返回参数结构体",
1929
+ "members": [
1930
+ {
1931
+ "disabled": false,
1932
+ "document": "申请合并支付的关联大订单号列表(不包含请求的订单号)\n注意:此字段可能返回 null,表示取不到有效值。",
1933
+ "example": "[\"20241012848002188543031\"]",
1934
+ "member": "string",
1935
+ "name": "BigDealIdList",
1936
+ "output_required": true,
1937
+ "type": "list",
1938
+ "value_allowed_null": true
1939
+ },
1940
+ {
1941
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
1942
+ "member": "string",
1943
+ "name": "RequestId",
1944
+ "type": "string"
1945
+ }
1946
+ ],
1947
+ "type": "object"
1948
+ },
1905
1949
  "DescribeAgentSelfPayDealsV2Request": {
1906
1950
  "document": "DescribeAgentSelfPayDealsV2请求参数结构体",
1907
1951
  "members": [
@@ -94,6 +94,14 @@
94
94
  "title": "获取某代理商代付订单"
95
95
  }
96
96
  ],
97
+ "DescribeAgentRelateBigDealIds": [
98
+ {
99
+ "document": "有两笔关联订单的返回。若没有关联订单则返回空数组",
100
+ "input": "POST / HTTP/1.1\nHost: partners.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeAgentRelateBigDealIds\n<公共请求参数>\n\n{\n \"BigDealId\": \"20241021203002223764041\"\n}",
101
+ "output": "{\n \"Response\": {\n \"BigDealIdList\": [\n \"20241021203002223736651\",\n \"20241021203002223761601\"\n ],\n \"RequestId\": \"00c9d9d3-432f-44bb-8d76-e24476fc7ed5\"\n }\n}",
102
+ "title": "查询到关联订单示例"
103
+ }
104
+ ],
97
105
  "DescribeAgentSelfPayDealsV2": [
98
106
  {
99
107
  "document": "",
@@ -292,7 +292,7 @@
292
292
  "members": [
293
293
  {
294
294
  "disabled": false,
295
- "document": "可用区名称,例如,ap-guangzhou-3\n全网可用区名称如下:\n<li> ap-chongqing-1 </li>\n<li> ap-seoul-1 </li>\n<li> ap-seoul-2 </li>\n<li> ap-chengdu-1 </li>\n<li> ap-chengdu-2 </li>\n<li> ap-hongkong-1 </li>\n<li> ap-hongkong-2 </li>\n<li> ap-shenzhen-fsi-1 </li>\n<li> ap-shenzhen-fsi-2 </li>\n<li> ap-shenzhen-fsi-3 </li>\n<li> ap-guangzhou-1(售罄)</li>\n<li> ap-guangzhou-2(售罄)</li>\n<li> ap-guangzhou-3 </li>\n<li> ap-guangzhou-4 </li>\n<li> ap-guangzhou-6 </li>\n<li> ap-tokyo-1 </li>\n<li> ap-singapore-1 </li>\n<li> ap-singapore-2 </li>\n<li> ap-shanghai-fsi-1 </li>\n<li> ap-shanghai-fsi-2 </li>\n<li> ap-shanghai-fsi-3 </li>\n<li> ap-bangkok-1 </li>\n<li> ap-shanghai-1(售罄) </li>\n<li> ap-shanghai-2 </li>\n<li> ap-shanghai-3 </li>\n<li> ap-shanghai-4 </li>\n<li> ap-shanghai-5 </li>\n<li> ap-mumbai-1 </li>\n<li> ap-mumbai-2 </li>\n<li> eu-moscow-1 </li>\n<li> ap-beijing-1 </li>\n<li> ap-beijing-2 </li>\n<li> ap-beijing-3 </li>\n<li> ap-beijing-4 </li>\n<li> ap-beijing-5 </li>\n<li> na-siliconvalley-1 </li>\n<li> na-siliconvalley-2 </li>\n<li> eu-frankfurt-1 </li>\n<li> na-ashburn-1 </li>\n<li> na-ashburn-2 </li>\n<li> ap-nanjing-1 </li>\n<li> ap-nanjing-2 </li>",
295
+ "document": "可用区名称,例如,ap-guangzhou-3\n全网可用区名称如下:\n<li> ap-chongqing-1 </li>\n<li> ap-seoul-1 </li>\n<li> ap-seoul-2 </li>\n<li> ap-chengdu-1 </li>\n<li> ap-chengdu-2 </li>\n<li> ap-hongkong-1 </li>\n<li> ap-hongkong-2 </li>\n<li> ap-shenzhen-fsi-1 </li>\n<li> ap-shenzhen-fsi-2 </li>\n<li> ap-shenzhen-fsi-3 </li>\n<li> ap-guangzhou-1(售罄)</li>\n<li> ap-guangzhou-2(售罄)</li>\n<li> ap-guangzhou-3 </li>\n<li> ap-guangzhou-4 </li>\n<li> ap-guangzhou-6 </li>\n<li> ap-tokyo-1 </li>\n<li> ap-singapore-1 </li>\n<li> ap-singapore-2 </li>\n<li> ap-shanghai-fsi-1 </li>\n<li> ap-shanghai-fsi-2 </li>\n<li> ap-shanghai-fsi-3 </li>\n<li> ap-bangkok-1 </li>\n<li> ap-shanghai-1(售罄) </li>\n<li> ap-shanghai-2 </li>\n<li> ap-shanghai-3 </li>\n<li> ap-shanghai-4 </li>\n<li> ap-shanghai-5 </li>\n<li> ap-mumbai-1 </li>\n<li> ap-mumbai-2 </li>\n<li> ap-beijing-1 </li>\n<li> ap-beijing-2 </li>\n<li> ap-beijing-3 </li>\n<li> ap-beijing-4 </li>\n<li> ap-beijing-5 </li>\n<li> na-siliconvalley-1 </li>\n<li> na-siliconvalley-2 </li>\n<li> eu-frankfurt-1 </li>\n<li> na-ashburn-1 </li>\n<li> na-ashburn-2 </li>\n<li> ap-nanjing-1 </li>\n<li> ap-nanjing-2 </li>",
296
296
  "example": "ap-guangzhou-3",
297
297
  "member": "string",
298
298
  "name": "Zone",
@@ -745,6 +745,58 @@ def doUpdateNamespace(args, parsed_globals):
745
745
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
746
746
 
747
747
 
748
+ def doListCustomDomains(args, parsed_globals):
749
+ g_param = parse_global_arg(parsed_globals)
750
+
751
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
752
+ cred = credential.CVMRoleCredential()
753
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
754
+ cred = credential.STSAssumeRoleCredential(
755
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
756
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
757
+ )
758
+ 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):
759
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
760
+ else:
761
+ cred = credential.Credential(
762
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
763
+ )
764
+ http_profile = HttpProfile(
765
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
766
+ reqMethod="POST",
767
+ endpoint=g_param[OptionsDefine.Endpoint],
768
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
769
+ )
770
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
771
+ if g_param[OptionsDefine.Language]:
772
+ profile.language = g_param[OptionsDefine.Language]
773
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
774
+ client = mod.ScfClient(cred, g_param[OptionsDefine.Region], profile)
775
+ client._sdkVersion += ("_CLI_" + __version__)
776
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
777
+ model = models.ListCustomDomainsRequest()
778
+ model.from_json_string(json.dumps(args))
779
+ start_time = time.time()
780
+ while True:
781
+ rsp = client.ListCustomDomains(model)
782
+ result = rsp.to_json_string()
783
+ try:
784
+ json_obj = json.loads(result)
785
+ except TypeError as e:
786
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
787
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
788
+ break
789
+ cur_time = time.time()
790
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
791
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
792
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
793
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
794
+ else:
795
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
796
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
797
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
798
+
799
+
748
800
  def doDeleteProvisionedConcurrencyConfig(args, parsed_globals):
749
801
  g_param = parse_global_arg(parsed_globals)
750
802
 
@@ -1265,6 +1317,58 @@ def doTerminateAsyncEvent(args, parsed_globals):
1265
1317
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1266
1318
 
1267
1319
 
1320
+ def doDeleteCustomDomain(args, parsed_globals):
1321
+ g_param = parse_global_arg(parsed_globals)
1322
+
1323
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1324
+ cred = credential.CVMRoleCredential()
1325
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1326
+ cred = credential.STSAssumeRoleCredential(
1327
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1328
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1329
+ )
1330
+ 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):
1331
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1332
+ else:
1333
+ cred = credential.Credential(
1334
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1335
+ )
1336
+ http_profile = HttpProfile(
1337
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1338
+ reqMethod="POST",
1339
+ endpoint=g_param[OptionsDefine.Endpoint],
1340
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1341
+ )
1342
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1343
+ if g_param[OptionsDefine.Language]:
1344
+ profile.language = g_param[OptionsDefine.Language]
1345
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1346
+ client = mod.ScfClient(cred, g_param[OptionsDefine.Region], profile)
1347
+ client._sdkVersion += ("_CLI_" + __version__)
1348
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1349
+ model = models.DeleteCustomDomainRequest()
1350
+ model.from_json_string(json.dumps(args))
1351
+ start_time = time.time()
1352
+ while True:
1353
+ rsp = client.DeleteCustomDomain(model)
1354
+ result = rsp.to_json_string()
1355
+ try:
1356
+ json_obj = json.loads(result)
1357
+ except TypeError as e:
1358
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1359
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1360
+ break
1361
+ cur_time = time.time()
1362
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1363
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1364
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1365
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1366
+ else:
1367
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1368
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1369
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1370
+
1371
+
1268
1372
  def doUpdateFunctionEventInvokeConfig(args, parsed_globals):
1269
1373
  g_param = parse_global_arg(parsed_globals)
1270
1374
 
@@ -1629,7 +1733,7 @@ def doGetAccount(args, parsed_globals):
1629
1733
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1630
1734
 
1631
1735
 
1632
- def doGetReservedConcurrencyConfig(args, parsed_globals):
1736
+ def doCreateCustomDomain(args, parsed_globals):
1633
1737
  g_param = parse_global_arg(parsed_globals)
1634
1738
 
1635
1739
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1658,11 +1762,11 @@ def doGetReservedConcurrencyConfig(args, parsed_globals):
1658
1762
  client = mod.ScfClient(cred, g_param[OptionsDefine.Region], profile)
1659
1763
  client._sdkVersion += ("_CLI_" + __version__)
1660
1764
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1661
- model = models.GetReservedConcurrencyConfigRequest()
1765
+ model = models.CreateCustomDomainRequest()
1662
1766
  model.from_json_string(json.dumps(args))
1663
1767
  start_time = time.time()
1664
1768
  while True:
1665
- rsp = client.GetReservedConcurrencyConfig(model)
1769
+ rsp = client.CreateCustomDomain(model)
1666
1770
  result = rsp.to_json_string()
1667
1771
  try:
1668
1772
  json_obj = json.loads(result)
@@ -2149,6 +2253,58 @@ def doGetAlias(args, parsed_globals):
2149
2253
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2150
2254
 
2151
2255
 
2256
+ def doGetReservedConcurrencyConfig(args, parsed_globals):
2257
+ g_param = parse_global_arg(parsed_globals)
2258
+
2259
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2260
+ cred = credential.CVMRoleCredential()
2261
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2262
+ cred = credential.STSAssumeRoleCredential(
2263
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2264
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2265
+ )
2266
+ 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):
2267
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2268
+ else:
2269
+ cred = credential.Credential(
2270
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2271
+ )
2272
+ http_profile = HttpProfile(
2273
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2274
+ reqMethod="POST",
2275
+ endpoint=g_param[OptionsDefine.Endpoint],
2276
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2277
+ )
2278
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2279
+ if g_param[OptionsDefine.Language]:
2280
+ profile.language = g_param[OptionsDefine.Language]
2281
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2282
+ client = mod.ScfClient(cred, g_param[OptionsDefine.Region], profile)
2283
+ client._sdkVersion += ("_CLI_" + __version__)
2284
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2285
+ model = models.GetReservedConcurrencyConfigRequest()
2286
+ model.from_json_string(json.dumps(args))
2287
+ start_time = time.time()
2288
+ while True:
2289
+ rsp = client.GetReservedConcurrencyConfig(model)
2290
+ result = rsp.to_json_string()
2291
+ try:
2292
+ json_obj = json.loads(result)
2293
+ except TypeError as e:
2294
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2295
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2296
+ break
2297
+ cur_time = time.time()
2298
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2299
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2300
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2301
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2302
+ else:
2303
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2304
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2305
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2306
+
2307
+
2152
2308
  def doPutTotalConcurrencyConfig(args, parsed_globals):
2153
2309
  g_param = parse_global_arg(parsed_globals)
2154
2310
 
@@ -2201,6 +2357,110 @@ def doPutTotalConcurrencyConfig(args, parsed_globals):
2201
2357
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2202
2358
 
2203
2359
 
2360
+ def doGetCustomDomain(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.ScfClient(cred, g_param[OptionsDefine.Region], profile)
2387
+ client._sdkVersion += ("_CLI_" + __version__)
2388
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2389
+ model = models.GetCustomDomainRequest()
2390
+ model.from_json_string(json.dumps(args))
2391
+ start_time = time.time()
2392
+ while True:
2393
+ rsp = client.GetCustomDomain(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
+
2412
+ def doUpdateCustomDomain(args, parsed_globals):
2413
+ g_param = parse_global_arg(parsed_globals)
2414
+
2415
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2416
+ cred = credential.CVMRoleCredential()
2417
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2418
+ cred = credential.STSAssumeRoleCredential(
2419
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2420
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2421
+ )
2422
+ 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):
2423
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2424
+ else:
2425
+ cred = credential.Credential(
2426
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2427
+ )
2428
+ http_profile = HttpProfile(
2429
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2430
+ reqMethod="POST",
2431
+ endpoint=g_param[OptionsDefine.Endpoint],
2432
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2433
+ )
2434
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2435
+ if g_param[OptionsDefine.Language]:
2436
+ profile.language = g_param[OptionsDefine.Language]
2437
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2438
+ client = mod.ScfClient(cred, g_param[OptionsDefine.Region], profile)
2439
+ client._sdkVersion += ("_CLI_" + __version__)
2440
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2441
+ model = models.UpdateCustomDomainRequest()
2442
+ model.from_json_string(json.dumps(args))
2443
+ start_time = time.time()
2444
+ while True:
2445
+ rsp = client.UpdateCustomDomain(model)
2446
+ result = rsp.to_json_string()
2447
+ try:
2448
+ json_obj = json.loads(result)
2449
+ except TypeError as e:
2450
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2451
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2452
+ break
2453
+ cur_time = time.time()
2454
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2455
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2456
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2457
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2458
+ else:
2459
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2460
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2461
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2462
+
2463
+
2204
2464
  def doCreateFunction(args, parsed_globals):
2205
2465
  g_param = parse_global_arg(parsed_globals)
2206
2466
 
@@ -2434,6 +2694,7 @@ ACTION_MAP = {
2434
2694
  "DeleteTrigger": doDeleteTrigger,
2435
2695
  "GetProvisionedConcurrencyConfig": doGetProvisionedConcurrencyConfig,
2436
2696
  "UpdateNamespace": doUpdateNamespace,
2697
+ "ListCustomDomains": doListCustomDomains,
2437
2698
  "DeleteProvisionedConcurrencyConfig": doDeleteProvisionedConcurrencyConfig,
2438
2699
  "PublishVersion": doPublishVersion,
2439
2700
  "DeleteLayerVersion": doDeleteLayerVersion,
@@ -2444,6 +2705,7 @@ ACTION_MAP = {
2444
2705
  "ListAsyncEvents": doListAsyncEvents,
2445
2706
  "CreateAlias": doCreateAlias,
2446
2707
  "TerminateAsyncEvent": doTerminateAsyncEvent,
2708
+ "DeleteCustomDomain": doDeleteCustomDomain,
2447
2709
  "UpdateFunctionEventInvokeConfig": doUpdateFunctionEventInvokeConfig,
2448
2710
  "ListVersionByFunction": doListVersionByFunction,
2449
2711
  "ListLayers": doListLayers,
@@ -2451,7 +2713,7 @@ ACTION_MAP = {
2451
2713
  "ListLayerVersions": doListLayerVersions,
2452
2714
  "UpdateTrigger": doUpdateTrigger,
2453
2715
  "GetAccount": doGetAccount,
2454
- "GetReservedConcurrencyConfig": doGetReservedConcurrencyConfig,
2716
+ "CreateCustomDomain": doCreateCustomDomain,
2455
2717
  "ListFunctions": doListFunctions,
2456
2718
  "UpdateFunctionConfiguration": doUpdateFunctionConfiguration,
2457
2719
  "PutReservedConcurrencyConfig": doPutReservedConcurrencyConfig,
@@ -2461,7 +2723,10 @@ ACTION_MAP = {
2461
2723
  "GetFunctionAddress": doGetFunctionAddress,
2462
2724
  "PutProvisionedConcurrencyConfig": doPutProvisionedConcurrencyConfig,
2463
2725
  "GetAlias": doGetAlias,
2726
+ "GetReservedConcurrencyConfig": doGetReservedConcurrencyConfig,
2464
2727
  "PutTotalConcurrencyConfig": doPutTotalConcurrencyConfig,
2728
+ "GetCustomDomain": doGetCustomDomain,
2729
+ "UpdateCustomDomain": doUpdateCustomDomain,
2465
2730
  "CreateFunction": doCreateFunction,
2466
2731
  "ListNamespaces": doListNamespaces,
2467
2732
  "UpdateFunctionCode": doUpdateFunctionCode,