tccli 3.0.1065.1__py2.py3-none-any.whl → 3.0.1067.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 (32) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/examples/csip/v20221121/DescribeTopAttackInfo.md +26 -0
  3. tccli/examples/omics/v20221128/CreateVolume.md +25 -0
  4. tccli/examples/omics/v20221128/DeleteVolume.md +20 -0
  5. tccli/examples/omics/v20221128/DeleteVolumeData.md +21 -0
  6. tccli/examples/omics/v20221128/DescribeVolumes.md +37 -0
  7. tccli/examples/omics/v20221128/ModifyVolume.md +21 -0
  8. tccli/examples/tse/v20201207/CreateGovernanceInstances.md +32 -0
  9. tccli/examples/tse/v20201207/DeleteGovernanceInstances.md +35 -0
  10. tccli/examples/tse/v20201207/DescribeGovernanceInstances.md +56 -0
  11. tccli/examples/tse/v20201207/ModifyGovernanceInstances.md +35 -0
  12. tccli/services/ckafka/v20190819/api.json +17 -17
  13. tccli/services/csip/csip_client.py +57 -4
  14. tccli/services/csip/v20221121/api.json +70 -0
  15. tccli/services/csip/v20221121/examples.json +8 -0
  16. tccli/services/ess/v20201111/api.json +2 -2
  17. tccli/services/essbasic/v20210526/api.json +2 -2
  18. tccli/services/iotvideo/v20211125/api.json +1 -1
  19. tccli/services/lighthouse/v20200324/api.json +1 -1
  20. tccli/services/monitor/v20180724/api.json +20 -0
  21. tccli/services/omics/omics_client.py +277 -12
  22. tccli/services/omics/v20221128/api.json +425 -0
  23. tccli/services/omics/v20221128/examples.json +40 -0
  24. tccli/services/trp/v20210515/api.json +18 -0
  25. tccli/services/tse/tse_client.py +220 -8
  26. tccli/services/tse/v20201207/api.json +779 -42
  27. tccli/services/tse/v20201207/examples.json +32 -0
  28. {tccli-3.0.1065.1.dist-info → tccli-3.0.1067.1.dist-info}/METADATA +2 -2
  29. {tccli-3.0.1065.1.dist-info → tccli-3.0.1067.1.dist-info}/RECORD +32 -22
  30. {tccli-3.0.1065.1.dist-info → tccli-3.0.1067.1.dist-info}/WHEEL +0 -0
  31. {tccli-3.0.1065.1.dist-info → tccli-3.0.1067.1.dist-info}/entry_points.txt +0 -0
  32. {tccli-3.0.1065.1.dist-info → tccli-3.0.1067.1.dist-info}/license_files/LICENSE +0 -0
@@ -1571,7 +1571,7 @@
1571
1571
  "usage": "in"
1572
1572
  },
