tccli 3.0.897.1__py2.py3-none-any.whl → 3.0.898.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/examples/cdn/v20180606/ModifyDomainConfig.md +88 -0
- tccli/examples/ckafka/v20190819/CreatePostPaidInstance.md +154 -0
- tccli/examples/cynosdb/v20190107/DescribeSupportProxyVersion.md +24 -0
- tccli/examples/ess/v20201111/CreateFlowApprovers.md +3 -1
- tccli/examples/ess/v20201111/DescribeThirdPartyAuthCode.md +1 -1
- tccli/examples/postgres/v20170312/CreateReadOnlyDBInstance.md +1 -1
- tccli/examples/postgres/v20170312/UpgradeDBInstanceKernelVersion.md +1 -1
- tccli/examples/sqlserver/v20180328/DescribeDBInstancesAttribute.md +6 -1
- tccli/examples/sqlserver/v20180328/DescribeDBs.md +1 -1
- tccli/examples/tdmq/v20200217/CreateCmqQueue.md +2 -2
- tccli/examples/tke/v20180525/CreateClusterEndpointVip.md +1 -1
- tccli/examples/trp/v20210515/CreateCodeBatch.md +11 -5
- tccli/examples/trp/v20210515/DescribeScanLogs.md +1 -1
- tccli/examples/trp/v20210515/DescribeTraceCodeById.md +16 -11
- tccli/examples/trp/v20210515/ModifyCodeBatch.md +3 -3
- tccli/services/cdn/cdn_client.py +57 -4
- tccli/services/cdn/v20180606/api.json +52 -0
- tccli/services/cdn/v20180606/examples.json +26 -0
- tccli/services/ckafka/ckafka_client.py +61 -8
- tccli/services/ckafka/v20190819/api.json +278 -0
- tccli/services/ckafka/v20190819/examples.json +20 -0
- tccli/services/cynosdb/cynosdb_client.py +53 -0
- tccli/services/cynosdb/v20190107/api.json +72 -0
- tccli/services/cynosdb/v20190107/examples.json +8 -0
- tccli/services/ess/v20201111/api.json +42 -11
- tccli/services/ess/v20201111/examples.json +3 -3
- tccli/services/essbasic/v20210526/api.json +27 -1
- tccli/services/postgres/v20170312/api.json +2 -31
- tccli/services/postgres/v20170312/examples.json +2 -2
- tccli/services/sqlserver/v20180328/api.json +72 -15
- tccli/services/sqlserver/v20180328/examples.json +3 -3
- tccli/services/tbaas/tbaas_client.py +4 -322
- tccli/services/tbaas/v20180416/api.json +108 -810
- tccli/services/tbaas/v20180416/examples.json +0 -48
- tccli/services/tdid/tdid_client.py +67 -1551
- tccli/services/tdid/v20210519/api.json +331 -3504
- tccli/services/tdid/v20210519/examples.json +0 -224
- tccli/services/tdmq/v20200217/api.json +2 -19
- tccli/services/tdmq/v20200217/examples.json +2 -2
- tccli/services/tione/v20211111/api.json +24 -2
- tccli/services/tke/v20180525/api.json +4 -6
- tccli/services/tke/v20180525/examples.json +2 -2
- tccli/services/trp/v20210515/api.json +285 -113
- tccli/services/trp/v20210515/examples.json +6 -6
- {tccli-3.0.897.1.dist-info → tccli-3.0.898.1.dist-info}/METADATA +2 -2
- {tccli-3.0.897.1.dist-info → tccli-3.0.898.1.dist-info}/RECORD +50 -47
- {tccli-3.0.897.1.dist-info → tccli-3.0.898.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.897.1.dist-info → tccli-3.0.898.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.897.1.dist-info → tccli-3.0.898.1.dist-info}/license_files/LICENSE +0 -0
@@ -2461,6 +2461,58 @@ def doFetchLatestDatahubMessageList(args, parsed_globals):
|
|
2461
2461
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2462
2462
|
|
2463
2463
|
|
2464
|
+
def doCreateUser(args, parsed_globals):
|
2465
|
+
g_param = parse_global_arg(parsed_globals)
|
2466
|
+
|
2467
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2468
|
+
cred = credential.CVMRoleCredential()
|
2469
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2470
|
+
cred = credential.STSAssumeRoleCredential(
|
2471
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2472
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2473
|
+
)
|
2474
|
+
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):
|
2475
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2476
|
+
else:
|
2477
|
+
cred = credential.Credential(
|
2478
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2479
|
+
)
|
2480
|
+
http_profile = HttpProfile(
|
2481
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2482
|
+
reqMethod="POST",
|
2483
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2484
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2485
|
+
)
|
2486
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2487
|
+
if g_param[OptionsDefine.Language]:
|
2488
|
+
profile.language = g_param[OptionsDefine.Language]
|
2489
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2490
|
+
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
2491
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2492
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2493
|
+
model = models.CreateUserRequest()
|
2494
|
+
model.from_json_string(json.dumps(args))
|
2495
|
+
start_time = time.time()
|
2496
|
+
while True:
|
2497
|
+
rsp = client.CreateUser(model)
|
2498
|
+
result = rsp.to_json_string()
|
2499
|
+
try:
|
2500
|
+
json_obj = json.loads(result)
|
2501
|
+
except TypeError as e:
|
2502
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2503
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2504
|
+
break
|
2505
|
+
cur_time = time.time()
|
2506
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2507
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2508
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2509
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2510
|
+
else:
|
2511
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2512
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2513
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2514
|
+
|
2515
|
+
|
2464
2516
|
def doDescribeTaskStatus(args, parsed_globals):
|
2465
2517
|
g_param = parse_global_arg(parsed_globals)
|
2466
2518
|
|
@@ -3501,7 +3553,7 @@ def doDescribeTopicProduceConnection(args, parsed_globals):
|
|
3501
3553
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3502
3554
|
|
3503
3555
|
|
3504
|
-
def
|
3556
|
+
def doCreatePostPaidInstance(args, parsed_globals):
|
3505
3557
|
g_param = parse_global_arg(parsed_globals)
|
3506
3558
|
|
3507
3559
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3530,11 +3582,11 @@ def doDescribeTopic(args, parsed_globals):
|
|
3530
3582
|
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
3531
3583
|
client._sdkVersion += ("_CLI_" + __version__)
|
3532
3584
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3533
|
-
model = models.
|
3585
|
+
model = models.CreatePostPaidInstanceRequest()
|
3534
3586
|
model.from_json_string(json.dumps(args))
|
3535
3587
|
start_time = time.time()
|
3536
3588
|
while True:
|
3537
|
-
rsp = client.
|
3589
|
+
rsp = client.CreatePostPaidInstance(model)
|
3538
3590
|
result = rsp.to_json_string()
|
3539
3591
|
try:
|
3540
3592
|
json_obj = json.loads(result)
|
@@ -3813,7 +3865,7 @@ def doDescribeConnectResources(args, parsed_globals):
|
|
3813
3865
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3814
3866
|
|
3815
3867
|
|
3816
|
-
def
|
3868
|
+
def doDescribeTopic(args, parsed_globals):
|
3817
3869
|
g_param = parse_global_arg(parsed_globals)
|
3818
3870
|
|
3819
3871
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3842,11 +3894,11 @@ def doCreateUser(args, parsed_globals):
|
|
3842
3894
|
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
3843
3895
|
client._sdkVersion += ("_CLI_" + __version__)
|
3844
3896
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3845
|
-
model = models.
|
3897
|
+
model = models.DescribeTopicRequest()
|
3846
3898
|
model.from_json_string(json.dumps(args))
|
3847
3899
|
start_time = time.time()
|
3848
3900
|
while True:
|
3849
|
-
rsp = client.
|
3901
|
+
rsp = client.DescribeTopic(model)
|
3850
3902
|
result = rsp.to_json_string()
|
3851
3903
|
try:
|
3852
3904
|
json_obj = json.loads(result)
|
@@ -4131,6 +4183,7 @@ ACTION_MAP = {
|
|
4131
4183
|
"DeleteRouteTriggerTime": doDeleteRouteTriggerTime,
|
4132
4184
|
"CreatePartition": doCreatePartition,
|
4133
4185
|
"FetchLatestDatahubMessageList": doFetchLatestDatahubMessageList,
|
4186
|
+
"CreateUser": doCreateUser,
|
4134
4187
|
"DescribeTaskStatus": doDescribeTaskStatus,
|
4135
4188
|
"BatchModifyGroupOffsets": doBatchModifyGroupOffsets,
|
4136
4189
|
"FetchDatahubMessageByOffset": doFetchDatahubMessageByOffset,
|
@@ -4151,13 +4204,13 @@ ACTION_MAP = {
|
|
4151
4204
|
"DescribeTopicAttributes": doDescribeTopicAttributes,
|
4152
4205
|
"AuthorizeToken": doAuthorizeToken,
|
4153
4206
|
"DescribeTopicProduceConnection": doDescribeTopicProduceConnection,
|
4154
|
-
"
|
4207
|
+
"CreatePostPaidInstance": doCreatePostPaidInstance,
|
4155
4208
|
"CreateAclRule": doCreateAclRule,
|
4156
4209
|
"ModifyInstanceAttributes": doModifyInstanceAttributes,
|
4157
4210
|
"DescribeCkafkaZone": doDescribeCkafkaZone,
|
4158
4211
|
"DescribeRegion": doDescribeRegion,
|
4159
4212
|
"DescribeConnectResources": doDescribeConnectResources,
|
4160
|
-
"
|
4213
|
+
"DescribeTopic": doDescribeTopic,
|
4161
4214
|
"DeleteTopic": doDeleteTopic,
|
4162
4215
|
"ModifyPassword": doModifyPassword,
|
4163
4216
|
"InquireCkafkaPrice": doInquireCkafkaPrice,
|
@@ -112,6 +112,13 @@
|
|
112
112
|
"output": "CreatePartitionResponse",
|
113
113
|
"status": "online"
|
114
114
|
},
|
115
|
+
"CreatePostPaidInstance": {
|
116
|
+
"document": "当前接口用来替代 CreateInstancePost 接口。创建按量计费实例。通常用于 SDK 或云 API 控制台调用接口,创建后付费 CKafka 实例。调用接口与在 CKafka 控制台购买按量付费实例效果相同。",
|
117
|
+
"input": "CreatePostPaidInstanceRequest",
|
118
|
+
"name": "创建按量计费实例(新)",
|
119
|
+
"output": "CreatePostPaidInstanceResponse",
|
120
|
+
"status": "online"
|
121
|
+
},
|
115
122
|
"CreateRoute": {
|
116
123
|
"document": "添加实例路由",
|
117
124
|
"input": "CreateRouteRequest",
|
@@ -3407,6 +3414,52 @@
|
|
3407
3414
|
],
|
3408
3415
|
"type": "object"
|
3409
3416
|
},
|
3417
|
+
"CreateInstancePostData": {
|
3418
|
+
"document": "创建后付费接口返回的 Data 数据结构",
|
3419
|
+
"members": [
|
3420
|
+
{
|
3421
|
+
"disabled": false,
|
3422
|
+
"document": "CreateInstancePre返回固定为0,不能作为CheckTaskStatus的查询条件。只是为了保证和后台数据结构对齐。\n注意:此字段可能返回 null,表示取不到有效值。",
|
3423
|
+
"example": "0",
|
3424
|
+
"member": "int64",
|
3425
|
+
"name": "FlowId",
|
3426
|
+
"required": true,
|
3427
|
+
"type": "int",
|
3428
|
+
"value_allowed_null": true
|
3429
|
+
},
|
3430
|
+
{
|
3431
|
+
"disabled": false,
|
3432
|
+
"document": "订单号列表\n注意:此字段可能返回 null,表示取不到有效值。",
|
3433
|
+
"example": "[\"20230608002033882210000\"]",
|
3434
|
+
"member": "string",
|
3435
|
+
"name": "DealNames",
|
3436
|
+
"required": true,
|
3437
|
+
"type": "list",
|
3438
|
+
"value_allowed_null": true
|
3439
|
+
},
|
3440
|
+
{
|
3441
|
+
"disabled": false,
|
3442
|
+
"document": "实例Id,当购买多个实例时,默认返回购买的第一个实例 id\n注意:此字段可能返回 null,表示取不到有效值。",
|
3443
|
+
"example": "ckafka-e5vjxxxx",
|
3444
|
+
"member": "string",
|
3445
|
+
"name": "InstanceId",
|
3446
|
+
"required": true,
|
3447
|
+
"type": "string",
|
3448
|
+
"value_allowed_null": true
|
3449
|
+
},
|
3450
|
+
{
|
3451
|
+
"disabled": false,
|
3452
|
+
"document": "订单和购买实例对应映射列表\n注意:此字段可能返回 null,表示取不到有效值。",
|
3453
|
+
"example": "无",
|
3454
|
+
"member": "DealInstanceDTO",
|
3455
|
+
"name": "DealNameInstanceIdMapping",
|
3456
|
+
"required": false,
|
3457
|
+
"type": "list",
|
3458
|
+
"value_allowed_null": true
|
3459
|
+
}
|
3460
|
+
],
|
3461
|
+
"usage": "out"
|
3462
|
+
},
|
3410
3463
|
"CreateInstancePostRequest": {
|
3411
3464
|
"document": "CreateInstancePost请求参数结构体",
|
3412
3465
|
"members": [
|
@@ -3575,6 +3628,42 @@
|
|
3575
3628
|
],
|
3576
3629
|
"type": "object"
|
3577
3630
|
},
|
3631
|
+
"CreateInstancePostResp": {
|
3632
|
+
"document": "后付费实例相关接口返回结构",
|
3633
|
+
"members": [
|
3634
|
+
{
|
3635
|
+
"disabled": false,
|
3636
|
+
"document": "返回的code,0为正常,非0为错误",
|
3637
|
+
"example": "0",
|
3638
|
+
"member": "string",
|
3639
|
+
"name": "ReturnCode",
|
3640
|
+
"required": true,
|
3641
|
+
"type": "string",
|
3642
|
+
"value_allowed_null": false
|
3643
|
+
},
|
3644
|
+
{
|
3645
|
+
"disabled": false,
|
3646
|
+
"document": "接口返回消息,当接口报错时提示错误信息",
|
3647
|
+
"example": "success",
|
3648
|
+
"member": "string",
|
3649
|
+
"name": "ReturnMessage",
|
3650
|
+
"required": true,
|
3651
|
+
"type": "string",
|
3652
|
+
"value_allowed_null": false
|
3653
|
+
},
|
3654
|
+
{
|
3655
|
+
"disabled": false,
|
3656
|
+
"document": "返回的Data数据\n注意:此字段可能返回 null,表示取不到有效值。",
|
3657
|
+
"example": "无",
|
3658
|
+
"member": "CreateInstancePostData",
|
3659
|
+
"name": "Data",
|
3660
|
+
"required": true,
|
3661
|
+
"type": "object",
|
3662
|
+
"value_allowed_null": true
|
3663
|
+
}
|
3664
|
+
],
|
3665
|
+
"usage": "out"
|
3666
|
+
},
|
3578
3667
|
"CreateInstancePostResponse": {
|
3579
3668
|
"document": "CreateInstancePost返回参数结构体",
|
3580
3669
|
"members": [
|
@@ -3939,6 +4028,195 @@
|
|
3939
4028
|
],
|
3940
4029
|
"type": "object"
|
3941
4030
|
},
|
4031
|
+
"CreatePostPaidInstanceRequest": {
|
4032
|
+
"document": "CreatePostPaidInstance请求参数结构体",
|
4033
|
+
"members": [
|
4034
|
+
{
|
4035
|
+
"disabled": false,
|
4036
|
+
"document": "实例名称,是一个不超过 64 个字符的字符串,必须以字母为首字符,剩余部分可以包含字母、数字和横划线(-)",
|
4037
|
+
"example": "testInstance",
|
4038
|
+
"member": "string",
|
4039
|
+
"name": "InstanceName",
|
4040
|
+
"required": false,
|
4041
|
+
"type": "string"
|
4042
|
+
},
|
4043
|
+
{
|
4044
|
+
"disabled": false,
|
4045
|
+
"document": "创建的实例默认接入点所在的 vpc 对应 vpcId。目前不支持创建基础网络实例,因此该参数必填",
|
4046
|
+
"example": "vpc-xxxxxxxx",
|
4047
|
+
"member": "string",
|
4048
|
+
"name": "VpcId",
|
4049
|
+
"required": false,
|
4050
|
+
"type": "string"
|
4051
|
+
},
|
4052
|
+
{
|
4053
|
+
"disabled": false,
|
4054
|
+
"document": "子网id。创建实例默认接入点所在的子网对应的子网 id",
|
4055
|
+
"example": "subnet-xxxxxxxx",
|
4056
|
+
"member": "string",
|
4057
|
+
"name": "SubnetId",
|
4058
|
+
"required": false,
|
4059
|
+
"type": "string"
|
4060
|
+
},
|
4061
|
+
{
|
4062
|
+
"disabled": false,
|
4063
|
+
"document": "实例规格。当创建标准版实例时必填,创建专业版实例时不需要填写。1:入门型;2:标准型;3:进阶型;4:容量型;5:高阶型1;6:高阶性2;7:高阶型3;8:高阶型4;9 :独占型",
|
4064
|
+
"example": "1",
|
4065
|
+
"member": "int64",
|
4066
|
+
"name": "InstanceType",
|
4067
|
+
"required": false,
|
4068
|
+
"type": "int"
|
4069
|
+
},
|
4070
|
+
{
|
4071
|
+
"disabled": false,
|
4072
|
+
"document": "实例日志的默认最长保留时间,单位分钟。不传入该参数时默认为 1440 分钟(1天),最大30天。当 topic 显式设置消息保留时间时,以 topic 保留时间为准",
|
4073
|
+
"example": "1440",
|
4074
|
+
"member": "int64",
|
4075
|
+
"name": "MsgRetentionTime",
|
4076
|
+
"required": false,
|
4077
|
+
"type": "int"
|
4078
|
+
},
|
4079
|
+
{
|
4080
|
+
"disabled": false,
|
4081
|
+
"document": "创建实例时可以选择集群Id, 该入参表示集群Id。不指定实例所在集群则不传入该参数",
|
4082
|
+
"example": "5914",
|
4083
|
+
"member": "int64",
|
4084
|
+
"name": "ClusterId",
|
4085
|
+
"required": false,
|
4086
|
+
"type": "int"
|
4087
|
+
},
|
4088
|
+
{
|
4089
|
+
"disabled": false,
|
4090
|
+
"document": "实例版本。目前支持 \"0.10.2\",\"1.1.1\",\"2.4.2\",\"2.8.1\"",
|
4091
|
+
"example": "2.4.2",
|
4092
|
+
"member": "string",
|
4093
|
+
"name": "KafkaVersion",
|
4094
|
+
"required": false,
|
4095
|
+
"type": "string"
|
4096
|
+
},
|
4097
|
+
{
|
4098
|
+
"disabled": false,
|
4099
|
+
"document": "实例类型。\"standard\":标准版,\"profession\":专业版",
|
4100
|
+
"example": "profession",
|
4101
|
+
"member": "string",
|
4102
|
+
"name": "SpecificationsType",
|
4103
|
+
"required": false,
|
4104
|
+
"type": "string"
|
4105
|
+
},
|
4106
|
+
{
|
4107
|
+
"disabled": false,
|
4108
|
+
"document": "实例硬盘类型,\"CLOUD_BASIC\":云硬盘,\"CLOUD_SSD\":高速云硬盘。不传默认为 \"CLOUD_BASIC\"",
|
4109
|
+
"example": "CLOUD_BASIC",
|
4110
|
+
"member": "string",
|
4111
|
+
"name": "DiskType",
|
4112
|
+
"required": false,
|
4113
|
+
"type": "string"
|
4114
|
+
},
|
4115
|
+
{
|
4116
|
+
"disabled": false,
|
4117
|
+
"document": "实例内网峰值带宽。单位 MB/s。标准版需传入当前实例规格所对应的峰值带宽。注意如果创建的实例为专业版实例,峰值带宽,分区数等参数配置需要满足专业版的计费规格。",
|
4118
|
+
"example": "20",
|
4119
|
+
"member": "int64",
|
4120
|
+
"name": "BandWidth",
|
4121
|
+
"required": false,
|
4122
|
+
"type": "int"
|
4123
|
+
},
|
4124
|
+
{
|
4125
|
+
"disabled": false,
|
4126
|
+
"document": "实例硬盘大小,需要满足当前实例的计费规格",
|
4127
|
+
"example": "200",
|
4128
|
+
"member": "int64",
|
4129
|
+
"name": "DiskSize",
|
4130
|
+
"required": false,
|
4131
|
+
"type": "int"
|
4132
|
+
},
|
4133
|
+
{
|
4134
|
+
"disabled": false,
|
4135
|
+
"document": "实例最大分区数量,需要满足当前实例的计费规格",
|
4136
|
+
"example": "400",
|
4137
|
+
"member": "int64",
|
4138
|
+
"name": "Partition",
|
4139
|
+
"required": false,
|
4140
|
+
"type": "int"
|
4141
|
+
},
|
4142
|
+
{
|
4143
|
+
"disabled": false,
|
4144
|
+
"document": "实例最大 topic 数量,需要满足当前实例的计费规格",
|
4145
|
+
"example": "200",
|
4146
|
+
"member": "int64",
|
4147
|
+
"name": "TopicNum",
|
4148
|
+
"required": false,
|
4149
|
+
"type": "int"
|
4150
|
+
},
|
4151
|
+
{
|
4152
|
+
"disabled": false,
|
4153
|
+
"document": "实例所在的可用区。当创建多可用区实例时,该参数为创建的默认接入点所在子网的可用区 id",
|
4154
|
+
"example": "100006",
|
4155
|
+
"member": "int64",
|
4156
|
+
"name": "ZoneId",
|
4157
|
+
"required": false,
|
4158
|
+
"type": "int"
|
4159
|
+
},
|
4160
|
+
{
|
4161
|
+
"disabled": false,
|
4162
|
+
"document": "当前实例是否为多可用区实例。",
|
4163
|
+
"example": "true",
|
4164
|
+
"member": "bool",
|
4165
|
+
"name": "MultiZoneFlag",
|
4166
|
+
"required": false,
|
4167
|
+
"type": "bool"
|
4168
|
+
},
|
4169
|
+
{
|
4170
|
+
"disabled": false,
|
4171
|
+
"document": "当实例为多可用区实例时,多可用区 id 列表。注意参数 ZoneId 对应的多可用区需要包含在该参数数组中",
|
4172
|
+
"example": "[100006,100007]",
|
4173
|
+
"member": "int64",
|
4174
|
+
"name": "ZoneIds",
|
4175
|
+
"required": false,
|
4176
|
+
"type": "list"
|
4177
|
+
},
|
4178
|
+
{
|
4179
|
+
"disabled": false,
|
4180
|
+
"document": "购买实例数量。非必填,默认值为 1。当传入该参数时,会创建多个 instanceName 加后缀区分的实例",
|
4181
|
+
"example": "1",
|
4182
|
+
"member": "int64",
|
4183
|
+
"name": "InstanceNum",
|
4184
|
+
"required": false,
|
4185
|
+
"type": "int"
|
4186
|
+
},
|
4187
|
+
{
|
4188
|
+
"disabled": false,
|
4189
|
+
"document": "公网带宽大小,单位 Mbps。默认是没有加上免费 3Mbps 带宽。例如总共需要 3Mbps 公网带宽,此处传 0;总共需要 4Mbps 公网带宽,此处传 1",
|
4190
|
+
"example": "12",
|
4191
|
+
"member": "int64",
|
4192
|
+
"name": "PublicNetworkMonthly",
|
4193
|
+
"required": false,
|
4194
|
+
"type": "int"
|
4195
|
+
}
|
4196
|
+
],
|
4197
|
+
"type": "object"
|
4198
|
+
},
|
4199
|
+
"CreatePostPaidInstanceResponse": {
|
4200
|
+
"document": "CreatePostPaidInstance返回参数结构体",
|
4201
|
+
"members": [
|
4202
|
+
{
|
4203
|
+
"disabled": false,
|
4204
|
+
"document": "返回结果",
|
4205
|
+
"example": "无",
|
4206
|
+
"member": "CreateInstancePostResp",
|
4207
|
+
"name": "Result",
|
4208
|
+
"type": "object",
|
4209
|
+
"value_allowed_null": false
|
4210
|
+
},
|
4211
|
+
{
|
4212
|
+
"document": "唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。",
|
4213
|
+
"member": "string",
|
4214
|
+
"name": "RequestId",
|
4215
|
+
"type": "string"
|
4216
|
+
}
|
4217
|
+
],
|
4218
|
+
"type": "object"
|
4219
|
+
},
|
3942
4220
|
"CreateRouteRequest": {
|
3943
4221
|
"document": "CreateRoute请求参数结构体",
|
3944
4222
|
"members": [
|
@@ -158,6 +158,26 @@
|
|
158
158
|
"title": "增加主题分区"
|
159
159
|
}
|
160
160
|
],
|
161
|
+
"CreatePostPaidInstance": [
|
162
|
+
{
|
163
|
+
"document": "创建硬盘大小 200GB,峰值带宽 20MB/s 的专业版后付费实例",
|
164
|
+
"input": "POST / HTTP/1.1\nHost: ckafka.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreatePostPaidInstance\n<公共请求参数>\n\n{\n \"InstanceName\": \"test55\",\n \"VpcId\": \"vpc-rmcgxxxx\",\n \"SubnetId\": \"subnet-mnzcxxxx\",\n \"ZoneId\": 450001,\n \"InstanceType\": 1,\n \"KafkaVersion\": \"1.1.1\",\n \"SpecificationsType\": \"profession\",\n \"DiskSize\": 200,\n \"BandWidth\": 20,\n \"Partition\": 400,\n \"DiskType\": \"CLOUD_BASIC\",\n \"PublicNetworkMonthly\": 0\n}",
|
165
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"323c3bbe-db79-48c3-9b76-63aacd65b169\",\n \"Result\": {\n \"Data\": {\n \"DealNameInstanceIdMapping\": [\n {\n \"DealName\": \"20230608002033899990000\",\n \"InstanceIdList\": [\n \"ckafka-mom5xxxx\"\n ]\n }\n ],\n \"DealNames\": [\n \"2023060800203389990000\"\n ],\n \"FlowId\": 0,\n \"InstanceId\": \"ckafka-mom5xxxx\"\n },\n \"ReturnCode\": \"0\",\n \"ReturnMessage\": \"ok[apply ok]\"\n }\n }\n}",
|
166
|
+
"title": "创建后付费专业版实例"
|
167
|
+
},
|
168
|
+
{
|
169
|
+
"document": "同时创建三个后付费专业版实例",
|
170
|
+
"input": "POST / HTTP/1.1\nHost: ckafka.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreatePostPaidInstance\n<公共请求参数>\n\n{\n \"InstanceName\": \"test58\",\n \"VpcId\": \"vpc-rmcg5cpf\",\n \"SubnetId\": \"subnet-mnzcs7gk\",\n \"KafkaVersion\": \"2.4.2\",\n \"SpecificationsType\": \"profession\",\n \"BandWidth\": 20,\n \"DiskSize\": 200,\n \"Partition\": 400,\n \"TopicNum\": 200,\n \"ZoneId\": 450001,\n \"InstanceNum\": 3,\n \"PublicNetworkMonthly\": 12\n}",
|
171
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"cda79237-6424-482a-b2d2-97d4853b33b4\",\n \"Result\": {\n \"Data\": {\n \"DealNameInstanceIdMapping\": [\n {\n \"DealName\": \"20230608002033915320000\",\n \"InstanceIdList\": [\n \"ckafka-bz4dxxxx\",\n \"ckafka-o9gdxxxx\",\n \"ckafka-aj5gxxxx\"\n ]\n }\n ],\n \"DealNames\": [\n \"20230608002033915320000\"\n ],\n \"FlowId\": 0,\n \"InstanceId\": \"ckafka-bz4dxxxx\"\n },\n \"ReturnCode\": \"0\",\n \"ReturnMessage\": \"ok[apply ok]\"\n }\n }\n}",
|
172
|
+
"title": "批量创建后付费专业版实例"
|
173
|
+
},
|
174
|
+
{
|
175
|
+
"document": "创建一个三可用区的专业版实例",
|
176
|
+
"input": "POST / HTTP/1.1\nHost: ckafka.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreatePostPaidInstance\n<公共请求参数>\n\n{\n \"InstanceName\": \"test55\",\n \"VpcId\": \"vpc-rmcgxxxx\",\n \"SubnetId\": \"subnet-mnzcxxxx\",\n \"ZoneId\": 450001,\n \"InstanceType\": 1,\n \"KafkaVersion\": \"1.1.1\",\n \"SpecificationsType\": \"profession\",\n \"DiskSize\": 200,\n \"BandWidth\": 20,\n \"Partition\": 400,\n \"DiskType\": \"CLOUD_BASIC\",\n \"PublicNetworkMonthly\": 0,\n \"MultiZoneFlag\": true,\n \"ZoneIds\": [\n 450001,\n 450002,\n 450003\n ]\n}",
|
177
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"323c3bbe-db79-48c3-9b76-63aacd65b169\",\n \"Result\": {\n \"Data\": {\n \"DealNameInstanceIdMapping\": [\n {\n \"DealName\": \"20230608002033899990000\",\n \"InstanceIdList\": [\n \"ckafka-mom5xxxx\"\n ]\n }\n ],\n \"DealNames\": [\n \"2023060800203389990000\"\n ],\n \"FlowId\": 0,\n \"InstanceId\": \"ckafka-mom5xxxx\"\n },\n \"ReturnCode\": \"0\",\n \"ReturnMessage\": \"ok[apply ok]\"\n }\n }\n}",
|
178
|
+
"title": "创建后付费多可用区专业版实例"
|
179
|
+
}
|
180
|
+
],
|
161
181
|
"CreateRoute": [
|
162
182
|
{
|
163
183
|
"document": "",
|
@@ -589,6 +589,58 @@ def doDescribeResourcePackageList(args, parsed_globals):
|
|
589
589
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
590
590
|
|
591
591
|
|
592
|
+
def doDescribeSupportProxyVersion(args, parsed_globals):
|
593
|
+
g_param = parse_global_arg(parsed_globals)
|
594
|
+
|
595
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
596
|
+
cred = credential.CVMRoleCredential()
|
597
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
598
|
+
cred = credential.STSAssumeRoleCredential(
|
599
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
600
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
601
|
+
)
|
602
|
+
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):
|
603
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
604
|
+
else:
|
605
|
+
cred = credential.Credential(
|
606
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
607
|
+
)
|
608
|
+
http_profile = HttpProfile(
|
609
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
610
|
+
reqMethod="POST",
|
611
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
612
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
613
|
+
)
|
614
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
615
|
+
if g_param[OptionsDefine.Language]:
|
616
|
+
profile.language = g_param[OptionsDefine.Language]
|
617
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
618
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
619
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
620
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
621
|
+
model = models.DescribeSupportProxyVersionRequest()
|
622
|
+
model.from_json_string(json.dumps(args))
|
623
|
+
start_time = time.time()
|
624
|
+
while True:
|
625
|
+
rsp = client.DescribeSupportProxyVersion(model)
|
626
|
+
result = rsp.to_json_string()
|
627
|
+
try:
|
628
|
+
json_obj = json.loads(result)
|
629
|
+
except TypeError as e:
|
630
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
631
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
632
|
+
break
|
633
|
+
cur_time = time.time()
|
634
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
635
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
636
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
637
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
638
|
+
else:
|
639
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
640
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
641
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
642
|
+
|
643
|
+
|
592
644
|
def doCreateAuditLogFile(args, parsed_globals):
|
593
645
|
g_param = parse_global_arg(parsed_globals)
|
594
646
|
|
@@ -6643,6 +6695,7 @@ ACTION_MAP = {
|
|
6643
6695
|
"CopyClusterPasswordComplexity": doCopyClusterPasswordComplexity,
|
6644
6696
|
"CloseAuditService": doCloseAuditService,
|
6645
6697
|
"DescribeResourcePackageList": doDescribeResourcePackageList,
|
6698
|
+
"DescribeSupportProxyVersion": doDescribeSupportProxyVersion,
|
6646
6699
|
"CreateAuditLogFile": doCreateAuditLogFile,
|
6647
6700
|
"SwitchClusterVpc": doSwitchClusterVpc,
|
6648
6701
|
"CloseProxy": doCloseProxy,
|
@@ -469,6 +469,13 @@
|
|
469
469
|
"output": "DescribeRollbackTimeValidityResponse",
|
470
470
|
"status": "online"
|
471
471
|
},
|
472
|
+
"DescribeSupportProxyVersion": {
|
473
|
+
"document": "查询支持的数据库代理版本",
|
474
|
+
"input": "DescribeSupportProxyVersionRequest",
|
475
|
+
"name": "查询支持的数据库代理版本",
|
476
|
+
"output": "DescribeSupportProxyVersionResponse",
|
477
|
+
"status": "online"
|
478
|
+
},
|
472
479
|
"DescribeZones": {
|
473
480
|
"document": "本接口(DescribeZones)用于查询可售卖地域可用区信息。",
|
474
481
|
"input": "DescribeZonesRequest",
|
@@ -3313,6 +3320,7 @@
|
|
3313
3320
|
"example": "20190522160000003106844584180998",
|
3314
3321
|
"member": "string",
|
3315
3322
|
"name": "TranId",
|
3323
|
+
"output_required": true,
|
3316
3324
|
"type": "string",
|
3317
3325
|
"value_allowed_null": true
|
3318
3326
|
},
|
@@ -3322,6 +3330,7 @@
|
|
3322
3330
|
"example": "[\"20190522112283\"]",
|
3323
3331
|
"member": "string",
|
3324
3332
|
"name": "DealNames",
|
3333
|
+
"output_required": true,
|
3325
3334
|
"type": "list",
|
3326
3335
|
"value_allowed_null": true
|
3327
3336
|
},
|
@@ -3331,6 +3340,7 @@
|
|
3331
3340
|
"example": "[\"cynosdbpg-ins-67rmucgk\"]",
|
3332
3341
|
"member": "string",
|
3333
3342
|
"name": "ResourceIds",
|
3343
|
+
"output_required": true,
|
3334
3344
|
"type": "list",
|
3335
3345
|
"value_allowed_null": true
|
3336
3346
|
},
|
@@ -3340,6 +3350,7 @@
|
|
3340
3350
|
"example": "[\"cynosdbmysql-sls-9nts65r2\"]",
|
3341
3351
|
"member": "string",
|
3342
3352
|
"name": "ClusterIds",
|
3353
|
+
"output_required": true,
|
3343
3354
|
"type": "list",
|
3344
3355
|
"value_allowed_null": true
|
3345
3356
|
},
|
@@ -3349,6 +3360,7 @@
|
|
3349
3360
|
"example": "[\"xxx\"]",
|
3350
3361
|
"member": "string",
|
3351
3362
|
"name": "BigDealIds",
|
3363
|
+
"output_required": true,
|
3352
3364
|
"type": "list",
|
3353
3365
|
"value_allowed_null": true
|
3354
3366
|
},
|
@@ -9595,6 +9607,64 @@
|
|
9595
9607
|
],
|
9596
9608
|
"type": "object"
|
9597
9609
|
},
|
9610
|
+
"DescribeSupportProxyVersionRequest": {
|
9611
|
+
"document": "DescribeSupportProxyVersion请求参数结构体",
|
9612
|
+
"members": [
|
9613
|
+
{
|
9614
|
+
"default": "",
|
9615
|
+
"disabled": false,
|
9616
|
+
"document": "集群ID",
|
9617
|
+
"example": "cynosdbmysql-xxxxxxx",
|
9618
|
+
"member": "string",
|
9619
|
+
"name": "ClusterId",
|
9620
|
+
"required": true,
|
9621
|
+
"type": "string"
|
9622
|
+
},
|
9623
|
+
{
|
9624
|
+
"default": "",
|
9625
|
+
"disabled": false,
|
9626
|
+
"document": "数据库代理组ID",
|
9627
|
+
"example": "无",
|
9628
|
+
"member": "string",
|
9629
|
+
"name": "ProxyGroupId",
|
9630
|
+
"required": false,
|
9631
|
+
"type": "string"
|
9632
|
+
}
|
9633
|
+
],
|
9634
|
+
"type": "object"
|
9635
|
+
},
|
9636
|
+
"DescribeSupportProxyVersionResponse": {
|
9637
|
+
"document": "DescribeSupportProxyVersion返回参数结构体",
|
9638
|
+
"members": [
|
9639
|
+
{
|
9640
|
+
"disabled": false,
|
9641
|
+
"document": "支持的数据库代理版本集合\n注意:此字段可能返回 null,表示取不到有效值。",
|
9642
|
+
"example": "无",
|
9643
|
+
"member": "string",
|
9644
|
+
"name": "SupportProxyVersions",
|
9645
|
+
"required": true,
|
9646
|
+
"type": "list",
|
9647
|
+
"value_allowed_null": true
|
9648
|
+
},
|
9649
|
+
{
|
9650
|
+
"disabled": false,
|
9651
|
+
"document": "当前proxy版本号\n注意:此字段可能返回 null,表示取不到有效值。",
|
9652
|
+
"example": "无",
|
9653
|
+
"member": "string",
|
9654
|
+
"name": "CurrentProxyVersion",
|
9655
|
+
"required": true,
|
9656
|
+
"type": "string",
|
9657
|
+
"value_allowed_null": true
|
9658
|
+
},
|
9659
|
+
{
|
9660
|
+
"document": "唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。",
|
9661
|
+
"member": "string",
|
9662
|
+
"name": "RequestId",
|
9663
|
+
"type": "string"
|
9664
|
+
}
|
9665
|
+
],
|
9666
|
+
"type": "object"
|
9667
|
+
},
|
9598
9668
|
"DescribeZonesRequest": {
|
9599
9669
|
"document": "DescribeZones请求参数结构体",
|
9600
9670
|
"members": [
|
@@ -14811,6 +14881,7 @@
|
|
14811
14881
|
"example": "package-123456",
|
14812
14882
|
"member": "string",
|
14813
14883
|
"name": "PackageId",
|
14884
|
+
"output_required": true,
|
14814
14885
|
"required": false,
|
14815
14886
|
"type": "string",
|
14816
14887
|
"value_allowed_null": true
|
@@ -14821,6 +14892,7 @@
|
|
14821
14892
|
"example": "CCU",
|
14822
14893
|
"member": "string",
|
14823
14894
|
"name": "PackageType",
|
14895
|
+
"output_required": true,
|
14824
14896
|
"required": false,
|
14825
14897
|
"type": "string",
|
14826
14898
|
"value_allowed_null": true
|