tccli 3.0.1113.1__py2.py3-none-any.whl → 3.0.1115.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 (39) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/asr/v20190614/api.json +1 -1
  3. tccli/services/cat/v20180409/api.json +2 -2
  4. tccli/services/cat/v20180409/examples.json +2 -2
  5. tccli/services/cdwdoris/v20211228/api.json +9 -0
  6. tccli/services/cynosdb/v20190107/api.json +151 -50
  7. tccli/services/dasb/dasb_client.py +347 -29
  8. tccli/services/dasb/v20191018/api.json +966 -13
  9. tccli/services/dasb/v20191018/examples.json +48 -0
  10. tccli/services/dbbrain/dbbrain_client.py +110 -4
  11. tccli/services/dbbrain/v20210527/api.json +235 -5
  12. tccli/services/dbbrain/v20210527/examples.json +23 -1
  13. tccli/services/dlc/dlc_client.py +190 -31
  14. tccli/services/dlc/v20210125/api.json +176 -0
  15. tccli/services/dlc/v20210125/examples.json +24 -0
  16. tccli/services/dsgc/v20190723/api.json +30 -17
  17. tccli/services/dsgc/v20190723/examples.json +1 -1
  18. tccli/services/ess/ess_client.py +110 -4
  19. tccli/services/ess/v20201111/api.json +146 -1
  20. tccli/services/ess/v20201111/examples.json +17 -1
  21. tccli/services/essbasic/v20210526/api.json +12 -2
  22. tccli/services/essbasic/v20210526/examples.json +4 -4
  23. tccli/services/hunyuan/v20230901/api.json +6 -6
  24. tccli/services/hunyuan/v20230901/examples.json +6 -6
  25. tccli/services/iotexplorer/iotexplorer_client.py +326 -8
  26. tccli/services/iotexplorer/v20190423/api.json +583 -0
  27. tccli/services/iotexplorer/v20190423/examples.json +48 -0
  28. tccli/services/monitor/v20180724/api.json +27 -0
  29. tccli/services/mps/v20190612/api.json +67 -1
  30. tccli/services/svp/svp_client.py +159 -0
  31. tccli/services/svp/v20240125/api.json +723 -0
  32. tccli/services/svp/v20240125/examples.json +24 -0
  33. tccli/services/tdmq/v20200217/api.json +2 -2
  34. tccli/services/tione/v20211111/api.json +11 -0
  35. {tccli-3.0.1113.1.dist-info → tccli-3.0.1115.1.dist-info}/METADATA +2 -2
  36. {tccli-3.0.1113.1.dist-info → tccli-3.0.1115.1.dist-info}/RECORD +39 -39
  37. {tccli-3.0.1113.1.dist-info → tccli-3.0.1115.1.dist-info}/WHEEL +0 -0
  38. {tccli-3.0.1113.1.dist-info → tccli-3.0.1115.1.dist-info}/entry_points.txt +0 -0
  39. {tccli-3.0.1113.1.dist-info → tccli-3.0.1115.1.dist-info}/license_files/LICENSE +0 -0
@@ -901,7 +901,7 @@ def doListEventHistory(args, parsed_globals):
901
901
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
902
902
 
903
903
 
904
- def doDeleteDevice(args, parsed_globals):
904
+ def doDescribeStudioProduct(args, parsed_globals):
905
905
  g_param = parse_global_arg(parsed_globals)
906
906
 
907
907
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -930,11 +930,11 @@ def doDeleteDevice(args, parsed_globals):
930
930
  client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
931
931
  client._sdkVersion += ("_CLI_" + __version__)
932
932
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
933
- model = models.DeleteDeviceRequest()
933
+ model = models.DescribeStudioProductRequest()
934
934
  model.from_json_string(json.dumps(args))
935
935
  start_time = time.time()
936
936
  while True:
937
- rsp = client.DeleteDevice(model)
937
+ rsp = client.DescribeStudioProduct(model)
938
938
  result = rsp.to_json_string()
939
939
  try:
940
940
  json_obj = json.loads(result)
@@ -1837,6 +1837,58 @@ def doDeleteLoRaGateway(args, parsed_globals):
1837
1837
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1838
1838
 
1839
1839
 
