tccli 3.0.828.1__py2.py3-none-any.whl → 3.0.829.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/services/autoscaling/v20180419/api.json +14 -14
- tccli/services/cloudstudio/cloudstudio_client.py +53 -0
- tccli/services/cloudstudio/v20210524/api.json +89 -0
- tccli/services/cloudstudio/v20210524/examples.json +8 -0
- tccli/services/ess/v20201111/api.json +9 -0
- tccli/services/ess/v20201111/examples.json +1 -1
- tccli/services/essbasic/v20210526/api.json +133 -364
- tccli/services/essbasic/v20210526/examples.json +89 -95
- tccli/services/ic/v20190307/api.json +1 -1
- tccli/services/live/v20180801/api.json +2 -6
- tccli/services/live/v20180801/examples.json +1 -1
- tccli/services/mrs/v20200910/api.json +8130 -2302
- tccli/services/mrs/v20200910/examples.json +1 -1
- tccli/services/ocr/v20181119/api.json +32 -134
- tccli/services/ocr/v20181119/examples.json +15 -15
- tccli/services/pts/v20210728/api.json +27 -78
- tccli/services/sslpod/v20190605/api.json +1 -1
- tccli/services/tem/v20210701/api.json +1 -1
- tccli/services/tione/v20191022/api.json +1 -1
- tccli/services/tione/v20211111/api.json +1 -1
- tccli/services/trtc/v20190722/api.json +3 -25
- tccli/services/vpc/v20170312/api.json +60 -51
- tccli/services/vpc/v20170312/examples.json +17 -17
- {tccli-3.0.828.1.dist-info → tccli-3.0.829.1.dist-info}/METADATA +2 -2
- {tccli-3.0.828.1.dist-info → tccli-3.0.829.1.dist-info}/RECORD +30 -30
- {tccli-3.0.828.1.dist-info → tccli-3.0.829.1.dist-info}/LICENSE +0 -0
- {tccli-3.0.828.1.dist-info → tccli-3.0.829.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.828.1.dist-info → tccli-3.0.829.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.828.1.dist-info → tccli-3.0.829.1.dist-info}/top_level.txt +0 -0
tccli/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '3.0.
|
1
|
+
__version__ = '3.0.829.1'
|
@@ -3631,8 +3631,8 @@
|
|
3631
3631
|
"document": "实例信息",
|
3632
3632
|
"members": [
|
3633
3633
|
{
|
3634
|
-
"default": "",
|
3635
3634
|
"document": "实例ID",
|
3635
|
+
"example": "ins-089dlszs",
|
3636
3636
|
"member": "string",
|
3637
3637
|
"name": "InstanceId",
|
3638
3638
|
"required": true,
|
@@ -3640,8 +3640,8 @@
|
|
3640
3640
|
"value_allowed_null": false
|
3641
3641
|
},
|
3642
3642
|
{
|
3643
|
-
"default": "",
|
3644
3643
|
"document": "伸缩组ID",
|
3644
|
+
"example": "asg-02ofd40a",
|
3645
3645
|
"member": "string",
|
3646
3646
|
"name": "AutoScalingGroupId",
|
3647
3647
|
"required": true,
|
@@ -3649,8 +3649,8 @@
|
|
3649
3649
|
"value_allowed_null": false
|
3650
3650
|
},
|
3651
3651
|
{
|
3652
|
-
"default": "",
|
3653
3652
|
"document": "启动配置ID",
|
3653
|
+
"example": "asc-23yf98ie",
|
3654
3654
|
"member": "string",
|
3655
3655
|
"name": "LaunchConfigurationId",
|
3656
3656
|
"required": true,
|
@@ -3658,8 +3658,8 @@
|
|
3658
3658
|
"value_allowed_null": false
|
3659
3659
|
},
|
3660
3660
|
{
|
3661
|
-
"default": "",
|
3662
3661
|
"document": "启动配置名称",
|
3662
|
+
"example": "测试asc-01_2.3",
|
3663
3663
|
"member": "string",
|
3664
3664
|
"name": "LaunchConfigurationName",
|
3665
3665
|
"required": true,
|
@@ -3667,8 +3667,8 @@
|
|
3667
3667
|
"value_allowed_null": false
|
3668
3668
|
},
|
3669
3669
|
{
|
3670
|
-
"
|
3671
|
-
"
|
3670
|
+
"document": "生命周期状态,取值如下:<br>\n<li>IN_SERVICE:运行中\n<li>CREATING:创建中\n<li>CREATION_FAILED:创建失败\n<li>TERMINATING:中止中\n<li>TERMINATION_FAILED:中止失败\n<li>ATTACHING:绑定中\n<li>ATTACH_FAILED:绑定失败\n<li>DETACHING:解绑中\n<li>DETACH_FAILED:解绑失败\n<li>ATTACHING_LB:绑定LB中\n<li>DETACHING_LB:解绑LB中\n<li>MODIFYING_LB:修改LB中\n<li>STARTING:开机中\n<li>START_FAILED:开机失败\n<li>STOPPING:关机中\n<li>STOP_FAILED:关机失败\n<li>STOPPED:已关机\n<li>IN_LAUNCHING_HOOK:扩容生命周期挂钩中\n<li>IN_TERMINATING_HOOK:缩容生命周期挂钩中",
|
3671
|
+
"example": "IN_SERVICE",
|
3672
3672
|
"member": "string",
|
3673
3673
|
"name": "LifeCycleState",
|
3674
3674
|
"required": true,
|
@@ -3676,8 +3676,8 @@
|
|
3676
3676
|
"value_allowed_null": false
|
3677
3677
|
},
|
3678
3678
|
{
|
3679
|
-
"default": "",
|
3680
3679
|
"document": "健康状态,取值包括HEALTHY和UNHEALTHY",
|
3680
|
+
"example": "HEALTHY",
|
3681
3681
|
"member": "string",
|
3682
3682
|
"name": "HealthStatus",
|
3683
3683
|
"required": true,
|
@@ -3685,8 +3685,8 @@
|
|
3685
3685
|
"value_allowed_null": false
|
3686
3686
|
},
|
3687
3687
|
{
|
3688
|
-
"default": "",
|
3689
3688
|
"document": "是否加入缩容保护",
|
3689
|
+
"example": "false",
|
3690
3690
|
"member": "bool",
|
3691
3691
|
"name": "ProtectedFromScaleIn",
|
3692
3692
|
"required": true,
|
@@ -3694,8 +3694,8 @@
|
|
3694
3694
|
"value_allowed_null": false
|
3695
3695
|
},
|
3696
3696
|
{
|
3697
|
-
"default": "",
|
3698
3697
|
"document": "可用区",
|
3698
|
+
"example": "ap-guangzhou-1",
|
3699
3699
|
"member": "string",
|
3700
3700
|
"name": "Zone",
|
3701
3701
|
"required": true,
|
@@ -3703,8 +3703,8 @@
|
|
3703
3703
|
"value_allowed_null": false
|
3704
3704
|
},
|
3705
3705
|
{
|
3706
|
-
"default": "",
|
3707
3706
|
"document": "创建类型,取值包括AUTO_CREATION, MANUAL_ATTACHING。",
|
3707
|
+
"example": "AUTO_CREATION",
|
3708
3708
|
"member": "string",
|
3709
3709
|
"name": "CreationType",
|
3710
3710
|
"required": true,
|
@@ -3712,8 +3712,8 @@
|
|
3712
3712
|
"value_allowed_null": false
|
3713
3713
|
},
|
3714
3714
|
{
|
3715
|
-
"default": "",
|
3716
3715
|
"document": "实例加入时间",
|
3716
|
+
"example": "2023-01-13T03:06:25Z",
|
3717
3717
|
"member": "datetime_iso",
|
3718
3718
|
"name": "AddTime",
|
3719
3719
|
"required": true,
|
@@ -3721,8 +3721,8 @@
|
|
3721
3721
|
"value_allowed_null": false
|
3722
3722
|
},
|
3723
3723
|
{
|
3724
|
-
"default": "",
|
3725
3724
|
"document": "实例类型",
|
3725
|
+
"example": "S3.MEDIUM2",
|
3726
3726
|
"member": "string",
|
3727
3727
|
"name": "InstanceType",
|
3728
3728
|
"required": true,
|
@@ -3730,8 +3730,8 @@
|
|
3730
3730
|
"value_allowed_null": false
|
3731
3731
|
},
|
3732
3732
|
{
|
3733
|
-
"default": "",
|
3734
3733
|
"document": "版本号",
|
3734
|
+
"example": "1",
|
3735
3735
|
"member": "int64",
|
3736
3736
|
"name": "VersionNumber",
|
3737
3737
|
"required": true,
|
@@ -3739,8 +3739,8 @@
|
|
3739
3739
|
"value_allowed_null": false
|
3740
3740
|
},
|
3741
3741
|
{
|
3742
|
-
"default": "",
|
3743
3742
|
"document": "伸缩组名称",
|
3743
|
+
"example": "测试asg-01_2.3",
|
3744
3744
|
"member": "string",
|
3745
3745
|
"name": "AutoScalingGroupName",
|
3746
3746
|
"required": true,
|
@@ -329,6 +329,58 @@ def doDescribeWorkspaceEnvList(args, parsed_globals):
|
|
329
329
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
330
330
|
|
331
331
|
|
332
|
+
def doCreateWorkspaceTemporaryToken(args, parsed_globals):
|
333
|
+
g_param = parse_global_arg(parsed_globals)
|
334
|
+
|
335
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
336
|
+
cred = credential.CVMRoleCredential()
|
337
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
338
|
+
cred = credential.STSAssumeRoleCredential(
|
339
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
340
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
341
|
+
)
|
342
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
343
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
344
|
+
else:
|
345
|
+
cred = credential.Credential(
|
346
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
347
|
+
)
|
348
|
+
http_profile = HttpProfile(
|
349
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
350
|
+
reqMethod="POST",
|
351
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
352
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
353
|
+
)
|
354
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
355
|
+
if g_param[OptionsDefine.Language]:
|
356
|
+
profile.language = g_param[OptionsDefine.Language]
|
357
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
358
|
+
client = mod.CloudstudioClient(cred, g_param[OptionsDefine.Region], profile)
|
359
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
360
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
361
|
+
model = models.CreateWorkspaceTemporaryTokenRequest()
|
362
|
+
model.from_json_string(json.dumps(args))
|
363
|
+
start_time = time.time()
|
364
|
+
while True:
|
365
|
+
rsp = client.CreateWorkspaceTemporaryToken(model)
|
366
|
+
result = rsp.to_json_string()
|
367
|
+
try:
|
368
|
+
json_obj = json.loads(result)
|
369
|
+
except TypeError as e:
|
370
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
371
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
372
|
+
break
|
373
|
+
cur_time = time.time()
|
374
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
375
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
376
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
377
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
378
|
+
else:
|
379
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
380
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
381
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
382
|
+
|
383
|
+
|
332
384
|
def doCreateWorkspaceByTemplate(args, parsed_globals):
|
333
385
|
g_param = parse_global_arg(parsed_globals)
|
334
386
|
|
@@ -1074,6 +1126,7 @@ ACTION_MAP = {
|
|
1074
1126
|
"ModifyCustomizeTemplateVersionControl": doModifyCustomizeTemplateVersionControl,
|
1075
1127
|
"ModifyCustomizeTemplatesPartById": doModifyCustomizeTemplatesPartById,
|
1076
1128
|
"DescribeWorkspaceEnvList": doDescribeWorkspaceEnvList,
|
1129
|
+
"CreateWorkspaceTemporaryToken": doCreateWorkspaceTemporaryToken,
|
1077
1130
|
"CreateWorkspaceByTemplate": doCreateWorkspaceByTemplate,
|
1078
1131
|
"DescribeCustomizeTemplates": doDescribeCustomizeTemplates,
|
1079
1132
|
"DescribeCustomizeTemplatesPresets": doDescribeCustomizeTemplatesPresets,
|
@@ -28,6 +28,13 @@
|
|
28
28
|
"output": "CreateWorkspaceByVersionControlResponse",
|
29
29
|
"status": "online"
|
30
30
|
},
|
31
|
+
"CreateWorkspaceTemporaryToken": {
|
32
|
+
"document": "为工作空间创建临时访问凭证,重复调用会创建新的 Token,旧的 Token 将会自动失效",
|
33
|
+
"input": "CreateWorkspaceTemporaryTokenRequest",
|
34
|
+
"name": "为工作空间创建临时访问凭证",
|
35
|
+
"output": "CreateWorkspaceTemporaryTokenResponse",
|
36
|
+
"status": "online"
|
37
|
+
},
|
31
38
|
"DeleteCustomizeTemplatesById": {
|
32
39
|
"document": "删除自定义模板",
|
33
40
|
"input": "DeleteCustomizeTemplatesByIdRequest",
|
@@ -434,6 +441,40 @@
|
|
434
441
|
],
|
435
442
|
"type": "object"
|
436
443
|
},
|
444
|
+
"CreateWorkspaceTemporaryTokenRequest": {
|
445
|
+
"document": "CreateWorkspaceTemporaryToken请求参数结构体",
|
446
|
+
"members": [
|
447
|
+
{
|
448
|
+
"document": "创建工作空间凭证 DTO",
|
449
|
+
"example": "无",
|
450
|
+
"member": "WorkspaceTokenDTO",
|
451
|
+
"name": "WorkspaceTokenDTO",
|
452
|
+
"required": true,
|
453
|
+
"type": "object"
|
454
|
+
}
|
455
|
+
],
|
456
|
+
"type": "object"
|
457
|
+
},
|
458
|
+
"CreateWorkspaceTemporaryTokenResponse": {
|
459
|
+
"document": "CreateWorkspaceTemporaryToken返回参数结构体",
|
460
|
+
"members": [
|
461
|
+
{
|
462
|
+
"document": "工作空间临时访问 token 信息",
|
463
|
+
"example": "无",
|
464
|
+
"member": "WorkspaceTokenInfoV0",
|
465
|
+
"name": "Data",
|
466
|
+
"type": "object",
|
467
|
+
"value_allowed_null": false
|
468
|
+
},
|
469
|
+
{
|
470
|
+
"document": "唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。",
|
471
|
+
"member": "string",
|
472
|
+
"name": "RequestId",
|
473
|
+
"type": "string"
|
474
|
+
}
|
475
|
+
],
|
476
|
+
"type": "object"
|
477
|
+
},
|
437
478
|
"CustomizeTemplatesPresetsInfo": {
|
438
479
|
"document": "模板的预置参数",
|
439
480
|
"members": [
|
@@ -2430,6 +2471,54 @@
|
|
2430
2471
|
}
|
2431
2472
|
],
|
2432
2473
|
"usage": "out"
|
2474
|
+
},
|
2475
|
+
"WorkspaceTokenDTO": {
|
2476
|
+
"document": "创建临时工作空间凭证 DTO",
|
2477
|
+
"members": [
|
2478
|
+
{
|
2479
|
+
"document": "工作空间 SpaceKey\n注意:此字段可能返回 null,表示取不到有效值。",
|
2480
|
+
"example": "knhwex",
|
2481
|
+
"member": "string",
|
2482
|
+
"name": "SpaceKey",
|
2483
|
+
"required": false,
|
2484
|
+
"type": "string",
|
2485
|
+
"value_allowed_null": true
|
2486
|
+
},
|
2487
|
+
{
|
2488
|
+
"document": "token过期时间,单位是秒,默认 3600\n注意:此字段可能返回 null,表示取不到有效值。",
|
2489
|
+
"example": "3600",
|
2490
|
+
"member": "uint64",
|
2491
|
+
"name": "TokenExpiredLimitSec",
|
2492
|
+
"required": false,
|
2493
|
+
"type": "int",
|
2494
|
+
"value_allowed_null": true
|
2495
|
+
}
|
2496
|
+
],
|
2497
|
+
"usage": "in"
|
2498
|
+
},
|
2499
|
+
"WorkspaceTokenInfoV0": {
|
2500
|
+
"document": "获取工作空间临时访问 token 出参",
|
2501
|
+
"members": [
|
2502
|
+
{
|
2503
|
+
"document": "访问工作空间临时凭证",
|
2504
|
+
"example": "83c99d6a03aa94f5e7bbfb4eded0de0b1153f44d05126d34b5f36e8343eca973",
|
2505
|
+
"member": "string",
|
2506
|
+
"name": "Token",
|
2507
|
+
"required": true,
|
2508
|
+
"type": "string",
|
2509
|
+
"value_allowed_null": false
|
2510
|
+
},
|
2511
|
+
{
|
2512
|
+
"document": "token 过期时间\n注意:此字段可能返回 null,表示取不到有效值。",
|
2513
|
+
"example": "2023-02-13T12:33:48 GMT+08:00",
|
2514
|
+
"member": "string",
|
2515
|
+
"name": "ExpiredTime",
|
2516
|
+
"required": true,
|
2517
|
+
"type": "string",
|
2518
|
+
"value_allowed_null": true
|
2519
|
+
}
|
2520
|
+
],
|
2521
|
+
"usage": "out"
|
2433
2522
|
}
|
2434
2523
|
},
|
2435
2524
|
"version": "1.0"
|
@@ -32,6 +32,14 @@
|
|
32
32
|
"title": "CreateWorkspaceByVersionControl"
|
33
33
|
}
|
34
34
|
],
|
35
|
+
"CreateWorkspaceTemporaryToken": [
|
36
|
+
{
|
37
|
+
"document": "为工作空间创建临时访问凭证,重复调用会创建新的 Token,旧的 Token 将会自动失效",
|
38
|
+
"input": "POST / HTTP/1.1\nHost: cloudstudio.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateWorkspaceTemporaryToken\n<公共请求参数>\n\n{\n \"WorkspaceTokenDTO\": {\n \"SpaceKey\": \"xx\",\n \"TokenExpiredLimitSec\": 3600\n }\n}",
|
39
|
+
"output": "{\n \"Response\": {\n \"Data\": {\n \"Token\": \"83c99d6a03aa94f5e7bbfb4eded0de0b1153f44d05126d34b5f36e8343eca973\",\n \"ExpiredTime\": \"2023-02-13T12:33:48 GMT+08:00\"\n },\n \"RequestId\": \"xx\"\n }\n}",
|
40
|
+
"title": "为工作空间创建临时访问凭证"
|
41
|
+
}
|
42
|
+
],
|
35
43
|
"DeleteCustomizeTemplatesById": [
|
36
44
|
{
|
37
45
|
"document": "",
|
@@ -1218,6 +1218,15 @@
|
|
1218
1218
|
"name": "Approvers",
|
1219
1219
|
"required": true,
|
1220
1220
|
"type": "list"
|
1221
|
+
},
|
1222
|
+
{
|
1223
|
+
"default": "",
|
1224
|
+
"document": "企微消息中的发起人",
|
1225
|
+
"example": "无",
|
1226
|
+
"member": "string",
|
1227
|
+
"name": "Initiator",
|
1228
|
+
"required": false,
|
1229
|
+
"type": "string"
|
1221
1230
|
}
|
1222
1231
|
],
|
1223
1232
|
"type": "object"
|
@@ -63,7 +63,7 @@
|
|
63
63
|
"CreateFlowApprovers": [
|
64
64
|
{
|
65
65
|
"document": "",
|
66
|
-
"input": "POST / HTTP/1.1\nHost: ess.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateFlowApprovers\n<公共请求参数>\n\n{\n \"Operator\": {\n \"UserId\": \"\"\n },\n \"FlowId\": \"flow_id_xxxxx\",\n \"Approvers\": [\n {\n \"RecipientId\": \"RecipientId_1\",\n \"ApproverSource\": \"WEWORK\",\n \"CustomUserId\": \"Zhangsan\"\n },\n {\n \"RecipientId\": \"RecipientId_1\",\n \"ApproverSource\": \"WEWORK\",\n \"CustomUserId\": \"Lisi\"\n },\n {\n \"RecipientId\": \"RecipientId_2\",\n \"ApproverSource\": \"WEWORK\",\n \"CustomUserId\": \"Wangwu\"\n },\n {\n \"RecipientId\": \"RecipientId_2\",\n \"ApproverSource\": \"WEWORK\",\n \"CustomUserId\": \"ZhaoLiu\"\n }\n ]\n}",
|
66
|
+
"input": "POST / HTTP/1.1\nHost: ess.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateFlowApprovers\n<公共请求参数>\n\n{\n \"Operator\": {\n \"UserId\": \"\"\n },\n \"FlowId\": \"flow_id_xxxxx\",\n \"Initiator\": \"xxx\",\n \"Approvers\": [\n {\n \"RecipientId\": \"RecipientId_1\",\n \"ApproverSource\": \"WEWORK\",\n \"CustomUserId\": \"Zhangsan\"\n },\n {\n \"RecipientId\": \"RecipientId_1\",\n \"ApproverSource\": \"WEWORK\",\n \"CustomUserId\": \"Lisi\"\n },\n {\n \"RecipientId\": \"RecipientId_2\",\n \"ApproverSource\": \"WEWORK\",\n \"CustomUserId\": \"Wangwu\"\n },\n {\n \"RecipientId\": \"RecipientId_2\",\n \"ApproverSource\": \"WEWORK\",\n \"CustomUserId\": \"ZhaoLiu\"\n }\n ]\n}",
|
67
67
|
"output": "{\n \"Response\": {\n \"RequestId\": \"2846e98d-7f-d2632a7fceef\"\n }\n}",
|
68
68
|
"title": "测试"
|
69
69
|
}
|