tccli 3.0.1168.1__py2.py3-none-any.whl → 3.0.1170.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.
Files changed (35) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/aiart/v20221229/api.json +18 -0
  3. tccli/services/cls/cls_client.py +224 -12
  4. tccli/services/cls/v20201016/api.json +346 -6
  5. tccli/services/cls/v20201016/examples.json +32 -0
  6. tccli/services/cwp/cwp_client.py +118 -65
  7. tccli/services/cwp/v20180228/api.json +135 -2
  8. tccli/services/cwp/v20180228/examples.json +8 -0
  9. tccli/services/emr/emr_client.py +163 -4
  10. tccli/services/emr/v20190103/api.json +880 -11
  11. tccli/services/emr/v20190103/examples.json +24 -0
  12. tccli/services/essbasic/v20210526/api.json +1 -1
  13. tccli/services/hunyuan/v20230901/api.json +2 -2
  14. tccli/services/ioa/v20220601/api.json +5 -5
  15. tccli/services/organization/organization_client.py +167 -8
  16. tccli/services/organization/v20210331/api.json +307 -0
  17. tccli/services/organization/v20210331/examples.json +24 -0
  18. tccli/services/pts/v20210728/api.json +10 -10
  19. tccli/services/pts/v20210728/examples.json +14 -14
  20. tccli/services/smh/smh_client.py +281 -16
  21. tccli/services/smh/v20210712/api.json +806 -2
  22. tccli/services/smh/v20210712/examples.json +40 -0
  23. tccli/services/tcss/v20201101/api.json +156 -53
  24. tccli/services/tcss/v20201101/examples.json +39 -9
  25. tccli/services/trocket/trocket_client.py +53 -0
  26. tccli/services/trocket/v20230308/api.json +71 -0
  27. tccli/services/trocket/v20230308/examples.json +8 -0
  28. tccli/services/trtc/v20190722/api.json +7 -7
  29. tccli/services/vod/v20180717/api.json +12 -0
  30. tccli/services/waf/v20180125/api.json +12 -6
  31. {tccli-3.0.1168.1.dist-info → tccli-3.0.1170.1.dist-info}/METADATA +2 -2
  32. {tccli-3.0.1168.1.dist-info → tccli-3.0.1170.1.dist-info}/RECORD +35 -35
  33. {tccli-3.0.1168.1.dist-info → tccli-3.0.1170.1.dist-info}/WHEEL +0 -0
  34. {tccli-3.0.1168.1.dist-info → tccli-3.0.1170.1.dist-info}/entry_points.txt +0 -0
  35. {tccli-3.0.1168.1.dist-info → tccli-3.0.1170.1.dist-info}/license_files/LICENSE +0 -0
@@ -184,6 +184,14 @@
184
184
  "title": "test"
185
185
  }
186
186
  ],
187
+ "DescribeServiceNodeInfos": [
188
+ {
189
+ "document": "查询服务进程信息",
190
+ "input": "https://emr.tencentcloudapi.com/?Action=DescribeServiceNodeInfos\n&InstanceId=emr-3qg9lptu\n&ServiceGroupType=1\n&ServiceNodeType=1\n&Offset=0\n&Limit=10\n&<公共请求参数>",
191
+ "output": "{\n \"Response\": {\n \"TotalCnt\": 0,\n \"ServiceNodeList\": [\n {\n \"Ip\": \"abc\",\n \"NodeType\": 0,\n \"NodeName\": \"abc\",\n \"ServiceStatus\": 0,\n \"MonitorStatus\": 0,\n \"Status\": 0,\n \"PortsInfo\": \"abc\",\n \"LastRestartTime\": \"abc\",\n \"Flag\": 0,\n \"ConfGroupId\": 0,\n \"ConfGroupName\": \"abc\",\n \"ConfStatus\": 0,\n \"ServiceDetectionInfo\": [\n {\n \"DetectAlert\": \"abc\",\n \"DetetcFunctionKey\": \"abc\",\n \"DetetcFunctionValue\": \"abc\",\n \"DetetcTime\": \"abc\",\n \"DetectFunctionKey\": \"abc\",\n \"DetectFunctionValue\": \"abc\",\n \"DetectTime\": \"abc\"\n }\n ],\n \"NodeFlagFilter\": \"abc\",\n \"HealthStatus\": {\n \"Code\": 0,\n \"Text\": \"abc\",\n \"Desc\": \"abc\"\n },\n \"IsSupportRoleMonitor\": true,\n \"StopPolicies\": [\n {\n \"Name\": \"abc\",\n \"DisplayName\": \"abc\",\n \"Describe\": \"abc\",\n \"BatchSizeRange\": [\n 0\n ],\n \"IsDefault\": \"abc\"\n }\n ],\n \"HAState\": \"abc\",\n \"NameService\": \"abc\",\n \"IsFederation\": true\n }\n ],\n \"AliasInfo\": \"abc\",\n \"SupportNodeFlagFilterList\": [\n \"abc\"\n ],\n \"RequestId\": \"abc\"\n }\n}",
192
+ "title": "查询服务进程信息"
193
+ }
194
+ ],
187
195
  "DescribeTrinoQueryInfo": [
188
196
  {
189
197
  "document": "",
@@ -208,6 +216,14 @@
208
216
  "title": "获取Yarn的Applications列表"
209
217
  }
210
218
  ],