1840
+ def doCancelAssignTWeCallLicense(args, parsed_globals):
1841
+ g_param = parse_global_arg(parsed_globals)
1842
+
1843
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1844
+ cred = credential.CVMRoleCredential()
1845
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1846
+ cred = credential.STSAssumeRoleCredential(
1847
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1848
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1849
+ )
1850
+ 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):
1851
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1852
+ else:
1853
+ cred = credential.Credential(
1854
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1855
+ )
1856
+ http_profile = HttpProfile(
1857
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1858
+ reqMethod="POST",
1859
+ endpoint=g_param[OptionsDefine.Endpoint],
1860
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1861
+ )
1862
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1863
+ if g_param[OptionsDefine.Language]:
1864
+ profile.language = g_param[OptionsDefine.Language]
1865
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1866
+ client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
1867
+ client._sdkVersion += ("_CLI_" + __version__)
1868
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1869
+ model = models.CancelAssignTWeCallLicenseRequest()
1870
+ model.from_json_string(json.dumps(args))
1871
+ start_time = time.time()
1872
+ while True:
1873
+ rsp = client.CancelAssignTWeCallLicense(model)
1874
+ result = rsp.to_json_string()
1875
+ try:
1876
+ json_obj = json.loads(result)
1877
+ except TypeError as e:
1878
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1879
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1880
+ break
1881
+ cur_time = time.time()
1882
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1883
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1884
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1885
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1886
+ else:
1887
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1888
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1889
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1890
+
1891
+
1840
1892
  def doCreateStudioProduct(args, parsed_globals):
1841
1893
  g_param = parse_global_arg(parsed_globals)
1842
1894
 
@@ -3969,6 +4021,58 @@ def doUploadFirmware(args, parsed_globals):
3969
4021
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3970
4022
 
3971
4023
 
4024
+ def doGetTWeCallPkgList(args, parsed_globals):
4025
+ g_param = parse_global_arg(parsed_globals)
4026
+
4027
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4028
+ cred = credential.CVMRoleCredential()
4029
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4030
+ cred = credential.STSAssumeRoleCredential(
4031
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4032
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4033
+ )
4034
+ 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):
4035
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4036
+ else:
4037
+ cred = credential.Credential(
4038
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4039
+ )
4040
+ http_profile = HttpProfile(
4041
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4042
+ reqMethod="POST",
4043
+ endpoint=g_param[OptionsDefine.Endpoint],
4044
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4045
+ )
4046
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4047
+ if g_param[OptionsDefine.Language]:
4048
+ profile.language = g_param[OptionsDefine.Language]
4049
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4050
+ client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
4051
+ client._sdkVersion += ("_CLI_" + __version__)
4052
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4053
+ model = models.GetTWeCallPkgListRequest()
4054
+ model.from_json_string(json.dumps(args))
4055
+ start_time = time.time()
4056
+ while True:
4057
+ rsp = client.GetTWeCallPkgList(model)
4058
+ result = rsp.to_json_string()
4059
+ try:
4060
+ json_obj = json.loads(result)
4061
+ except TypeError as e:
4062
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4063
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4064
+ break
4065
+ cur_time = time.time()
4066
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4067
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4068
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4069
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4070
+ else:
4071
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4072
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4073
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4074
+
4075
+
3972
4076
  def doUpdateDevicesEnableState(args, parsed_globals):
3973
4077
  g_param = parse_global_arg(parsed_globals)
3974
4078
 
@@ -4229,6 +4333,58 @@ def doSearchPositionSpace(args, parsed_globals):
4229
4333
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4230
4334
 
4231
4335
 
