tccli 3.0.1167.1__py2.py3-none-any.whl → 3.0.1169.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tccli/__init__.py +1 -1
- tccli/services/aiart/v20221229/api.json +9 -0
- tccli/services/autoscaling/v20180419/api.json +42 -10
- tccli/services/cls/cls_client.py +224 -12
- tccli/services/cls/v20201016/api.json +331 -0
- tccli/services/cls/v20201016/examples.json +32 -0
- tccli/services/dlc/v20210125/api.json +18 -0
- tccli/services/es/v20180416/api.json +28 -0
- tccli/services/es/v20180416/examples.json +1 -1
- tccli/services/essbasic/v20210526/api.json +1 -1
- tccli/services/hunyuan/v20230901/api.json +2 -2
- tccli/services/iotexplorer/v20190423/api.json +30 -0
- tccli/services/iotexplorer/v20190423/examples.json +1 -1
- tccli/services/organization/organization_client.py +167 -8
- tccli/services/organization/v20210331/api.json +307 -0
- tccli/services/organization/v20210331/examples.json +24 -0
- tccli/services/pts/v20210728/api.json +10 -10
- tccli/services/pts/v20210728/examples.json +14 -14
- tccli/services/sms/v20210111/api.json +1 -1
- tccli/services/ssl/v20191205/api.json +48 -28
- tccli/services/ssl/v20191205/examples.json +3 -3
- tccli/services/tcbr/v20220217/api.json +38 -5
- tccli/services/tcss/v20201101/api.json +156 -53
- tccli/services/tcss/v20201101/examples.json +39 -9
- tccli/services/trocket/trocket_client.py +53 -0
- tccli/services/trocket/v20230308/api.json +71 -0
- tccli/services/trocket/v20230308/examples.json +8 -0
- tccli/services/trtc/v20190722/api.json +56 -9
- tccli/services/trtc/v20190722/examples.json +1 -1
- tccli/services/waf/v20180125/api.json +12 -6
- tccli/services/wedata/v20210820/api.json +11 -2
- {tccli-3.0.1167.1.dist-info → tccli-3.0.1169.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1167.1.dist-info → tccli-3.0.1169.1.dist-info}/RECORD +36 -36
- {tccli-3.0.1167.1.dist-info → tccli-3.0.1169.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1167.1.dist-info → tccli-3.0.1169.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1167.1.dist-info → tccli-3.0.1169.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '3.0.
|
1
|
+
__version__ = '3.0.1169.1'
|
@@ -131,6 +131,15 @@
|
|
131
131
|
"required": false,
|
132
132
|
"type": "int"
|
133
133
|
},
|
134
|
+
{
|
135
|
+
"disabled": false,
|
136
|
+
"document": "标识内容设置。\n默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。",
|
137
|
+
"example": "无",
|
138
|
+
"member": "LogoParam",
|
139
|
+
"name": "LogoParam",
|
140
|
+
"required": false,
|
141
|
+
"type": "object"
|
142
|
+
},
|
134
143
|
{
|
135
144
|
"disabled": false,
|
136
145
|
"document": "返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。\n生成图分辨率较大时建议选择 url,使用 base64 可能因图片过大导致返回失败。",
|
@@ -1293,6 +1293,15 @@
|
|
1293
1293
|
"name": "ClearDisasterRecoverGroupIds",
|
1294
1294
|
"required": false,
|
1295
1295
|
"type": "bool"
|
1296
|
+
},
|
1297
|
+
{
|
1298
|
+
"disabled": false,
|
1299
|
+
"document": "是否清空实例标签列表,非必填,默认为 false。\n填 true 代表清空实例标签列表,清空后基于此新创建的云主机将不会绑定列表中的标签。",
|
1300
|
+
"example": "false",
|
1301
|
+
"member": "bool",
|
1302
|
+
"name": "ClearInstanceTags",
|
1303
|
+
"required": false,
|
1304
|
+
"type": "bool"
|
1296
1305
|
}
|
1297
1306
|
],
|
1298
1307
|
"type": "object"
|
@@ -1802,7 +1811,7 @@
|
|
1802
1811
|
},
|
1803
1812
|
{
|
1804
1813
|
"disabled": false,
|
1805
|
-
"document": "实例计费类型,CVM默认值按照POSTPAID_BY_HOUR处理。\n<
|
1814
|
+
"document": "实例计费类型,CVM默认值按照POSTPAID_BY_HOUR处理。\n<li>POSTPAID_BY_HOUR:按小时后付费</li>\n<li>SPOTPAID:竞价付费</li>\n<li>PREPAID:预付费,即包年包月</li>",
|
1806
1815
|
"example": "无",
|
1807
1816
|
"member": "string",
|
1808
1817
|
"name": "InstanceChargeType",
|
@@ -1838,7 +1847,7 @@
|
|
1838
1847
|
},
|
1839
1848
|
{
|
1840
1849
|
"disabled": false,
|
1841
|
-
"document": "实例类型校验策略,取值包括 ALL 和 ANY,默认取值为ANY。\n<
|
1850
|
+
"document": "实例类型校验策略,取值包括 ALL 和 ANY,默认取值为ANY。\n<li> ALL,所有实例类型(InstanceType)都可用则通过校验,否则校验报错。</li>\n<li> ANY,存在任何一个实例类型(InstanceType)可用则通过校验,否则校验报错。</li>\n\n实例类型不可用的常见原因包括该实例类型售罄、对应云盘售罄等。\n如果 InstanceTypes 中一款机型不存在或者已下线,则无论 InstanceTypesCheckPolicy 采用何种取值,都会校验报错。",
|
1842
1851
|
"example": "无",
|
1843
1852
|
"member": "string",
|
1844
1853
|
"name": "InstanceTypesCheckPolicy",
|
@@ -1892,7 +1901,7 @@
|
|
1892
1901
|
},
|
1893
1902
|
{
|
1894
1903
|
"disabled": false,
|
1895
|
-
"document": "云盘类型选择策略,默认取值 ORIGINAL,取值范围:\n<
|
1904
|
+
"document": "云盘类型选择策略,默认取值 ORIGINAL,取值范围:\n<li>ORIGINAL:使用设置的云盘类型</li>\n<li>AUTOMATIC:自动选择当前可用的云盘类型</li>",
|
1896
1905
|
"example": "ORIGINAL",
|
1897
1906
|
"member": "string",
|
1898
1907
|
"name": "DiskTypePolicy",
|
@@ -1938,6 +1947,7 @@
|
|
1938
1947
|
"example": "asc-23h37kyn",
|
1939
1948
|
"member": "string",
|
1940
1949
|
"name": "LaunchConfigurationId",
|
1950
|
+
"output_required": true,
|
1941
1951
|
"type": "string",
|
1942
1952
|
"value_allowed_null": false
|
1943
1953
|
},
|
@@ -3934,20 +3944,33 @@
|
|
3934
3944
|
"members": [
|
3935
3945
|
{
|
3936
3946
|
"disabled": false,
|
3937
|
-
"document": "云服务器的主机名。\n<
|
3947
|
+
"document": "云服务器的主机名。\n<li> 点号(.)和短横线(-)不能作为 HostName 的首尾字符,不能连续使用。</li> \n<li> 不支持 Windows 实例。</li> \n<li> 其他类型(Linux 等)实例:字符长度为[2, 40],允许支持多个点号,点之间为一段,每段允许字母(不限制大小写)、数字和短横线(-)组成。不允许为纯数字。</li> \n注意:此字段可能返回 null,表示取不到有效值。",
|
3938
3948
|
"example": "aaa",
|
3939
3949
|
"member": "string",
|
3940
3950
|
"name": "HostName",
|
3951
|
+
"output_required": true,
|
3941
3952
|
"required": true,
|
3942
3953
|
"type": "string",
|
3943
3954
|
"value_allowed_null": true
|
3944
3955
|
},
|
3945
3956
|
{
|
3946
3957
|
"disabled": false,
|
3947
|
-
"document": "云服务器主机名的风格,取值范围包括 ORIGINAL 和 UNIQUE,默认为 ORIGINAL。\n<
|
3958
|
+
"document": "云服务器主机名的风格,取值范围包括 ORIGINAL 和 UNIQUE,默认为 ORIGINAL。\n<li> ORIGINAL,AS 直接将入参中所填的 HostName 传递给 CVM,CVM 可能会对 HostName 追加序列号,伸缩组中实例的 HostName 会出现冲突的情况。</li> \n<li> UNIQUE,入参所填的 HostName 相当于主机名前缀,AS 和 CVM 会对其进行拓展,伸缩组中实例的 HostName 可以保证唯一。</li> \n注意:此字段可能返回 null,表示取不到有效值。",
|
3948
3959
|
"example": "ORIGINAL",
|
3949
3960
|
"member": "string",
|
3950
3961
|
"name": "HostNameStyle",
|
3962
|
+
"output_required": true,
|
3963
|
+
"required": false,
|
3964
|
+
"type": "string",
|
3965
|
+
"value_allowed_null": true
|
3966
|
+
},
|
3967
|
+
{
|
3968
|
+
"disabled": false,
|
3969
|
+
"document": "云服务器的主机名后缀。\n<li> 点号(.)和短横线(-)不能作为 HostNameSuffix 的首尾字符,不能连续使用。</li> \n<li> 不支持 Windows 实例。</li> \n<li>其他类型(Linux 等)实例:字符长度为[1, 37],且与 HostName 的长度和不能超过 39,允许支持多个点号,点之间为一段,每段允许字母(不限制大小写)、数字和短横线(-)组成。</li> \n假设后缀名称为 suffix,原主机名为 test.0,最终主机名为 test.0.suffix。\n注意:此字段可能返回 null,表示取不到有效值。",
|
3970
|
+
"example": "suffix",
|
3971
|
+
"member": "string",
|
3972
|
+
"name": "HostNameSuffix",
|
3973
|
+
"output_required": true,
|
3951
3974
|
"required": false,
|
3952
3975
|
"type": "string",
|
3953
3976
|
"value_allowed_null": true
|
@@ -5386,7 +5409,7 @@
|
|
5386
5409
|
},
|
5387
5410
|
{
|
5388
5411
|
"disabled": false,
|
5389
|
-
"document": "实例类型校验策略,在实际修改 InstanceTypes 时发挥作用,取值包括 ALL 和 ANY,默认取值为ANY。\n<
|
5412
|
+
"document": "实例类型校验策略,在实际修改 InstanceTypes 时发挥作用,取值包括 ALL 和 ANY,默认取值为ANY。\n<li> ALL,所有实例类型(InstanceType)都可用则通过校验,否则校验报错。</li> \n<li> ANY,存在任何一个实例类型(InstanceType)可用则通过校验,否则校验报错。</li> \n实例类型不可用的常见原因包括该实例类型售罄、对应云盘售罄等。\n如果 InstanceTypes 中一款机型不存在或者已下线,则无论 InstanceTypesCheckPolicy 采用何种取值,都会校验报错。",
|
5390
5413
|
"example": "ALL",
|
5391
5414
|
"member": "string",
|
5392
5415
|
"name": "InstanceTypesCheckPolicy",
|
@@ -5431,7 +5454,7 @@
|
|
5431
5454
|
},
|
5432
5455
|
{
|
5433
5456
|
"disabled": false,
|
5434
|
-
"document": "实例计费类型。具体取值范围如下:\n<
|
5457
|
+
"document": "实例计费类型。具体取值范围如下:\n<li>POSTPAID_BY_HOUR:按小时后付费</li>\n<li>SPOTPAID:竞价付费</li>\n<li>PREPAID:预付费,即包年包月</li>",
|
5435
5458
|
"example": "POSTPAID_BY_HOUR",
|
5436
5459
|
"member": "string",
|
5437
5460
|
"name": "InstanceChargeType",
|
@@ -5458,7 +5481,7 @@
|
|
5458
5481
|
},
|
5459
5482
|
{
|
5460
5483
|
"disabled": false,
|
5461
|
-
"document": "云盘类型选择策略,取值范围:\n<
|
5484
|
+
"document": "云盘类型选择策略,取值范围:\n<li>ORIGINAL:使用设置的云盘类型。</li>\n<li>AUTOMATIC:自动选择当前可用的云盘类型。</li>",
|
5462
5485
|
"example": "ORIGINAL",
|
5463
5486
|
"member": "string",
|
5464
5487
|
"name": "DiskTypePolicy",
|
@@ -5513,7 +5536,7 @@
|
|
5513
5536
|
{
|
5514
5537
|
"disabled": false,
|
5515
5538
|
"document": "CAM角色名称。可通过DescribeRoleList接口返回值中的roleName获取。",
|
5516
|
-
"example": "
|
5539
|
+
"example": "TestRole",
|
5517
5540
|
"member": "string",
|
5518
5541
|
"name": "CamRoleName",
|
5519
5542
|
"required": false,
|
@@ -5522,7 +5545,7 @@
|
|
5522
5545
|
{
|
5523
5546
|
"disabled": false,
|
5524
5547
|
"document": "高性能计算集群ID。<br>\n注意:此字段默认为空。",
|
5525
|
-
"example": "
|
5548
|
+
"example": "hpc-abcd1234",
|
5526
5549
|
"member": "string",
|
5527
5550
|
"name": "HpcClusterId",
|
5528
5551
|
"required": false,
|
@@ -5554,6 +5577,15 @@
|
|
5554
5577
|
"name": "LoginSettings",
|
5555
5578
|
"required": false,
|
5556
5579
|
"type": "object"
|
5580
|
+
},
|
5581
|
+
{
|
5582
|
+
"disabled": false,
|
5583
|
+
"document": "实例标签列表。通过指定该参数,可以为扩容的实例绑定标签。最多支持指定10个标签。\n该参数会覆盖原有的实例标签列表,如需新增标签,需将新标签和原有标签一并传入。",
|
5584
|
+
"example": "[{\"Key\":\"Test\",\"Value\":\"test\"}]",
|
5585
|
+
"member": "InstanceTag",
|
5586
|
+
"name": "InstanceTags",
|
5587
|
+
"required": false,
|
5588
|
+
"type": "list"
|
5557
5589
|
}
|
5558
5590
|
],
|
5559
5591
|
"type": "object"
|
tccli/services/cls/cls_client.py
CHANGED
@@ -173,6 +173,58 @@ def doDescribeExports(args, parsed_globals):
|
|
173
173
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
174
174
|
|
175
175
|
|
176
|
+
def doDescribeConsoleSharingList(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.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
203
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
204
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
205
|
+
model = models.DescribeConsoleSharingListRequest()
|
206
|
+
model.from_json_string(json.dumps(args))
|
207
|
+
start_time = time.time()
|
208
|
+
while True:
|
209
|
+
rsp = client.DescribeConsoleSharingList(model)
|
210
|
+
result = rsp.to_json_string()
|
211
|
+
try:
|
212
|
+
json_obj = json.loads(result)
|
213
|
+
except TypeError as e:
|
214
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
215
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
216
|
+
break
|
217
|
+
cur_time = time.time()
|
218
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
219
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
220
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
221
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
222
|
+
else:
|
223
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
224
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
225
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
226
|
+
|
227
|
+
|
176
228
|
def doCreateIndex(args, parsed_globals):
|
177
229
|
g_param = parse_global_arg(parsed_globals)
|
178
230
|
|
@@ -2253,7 +2305,7 @@ def doCreateAlarmNotice(args, parsed_globals):
|
|
2253
2305
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2254
2306
|
|
2255
2307
|
|
2256
|
-
def
|
2308
|
+
def doModifyCosRecharge(args, parsed_globals):
|
2257
2309
|
g_param = parse_global_arg(parsed_globals)
|
2258
2310
|
|
2259
2311
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2282,11 +2334,11 @@ def doPreviewKafkaRecharge(args, parsed_globals):
|
|
2282
2334
|
client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
2283
2335
|
client._sdkVersion += ("_CLI_" + __version__)
|
2284
2336
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2285
|
-
model = models.
|
2337
|
+
model = models.ModifyCosRechargeRequest()
|
2286
2338
|
model.from_json_string(json.dumps(args))
|
2287
2339
|
start_time = time.time()
|
2288
2340
|
while True:
|
2289
|
-
rsp = client.
|
2341
|
+
rsp = client.ModifyCosRecharge(model)
|
2290
2342
|
result = rsp.to_json_string()
|
2291
2343
|
try:
|
2292
2344
|
json_obj = json.loads(result)
|
@@ -2773,6 +2825,58 @@ def doGetAlarmLog(args, parsed_globals):
|
|
2773
2825
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2774
2826
|
|
2775
2827
|
|
2828
|
+
def doCreateConsoleSharing(args, parsed_globals):
|
2829
|
+
g_param = parse_global_arg(parsed_globals)
|
2830
|
+
|
2831
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2832
|
+
cred = credential.CVMRoleCredential()
|
2833
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2834
|
+
cred = credential.STSAssumeRoleCredential(
|
2835
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2836
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2837
|
+
)
|
2838
|
+
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):
|
2839
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2840
|
+
else:
|
2841
|
+
cred = credential.Credential(
|
2842
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2843
|
+
)
|
2844
|
+
http_profile = HttpProfile(
|
2845
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2846
|
+
reqMethod="POST",
|
2847
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2848
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2849
|
+
)
|
2850
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2851
|
+
if g_param[OptionsDefine.Language]:
|
2852
|
+
profile.language = g_param[OptionsDefine.Language]
|
2853
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2854
|
+
client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
2855
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2856
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2857
|
+
model = models.CreateConsoleSharingRequest()
|
2858
|
+
model.from_json_string(json.dumps(args))
|
2859
|
+
start_time = time.time()
|
2860
|
+
while True:
|
2861
|
+
rsp = client.CreateConsoleSharing(model)
|
2862
|
+
result = rsp.to_json_string()
|
2863
|
+
try:
|
2864
|
+
json_obj = json.loads(result)
|
2865
|
+
except TypeError as e:
|
2866
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2867
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2868
|
+
break
|
2869
|
+
cur_time = time.time()
|
2870
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2871
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2872
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2873
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2874
|
+
else:
|
2875
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2876
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2877
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2878
|
+
|
2879
|
+
|
2776
2880
|
def doDescribeMachineGroupConfigs(args, parsed_globals):
|
2777
2881
|
g_param = parse_global_arg(parsed_globals)
|
2778
2882
|
|
@@ -3189,7 +3293,7 @@ def doAddMachineGroupInfo(args, parsed_globals):
|
|
3189
3293
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3190
3294
|
|
3191
3295
|
|
3192
|
-
def
|
3296
|
+
def doDeleteConsoleSharing(args, parsed_globals):
|
3193
3297
|
g_param = parse_global_arg(parsed_globals)
|
3194
3298
|
|
3195
3299
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3218,11 +3322,11 @@ def doDescribeDataTransformInfo(args, parsed_globals):
|
|
3218
3322
|
client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
3219
3323
|
client._sdkVersion += ("_CLI_" + __version__)
|
3220
3324
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3221
|
-
model = models.
|
3325
|
+
model = models.DeleteConsoleSharingRequest()
|
3222
3326
|
model.from_json_string(json.dumps(args))
|
3223
3327
|
start_time = time.time()
|
3224
3328
|
while True:
|
3225
|
-
rsp = client.
|
3329
|
+
rsp = client.DeleteConsoleSharing(model)
|
3226
3330
|
result = rsp.to_json_string()
|
3227
3331
|
try:
|
3228
3332
|
json_obj = json.loads(result)
|
@@ -3761,6 +3865,58 @@ def doSplitPartition(args, parsed_globals):
|
|
3761
3865
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3762
3866
|
|
3763
3867
|
|
3868
|
+
def doDescribeDataTransformInfo(args, parsed_globals):
|
3869
|
+
g_param = parse_global_arg(parsed_globals)
|
3870
|
+
|
3871
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3872
|
+
cred = credential.CVMRoleCredential()
|
3873
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3874
|
+
cred = credential.STSAssumeRoleCredential(
|
3875
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3876
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3877
|
+
)
|
3878
|
+
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):
|
3879
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3880
|
+
else:
|
3881
|
+
cred = credential.Credential(
|
3882
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3883
|
+
)
|
3884
|
+
http_profile = HttpProfile(
|
3885
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3886
|
+
reqMethod="POST",
|
3887
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3888
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3889
|
+
)
|
3890
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3891
|
+
if g_param[OptionsDefine.Language]:
|
3892
|
+
profile.language = g_param[OptionsDefine.Language]
|
3893
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3894
|
+
client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
3895
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3896
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3897
|
+
model = models.DescribeDataTransformInfoRequest()
|
3898
|
+
model.from_json_string(json.dumps(args))
|
3899
|
+
start_time = time.time()
|
3900
|
+
while True:
|
3901
|
+
rsp = client.DescribeDataTransformInfo(model)
|
3902
|
+
result = rsp.to_json_string()
|
3903
|
+
try:
|
3904
|
+
json_obj = json.loads(result)
|
3905
|
+
except TypeError as e:
|
3906
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3907
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3908
|
+
break
|
3909
|
+
cur_time = time.time()
|
3910
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3911
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3912
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3913
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3914
|
+
else:
|
3915
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3916
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3917
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3918
|
+
|
3919
|
+
|
3764
3920
|
def doDescribeMachineGroups(args, parsed_globals):
|
3765
3921
|
g_param = parse_global_arg(parsed_globals)
|
3766
3922
|
|
@@ -4333,6 +4489,58 @@ def doDescribeShippers(args, parsed_globals):
|
|
4333
4489
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4334
4490
|
|
4335
4491
|
|
4492
|
+
def doModifyConsoleSharing(args, parsed_globals):
|
4493
|
+
g_param = parse_global_arg(parsed_globals)
|
4494
|
+
|
4495
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4496
|
+
cred = credential.CVMRoleCredential()
|
4497
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4498
|
+
cred = credential.STSAssumeRoleCredential(
|
4499
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4500
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4501
|
+
)
|
4502
|
+
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):
|
4503
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4504
|
+
else:
|
4505
|
+
cred = credential.Credential(
|
4506
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4507
|
+
)
|
4508
|
+
http_profile = HttpProfile(
|
4509
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4510
|
+
reqMethod="POST",
|
4511
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4512
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4513
|
+
)
|
4514
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4515
|
+
if g_param[OptionsDefine.Language]:
|
4516
|
+
profile.language = g_param[OptionsDefine.Language]
|
4517
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4518
|
+
client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
4519
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4520
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4521
|
+
model = models.ModifyConsoleSharingRequest()
|
4522
|
+
model.from_json_string(json.dumps(args))
|
4523
|
+
start_time = time.time()
|
4524
|
+
while True:
|
4525
|
+
rsp = client.ModifyConsoleSharing(model)
|
4526
|
+
result = rsp.to_json_string()
|
4527
|
+
try:
|
4528
|
+
json_obj = json.loads(result)
|
4529
|
+
except TypeError as e:
|
4530
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4531
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4532
|
+
break
|
4533
|
+
cur_time = time.time()
|
4534
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4535
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4536
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4537
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4538
|
+
else:
|
4539
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4540
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4541
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4542
|
+
|
4543
|
+
|
4336
4544
|
def doDescribeDashboards(args, parsed_globals):
|
4337
4545
|
g_param = parse_global_arg(parsed_globals)
|
4338
4546
|
|
@@ -4385,7 +4593,7 @@ def doDescribeDashboards(args, parsed_globals):
|
|
4385
4593
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4386
4594
|
|
4387
4595
|
|
4388
|
-
def
|
4596
|
+
def doPreviewKafkaRecharge(args, parsed_globals):
|
4389
4597
|
g_param = parse_global_arg(parsed_globals)
|
4390
4598
|
|
4391
4599
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4414,11 +4622,11 @@ def doModifyCosRecharge(args, parsed_globals):
|
|
4414
4622
|
client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
4415
4623
|
client._sdkVersion += ("_CLI_" + __version__)
|
4416
4624
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4417
|
-
model = models.
|
4625
|
+
model = models.PreviewKafkaRechargeRequest()
|
4418
4626
|
model.from_json_string(json.dumps(args))
|
4419
4627
|
start_time = time.time()
|
4420
4628
|
while True:
|
4421
|
-
rsp = client.
|
4629
|
+
rsp = client.PreviewKafkaRecharge(model)
|
4422
4630
|
result = rsp.to_json_string()
|
4423
4631
|
try:
|
4424
4632
|
json_obj = json.loads(result)
|
@@ -5082,6 +5290,7 @@ ACTION_MAP = {
|
|
5082
5290
|
"ModifyKafkaConsumer": doModifyKafkaConsumer,
|
5083
5291
|
"CreateKafkaRecharge": doCreateKafkaRecharge,
|
5084
5292
|
"DescribeExports": doDescribeExports,
|
5293
|
+
"DescribeConsoleSharingList": doDescribeConsoleSharingList,
|
5085
5294
|
"CreateIndex": doCreateIndex,
|
5086
5295
|
"QueryMetric": doQueryMetric,
|
5087
5296
|
"ModifyShipper": doModifyShipper,
|
@@ -5122,7 +5331,7 @@ ACTION_MAP = {
|
|
5122
5331
|
"ModifyDashboardSubscribe": doModifyDashboardSubscribe,
|
5123
5332
|
"DeleteIndex": doDeleteIndex,
|
5124
5333
|
"CreateAlarmNotice": doCreateAlarmNotice,
|
5125
|
-
"
|
5334
|
+
"ModifyCosRecharge": doModifyCosRecharge,
|
5126
5335
|
"ModifyConfigExtra": doModifyConfigExtra,
|
5127
5336
|
"ModifyAlarmShield": doModifyAlarmShield,
|
5128
5337
|
"SearchDashboardSubscribe": doSearchDashboardSubscribe,
|
@@ -5132,6 +5341,7 @@ ACTION_MAP = {
|
|
5132
5341
|
"CreateMachineGroup": doCreateMachineGroup,
|
5133
5342
|
"DeleteMachineGroupInfo": doDeleteMachineGroupInfo,
|
5134
5343
|
"GetAlarmLog": doGetAlarmLog,
|
5344
|
+
"CreateConsoleSharing": doCreateConsoleSharing,
|
5135
5345
|
"DescribeMachineGroupConfigs": doDescribeMachineGroupConfigs,
|
5136
5346
|
"DescribeShipperTasks": doDescribeShipperTasks,
|
5137
5347
|
"SearchCosRechargeInfo": doSearchCosRechargeInfo,
|
@@ -5140,7 +5350,7 @@ ACTION_MAP = {
|
|
5140
5350
|
"DeleteDashboardSubscribe": doDeleteDashboardSubscribe,
|
5141
5351
|
"CreateDataTransform": doCreateDataTransform,
|
5142
5352
|
"AddMachineGroupInfo": doAddMachineGroupInfo,
|
5143
|
-
"
|
5353
|
+
"DeleteConsoleSharing": doDeleteConsoleSharing,
|
5144
5354
|
"DescribeAlarmNotices": doDescribeAlarmNotices,
|
5145
5355
|
"DescribePartitions": doDescribePartitions,
|
5146
5356
|
"DeleteConfigExtra": doDeleteConfigExtra,
|
@@ -5151,6 +5361,7 @@ ACTION_MAP = {
|
|
5151
5361
|
"DescribeConfigMachineGroups": doDescribeConfigMachineGroups,
|
5152
5362
|
"DeleteExport": doDeleteExport,
|
5153
5363
|
"SplitPartition": doSplitPartition,
|
5364
|
+
"DescribeDataTransformInfo": doDescribeDataTransformInfo,
|
5154
5365
|
"DescribeMachineGroups": doDescribeMachineGroups,
|
5155
5366
|
"CreateConsumer": doCreateConsumer,
|
5156
5367
|
"ModifyTopic": doModifyTopic,
|
@@ -5162,8 +5373,9 @@ ACTION_MAP = {
|
|
5162
5373
|
"CheckRechargeKafkaServer": doCheckRechargeKafkaServer,
|
5163
5374
|
"ModifyAlarm": doModifyAlarm,
|
5164
5375
|
"DescribeShippers": doDescribeShippers,
|
5376
|
+
"ModifyConsoleSharing": doModifyConsoleSharing,
|
5165
5377
|
"DescribeDashboards": doDescribeDashboards,
|
5166
|
-
"
|
5378
|
+
"PreviewKafkaRecharge": doPreviewKafkaRecharge,
|
5167
5379
|
"ModifyConfig": doModifyConfig,
|
5168
5380
|
"UploadLog": doUploadLog,
|
5169
5381
|
"DeleteTopic": doDeleteTopic,
|