219
+ "DescribeYarnScheduleHistory": [
220
+ {
221
+ "document": "",
222
+ "input": "POST / HTTP/1.1\nHost: emr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeYarnScheduleHistory\n<公共请求参数>\n\n{\n \"InstanceId\": \"emr-a903oah8\",\n \"StartTime\": 1722873600,\n \"EndTime\": 1722959999,\n \"Limit\": 10,\n \"Offset\": 0,\n \"SchedulerType\": \"All\",\n \"TaskState\": -99\n}",
223
+ "output": "{\n \"Response\": {\n \"RequestId\": \"c38e1833-e164-488c-9817-e8ca75d8d214\",\n \"SchedulerNameList\": [\n \"Capacity Scheduler\",\n \"Fair Scheduler\"\n ],\n \"StateList\": [\n 0,\n 1,\n 2,\n -1\n ],\n \"Tasks\": [\n {\n \"CreateTime\": \"2024-08-07 19:13:38\",\n \"Details\": [\n {\n \"FailReason\": \"\",\n \"JobId\": 40005,\n \"Progress\": \"9%\",\n \"Step\": \"开始\"\n },\n {\n \"FailReason\": \"\",\n \"JobId\": 40005,\n \"Progress\": \"45%\",\n \"Step\": \"写 capacity-scheduler.xml\"\n },\n {\n \"FailReason\": \"\",\n \"JobId\": 40005,\n \"Progress\": \"63%\",\n \"Step\": \"重启 resource manager\"\n },\n {\n \"FailReason\": \"\",\n \"JobId\": 40005,\n \"Progress\": \"100%\",\n \"Step\": \"结束\"\n }\n ],\n \"EndTime\": \"2024-08-07 19:13:48\",\n \"OperatorName\": \"change capacity scheduler,disable label,refresh dynamic pools,restart resource manager\",\n \"SchedulerName\": \"Capacity Scheduler\",\n \"State\": 2\n },\n {\n \"CreateTime\": \"2024-08-06 14:30:02\",\n \"Details\": [\n {\n \"FailReason\": \"\",\n \"JobId\": 40000,\n \"Progress\": \"9%\",\n \"Step\": \"开始\"\n },\n {\n \"FailReason\": \"\",\n \"JobId\": 40000,\n \"Progress\": \"45%\",\n \"Step\": \"写 capacity-scheduler.xml\"\n },\n {\n \"FailReason\": \"The task was canceled because of a timeout\",\n \"JobId\": 40000,\n \"Progress\": \"63%\",\n \"Step\": \"重启 resource manager\"\n }\n ],\n \"EndTime\": \"2024-08-06 14:35:05\",\n \"OperatorName\": \"change capacity scheduler,disable label,refresh dynamic pools,restart resource manager\",\n \"SchedulerName\": \"Capacity Scheduler\",\n \"State\": -1\n },\n {\n \"CreateTime\": \"2024-08-06 11:29:15\",\n \"Details\": [\n {\n \"FailReason\": \"\",\n \"JobId\": 39994,\n \"Progress\": \"9%\",\n \"Step\": \"开始\"\n },\n {\n \"FailReason\": \"\",\n \"JobId\": 39994,\n \"Progress\": \"45%\",\n \"Step\": \"写 capacity-scheduler.xml\"\n },\n {\n \"FailReason\": \"\",\n \"JobId\": 39994,\n \"Progress\": \"63%\",\n \"Step\": \"重启 resource manager\"\n },\n {\n \"FailReason\": \"\",\n \"JobId\": 39994,\n \"Progress\": \"100%\",\n \"Step\": \"结束\"\n }\n ],\n \"EndTime\": \"2024-08-06 11:29:25\",\n \"OperatorName\": \"change capacity scheduler,disable label,refresh dynamic pools,restart resource manager\",\n \"SchedulerName\": \"Capacity Scheduler\",\n \"State\": 2\n }\n ],\n \"Total\": 3\n }\n}",
224
+ "title": "查看yarn资源调度的调度历史"
225
+ }
226
+ ],
211
227
  "InquirePriceRenewEmr": [
212
228
  {
213
229
  "document": "",
@@ -308,6 +324,14 @@
308
324
  "title": "test"
309
325
  }
310
326
  ],