4336
+ def doAssignTWeCallLicense(args, parsed_globals):
4337
+ g_param = parse_global_arg(parsed_globals)
4338
+
4339
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4340
+ cred = credential.CVMRoleCredential()
4341
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4342
+ cred = credential.STSAssumeRoleCredential(
4343
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4344
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4345
+ )
4346
+ 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):
4347
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4348
+ else:
4349
+ cred = credential.Credential(
4350
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4351
+ )
4352
+ http_profile = HttpProfile(
4353
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4354
+ reqMethod="POST",
4355
+ endpoint=g_param[OptionsDefine.Endpoint],
4356
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4357
+ )
4358
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4359
+ if g_param[OptionsDefine.Language]:
4360
+ profile.language = g_param[OptionsDefine.Language]
4361
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4362
+ client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
4363
+ client._sdkVersion += ("_CLI_" + __version__)
4364
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4365
+ model = models.AssignTWeCallLicenseRequest()
4366
+ model.from_json_string(json.dumps(args))
4367
+ start_time = time.time()
4368
+ while True:
4369
+ rsp = client.AssignTWeCallLicense(model)
4370
+ result = rsp.to_json_string()
4371
+ try:
4372
+ json_obj = json.loads(result)
4373
+ except TypeError as e:
4374
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4375
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4376
+ break
4377
+ cur_time = time.time()
4378
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4379
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4380
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4381
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4382
+ else:
4383
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4384
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4385
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4386
+
4387
+
4232
4388
  def doModifyPositionSpace(args, parsed_globals):
4233
4389
  g_param = parse_global_arg(parsed_globals)
4234
4390
 
@@ -4385,6 +4541,58 @@ def doUpdateFirmware(args, parsed_globals):
4385
4541
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4386
4542
 
4387
4543
 
4544
+ def doGetTWeCallActiveStatus(args, parsed_globals):
4545
+ g_param = parse_global_arg(parsed_globals)
4546
+
4547
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4548
+ cred = credential.CVMRoleCredential()
4549
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4550
+ cred = credential.STSAssumeRoleCredential(
4551
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4552
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4553
+ )
4554
+ 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):
4555
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4556
+ else:
4557
+ cred = credential.Credential(
4558
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4559
+ )
4560
+ http_profile = HttpProfile(
4561
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4562
+ reqMethod="POST",
4563
+ endpoint=g_param[OptionsDefine.Endpoint],
4564
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4565
+ )
4566
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4567
+ if g_param[OptionsDefine.Language]:
4568
+ profile.language = g_param[OptionsDefine.Language]
4569
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4570
+ client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
4571
+ client._sdkVersion += ("_CLI_" + __version__)
4572
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4573
+ model = models.GetTWeCallActiveStatusRequest()
4574
+ model.from_json_string(json.dumps(args))
4575
+ start_time = time.time()
4576
+ while True:
4577
+ rsp = client.GetTWeCallActiveStatus(model)
4578
+ result = rsp.to_json_string()
4579
+ try:
4580
+ json_obj = json.loads(result)
4581
+ except TypeError as e:
4582
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4583
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4584
+ break
4585
+ cur_time = time.time()
4586
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4587
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4588
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4589
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4590
+ else:
4591
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4592
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4593
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4594
+
4595
+
4388
4596
  def doDescribeGatewaySubProducts(args, parsed_globals):
4389
4597
  g_param = parse_global_arg(parsed_globals)
4390
4598
 
@@ -4957,6 +5165,58 @@ def doDescribeBatchProduction(args, parsed_globals):
4957
5165
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4958
5166
 
4959
5167
 
5168
+ def doActivateTWeCallLicense(args, parsed_globals):
5169
+ g_param = parse_global_arg(parsed_globals)
5170
+
5171
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5172
+ cred = credential.CVMRoleCredential()
5173
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5174
+ cred = credential.STSAssumeRoleCredential(
5175
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5176
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5177
+ )
5178
+ 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):
5179
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5180
+ else:
5181
+ cred = credential.Credential(
5182
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5183
+ )
5184
+ http_profile = HttpProfile(
5185
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5186
+ reqMethod="POST",
5187
+ endpoint=g_param[OptionsDefine.Endpoint],
5188
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5189
+ )
5190
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5191
+ if g_param[OptionsDefine.Language]:
5192
+ profile.language = g_param[OptionsDefine.Language]
5193
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5194
+ client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
5195
+ client._sdkVersion += ("_CLI_" + __version__)
5196
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
5197
+ model = models.ActivateTWeCallLicenseRequest()
5198
+ model.from_json_string(json.dumps(args))
5199
+ start_time = time.time()
5200
+ while True:
5201
+ rsp = client.ActivateTWeCallLicense(model)
5202
+ result = rsp.to_json_string()
5203
+ try:
5204
+ json_obj = json.loads(result)
5205
+ except TypeError as e:
5206
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
5207
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5208
+ break
5209
+ cur_time = time.time()
5210
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5211
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5212
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5213
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5214
+ else:
5215
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5216
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5217
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5218
+
5219
+
4960
5220
  def doUpdateDeviceTWeCallAuthorizeStatus(args, parsed_globals):