1573
1573
  "Component": {
1574
- "document": "此结构体 (Component) 用于描述控件属性。\n\n在通过文件发起合同时,对应的component有三种定位方式\n1. 绝对定位方式\n2. 表单域(FIELD)定位方式\n3. 关键字(KEYWORD)定位方式,使用关键字定位时,请确保PDF原始文件内是关键字以文字形式保存在PDF文件中,不支持对图片内文字进行关键字查找\n可以参考官网说明\nhttps://cloud.tencent.com/document/product/1323/78346#component-.E4.B8.89.E7.A7.8D.E5.AE.9A.E4.BD.8D.E6.96.B9.E5.BC.8F.E8.AF.B4.E6.98.8E",
1574
+ "document": "此结构体 (Component) 用于描述控件属性。\n\n在通过文件发起合同时,对应的component有三种定位方式\n1. 绝对定位方式 (可以通过 [PDF坐标计算助手](https://qian.tencent.com/developers/tools/template-editor)计算控件的坐标)\n2. 表单域(FIELD)定位方式\n3. 关键字(KEYWORD)定位方式,使用关键字定位时,请确保PDF原始文件内是关键字以文字形式保存在PDF文件中,不支持对图片内文字进行关键字查找\n可以参考官网说明\nhttps://cloud.tencent.com/document/product/1323/78346#component-.E4.B8.89.E7.A7.8D.E5.AE.9A.E4.BD.8D.E6.96.B9.E5.BC.8F.E8.AF.B4.E6.98.8E",
1575
1575
  "members": [
1576
1576
  {
1577
1577
  "disabled": false,
@@ -3370,7 +3370,7 @@
3370
3370
  },
3371
3371
  {
3372
3372
  "disabled": false,
3373
- "document": "合同流程的参与方列表,最多可支持50个参与方,可在列表中指定企业B端签署方和个人C端签署方的联系和认证方式等信息,具体定义可以参考开发者中心的ApproverInfo结构体。\n\n注: \n<font color=\"red\" > <b> 在发起流程时,需要保证 approver 中的顺序与模板定义顺序一致,否则会发起失败。\n例如,如果模板中定义的第一个参与人是个人用户,第二个参与人是企业员工,则在 approver 中传参时,第一个也必须是个人用户,第二个参与人必须是企业员工。</b></font>\n![image](https://qcloudimg.tencent-cloud.cn/raw/addbc9f12785e4d9d7c5cdeda660631a.png)",
3373
+ "document": "合同流程的参与方列表,最多可支持50个参与方,可在列表中指定企业B端签署方和个人C端签署方的联系和认证方式等信息,具体定义可以参考开发者中心的ApproverInfo结构体。\n\n注: \n<font color=\"red\" > <b> 在发起流程时,需要保证 approver 中的顺序与模板定义顺序一致,否则会发起失败。\n例如,如果模板中定义的第一个参与人是个人用户,第二个参与人是企业员工,则在 approver 中传参时,第一个也必须是个人用户,第二个参与人必须是企业员工。</b></font>\n\n[点击查看模板参与人顺序定义位置](https://qcloudimg.tencent-cloud.cn/raw/d14457b48cc66b29262ccb9d7b3ed556.png)",
3374
3374
  "example": "无",
3375
3375
  "member": "FlowCreateApprover",
3376
3376
  "name": "Approvers",
@@ -5186,7 +5186,7 @@
5186
5186
  "usage": "in"
5187
5187
  },
5188
5188
  "Component": {
5189
- "document": "此结构体 (Component) 用于描述控件属性。\n\n在通过文件发起合同时,对应的component有三种定位方式\n1. 绝对定位方式\n2. 表单域(FIELD)定位方式\n3. 关键字(KEYWORD)定位方式,使用关键字定位时,请确保PDF原始文件内是关键字以文字形式保存在PDF文件中,不支持对图片内文字进行关键字查找\n可以参考官网说明\nhttps://cloud.tencent.com/document/product/1323/78346#component-.E4.B8.89.E7.A7.8D.E5.AE.9A.E4.BD.8D.E6.96.B9.E5.BC.8F.E8.AF.B4.E6.98.8E",
5189
+ "document": "此结构体 (Component) 用于描述控件属性。\n\n在通过文件发起合同时,对应的component有三种定位方式\n1. 绝对定位方式 (可以通过 [PDF坐标计算助手](https://qian.tencent.com/developers/tools/template-editor)计算控件的坐标)\n2. 表单域(FIELD)定位方式\n3. 关键字(KEYWORD)定位方式,使用关键字定位时,请确保PDF原始文件内是关键字以文字形式保存在PDF文件中,不支持对图片内文字进行关键字查找\n可以参考官网说明\nhttps://cloud.tencent.com/document/product/1323/78346#component-.E4.B8.89.E7.A7.8D.E5.AE.9A.E4.BD.8D.E6.96.B9.E5.BC.8F.E8.AF.B4.E6.98.8E",
5190
5190
  "members": [
5191
5191
  {
5192
5192
  "disabled": false,
@@ -8409,7 +8409,7 @@
8409
8409
  },
8410
8410
  {
8411
8411
  "disabled": false,
8412
- "document": "多个签署人信息,最大支持50个签署方",
8412
+ "document": "合同流程的参与方列表,最多可支持50个参与方\n\n注: \n<font color=\"red\" > <b> 在发起流程时,需要保证 FlowApprovers中的顺序与模板定义顺序一致,否则会发起失败。\n例如,如果模板中定义的第一个参与人是个人用户,第二个参与人是企业员工,则在 approver 中传参时,第一个也必须是个人用户,第二个参与人必须是企业员工。</b></font>\n\n[点击查看模板参与人顺序定义位置](https://qcloudimg.tencent-cloud.cn/raw/c50e0a204fc5c66aaa2ca70e451ef2d6.png)\n",
8413
8413
  "example": "签署人信息",
8414
8414
  "member": "FlowApproverInfo",
8415
8415
  "name": "FlowApprovers",
@@ -2174,7 +2174,7 @@
2174
2174
  },
2175
2175
  {
2176
2176
  "disabled": false,
2177
- "document": "云存存储区域,国内默认为ap-guangzhou。海外默认为东南亚ap-singapore,可选美东na-ashburn、欧洲eu-frankfurt。",
2177
+ "document": "云存视频存储区域,国内默认为ap-guangzhou。海外默认为东南亚ap-singapore,可选美东na-ashburn、欧洲eu-frankfurt。",
2178
2178
  "example": "ap-guangzhou",
2179
2179
  "member": "string",
2180
2180
  "name": "StorageRegion",
@@ -6905,7 +6905,7 @@
6905
6905
  {
6906
6906
  "disabled": false,
6907
6907
  "document": "隔离时间。按照 ISO8601 标准表示,并且使用 UTC 时间。 \n格式为: YYYY-MM-DDThh:mm:ssZ。\n注意:此字段可能返回 null,表示取不到有效值。",
6908
- "example": "",
6908
+ "example": "2023-12-01T06:34:59Z",
6909
6909
  "member": "datetime_iso",
6910
6910
  "name": "IsolatedTime",
6911
6911
  "output_required": true,
@@ -16386,6 +16386,26 @@
16386
16386
  "output_required": true,
16387
16387
  "type": "bool",
16388
16388
  "value_allowed_null": true
16389
+ },
16390
+ {
16391
+ "disabled": false,
16392
+ "document": "采集agent期望pod数\n注意:此字段可能返回 null,表示取不到有效值。",
16393
+ "example": "1",
16394
+ "member": "int64",
16395
+ "name": "DesiredAgentNum",
16396
+ "output_required": false,
16397
+ "type": "int",
16398
+ "value_allowed_null": true
16399
+ },
16400
+ {
16401
+ "disabled": false,
16402
+ "document": "采集agent已正常启动pod数\n注意:此字段可能返回 null,表示取不到有效值。",
16403
+ "example": "1",
16404
+ "member": "int64",
16405
+ "name": "ReadyAgentNum",
16406
+ "output_required": false,
16407
+ "type": "int",
16408
+ "value_allowed_null": true
16389
16409
  }
16390
16410
  ],
16391
16411
  "usage": "out"
@@ -69,7 +69,7 @@ def doDescribeRuns(args, parsed_globals):
69
69
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
70
 
71
71
 
72
- def doGetRunStatus(args, parsed_globals):
72
+ def doDeleteVolume(args, parsed_globals):
73
73
  g_param = parse_global_arg(parsed_globals)
74
74
 
75
75
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -98,11 +98,115 @@ def doGetRunStatus(args, parsed_globals):
98
98
  client = mod.OmicsClient(cred, g_param[OptionsDefine.Region], profile)
99
99
  client._sdkVersion += ("_CLI_" + __version__)
100
100
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
101
- model = models.GetRunStatusRequest()
101
+ model = models.DeleteVolumeRequest()
102
102
  model.from_json_string(json.dumps(args))
103
103
  start_time = time.time()
104
104
  while True:
105
- rsp = client.GetRunStatus(model)
105
+ rsp = client.DeleteVolume(model)
106
+ result = rsp.to_json_string()
107
+ try:
108
+ json_obj = json.loads(result)
109
+ except TypeError as e:
110
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
111
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
112
+ break
113
+ cur_time = time.time()
114
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
115
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
116
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
117
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
118
+ else:
119
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
120
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
121
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
122
+
123
+
124
+ def doDescribeTablesRows(args, parsed_globals):
125
+ g_param = parse_global_arg(parsed_globals)
126
+
127
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
128
+ cred = credential.CVMRoleCredential()
129
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
130
+ cred = credential.STSAssumeRoleCredential(
131
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
132
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
133
+ )
134
+ 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):
135
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
136
+ else:
137
+ cred = credential.Credential(
138
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
139
+ )
140
+ http_profile = HttpProfile(
141
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
142
+ reqMethod="POST",
143
+ endpoint=g_param[OptionsDefine.Endpoint],
144
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
145
+ )
146
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
147
+ if g_param[OptionsDefine.Language]:
148
+ profile.language = g_param[OptionsDefine.Language]
149
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
150
+ client = mod.OmicsClient(cred, g_param[OptionsDefine.Region], profile)
151
+ client._sdkVersion += ("_CLI_" + __version__)
152
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
153
+ model = models.DescribeTablesRowsRequest()
154
+ model.from_json_string(json.dumps(args))
155
+ start_time = time.time()
156
+ while True:
157
+ rsp = client.DescribeTablesRows(model)
158
+ result = rsp.to_json_string()
159
+ try:
160
+ json_obj = json.loads(result)
161
+ except TypeError as e:
162
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
163
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
164
+ break
165
+ cur_time = time.time()
166
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
167
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
168
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
169
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
170
+ else:
171
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
172
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
173
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
174
+
175
+
176
+ def doDeleteVolumeData(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.OmicsClient(cred, g_param[OptionsDefine.Region], profile)
203
+ client._sdkVersion += ("_CLI_" + __version__)
204
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
205
+ model = models.DeleteVolumeDataRequest()
206
+ model.from_json_string(json.dumps(args))
207
+ start_time = time.time()
208
+ while True:
209
+ rsp = client.DeleteVolumeData(model)
106
210
  result = rsp.to_json_string()
107
211
  try:
108
212
  json_obj = json.loads(result)
@@ -225,7 +329,7 @@ def doGetRunMetadataFile(args, parsed_globals):
225
329
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
330
 
227
331
 
228
- def doGetRunCalls(args, parsed_globals):
332
+ def doCreateVolume(args, parsed_globals):
229
333
  g_param = parse_global_arg(parsed_globals)
230
334
 
231
335
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -254,11 +358,11 @@ def doGetRunCalls(args, parsed_globals):
254
358
  client = mod.OmicsClient(cred, g_param[OptionsDefine.Region], profile)
255
359
  client._sdkVersion += ("_CLI_" + __version__)
256
360
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
257
- model = models.GetRunCallsRequest()
361
+ model = models.CreateVolumeRequest()
258
362
  model.from_json_string(json.dumps(args))
259
363
  start_time = time.time()
260
364
  while True:
261
- rsp = client.GetRunCalls(model)
365
+ rsp = client.CreateVolume(model)
262
366
  result = rsp.to_json_string()
263
367
  try:
264
368
  json_obj = json.loads(result)
@@ -329,6 +433,58 @@ def doImportTableFile(args, parsed_globals):
329
433
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
330
434
 
331
435
 
436
+ def doGetRunStatus(args, parsed_globals):
437
+ g_param = parse_global_arg(parsed_globals)
438
+
439
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
440
+ cred = credential.CVMRoleCredential()
441
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
442
+ cred = credential.STSAssumeRoleCredential(
443
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
444
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
445
+ )
446
+ 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):
447
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
448
+ else:
449
+ cred = credential.Credential(
450
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
451
+ )
452
+ http_profile = HttpProfile(
453
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
454
+ reqMethod="POST",
455
+ endpoint=g_param[OptionsDefine.Endpoint],
456
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
457
+ )
458
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
459
+ if g_param[OptionsDefine.Language]:
460
+ profile.language = g_param[OptionsDefine.Language]
461
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
462
+ client = mod.OmicsClient(cred, g_param[OptionsDefine.Region], profile)
463
+ client._sdkVersion += ("_CLI_" + __version__)
464
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
465
+ model = models.GetRunStatusRequest()
466
+ model.from_json_string(json.dumps(args))
467
+ start_time = time.time()
468
+ while True:
469
+ rsp = client.GetRunStatus(model)
470
+ result = rsp.to_json_string()
471
+ try:
472
+ json_obj = json.loads(result)
473
+ except TypeError as e:
474
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
475
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
476
+ break
477
+ cur_time = time.time()
478
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
479
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
480
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
481
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
482
+ else:
483
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
484
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
485
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
486
+
487
+
332
488
  def doRunWorkflow(args, parsed_globals):
333
489
  g_param = parse_global_arg(parsed_globals)
334
490
 
@@ -381,6 +537,58 @@ def doRunWorkflow(args, parsed_globals):
381
537
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
382
538
 
383
539
 
540
+ def doGetRunCalls(args, parsed_globals):
541
+ g_param = parse_global_arg(parsed_globals)
542
+
543
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
544
+ cred = credential.CVMRoleCredential()
545
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
546
+ cred = credential.STSAssumeRoleCredential(
547
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
548
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
549
+ )
550
+ 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):
551
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
552
+ else:
553
+ cred = credential.Credential(
554
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
555
+ )
556
+ http_profile = HttpProfile(
557
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
558
+ reqMethod="POST",
559
+ endpoint=g_param[OptionsDefine.Endpoint],
560
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
561
+ )
562
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
563
+ if g_param[OptionsDefine.Language]:
564
+ profile.language = g_param[OptionsDefine.Language]
565
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
566
+ client = mod.OmicsClient(cred, g_param[OptionsDefine.Region], profile)
567
+ client._sdkVersion += ("_CLI_" + __version__)
568
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
569
+ model = models.GetRunCallsRequest()
570
+ model.from_json_string(json.dumps(args))
571
+ start_time = time.time()
572
+ while True:
573
+ rsp = client.GetRunCalls(model)
574
+ result = rsp.to_json_string()
575
+ try:
576
+ json_obj = json.loads(result)
577
+ except TypeError as e:
578
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
579
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
580
+ break
581
+ cur_time = time.time()
582
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
583
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
584
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
585
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
586
+ else:
587
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
588
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
589
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
590
+
591
+
384
592
  def doCreateEnvironment(args, parsed_globals):
385
593
  g_param = parse_global_arg(parsed_globals)
386
594
 
@@ -641,6 +849,58 @@ def doDescribeRunGroups(args, parsed_globals):
641
849
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
642
850
 
643
851
 
852
+ def doModifyVolume(args, parsed_globals):
853
+ g_param = parse_global_arg(parsed_globals)
854
+
855
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
856
+ cred = credential.CVMRoleCredential()
857
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
858
+ cred = credential.STSAssumeRoleCredential(
859
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
860
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
861
+ )
862
+ 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):
863
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
864
+ else:
865
+ cred = credential.Credential(
866
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
867
+ )
868
+ http_profile = HttpProfile(
869
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
870
+ reqMethod="POST",
871
+ endpoint=g_param[OptionsDefine.Endpoint],
872
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
873
+ )
874
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
875
+ if g_param[OptionsDefine.Language]:
876
+ profile.language = g_param[OptionsDefine.Language]
877
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
878
+ client = mod.OmicsClient(cred, g_param[OptionsDefine.Region], profile)
879
+ client._sdkVersion += ("_CLI_" + __version__)
880
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
881
+ model = models.ModifyVolumeRequest()
882
+ model.from_json_string(json.dumps(args))
883
+ start_time = time.time()
884
+ while True:
885
+ rsp = client.ModifyVolume(model)
886
+ result = rsp.to_json_string()
887
+ try:
888
+ json_obj = json.loads(result)
889
+ except TypeError as e:
890
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
891
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
892
+ break
893
+ cur_time = time.time()
894
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
895
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
896
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
897
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
898
+ else:
899
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
900
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
901
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
902
+
903
+
644
904
  def doDeleteEnvironment(args, parsed_globals):
645
905
  g_param = parse_global_arg(parsed_globals)
646
906
 
@@ -745,7 +1005,7 @@ def doDescribeTables(args, parsed_globals):
745
1005
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
746
1006
 
747
1007
 
748
- def doDescribeTablesRows(args, parsed_globals):
1008
+ def doDescribeVolumes(args, parsed_globals):
749
1009
  g_param = parse_global_arg(parsed_globals)
750
1010
 
751
1011
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -774,11 +1034,11 @@ def doDescribeTablesRows(args, parsed_globals):
774
1034
  client = mod.OmicsClient(cred, g_param[OptionsDefine.Region], profile)
775
1035
  client._sdkVersion += ("_CLI_" + __version__)
776
1036
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
777
- model = models.DescribeTablesRowsRequest()
1037
+ model = models.DescribeVolumesRequest()
778
1038
  model.from_json_string(json.dumps(args))
779
1039
  start_time = time.time()
780
1040
  while True:
781
- rsp = client.DescribeTablesRows(model)
1041
+ rsp = client.DescribeVolumes(model)
782
1042
  result = rsp.to_json_string()
783
1043
  try:
784
1044
  json_obj = json.loads(result)
@@ -809,20 +1069,25 @@ MODELS_MAP = {
809
1069
 
810
1070
  ACTION_MAP = {
811
1071
  "DescribeRuns": doDescribeRuns,
812
- "GetRunStatus": doGetRunStatus,
1072
+ "DeleteVolume": doDeleteVolume,
1073
+ "DescribeTablesRows": doDescribeTablesRows,
1074
+ "DeleteVolumeData": doDeleteVolumeData,
813
1075
  "DescribeEnvironments": doDescribeEnvironments,
814
1076
  "GetRunMetadataFile": doGetRunMetadataFile,
815
- "GetRunCalls": doGetRunCalls,
1077
+ "CreateVolume": doCreateVolume,
816
1078
  "ImportTableFile": doImportTableFile,
1079
+ "GetRunStatus": doGetRunStatus,
817
1080
  "RunWorkflow": doRunWorkflow,
1081
+ "GetRunCalls": doGetRunCalls,
818
1082
  "CreateEnvironment": doCreateEnvironment,
819
1083
  "RetryRuns": doRetryRuns,
820
1084
  "TerminateRunGroup": doTerminateRunGroup,
821
1085
  "RunApplication": doRunApplication,
822
1086
  "DescribeRunGroups": doDescribeRunGroups,
1087
+ "ModifyVolume": doModifyVolume,
823
1088
  "DeleteEnvironment": doDeleteEnvironment,
824
1089
  "DescribeTables": doDescribeTables,
825
- "DescribeTablesRows": doDescribeTablesRows,
1090
+ "DescribeVolumes": doDescribeVolumes,
826
1091
 
827
1092
  }
828
1093