327
+ "ModifyYarnDeploy": [
328
+ {
329
+ "document": "",
330
+ "input": "POST / HTTP/1.1\nHost: emr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyYarnDeploy\n<公共请求参数>\n\n{\n \"InstanceId\": \"emr-a903oah8\",\n \"OldScheduler\": \"capacity\",\n \"NewScheduler\": \"fair\"\n}",
331
+ "output": "{\n \"Response\": {\n \"ErrorMsg\": null,\n \"IsDraft\": false,\n \"RequestId\": \"d76bd103-947e-49f3-8485-e6aab28ecbbf\"\n }\n}",
332
+ "title": "部署生效"
333
+ }
334
+ ],
311
335
  "RunJobFlow": [
312
336
  {
313
337
  "document": "",
@@ -4382,7 +4382,7 @@
4382
4382
  },
4383
4383
  {
4384
4384
  "disabled": false,
4385
- "document": "电子印章类型 , 可选类型如下: <ul><li>**OFFICIAL**: 公章</li><li>**CONTRACT**: 合同专用章;</li><li>**FINANCE**: 财务专用章;</li><li>**PERSONNEL**: 人事专用章</li><li>**INVOICE**: 发票专用章</li><li>**EMPLOYEE_QUALIFICATION_SEAL**: 员工执业章</li></ul>注: `为空时查询所有类型的印章。`",
4385
+ "document": "电子印章类型 , 可选类型如下: <ul><li>**OFFICIAL**: 公章</li><li>**CONTRACT**: 合同专用章;</li><li>**FINANCE**: 财务专用章;</li><li>**PERSONNEL**: 人事专用章</li><li>**INVOICE**: 发票专用章</li><li>**LEGAL_PERSON_SEAL**: 法定代表人章;</li><li>**EMPLOYEE_QUALIFICATION_SEAL**: 员工执业章</li></ul>注: `1.为空时查询所有类型的印章。`",
4386
4386
  "example": "无",
4387
4387
  "member": "string",
4388
4388
  "name": "SealTypes",
@@ -132,7 +132,7 @@
132
132
  },
133
133
  {
134
134
  "disabled": false,
135
- "document": "说明:\n1. 影响输出文本的多样性,取值区间为 [0.0, 1.0]。取值越大,生成文本的多样性越强。\n2. 模型已有默认参数,不传值时使用各模型推荐值,不推荐用户修改。",
135
+ "document": "说明:\n1. 影响输出文本的多样性。模型已有默认参数,不传值时使用各模型推荐值,不推荐用户修改。\n2. 取值区间为 [0.0, 1.0]。取值越大,生成文本的多样性越强。",
136
136
  "example": "无",
137
137
  "member": "float",
138
138
  "name": "TopP",
@@ -141,7 +141,7 @@
141
141
  },
142
142
  {
143
143
  "disabled": false,
144
- "document": "说明:\n1. 影响模型输出多样性,取值区间为 [0.0, 2.0]。较高的数值会使输出更加多样化和不可预测,而较低的数值会使其更加集中和确定。\n2. 模型已有默认参数,不传值时使用各模型推荐值,不推荐用户修改。",
144
+ "document": "说明:\n1. 影响模型输出多样性,模型已有默认参数,不传值时使用各模型推荐值,不推荐用户修改。\n2. 取值区间为 [0.0, 2.0]。较高的数值会使输出更加多样化和不可预测,而较低的数值会使其更加集中和确定。",
145
145
  "example": "无",
146
146
  "member": "float",
147
147
  "name": "Temperature",
@@ -446,7 +446,7 @@
446
446
  },
447
447
  {
448
448
  "disabled": false,
449
- "document": "私有化默认分组id-名称-操作系统\n1\t全网终端\tWin\n2\t未分组终端\tWin\n30000000\t服务器\tWin\n40000101\t全网终端\tLinux\n40000102\t未分组终端\tLinux\n40000103\t服务器\tLinux\n40000201\t全网终端\tmacOS\n40000202\t未分组终端\tmacOS\n40000203\t服务器\tmacOS\n40000401\t全网终端\tAndroid\n40000402\t未分组终端\tAndroid\n40000501\t全网终端\tiOS\n40000502\t未分组终端\tiOS",
449
+ "document": "【和GroupIds必须有一个填写】设备分组id(需要和OsType匹配)\nid-名称-操作系统\n1\t全网终端\tWin\n2\t未分组终端\tWin\n30000000\t服务器\tWin\n40000101\t全网终端\tLinux\n40000102\t未分组终端\tLinux\n40000103\t服务器\tLinux\n40000201\t全网终端\tmacOS\n40000202\t未分组终端\tmacOS\n40000203\t服务器\tmacOS\n40000401\t全网终端\tAndroid\n40000402\t未分组终端\tAndroid\n40000501\t全网终端\tiOS\n40000502\t未分组终端\tiOS",
450
450
  "example": "1",
451
451
  "member": "int64",
452
452
  "name": "GroupId",
@@ -455,7 +455,7 @@
455
455
  },
456
456
  {
457
457
  "disabled": false,
458
- "document": "系统类型(0: win,1:linux,2: mac,3: win_srv,4:android,5:ios 默认值0",
458
+ "document": "【必填】操作系统类型(0: win,1:linux,2: mac,3: win_srv,4:android,5:ios 默认值0),需要和GroupId或者GroupIds匹配",
459
459
  "example": "0",
460
460
  "member": "int64",
461
461
  "name": "OsType",
@@ -464,7 +464,7 @@
464
464
  },
465
465
  {
466
466
  "disabled": false,
467
- "document": "在线状态 2 在线 01 离线",
467
+ "document": "在线状态 2表示在线,0或者1表示离线)",
468
468
  "example": "2",
469
469
  "member": "int64",
470
470
  "name": "OnlineStatus",
@@ -491,7 +491,7 @@
491
491
  },
492
492
  {
493
493
  "disabled": false,
494
- "document": "获取第几页--兼容旧接口,参数同Condition(只支持32位)",
494
+ "document": "获取第几页--兼容旧接口,参数同Condition",
495
495
  "example": "1",
496
496
  "member": "int64",
497
497
  "name": "PageNum",
@@ -500,7 +500,7 @@
500
500
  },
501
501
  {
502
502
  "disabled": false,
503
- "document": "每页获取数--兼容旧接口,参数同Condition(只支持32位)",
503
+ "document": "每页获取数--兼容旧接口,参数同Condition",
504
504
  "example": "20",
505
505
  "member": "int64",
506
506
  "name": "PageSize",
@@ -1163,6 +1163,58 @@ def doDeleteAccount(args, parsed_globals):
1163
1163
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1164
1164
 
1165
1165
 
1166
+ def doListOrgServiceAssignMember(args, parsed_globals):
1167
+ g_param = parse_global_arg(parsed_globals)
1168
+
1169
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1170
+ cred = credential.CVMRoleCredential()
1171
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1172
+ cred = credential.STSAssumeRoleCredential(
1173
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1174
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1175
+ )
1176
+ 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):
1177
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1178
+ else:
1179
+ cred = credential.Credential(
1180
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1181
+ )
1182
+ http_profile = HttpProfile(
1183
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1184
+ reqMethod="POST",
1185
+ endpoint=g_param[OptionsDefine.Endpoint],
1186
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1187
+ )
1188
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1189
+ if g_param[OptionsDefine.Language]:
1190
+ profile.language = g_param[OptionsDefine.Language]
1191
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1192
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1193
+ client._sdkVersion += ("_CLI_" + __version__)
1194
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1195
+ model = models.ListOrgServiceAssignMemberRequest()
1196
+ model.from_json_string(json.dumps(args))
1197
+ start_time = time.time()
1198
+ while True:
1199
+ rsp = client.ListOrgServiceAssignMember(model)
1200
+ result = rsp.to_json_string()
1201
+ try:
1202
+ json_obj = json.loads(result)
1203
+ except TypeError as e:
1204
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1205
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1206
+ break
1207
+ cur_time = time.time()
1208
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1209
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1210
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1211
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1212
+ else:
1213
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1214
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1215
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1216
+
1217
+
1166
1218
  def doRejectJoinShareUnitInvitation(args, parsed_globals):
1167
1219
  g_param = parse_global_arg(parsed_globals)
1168
1220
 
@@ -1267,6 +1319,58 @@ def doDeleteOrganizationNodes(args, parsed_globals):
1267
1319
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1268
1320
 
1269
1321
 
1322
+ def doCreateOrgServiceAssign(args, parsed_globals):
1323
+ g_param = parse_global_arg(parsed_globals)
1324
+
1325
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1326
+ cred = credential.CVMRoleCredential()
1327
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1328
+ cred = credential.STSAssumeRoleCredential(
1329
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1330
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1331
+ )
1332
+ 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):
1333
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1334
+ else:
1335
+ cred = credential.Credential(
1336
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1337
+ )
1338
+ http_profile = HttpProfile(
1339
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1340
+ reqMethod="POST",
1341
+ endpoint=g_param[OptionsDefine.Endpoint],
1342
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1343
+ )
1344
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1345
+ if g_param[OptionsDefine.Language]:
1346
+ profile.language = g_param[OptionsDefine.Language]
1347
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1348
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1349
+ client._sdkVersion += ("_CLI_" + __version__)
1350
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1351
+ model = models.CreateOrgServiceAssignRequest()
1352
+ model.from_json_string(json.dumps(args))
1353
+ start_time = time.time()
1354
+ while True:
1355
+ rsp = client.CreateOrgServiceAssign(model)
1356
+ result = rsp.to_json_string()
1357
+ try:
1358
+ json_obj = json.loads(result)
1359
+ except TypeError as e:
1360
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1361
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1362
+ break
1363
+ cur_time = time.time()
1364
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1365
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1366
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1367
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1368
+ else:
1369
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1370
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1371
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1372
+
1373
+
1270
1374
  def doDescribeEffectivePolicy(args, parsed_globals):