4961
5221
  g_param = parse_global_arg(parsed_globals)
4962
5222
 
@@ -5425,7 +5685,7 @@ def doModifyPositionFence(args, parsed_globals):
5425
5685
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5426
5686
 
5427
5687
 
5428
- def doDescribeStudioProduct(args, parsed_globals):
5688
+ def doDeleteDevice(args, parsed_globals):
5429
5689
  g_param = parse_global_arg(parsed_globals)
5430
5690
 
5431
5691
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -5454,11 +5714,11 @@ def doDescribeStudioProduct(args, parsed_globals):
5454
5714
  client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
5455
5715
  client._sdkVersion += ("_CLI_" + __version__)
5456
5716
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
5457
- model = models.DescribeStudioProductRequest()
5717
+ model = models.DeleteDeviceRequest()
5458
5718
  model.from_json_string(json.dumps(args))
5459
5719
  start_time = time.time()
5460
5720
  while True:
5461
- rsp = client.DescribeStudioProduct(model)
5721
+ rsp = client.DeleteDevice(model)
5462
5722
  result = rsp.to_json_string()
5463
5723
  try:
5464
5724
  json_obj = json.loads(result)
@@ -6101,6 +6361,58 @@ def doModifyLoRaFrequency(args, parsed_globals):
6101
6361
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6102
6362
 
6103
6363
 
6364
+ def doGetAuthMiniProgramAppList(args, parsed_globals):
6365
+ g_param = parse_global_arg(parsed_globals)
6366
+
6367
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
6368
+ cred = credential.CVMRoleCredential()
6369
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
6370
+ cred = credential.STSAssumeRoleCredential(
6371
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
6372
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
6373
+ )
6374
+ 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):
6375
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
6376
+ else:
6377
+ cred = credential.Credential(
6378
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
6379
+ )
6380
+ http_profile = HttpProfile(
6381
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
6382
+ reqMethod="POST",
6383
+ endpoint=g_param[OptionsDefine.Endpoint],
6384
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
6385
+ )
6386
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
6387
+ if g_param[OptionsDefine.Language]:
6388
+ profile.language = g_param[OptionsDefine.Language]
6389
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
6390
+ client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
6391
+ client._sdkVersion += ("_CLI_" + __version__)
6392
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
6393
+ model = models.GetAuthMiniProgramAppListRequest()
6394
+ model.from_json_string(json.dumps(args))
6395
+ start_time = time.time()
6396
+ while True:
6397
+ rsp = client.GetAuthMiniProgramAppList(model)
6398
+ result = rsp.to_json_string()
6399
+ try:
6400
+ json_obj = json.loads(result)
6401
+ except TypeError as e:
6402
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
6403
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
6404
+ break
6405
+ cur_time = time.time()
6406
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
6407
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
6408
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
6409
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
6410
+ else:
6411
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
6412
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
6413
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6414
+
6415
+
6104
6416
  def doDeletePositionFence(args, parsed_globals):
6105
6417
  g_param = parse_global_arg(parsed_globals)
6106
6418
 
