tccli 3.0.1303.1__py2.py3-none-any.whl → 3.0.1306.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 +39 -39
- tccli/services/aiart/v20221229/examples.json +11 -11
- tccli/services/ams/v20201229/api.json +28 -34
- tccli/services/ams/v20201229/examples.json +2 -8
- tccli/services/autoscaling/v20180419/api.json +57 -57
- tccli/services/autoscaling/v20180419/examples.json +6 -6
- tccli/services/bi/v20220105/api.json +9 -0
- tccli/services/bi/v20220105/examples.json +1 -1
- tccli/services/cbs/v20170312/api.json +49 -38
- tccli/services/ccc/v20200210/api.json +10 -0
- tccli/services/cdb/v20170320/api.json +9 -9
- tccli/services/cdb/v20170320/examples.json +2 -2
- tccli/services/cdn/v20180606/api.json +61 -58
- tccli/services/cdn/v20180606/examples.json +8 -8
- tccli/services/cfs/v20190719/api.json +12 -2
- tccli/services/cfs/v20190719/examples.json +2 -2
- tccli/services/cfw/cfw_client.py +53 -0
- tccli/services/cfw/v20190904/api.json +539 -0
- tccli/services/cfw/v20190904/examples.json +8 -0
- tccli/services/chc/v20230418/api.json +10 -0
- tccli/services/ckafka/ckafka_client.py +53 -0
- tccli/services/ckafka/v20190819/api.json +242 -8
- tccli/services/ckafka/v20190819/examples.json +8 -0
- tccli/services/clb/v20180317/api.json +8 -8
- tccli/services/cvm/v20170312/api.json +129 -20
- tccli/services/cvm/v20170312/examples.json +1 -1
- tccli/services/cynosdb/v20190107/api.json +9 -9
- tccli/services/dbbrain/v20191016/api.json +11 -10
- tccli/services/dbbrain/v20191016/examples.json +1 -1
- tccli/services/dbbrain/v20210527/api.json +1 -1
- tccli/services/dc/v20180410/api.json +16 -6
- tccli/services/dc/v20180410/examples.json +4 -4
- tccli/services/domain/v20180808/api.json +162 -162
- tccli/services/domain/v20180808/examples.json +34 -34
- tccli/services/drm/v20181115/api.json +52 -65
- tccli/services/drm/v20181115/examples.json +1 -1
- tccli/services/dsgc/v20190723/api.json +10 -0
- tccli/services/dts/v20211206/api.json +0 -9
- tccli/services/dts/v20211206/examples.json +1 -1
- tccli/services/ecdn/v20191012/api.json +12 -12
- tccli/services/emr/v20190103/api.json +10 -0
- tccli/services/gs/gs_client.py +53 -0
- tccli/services/gs/v20191118/api.json +75 -3
- tccli/services/gs/v20191118/examples.json +15 -7
- tccli/services/gwlb/v20240906/api.json +28 -28
- tccli/services/hai/hai_client.py +53 -0
- tccli/services/hai/v20230812/api.json +62 -0
- tccli/services/hai/v20230812/examples.json +8 -0
- tccli/services/hunyuan/v20230901/api.json +4 -4
- tccli/services/ims/v20201229/api.json +14 -5
- tccli/services/ims/v20201229/examples.json +2 -2
- tccli/services/ioa/v20220601/api.json +13 -2
- tccli/services/iotexplorer/v20190423/api.json +62 -3
- tccli/services/iotexplorer/v20190423/examples.json +1 -1
- tccli/services/iotvideoindustry/v20201201/api.json +29 -19
- tccli/services/iotvideoindustry/v20201201/examples.json +2 -2
- tccli/services/iss/iss_client.py +273 -8
- tccli/services/iss/v20230517/api.json +586 -0
- tccli/services/iss/v20230517/examples.json +46 -0
- tccli/services/lcic/v20220817/api.json +1 -1
- tccli/services/lighthouse/v20200324/api.json +1 -1
- tccli/services/live/v20180801/api.json +18 -18
- tccli/services/lke/v20231130/api.json +50 -6
- tccli/services/lkeap/v20240522/api.json +124 -1
- tccli/services/monitor/v20180724/api.json +1 -1
- tccli/services/mps/v20190612/api.json +283 -290
- tccli/services/mps/v20190612/examples.json +9 -9
- tccli/services/ocr/v20181119/api.json +133 -114
- tccli/services/ocr/v20181119/examples.json +1 -1
- tccli/services/postgres/v20170312/api.json +140 -121
- tccli/services/postgres/v20170312/examples.json +1 -1
- tccli/services/redis/v20180412/api.json +94 -4
- tccli/services/redis/v20180412/examples.json +3 -3
- tccli/services/ses/v20201002/api.json +9 -0
- tccli/services/soe/v20180724/api.json +13 -13
- tccli/services/soe/v20180724/examples.json +2 -2
- tccli/services/tat/v20201028/api.json +19 -19
- tccli/services/tcss/v20201101/api.json +27 -0
- tccli/services/teo/v20220901/api.json +14 -3
- tccli/services/tione/tione_client.py +53 -0
- tccli/services/tione/v20211111/api.json +49 -1
- tccli/services/tione/v20211111/examples.json +8 -0
- tccli/services/trtc/v20190722/api.json +5 -5
- tccli/services/tse/v20201207/api.json +30 -0
- tccli/services/tts/v20190823/api.json +1 -1
- tccli/services/vm/v20210922/api.json +21 -30
- tccli/services/vm/v20210922/examples.json +2 -2
- tccli/services/vod/v20180717/api.json +6 -6
- tccli/services/vod/v20180717/examples.json +1 -1
- tccli/services/vpc/v20170312/api.json +103 -81
- tccli/services/vpc/v20170312/examples.json +3 -3
- tccli/services/vrs/v20200824/api.json +52 -52
- tccli/services/vrs/v20200824/examples.json +2 -2
- tccli/services/wedata/v20210820/api.json +192 -11
- tccli/services/wedata/v20210820/examples.json +8 -0
- tccli/services/wedata/wedata_client.py +53 -0
- {tccli-3.0.1303.1.dist-info → tccli-3.0.1306.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1303.1.dist-info → tccli-3.0.1306.1.dist-info}/RECORD +102 -102
- {tccli-3.0.1303.1.dist-info → tccli-3.0.1306.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1303.1.dist-info → tccli-3.0.1306.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1303.1.dist-info → tccli-3.0.1306.1.dist-info}/license_files/LICENSE +0 -0
@@ -1,46 +1,46 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"DescribeDomains": {
|
4
|
-
"document": "本接口(DescribeDomains)用于查询CDN域名基本信息,包括项目id,状态,业务类型,创建时间,更新时间等。\n\n>? 若您的业务已迁移至 CDN 控制台,请参考<a href=\"https://cloud.tencent.com/document/api/228/41118\"> CDN 接口文档</a>,使用 CDN 相关API 进行操作。",
|
4
|
+
"document": "ECDN平台下线,接口开始预下线处理\n\n本接口(DescribeDomains)用于查询CDN域名基本信息,包括项目id,状态,业务类型,创建时间,更新时间等。\n\n>? 若您的业务已迁移至 CDN 控制台,请参考<a href=\"https://cloud.tencent.com/document/api/228/41118\"> CDN 接口文档</a>,使用 CDN 相关API 进行操作。",
|
5
5
|
"input": "DescribeDomainsRequest",
|
6
6
|
"name": "查询域名基本信息",
|
7
7
|
"output": "DescribeDomainsResponse",
|
8
|
-
"status": "
|
8
|
+
"status": "deprecated"
|
9
9
|
},
|
10
10
|
"DescribeDomainsConfig": {
|
11
|
-
"document": "本接口(DescribeDomainsConfig)用于查询CDN加速域名详细配置信息。\n\n>? 若您的业务已迁移至 CDN 控制台,请参考<a href=\"https://cloud.tencent.com/document/api/228/41117\"> CDN 接口文档</a>,使用 CDN 相关API 进行操作。",
|
11
|
+
"document": "ECDN平台下线,接口开始预下线处理\n\n本接口(DescribeDomainsConfig)用于查询CDN加速域名详细配置信息。\n\n>? 若您的业务已迁移至 CDN 控制台,请参考<a href=\"https://cloud.tencent.com/document/api/228/41117\"> CDN 接口文档</a>,使用 CDN 相关API 进行操作。",
|
12
12
|
"input": "DescribeDomainsConfigRequest",
|
13
13
|
"name": "查询域名详细配置",
|
14
14
|
"output": "DescribeDomainsConfigResponse",
|
15
|
-
"status": "
|
15
|
+
"status": "deprecated"
|
16
16
|
},
|
17
17
|
"DescribeEcdnDomainLogs": {
|
18
|
-
"document": "本接口(DescribeEcdnDomainLogs)用于查询域名的访问日志下载地址。",
|
18
|
+
"document": "ECDN平台下线,接口开始预下线处理\n\n本接口(DescribeEcdnDomainLogs)用于查询域名的访问日志下载地址。",
|
19
19
|
"input": "DescribeEcdnDomainLogsRequest",
|
20
20
|
"name": "查询域名日志下载链接",
|
21
21
|
"output": "DescribeEcdnDomainLogsResponse",
|
22
|
-
"status": "
|
22
|
+
"status": "deprecated"
|
23
23
|
},
|
24
24
|
"DescribeEcdnDomainStatistics": {
|
25
|
-
"document": "本接口(DescribeEcdnDomainStatistics)用于查询指定时间段内的域名访问统计指标。\n\n>? 若您的业务已迁移至 CDN 控制台,请参考<a href=\"https://cloud.tencent.com/document/api/228/30986\"> CDN 接口文档</a>,使用 CDN 相关API 进行操作。",
|
25
|
+
"document": "ECDN平台下线,接口开始预下线处理\n\n本接口(DescribeEcdnDomainStatistics)用于查询指定时间段内的域名访问统计指标。\n\n>? 若您的业务已迁移至 CDN 控制台,请参考<a href=\"https://cloud.tencent.com/document/api/228/30986\"> CDN 接口文档</a>,使用 CDN 相关API 进行操作。",
|
26
26
|
"input": "DescribeEcdnDomainStatisticsRequest",
|
27
27
|
"name": "域名统计指标查询",
|
28
28
|
"output": "DescribeEcdnDomainStatisticsResponse",
|
29
|
-
"status": "
|
29
|
+
"status": "deprecated"
|
30
30
|
},
|
31
31
|
"DescribeEcdnStatistics": {
|
32
|
-
"document": "
|
32
|
+
"document": "ECDN平台下线,接口开始预下线处理\n\nDescribeEcdnStatistics用于查询 ECDN 实时访问监控数据,支持以下指标查询:\n\n+ 流量(单位为 byte)\n+ 带宽(单位为 bps)\n+ 请求数(单位为 次)\n+ 状态码 2xx 汇总及各 2 开头状态码明细(单位为 个)\n+ 状态码 3xx 汇总及各 3 开头状态码明细(单位为 个)\n+ 状态码 4xx 汇总及各 4 开头状态码明细(单位为 个)\n+ 状态码 5xx 汇总及各 5 开头状态码明细(单位为 个)",
|
33
33
|
"input": "DescribeEcdnStatisticsRequest",
|
34
34
|
"name": "访问数据查询",
|
35
35
|
"output": "DescribeEcdnStatisticsResponse",
|
36
|
-
"status": "
|
36
|
+
"status": "deprecated"
|
37
37
|
},
|
38
38
|
"DescribeIpStatus": {
|
39
|
-
"document": "
|
39
|
+
"document": "ECDN平台下线,接口开始预下线处理\n\nDescribeIpStatus 用于查询域名所在加速平台的所有节点信息, 如果您的源站有白名单设置,可以通过本接口获取ECDN服务的节点IP进行加白, 本接口为内测接口,请联系腾讯云工程师开白。\n\n由于产品服务节点常有更新,对于源站开白的使用场景,请定期调用接口获取最新节点信息,若新增服务节点发布7日后您尚未更新加白导致回源失败等问题,ECDN侧不对此承担责任。",
|
40
40
|
"input": "DescribeIpStatusRequest",
|
41
41
|
"name": "查询平台服务节点IP",
|
42
42
|
"output": "DescribeIpStatusResponse",
|
43
|
-
"status": "
|
43
|
+
"status": "deprecated"
|
44
44
|
},
|
45
45
|
"DescribePurgeTasks": {
|
46
46
|
"document": "ECDN即将下线,如需要动态加速请使用EdgeOne\n\nDescribePurgeTasks 用于查询刷新任务提交历史记录及执行进度。\n\n>? 若您的业务已迁移至 CDN 控制台,请参考<a href=\"https://cloud.tencent.com/document/api/228/37873\"> CDN 接口文档</a>,使用 CDN 相关API 进行操作。",
|
@@ -13229,6 +13229,16 @@
|
|
13229
13229
|
"output_required": false,
|
13230
13230
|
"type": "string",
|
13231
13231
|
"value_allowed_null": false
|
13232
|
+
},
|
13233
|
+
{
|
13234
|
+
"disabled": false,
|
13235
|
+
"document": "新挂磁盘时可支持配置的服务名称列表",
|
13236
|
+
"example": "[\"HDFS\",\"YARN\"]",
|
13237
|
+
"member": "string",
|
13238
|
+
"name": "ConfigurableServices",
|
13239
|
+
"output_required": false,
|
13240
|
+
"type": "list",
|
13241
|
+
"value_allowed_null": false
|
13232
13242
|
}
|
13233
13243
|
],
|
13234
13244
|
"usage": "out"
|
tccli/services/gs/gs_client.py
CHANGED
@@ -1941,6 +1941,58 @@ def doStopAndroidInstancesApp(args, parsed_globals):
|
|
1941
1941
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1942
1942
|
|
1943
1943
|
|
1944
|
+
def doRebootAndroidInstanceHosts(args, parsed_globals):
|
1945
|
+
g_param = parse_global_arg(parsed_globals)
|
1946
|
+
|
1947
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1948
|
+
cred = credential.CVMRoleCredential()
|
1949
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1950
|
+
cred = credential.STSAssumeRoleCredential(
|
1951
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1952
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1953
|
+
)
|
1954
|
+
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):
|
1955
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1956
|
+
else:
|
1957
|
+
cred = credential.Credential(
|
1958
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1959
|
+
)
|
1960
|
+
http_profile = HttpProfile(
|
1961
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1962
|
+
reqMethod="POST",
|
1963
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1964
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1965
|
+
)
|
1966
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1967
|
+
if g_param[OptionsDefine.Language]:
|
1968
|
+
profile.language = g_param[OptionsDefine.Language]
|
1969
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1970
|
+
client = mod.GsClient(cred, g_param[OptionsDefine.Region], profile)
|
1971
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1972
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1973
|
+
model = models.RebootAndroidInstanceHostsRequest()
|
1974
|
+
model.from_json_string(json.dumps(args))
|
1975
|
+
start_time = time.time()
|
1976
|
+
while True:
|
1977
|
+
rsp = client.RebootAndroidInstanceHosts(model)
|
1978
|
+
result = rsp.to_json_string()
|
1979
|
+
try:
|
1980
|
+
json_obj = json.loads(result)
|
1981
|
+
except TypeError as e:
|
1982
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1983
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1984
|
+
break
|
1985
|
+
cur_time = time.time()
|
1986
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1987
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1988
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1989
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1990
|
+
else:
|
1991
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1992
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1993
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1994
|
+
|
1995
|
+
|
1944
1996
|
def doSwitchGameArchive(args, parsed_globals):
|
1945
1997
|
g_param = parse_global_arg(parsed_globals)
|
1946
1998
|
|
@@ -2925,6 +2977,7 @@ ACTION_MAP = {
|
|
2925
2977
|
"StopPublishStream": doStopPublishStream,
|
2926
2978
|
"StartAndroidInstances": doStartAndroidInstances,
|
2927
2979
|
"StopAndroidInstancesApp": doStopAndroidInstancesApp,
|
2980
|
+
"RebootAndroidInstanceHosts": doRebootAndroidInstanceHosts,
|
2928
2981
|
"SwitchGameArchive": doSwitchGameArchive,
|
2929
2982
|
"DeleteAndroidAppVersion": doDeleteAndroidAppVersion,
|
2930
2983
|
"DescribeAndroidInstanceLabels": doDescribeAndroidInstanceLabels,
|
@@ -252,6 +252,13 @@
|
|
252
252
|
"output": "ModifyAndroidInstancesUserIdResponse",
|
253
253
|
"status": "online"
|
254
254
|
},
|
255
|
+
"RebootAndroidInstanceHosts": {
|
256
|
+
"document": "重启安卓实例宿主机。请注意:\n\n- 当前每 15 分钟只能重启一次\n- 一个宿主机可能有多个云手机实例,重启宿主机会影响运行在上面的所有实例,请确保该宿主机上的所有云手机实例未投入业务使用",
|
257
|
+
"input": "RebootAndroidInstanceHostsRequest",
|
258
|
+
"name": "批量重启安卓实例宿主机",
|
259
|
+
"output": "RebootAndroidInstanceHostsResponse",
|
260
|
+
"status": "online"
|
261
|
+
},
|
255
262
|
"RebootAndroidInstances": {
|
256
263
|
"document": "重启安卓实例",
|
257
264
|
"input": "RebootAndroidInstancesRequest",
|
@@ -528,13 +535,23 @@
|
|
528
535
|
},
|
529
536
|
{
|
530
537
|
"disabled": false,
|
531
|
-
"document": "shell
|
538
|
+
"document": "shell 安装命令(支持多条命令执行,通过 && 组合;只在应用 AppMode 为 ADVANCED 高级模式下 才会生效)",
|
532
539
|
"example": "\"tar -zxvf test-1.0.X.tgz && cd test-1.0.X && ./install.sh\"",
|
533
540
|
"member": "string",
|
534
541
|
"name": "Command",
|
535
542
|
"output_required": true,
|
536
543
|
"type": "string",
|
537
544
|
"value_allowed_null": false
|
545
|
+
},
|
546
|
+
{
|
547
|
+
"disabled": false,
|
548
|
+
"document": "shell 卸载命令(支持多条命令执行,通过 && 组合;只在应用 AppMode 为 ADVANCED 高级模式下 才会生效)",
|
549
|
+
"example": "\"tar -zxvf test-1\"cd test-1.0.X && ./uninstall.sh\"",
|
550
|
+
"member": "string",
|
551
|
+
"name": "UninstallCommand",
|
552
|
+
"output_required": true,
|
553
|
+
"type": "string",
|
554
|
+
"value_allowed_null": false
|
538
555
|
}
|
539
556
|
],
|
540
557
|
"usage": "out"
|
@@ -1290,12 +1307,21 @@
|
|
1290
1307
|
},
|
1291
1308
|
{
|
1292
1309
|
"disabled": false,
|
1293
|
-
"document": "shell
|
1310
|
+
"document": "应用 shell 安装命令(支持多条命令执行,通过 && 组合;只在应用 AppMode 为 ADVANCED 高级模式下 才会生效)",
|
1294
1311
|
"example": "tar -zxvf test-1.0.X.tgz && cd test-1.0.X && ./install.sh",
|
1295
1312
|
"member": "string",
|
1296
1313
|
"name": "Command",
|
1297
1314
|
"required": false,
|
1298
1315
|
"type": "string"
|
1316
|
+
},
|
1317
|
+
{
|
1318
|
+
"disabled": false,
|
1319
|
+
"document": "应用 shell 卸载命令(支持多条命令执行,通过 && 组合;只在应用 AppMode 为 ADVANCED 高级模式下 才会生效)",
|
1320
|
+
"example": "cd test-1.0.X && ./uninstall.sh",
|
1321
|
+
"member": "string",
|
1322
|
+
"name": "UninstallCommand",
|
1323
|
+
"required": false,
|
1324
|
+
"type": "string"
|
1299
1325
|
}
|
1300
1326
|
],
|
1301
1327
|
"type": "object"
|
@@ -2946,12 +2972,21 @@
|
|
2946
2972
|
},
|
2947
2973
|
{
|
2948
2974
|
"disabled": false,
|
2949
|
-
"document": "shell
|
2975
|
+
"document": "应用 shell 安装命令(支持多条命令执行,通过 && 组合;只在应用 AppMode 为 ADVANCED 高级模式下 才会生效)",
|
2950
2976
|
"example": "\"tar -zxvf test-1.0.X.tgz && cd test-1.0.X && ./install.sh\"",
|
2951
2977
|
"member": "string",
|
2952
2978
|
"name": "Command",
|
2953
2979
|
"required": false,
|
2954
2980
|
"type": "string"
|
2981
|
+
},
|
2982
|
+
{
|
2983
|
+
"disabled": false,
|
2984
|
+
"document": "应用 shell 卸载命令(支持多条命令执行,通过 && 组合;只在应用 AppMode 为 ADVANCED 高级模式下 才会生效)",
|
2985
|
+
"example": "\"cd test-1.0.X && ./uninstall.sh\"",
|
2986
|
+
"member": "string",
|
2987
|
+
"name": "UninstallCommand",
|
2988
|
+
"required": false,
|
2989
|
+
"type": "string"
|
2955
2990
|
}
|
2956
2991
|
],
|
2957
2992
|
"type": "object"
|
@@ -3256,6 +3291,43 @@
|
|
3256
3291
|
],
|
3257
3292
|
"type": "object"
|
3258
3293
|
},
|
3294
|
+
"RebootAndroidInstanceHostsRequest": {
|
3295
|
+
"document": "RebootAndroidInstanceHosts请求参数结构体",
|
3296
|
+
"members": [
|
3297
|
+
{
|
3298
|
+
"disabled": false,
|
3299
|
+
"document": "宿主机序列号集合",
|
3300
|
+
"example": "[\"RK5838P1262201165\"]",
|
3301
|
+
"member": "string",
|
3302
|
+
"name": "HostSerialNumbers",
|
3303
|
+
"required": true,
|
3304
|
+
"type": "list"
|
3305
|
+
}
|
3306
|
+
],
|
3307
|
+
"type": "object"
|
3308
|
+
},
|
3309
|
+
"RebootAndroidInstanceHostsResponse": {
|
3310
|
+
"document": "RebootAndroidInstanceHosts返回参数结构体",
|
3311
|
+
"members": [
|
3312
|
+
{
|
3313
|
+
"disabled": false,
|
3314
|
+
"document": "任务 ID 集合,以供任务状态查询,其中 InstanceId 为宿主机序列号",
|
3315
|
+
"example": "无",
|
3316
|
+
"member": "AndroidInstanceTask",
|
3317
|
+
"name": "TaskSet",
|
3318
|
+
"output_required": true,
|
3319
|
+
"type": "list",
|
3320
|
+
"value_allowed_null": false
|
3321
|
+
},
|
3322
|
+
{
|
3323
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
3324
|
+
"member": "string",
|
3325
|
+
"name": "RequestId",
|
3326
|
+
"type": "string"
|
3327
|
+
}
|
3328
|
+
],
|
3329
|
+
"type": "object"
|
3330
|
+
},
|
3259
3331
|
"RebootAndroidInstancesRequest": {
|
3260
3332
|
"document": "RebootAndroidInstances请求参数结构体",
|
3261
3333
|
"members": [
|
@@ -35,7 +35,7 @@
|
|
35
35
|
"CreateAndroidAppVersion": [
|
36
36
|
{
|
37
37
|
"document": "创建安卓应用版本",
|
38
|
-
"input": "POST / HTTP/1.1\nHost: gs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateAndroidAppVersion\n<公共请求参数>\n\n{\n \"AndroidAppId\": \"apk-ne70ubtu\",\n \"Command\": \"tar -zxvf test-1.0.X.tar.gz && cd test-1.0.X && ./install.sh\",\n \"DownloadUrl\": \"\"\n}",
|
38
|
+
"input": "POST / HTTP/1.1\nHost: gs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateAndroidAppVersion\n<公共请求参数>\n\n{\n \"AndroidAppId\": \"apk-ne70ubtu\",\n \"Command\": \"tar -zxvf test-1.0.X.tar.gz && cd test-1.0.X && ./install.sh\",\n \"UninstallCommand\": \"cd test-1.0.X && ./uninstall.sh\",\n \"DownloadUrl\": \"\"\n}",
|
39
39
|
"output": "{\n \"Response\": {\n \"AndroidAppVersion\": \"1705458203832573301\",\n \"RequestId\": \"143c46a1-70f4-4371-8cc8-c30efef53c4e\"\n }\n}",
|
40
40
|
"title": "创建安卓应用版本"
|
41
41
|
},
|
@@ -98,8 +98,8 @@
|
|
98
98
|
{
|
99
99
|
"document": "",
|
100
100
|
"input": "POST / HTTP/1.1\nHost: gs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateCosCredential\n<公共请求参数>\n\n{\n \"CosType\": \"Mobile\"\n}",
|
101
|
-
"output": "{\n \"Response\": {\n \"SecretID\": \"
|
102
|
-
"title": "
|
101
|
+
"output": "{\n \"Response\": {\n \"SecretID\": \"secret-id\",\n \"SecretKey\": \"secret-key\",\n \"SessionToken\": \"session-token\",\n \"CosBucket\": \"bucket-name\",\n \"CosRegion\": \"cos-region\",\n \"Path\": \"/test/\",\n \"StartTime\": 1500000,\n \"ExpiredTime\": 1500000,\n \"RequestId\": \"4eb17e58-68da-4e9a-b298-0894723c9022\"\n }\n}",
|
102
|
+
"title": "创建 Cos 临时密钥示例"
|
103
103
|
}
|
104
104
|
],
|
105
105
|
"CreateSession": [
|
@@ -146,7 +146,7 @@
|
|
146
146
|
{
|
147
147
|
"document": "查询安卓应用信息",
|
148
148
|
"input": "POST / HTTP/1.1\nHost: gs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeAndroidApps\n<公共请求参数>\n\n{\n \"Offset\": 2,\n \"Limit\": 2\n}",
|
149
|
-
"output": "{\n \"Response\": {\n \"Apps\": [\n {\n \"AndroidAppId\": \"apk-ne70ubtu\",\n \"AndroidAppVersionInfo\": [\n {\n \"AndroidAppVersion\": \"1705404913631168348\",\n \"CreateTime\": \"2024-01-16T11:36:20Z\",\n \"Command\": \"tar -zxvf test-1.0.X.tgz && cd test-1.0.X && ./install.sh\",\n \"State\": \"CREATE_SUCCESS\"\n },\n {\n \"AndroidAppVersion\": \"1705406075397560877\",\n \"CreateTime\": \"2024-01-16T11:54:35Z\",\n \"Command\": \"tar -zxvf test-2.0.X.tgz && cd test-2.0.X && ./install.sh\",\n \"State\": \"CREATE_FAIL\"\n }\n ],\n \"Name\": \"控制台测试1\",\n \"State\": \"ONLINE\",\n \"UserId\": \"user1\",\n \"AppMode\": \"ADVANCED\",\n \"CreateTime\": \"2024-01-16T11:54:35Z\"\n },\n {\n \"AndroidAppId\": \"apk-d6fyydrc\",\n \"AndroidAppVersionInfo\": null,\n \"Name\": \"控制台测试1\",\n \"State\": \"ONLINE\",\n \"UserId\": \"user2\",\n \"AppMode\": \"NORMAL\",\n \"CreateTime\": \"2024-01-16T11:54:35Z\"\n }\n ],\n \"RequestId\": \"5eae7edb-7e12-451e-a4c1-7cf0b777c6e7\",\n \"TotalCount\": 2\n }\n}",
|
149
|
+
"output": "{\n \"Response\": {\n \"Apps\": [\n {\n \"AndroidAppId\": \"apk-ne70ubtu\",\n \"AndroidAppVersionInfo\": [\n {\n \"AndroidAppVersion\": \"1705404913631168348\",\n \"CreateTime\": \"2024-01-16T11:36:20Z\",\n \"Command\": \"tar -zxvf test-1.0.X.tgz && cd test-1.0.X && ./install.sh\",\n \"UninstallCommand\": \"cd test-1.0.X && ./uninstall.sh\",\n \"State\": \"CREATE_SUCCESS\"\n },\n {\n \"AndroidAppVersion\": \"1705406075397560877\",\n \"CreateTime\": \"2024-01-16T11:54:35Z\",\n \"Command\": \"tar -zxvf test-2.0.X.tgz && cd test-2.0.X && ./install.sh\",\n \"UninstallCommand\": \"cd test-2.0.X && ./uninstall.sh\",\n \"State\": \"CREATE_FAIL\"\n }\n ],\n \"Name\": \"控制台测试1\",\n \"State\": \"ONLINE\",\n \"UserId\": \"user1\",\n \"AppMode\": \"ADVANCED\",\n \"CreateTime\": \"2024-01-16T11:54:35Z\"\n },\n {\n \"AndroidAppId\": \"apk-d6fyydrc\",\n \"AndroidAppVersionInfo\": null,\n \"Name\": \"控制台测试1\",\n \"State\": \"ONLINE\",\n \"UserId\": \"user2\",\n \"AppMode\": \"NORMAL\",\n \"CreateTime\": \"2024-01-16T11:54:35Z\"\n }\n ],\n \"RequestId\": \"5eae7edb-7e12-451e-a4c1-7cf0b777c6e7\",\n \"TotalCount\": 2\n }\n}",
|
150
150
|
"title": "查询安卓应用信息"
|
151
151
|
}
|
152
152
|
],
|
@@ -241,7 +241,7 @@
|
|
241
241
|
"ModifyAndroidAppVersion": [
|
242
242
|
{
|
243
243
|
"document": "",
|
244
|
-
"input": "POST / HTTP/1.1\nHost: gs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyAndroidAppVersion\n<公共请求参数>\n\n{\n \"AndroidAppId\": \"apk-ne70ubtu\",\n \"AndroidAppVersion\": \"ver-a1b2c3\",\n \"AndroidAppVersionName\": \"a1b2c3\",\n \"Command\": \"tar -zxvf test-1.0.X.tar.gz && cd test-1.0.X && ./install.sh\"\n}",
|
244
|
+
"input": "POST / HTTP/1.1\nHost: gs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyAndroidAppVersion\n<公共请求参数>\n\n{\n \"AndroidAppId\": \"apk-ne70ubtu\",\n \"AndroidAppVersion\": \"ver-a1b2c3\",\n \"AndroidAppVersionName\": \"a1b2c3\",\n \"Command\": \"tar -zxvf test-1.0.X.tar.gz && cd test-1.0.X && ./install.sh\",\n \"UninstallCommand\": \"cd test-1.0.X && ./uninstall.sh\"\n}",
|
245
245
|
"output": "{\n \"Response\": {\n \"RequestId\": \"143c46a1-70f4-4371-8cc8-c30efef53c4e\"\n }\n}",
|
246
246
|
"title": "修改安卓应用版本示例"
|
247
247
|
}
|
@@ -294,6 +294,14 @@
|
|
294
294
|
"title": "示例"
|
295
295
|
}
|
296
296
|
],
|
297
|
+
"RebootAndroidInstanceHosts": [
|
298
|
+
{
|
299
|
+
"document": "示例",
|
300
|
+
"input": "POST / HTTP/1.1\nHost: gs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RebootAndroidInstanceHosts\n<公共请求参数>\n\n{\n \"HostSerialNumbers\": [\n \"RK8S50P1402309019\"\n ]\n}",
|
301
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"8c99eb1a-a4e3-4d32-af51-aa282175f0b0\",\n \"TaskSet\": [\n {\n \"AndroidInstanceId\": \"RK8S50P1402309019\",\n \"TaskId\": \"798e9440-6b81-4018-a411-0ab057e35882\"\n }\n ]\n }\n}",
|
302
|
+
"title": "示例"
|
303
|
+
}
|
304
|
+
],
|
297
305
|
"RebootAndroidInstances": [
|
298
306
|
{
|
299
307
|
"document": "重启安卓实例",
|
@@ -377,7 +385,7 @@
|
|
377
385
|
"StopAndroidInstancesApp": [
|
378
386
|
{
|
379
387
|
"document": "",
|
380
|
-
"input": "POST / HTTP/1.1\nHost: gs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: StartAndroidInstancesApp\n<公共请求参数>\n\n{\n \"AndroidInstanceIds\": [\n \"
|
388
|
+
"input": "POST / HTTP/1.1\nHost: gs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: StartAndroidInstancesApp\n<公共请求参数>\n\n{\n \"AndroidInstanceIds\": [\n \"cai-251006279-ea99UI657kj\"\n ],\n \"PackageName\": \"com.tencent.module\"\n}",
|
381
389
|
"output": "{\n \"Response\": {\n \"RequestId\": \"6f7b34a3-0c00-4fac-b6f0-08d47ac3e736\"\n }\n}",
|
382
390
|
"title": "停止安卓实例应用示例"
|
383
391
|
}
|
@@ -410,7 +418,7 @@
|
|
410
418
|
{
|
411
419
|
"document": "",
|
412
420
|
"input": "POST / HTTP/1.1\nHost: gs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SyncAndroidInstanceImage\n<公共请求参数>\n\n{\n \"AndroidInstanceImageId\": \"image-abcd1234\",\n \"DestinationZones\": [\n \"ap-guangzhou-3\"\n ]\n}",
|
413
|
-
"output": "{\n \"Response\": {\n \"SyncAndroidInstanceImages\": [\n {\n \"AndroidInstanceImageId\": \"
|
421
|
+
"output": "{\n \"Response\": {\n \"SyncAndroidInstanceImages\": [\n {\n \"AndroidInstanceImageId\": \"image-49va6apu\",\n \"AndroidInstanceImageZone\": \"ap-guangzhou-3\"\n }\n ],\n \"RequestId\": \"requestid\"\n }\n}",
|
414
422
|
"title": "SyncAndroidInstanceImage 示例"
|
415
423
|
}
|
416
424
|
],
|
@@ -252,23 +252,23 @@
|
|
252
252
|
"members": [
|
253
253
|
{
|
254
254
|
"disabled": false,
|
255
|
-
"document": "由网关负载均衡实例唯一 ID 组成的数组。\n存在某些场景,如创建出现延迟时,此字段可能返回为空;此时可以根据接口返回的RequestId或DealName参数,通过[DescribeTaskStatus](https://cloud.tencent.com/document/api/1782/111700)接口查询创建的资源ID
|
255
|
+
"document": "由网关负载均衡实例唯一 ID 组成的数组。\n存在某些场景,如创建出现延迟时,此字段可能返回为空;此时可以根据接口返回的RequestId或DealName参数,通过[DescribeTaskStatus](https://cloud.tencent.com/document/api/1782/111700)接口查询创建的资源ID。",
|
256
256
|
"example": "[\"gwlb-6efswuxa\"]",
|
257
257
|
"member": "string",
|
258
258
|
"name": "LoadBalancerIds",
|
259
259
|
"output_required": true,
|
260
260
|
"type": "list",
|
261
|
-
"value_allowed_null":
|
261
|
+
"value_allowed_null": false
|
262
262
|
},
|
263
263
|
{
|
264
264
|
"disabled": false,
|
265
|
-
"document": "
|
265
|
+
"document": "订单号。",
|
266
266
|
"example": "2022XXXX",
|
267
267
|
"member": "string",
|
268
268
|
"name": "DealName",
|
269
269
|
"output_required": true,
|
270
270
|
"type": "string",
|
271
|
-
"value_allowed_null":
|
271
|
+
"value_allowed_null": false
|
272
272
|
},
|
273
273
|
{
|
274
274
|
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
@@ -1126,23 +1126,23 @@
|
|
1126
1126
|
"members": [
|
1127
1127
|
{
|
1128
1128
|
"disabled": false,
|
1129
|
-
"document": "
|
1129
|
+
"document": "后付费单价,单位:元。",
|
1130
1130
|
"example": "10",
|
1131
1131
|
"member": "float",
|
1132
1132
|
"name": "UnitPrice",
|
1133
1133
|
"output_required": false,
|
1134
1134
|
"type": "float",
|
1135
|
-
"value_allowed_null":
|
1135
|
+
"value_allowed_null": false
|
1136
1136
|
},
|
1137
1137
|
{
|
1138
1138
|
"disabled": false,
|
1139
|
-
"document": "后付费计价单元,可取值范围: HOUR:表示计价单元是按每小时来计算。当前涉及该计价单元的场景有:实例按小时后付费(POSTPAID_BY_HOUR
|
1139
|
+
"document": "后付费计价单元,可取值范围: HOUR:表示计价单元是按每小时来计算。当前涉及该计价单元的场景有:实例按小时后付费(POSTPAID_BY_HOUR)。",
|
1140
1140
|
"example": "HOUR",
|
1141
1141
|
"member": "string",
|
1142
1142
|
"name": "ChargeUnit",
|
1143
1143
|
"output_required": false,
|
1144
1144
|
"type": "string",
|
1145
|
-
"value_allowed_null":
|
1145
|
+
"value_allowed_null": false
|
1146
1146
|
},
|
1147
1147
|
{
|
1148
1148
|
"disabled": false,
|
@@ -1166,23 +1166,23 @@
|
|
1166
1166
|
},
|
1167
1167
|
{
|
1168
1168
|
"disabled": false,
|
1169
|
-
"document": "
|
1169
|
+
"document": "后付费的折扣单价,单位:元。",
|
1170
1170
|
"example": "10",
|
1171
1171
|
"member": "float",
|
1172
1172
|
"name": "UnitPriceDiscount",
|
1173
1173
|
"output_required": false,
|
1174
1174
|
"type": "float",
|
1175
|
-
"value_allowed_null":
|
1175
|
+
"value_allowed_null": false
|
1176
1176
|
},
|
1177
1177
|
{
|
1178
1178
|
"disabled": false,
|
1179
|
-
"document": "折扣,如20.0代表2
|
1179
|
+
"document": "折扣,如20.0代表2折。",
|
1180
1180
|
"example": "100",
|
1181
1181
|
"member": "float",
|
1182
1182
|
"name": "Discount",
|
1183
1183
|
"output_required": false,
|
1184
1184
|
"type": "float",
|
1185
|
-
"value_allowed_null":
|
1185
|
+
"value_allowed_null": false
|
1186
1186
|
}
|
1187
1187
|
],
|
1188
1188
|
"usage": "out"
|
@@ -1327,23 +1327,23 @@
|
|
1327
1327
|
"members": [
|
1328
1328
|
{
|
1329
1329
|
"disabled": false,
|
1330
|
-
"document": "
|
1330
|
+
"document": "描述了实例价格。",
|
1331
1331
|
"example": "无",
|
1332
1332
|
"member": "ItemPrice",
|
1333
1333
|
"name": "InstancePrice",
|
1334
1334
|
"output_required": false,
|
1335
1335
|
"type": "object",
|
1336
|
-
"value_allowed_null":
|
1336
|
+
"value_allowed_null": false
|
1337
1337
|
},
|
1338
1338
|
{
|
1339
1339
|
"disabled": false,
|
1340
|
-
"document": "描述了GLCU
|
1340
|
+
"document": "描述了GLCU的价格。",
|
1341
1341
|
"example": "无",
|
1342
1342
|
"member": "ItemPrice",
|
1343
1343
|
"name": "LcuPrice",
|
1344
1344
|
"output_required": false,
|
1345
1345
|
"type": "object",
|
1346
|
-
"value_allowed_null":
|
1346
|
+
"value_allowed_null": false
|
1347
1347
|
}
|
1348
1348
|
],
|
1349
1349
|
"usage": "out"
|
@@ -1491,63 +1491,63 @@
|
|
1491
1491
|
},
|
1492
1492
|
{
|
1493
1493
|
"disabled": false,
|
1494
|
-
"document": "后端服务的外网 IP
|
1494
|
+
"document": "后端服务的外网 IP",
|
1495
1495
|
"example": "[1.1.1.1]",
|
1496
1496
|
"member": "string",
|
1497
1497
|
"name": "PublicIpAddresses",
|
1498
1498
|
"output_required": true,
|
1499
1499
|
"type": "list",
|
1500
|
-
"value_allowed_null":
|
1500
|
+
"value_allowed_null": false
|
1501
1501
|
},
|
1502
1502
|
{
|
1503
1503
|
"disabled": false,
|
1504
|
-
"document": "后端服务的内网 IP
|
1504
|
+
"document": "后端服务的内网 IP",
|
1505
1505
|
"example": "[2.2.2.2]",
|
1506
1506
|
"member": "string",
|
1507
1507
|
"name": "PrivateIpAddresses",
|
1508
1508
|
"output_required": true,
|
1509
1509
|
"type": "list",
|
1510
|
-
"value_allowed_null":
|
1510
|
+
"value_allowed_null": false
|
1511
1511
|
},
|
1512
1512
|
{
|
1513
1513
|
"disabled": false,
|
1514
|
-
"document": "
|
1514
|
+
"document": "后端服务的实例名称",
|
1515
1515
|
"example": "testName",
|
1516
1516
|
"member": "string",
|
1517
1517
|
"name": "InstanceName",
|
1518
1518
|
"output_required": true,
|
1519
1519
|
"type": "string",
|
1520
|
-
"value_allowed_null":
|
1520
|
+
"value_allowed_null": false
|
1521
1521
|
},
|
1522
1522
|
{
|
1523
1523
|
"disabled": false,
|
1524
|
-
"document": "
|
1524
|
+
"document": "后端服务被绑定的时间",
|
1525
1525
|
"example": "2021-03-16T00:00:00+08:00",
|
1526
1526
|
"member": "datetime_iso",
|
1527
1527
|
"name": "RegisteredTime",
|
1528
1528
|
"output_required": true,
|
1529
1529
|
"type": "string",
|
1530
|
-
"value_allowed_null":
|
1530
|
+
"value_allowed_null": false
|
1531
1531
|
},
|
1532
1532
|
{
|
1533
1533
|
"disabled": false,
|
1534
|
-
"document": "弹性网卡唯一ID
|
1534
|
+
"document": "弹性网卡唯一ID",
|
1535
1535
|
"example": "eni-jf7u****",
|
1536
1536
|
"member": "string",
|
1537
1537
|
"name": "EniId",
|
1538
1538
|
"output_required": true,
|
1539
1539
|
"type": "string",
|
1540
|
-
"value_allowed_null":
|
1540
|
+
"value_allowed_null": false
|
1541
1541
|
},
|
1542
1542
|
{
|
1543
1543
|
"disabled": false,
|
1544
|
-
"document": "后端服务的可用区ID
|
1544
|
+
"document": "后端服务的可用区ID",
|
1545
1545
|
"example": "400001",
|
1546
1546
|
"member": "uint64",
|
1547
1547
|
"name": "ZoneId",
|
1548
1548
|
"output_required": true,
|
1549
1549
|
"type": "int",
|
1550
|
-
"value_allowed_null":
|
1550
|
+
"value_allowed_null": false
|
1551
1551
|
}
|
1552
1552
|
],
|
1553
1553
|
"usage": "out"
|
tccli/services/hai/hai_client.py
CHANGED
@@ -693,6 +693,58 @@ def doTerminateInstances(args, parsed_globals):
|
|
693
693
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
694
694
|
|
695
695
|
|
696
|
+
def doCreateApplication(args, parsed_globals):
|
697
|
+
g_param = parse_global_arg(parsed_globals)
|
698
|
+
|
699
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
700
|
+
cred = credential.CVMRoleCredential()
|
701
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
702
|
+
cred = credential.STSAssumeRoleCredential(
|
703
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
704
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
705
|
+
)
|
706
|
+
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):
|
707
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
708
|
+
else:
|
709
|
+
cred = credential.Credential(
|
710
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
711
|
+
)
|
712
|
+
http_profile = HttpProfile(
|
713
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
714
|
+
reqMethod="POST",
|
715
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
716
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
717
|
+
)
|
718
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
719
|
+
if g_param[OptionsDefine.Language]:
|
720
|
+
profile.language = g_param[OptionsDefine.Language]
|
721
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
722
|
+
client = mod.HaiClient(cred, g_param[OptionsDefine.Region], profile)
|
723
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
724
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
725
|
+
model = models.CreateApplicationRequest()
|
726
|
+
model.from_json_string(json.dumps(args))
|
727
|
+
start_time = time.time()
|
728
|
+
while True:
|
729
|
+
rsp = client.CreateApplication(model)
|
730
|
+
result = rsp.to_json_string()
|
731
|
+
try:
|
732
|
+
json_obj = json.loads(result)
|
733
|
+
except TypeError as e:
|
734
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
735
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
736
|
+
break
|
737
|
+
cur_time = time.time()
|
738
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
739
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
740
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
741
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
742
|
+
else:
|
743
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
744
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
745
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
746
|
+
|
747
|
+
|
696
748
|
CLIENT_MAP = {
|
697
749
|
"v20230812": hai_client_v20230812,
|
698
750
|
|
@@ -717,6 +769,7 @@ ACTION_MAP = {
|
|
717
769
|
"DescribeServiceLoginSettings": doDescribeServiceLoginSettings,
|
718
770
|
"InquirePriceRunInstances": doInquirePriceRunInstances,
|
719
771
|
"TerminateInstances": doTerminateInstances,
|
772
|
+
"CreateApplication": doCreateApplication,
|
720
773
|
|
721
774
|
}
|
722
775
|
|