1271
1375
  g_param = parse_global_arg(parsed_globals)
1272
1376
 
@@ -2411,6 +2515,58 @@ def doCreateOrganizationIdentity(args, parsed_globals):
2411
2515
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2412
2516
 
2413
2517
 
2518
+ def doDeleteOrgServiceAssign(args, parsed_globals):
2519
+ g_param = parse_global_arg(parsed_globals)
2520
+
2521
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2522
+ cred = credential.CVMRoleCredential()
2523
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2524
+ cred = credential.STSAssumeRoleCredential(
2525
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2526
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2527
+ )
2528
+ 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):
2529
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2530
+ else:
2531
+ cred = credential.Credential(
2532
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2533
+ )
2534
+ http_profile = HttpProfile(
2535
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2536
+ reqMethod="POST",
2537
+ endpoint=g_param[OptionsDefine.Endpoint],
2538
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2539
+ )
2540
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2541
+ if g_param[OptionsDefine.Language]:
2542
+ profile.language = g_param[OptionsDefine.Language]
2543
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2544
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2545
+ client._sdkVersion += ("_CLI_" + __version__)
2546
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2547
+ model = models.DeleteOrgServiceAssignRequest()
2548
+ model.from_json_string(json.dumps(args))
2549
+ start_time = time.time()
2550
+ while True:
2551
+ rsp = client.DeleteOrgServiceAssign(model)
2552
+ result = rsp.to_json_string()
2553
+ try:
2554
+ json_obj = json.loads(result)
2555
+ except TypeError as e:
2556
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2557
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2558
+ break
2559
+ cur_time = time.time()
2560
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2561
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2562
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2563
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2564
+ else:
2565
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2566
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2567
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2568
+
2569
+
2414
2570
  def doDeleteOrganizationIdentity(args, parsed_globals):