@@ -6805,7 +7117,7 @@ ACTION_MAP = {
6805
7117
  "DescribeDeviceBindGateway": doDescribeDeviceBindGateway,
6806
7118
  "GetDeviceLocationHistory": doGetDeviceLocationHistory,
6807
7119
  "ListEventHistory": doListEventHistory,
6808
- "DeleteDevice": doDeleteDevice,
7120
+ "DescribeStudioProduct": doDescribeStudioProduct,
6809
7121
  "GetLoRaGatewayList": doGetLoRaGatewayList,
6810
7122
  "ReleaseStudioProduct": doReleaseStudioProduct,
6811
7123
  "DescribeCloudStorageThumbnailList": doDescribeCloudStorageThumbnailList,
@@ -6823,6 +7135,7 @@ ACTION_MAP = {
6823
7135
  "DescribeCloudStorageAIService": doDescribeCloudStorageAIService,
6824
7136
  "DescribeFenceBindList": doDescribeFenceBindList,
6825
7137
  "DeleteLoRaGateway": doDeleteLoRaGateway,
7138
+ "CancelAssignTWeCallLicense": doCancelAssignTWeCallLicense,
6826
7139
  "CreateStudioProduct": doCreateStudioProduct,
6827
7140
  "DescribeCloudStorageDate": doDescribeCloudStorageDate,
6828
7141
  "EnableTopicRule": doEnableTopicRule,
@@ -6864,14 +7177,17 @@ ACTION_MAP = {
6864
7177
  "PublishRRPCMessage": doPublishRRPCMessage,
6865
7178
  "DescribeCloudStorage": doDescribeCloudStorage,
6866
7179
  "UploadFirmware": doUploadFirmware,
7180
+ "GetTWeCallPkgList": doGetTWeCallPkgList,
6867
7181
  "UpdateDevicesEnableState": doUpdateDevicesEnableState,
6868
7182
  "ModifyProject": doModifyProject,
6869
7183
  "BindProducts": doBindProducts,
6870
7184
  "RemoveUserByRoomIdFromTRTC": doRemoveUserByRoomIdFromTRTC,
6871
7185
  "SearchPositionSpace": doSearchPositionSpace,
7186
+ "AssignTWeCallLicense": doAssignTWeCallLicense,
6872
7187
  "ModifyPositionSpace": doModifyPositionSpace,
6873
7188
  "DescribeSpaceFenceEventList": doDescribeSpaceFenceEventList,
6874
7189
  "UpdateFirmware": doUpdateFirmware,
7190
+ "GetTWeCallActiveStatus": doGetTWeCallActiveStatus,
6875
7191
  "DescribeGatewaySubProducts": doDescribeGatewaySubProducts,
6876
7192
  "DescribeDevicePositionList": doDescribeDevicePositionList,
6877
7193
  "DescribeDeviceFirmwares": doDescribeDeviceFirmwares,
@@ -6883,6 +7199,7 @@ ACTION_MAP = {
6883
7199
  "GetStudioProductList": doGetStudioProductList,
6884
7200
  "DescribeModelDefinition": doDescribeModelDefinition,
6885
7201
  "DescribeBatchProduction": doDescribeBatchProduction,
7202
+ "ActivateTWeCallLicense": doActivateTWeCallLicense,
6886
7203
  "UpdateDeviceTWeCallAuthorizeStatus": doUpdateDeviceTWeCallAuthorizeStatus,
6887
7204
  "DeleteCloudStorageEvent": doDeleteCloudStorageEvent,
6888
7205
  "DeleteDevices": doDeleteDevices,
@@ -6892,7 +7209,7 @@ ACTION_MAP = {
6892
7209
  "PublishMessage": doPublishMessage,
6893
7210
  "DescribeDeviceDataHistory": doDescribeDeviceDataHistory,
6894
7211
  "ModifyPositionFence": doModifyPositionFence,
6895
- "DescribeStudioProduct": doDescribeStudioProduct,
7212
+ "DeleteDevice": doDeleteDevice,
6896
7213
  "DescribePositionFenceList": doDescribePositionFenceList,
6897
7214
  "DeleteLoRaFrequency": doDeleteLoRaFrequency,
6898
7215
  "DescribePackageConsumeTask": doDescribePackageConsumeTask,
@@ -6905,6 +7222,7 @@ ACTION_MAP = {
6905
7222
  "DescribeCloudStorageAIServiceTask": doDescribeCloudStorageAIServiceTask,
6906
7223
  "DescribeInstance": doDescribeInstance,
6907
7224
  "ModifyLoRaFrequency": doModifyLoRaFrequency,
7225
+ "GetAuthMiniProgramAppList": doGetAuthMiniProgramAppList,
6908
7226
  "DeletePositionFence": doDeletePositionFence,
6909
7227
  "ModifyCloudStorageAIServiceCallback": doModifyCloudStorageAIServiceCallback,
6910
7228
  "DescribeCloudStorageAIServiceTasks": doDescribeCloudStorageAIServiceTasks,