2415
2571
  g_param = parse_global_arg(parsed_globals)
2416
2572
 
@@ -3503,7 +3659,7 @@ def doListOrganizationNodes(args, parsed_globals):
3503
3659
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3504
3660
 
3505
3661
 
3506
- def doCheckAccountDelete(args, parsed_globals):
3662
+ def doDeleteOrganizationMemberAuthIdentity(args, parsed_globals):
3507
3663
  g_param = parse_global_arg(parsed_globals)
3508
3664
 
3509
3665
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3532,11 +3688,11 @@ def doCheckAccountDelete(args, parsed_globals):
3532
3688
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3533
3689
  client._sdkVersion += ("_CLI_" + __version__)
3534
3690
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3535
- model = models.CheckAccountDeleteRequest()
3691
+ model = models.DeleteOrganizationMemberAuthIdentityRequest()
3536
3692
  model.from_json_string(json.dumps(args))
3537
3693
  start_time = time.time()
3538
3694
  while True:
3539
- rsp = client.CheckAccountDelete(model)
3695
+ rsp = client.DeleteOrganizationMemberAuthIdentity(model)
3540
3696
  result = rsp.to_json_string()
3541
3697
  try:
3542
3698
  json_obj = json.loads(result)
@@ -3867,7 +4023,7 @@ def doListOrganizationNodeMembers(args, parsed_globals):
3867
4023
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3868
4024
 
3869
4025
 
3870
- def doDeleteOrganizationMemberAuthIdentity(args, parsed_globals):
4026
+ def doCheckAccountDelete(args, parsed_globals):
3871
4027
  g_param = parse_global_arg(parsed_globals)
3872
4028
 
3873
4029
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3896,11 +4052,11 @@ def doDeleteOrganizationMemberAuthIdentity(args, parsed_globals):
3896
4052
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3897
4053
  client._sdkVersion += ("_CLI_" + __version__)
3898
4054
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3899
- model = models.DeleteOrganizationMemberAuthIdentityRequest()
4055
+ model = models.CheckAccountDeleteRequest()
3900
4056
  model.from_json_string(json.dumps(args))
3901
4057
  start_time = time.time()
3902
4058
  while True:
3903
- rsp = client.DeleteOrganizationMemberAuthIdentity(model)
4059
+ rsp = client.CheckAccountDelete(model)
3904
4060
  result = rsp.to_json_string()
3905
4061
  try:
3906
4062
  json_obj = json.loads(result)
@@ -4006,8 +4162,10 @@ ACTION_MAP = {
4006
4162
  "UpdateOrganizationIdentity": doUpdateOrganizationIdentity,
4007
4163
  "DescribeOrganizationFinancialByMonth": doDescribeOrganizationFinancialByMonth,
4008
4164
  "DeleteAccount": doDeleteAccount,
4165
+ "ListOrgServiceAssignMember": doListOrgServiceAssignMember,
4009
4166
  "RejectJoinShareUnitInvitation": doRejectJoinShareUnitInvitation,
4010
4167
  "DeleteOrganizationNodes": doDeleteOrganizationNodes,
4168
+ "CreateOrgServiceAssign": doCreateOrgServiceAssign,
4011
4169
  "DescribeEffectivePolicy": doDescribeEffectivePolicy,
4012
4170
  "DeleteShareUnitResources": doDeleteShareUnitResources,
4013
4171
  "DescribeShareUnits": doDescribeShareUnits,
@@ -4030,6 +4188,7 @@ ACTION_MAP = {
4030
4188
  "DescribeShareUnitResources": doDescribeShareUnitResources,
4031
4189
  "DetachPolicy": doDetachPolicy,
4032
4190
  "CreateOrganizationIdentity": doCreateOrganizationIdentity,
4191
+ "DeleteOrgServiceAssign": doDeleteOrgServiceAssign,
4033
4192
  "DeleteOrganizationIdentity": doDeleteOrganizationIdentity,
4034
4193
  "AcceptOrganizationInvitation": doAcceptOrganizationInvitation,
4035
4194
  "DenyOrganizationInvitation": doDenyOrganizationInvitation,
@@ -4051,14 +4210,14 @@ ACTION_MAP = {
4051
4210
  "DescribeOrganizationNodes": doDescribeOrganizationNodes,
4052
4211
  "CreateOrganization": doCreateOrganization,
4053
4212
  "ListOrganizationNodes": doListOrganizationNodes,
4054
- "CheckAccountDelete": doCheckAccountDelete,
4213
+ "DeleteOrganizationMemberAuthIdentity": doDeleteOrganizationMemberAuthIdentity,
4055
4214
  "CreatePolicy": doCreatePolicy,
4056
4215
  "CreateOrganizationMemberPolicy": doCreateOrganizationMemberPolicy,
4057
4216
  "ListOrganizationService": doListOrganizationService,
4058
4217
  "DeletePolicy": doDeletePolicy,
4059
4218
  "ListTargetsForPolicy": doListTargetsForPolicy,
4060
4219
  "ListOrganizationNodeMembers": doListOrganizationNodeMembers,
4061
- "DeleteOrganizationMemberAuthIdentity": doDeleteOrganizationMemberAuthIdentity,
4220
+ "CheckAccountDelete": doCheckAccountDelete,
4062
4221
  "UpdatePolicy": doUpdatePolicy,
4063
4222
 
4064
4223
  }