tccli 3.0.1348.1__py2.py3-none-any.whl → 3.0.1350.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/__init__.py +0 -76
- tccli/services/ai3d/v20250513/api.json +1 -1
- tccli/services/aiart/v20221229/api.json +2 -2
- tccli/services/autoscaling/v20180419/api.json +11 -0
- tccli/services/batch/v20170312/api.json +44 -0
- tccli/services/cdb/v20170320/api.json +8 -8
- tccli/services/cdb/v20170320/examples.json +1 -1
- tccli/services/cdn/v20180606/api.json +5 -5
- tccli/services/cdwch/v20200915/api.json +11 -1
- tccli/services/cdwdoris/v20211228/api.json +145 -7
- tccli/services/cfg/v20210820/api.json +20 -0
- tccli/services/cfs/v20190719/api.json +10 -10
- tccli/services/cfw/cfw_client.py +53 -0
- tccli/services/cfw/v20190904/api.json +272 -0
- tccli/services/cfw/v20190904/examples.json +8 -0
- tccli/services/ckafka/ckafka_client.py +0 -53
- tccli/services/ckafka/v20190819/api.json +0 -215
- tccli/services/ckafka/v20190819/examples.json +0 -8
- tccli/services/csip/csip_client.py +833 -144
- tccli/services/csip/v20221121/api.json +3304 -1436
- tccli/services/csip/v20221121/examples.json +105 -7
- tccli/services/ctem/v20231128/api.json +20 -0
- tccli/services/cvm/v20170312/api.json +3 -3
- tccli/services/cwp/v20180228/api.json +9 -0
- tccli/services/cwp/v20180228/examples.json +6 -0
- tccli/services/dts/v20211206/api.json +21 -1
- tccli/services/emr/v20190103/api.json +219 -4
- tccli/services/es/v20250101/api.json +22 -0
- tccli/services/ess/v20201111/api.json +10 -1
- tccli/services/essbasic/v20210526/api.json +3 -3
- tccli/services/faceid/v20180301/api.json +3 -3
- tccli/services/gs/v20191118/api.json +38 -0
- tccli/services/igtm/igtm_client.py +159 -0
- tccli/services/igtm/v20231024/api.json +577 -0
- tccli/services/igtm/v20231024/examples.json +24 -0
- tccli/services/iotexplorer/v20190423/api.json +3 -3
- tccli/services/lcic/lcic_client.py +53 -0
- tccli/services/lcic/v20220817/api.json +53 -0
- tccli/services/lcic/v20220817/examples.json +8 -0
- tccli/services/live/live_client.py +224 -65
- tccli/services/live/v20180801/api.json +275 -1
- tccli/services/live/v20180801/examples.json +25 -1
- tccli/services/lke/v20231130/api.json +248 -2
- tccli/services/lke/v20231130/examples.json +1 -1
- tccli/services/lkeap/v20240522/api.json +1 -1
- tccli/services/mrs/v20200910/api.json +10 -0
- tccli/services/nlp/nlp_client.py +4 -322
- tccli/services/nlp/v20190408/api.json +0 -459
- tccli/services/nlp/v20190408/examples.json +0 -48
- tccli/services/ocr/v20181119/api.json +60 -5
- tccli/services/omics/v20221128/api.json +41 -3
- tccli/services/redis/v20180412/api.json +6 -6
- tccli/services/redis/v20180412/examples.json +1 -1
- tccli/services/ses/v20201002/api.json +100 -5
- tccli/services/tcb/v20180608/api.json +1 -1
- tccli/services/tcb/v20180608/examples.json +1 -1
- tccli/services/tdmq/v20200217/api.json +19 -0
- tccli/services/teo/teo_client.py +281 -16
- tccli/services/teo/v20220901/api.json +611 -6
- tccli/services/teo/v20220901/examples.json +48 -2
- tccli/services/tione/v20211111/api.json +16 -0
- tccli/services/tke/tke_client.py +57 -4
- tccli/services/tke/v20180525/api.json +24 -24
- tccli/services/tke/v20220501/api.json +52 -0
- tccli/services/tke/v20220501/examples.json +8 -0
- tccli/services/tmt/v20180321/api.json +4 -4
- tccli/services/tsf/v20180326/api.json +4 -4
- tccli/services/vclm/v20240523/api.json +2 -2
- tccli/services/vod/v20180717/api.json +5 -5
- tccli/services/vod/v20180717/examples.json +9 -9
- tccli/services/vpc/v20170312/api.json +1 -1
- tccli/services/vrs/v20200824/api.json +1 -1
- {tccli-3.0.1348.1.dist-info → tccli-3.0.1350.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1348.1.dist-info → tccli-3.0.1350.1.dist-info}/RECORD +78 -180
- tccli/services/cis/__init__.py +0 -4
- tccli/services/cis/cis_client.py +0 -525
- tccli/services/cis/v20180408/api.json +0 -737
- tccli/services/cis/v20180408/examples.json +0 -93
- tccli/services/dataintegration/__init__.py +0 -4
- tccli/services/dataintegration/dataintegration_client.py +0 -207
- tccli/services/dataintegration/v20220613/api.json +0 -87
- tccli/services/dataintegration/v20220613/examples.json +0 -13
- tccli/services/dtf/__init__.py +0 -4
- tccli/services/dtf/dtf_client.py +0 -207
- tccli/services/dtf/v20200506/api.json +0 -274
- tccli/services/dtf/v20200506/examples.json +0 -13
- tccli/services/gpm/__init__.py +0 -4
- tccli/services/gpm/gpm_client.py +0 -1108
- tccli/services/gpm/v20200820/api.json +0 -1959
- tccli/services/gpm/v20200820/examples.json +0 -149
- tccli/services/gse/__init__.py +0 -4
- tccli/services/gse/gse_client.py +0 -4076
- tccli/services/gse/v20191112/api.json +0 -7095
- tccli/services/gse/v20191112/examples.json +0 -615
- tccli/services/iecp/__init__.py +0 -4
- tccli/services/iecp/iecp_client.py +0 -4500
- tccli/services/iecp/v20210914/api.json +0 -9770
- tccli/services/iecp/v20210914/examples.json +0 -691
- tccli/services/iir/__init__.py +0 -4
- tccli/services/iir/iir_client.py +0 -207
- tccli/services/iir/v20200417/api.json +0 -204
- tccli/services/iir/v20200417/examples.json +0 -13
- tccli/services/iottid/__init__.py +0 -4
- tccli/services/iottid/iottid_client.py +0 -631
- tccli/services/iottid/v20190411/api.json +0 -553
- tccli/services/iottid/v20190411/examples.json +0 -95
- tccli/services/mgobe/__init__.py +0 -4
- tccli/services/mgobe/mgobe_client.py +0 -530
- tccli/services/mgobe/v20190929/api.json +0 -52
- tccli/services/mgobe/v20190929/examples.json +0 -13
- tccli/services/mgobe/v20201014/api.json +0 -671
- tccli/services/mgobe/v20201014/examples.json +0 -61
- tccli/services/mvj/__init__.py +0 -4
- tccli/services/mvj/mvj_client.py +0 -207
- tccli/services/mvj/v20190926/api.json +0 -123
- tccli/services/mvj/v20190926/examples.json +0 -19
- tccli/services/pds/__init__.py +0 -4
- tccli/services/pds/pds_client.py +0 -260
- tccli/services/pds/v20210701/api.json +0 -193
- tccli/services/pds/v20210701/examples.json +0 -21
- tccli/services/smpn/__init__.py +0 -4
- tccli/services/smpn/smpn_client.py +0 -260
- tccli/services/smpn/v20190822/api.json +0 -191
- tccli/services/smpn/v20190822/examples.json +0 -21
- tccli/services/solar/__init__.py +0 -4
- tccli/services/solar/solar_client.py +0 -1055
- tccli/services/solar/v20181011/api.json +0 -1760
- tccli/services/solar/v20181011/examples.json +0 -125
- tccli/services/tan/__init__.py +0 -4
- tccli/services/tan/tan_client.py +0 -207
- tccli/services/tan/v20220420/api.json +0 -65
- tccli/services/tan/v20220420/examples.json +0 -19
- tccli/services/tav/__init__.py +0 -4
- tccli/services/tav/tav_client.py +0 -366
- tccli/services/tav/v20190118/api.json +0 -262
- tccli/services/tav/v20190118/examples.json +0 -37
- tccli/services/tbm/__init__.py +0 -4
- tccli/services/tbm/tbm_client.py +0 -631
- tccli/services/tbm/v20180129/api.json +0 -1037
- tccli/services/tbm/v20180129/examples.json +0 -77
- tccli/services/tcex/__init__.py +0 -4
- tccli/services/tcex/tcex_client.py +0 -260
- tccli/services/tcex/v20200727/api.json +0 -158
- tccli/services/tcex/v20200727/examples.json +0 -21
- tccli/services/tci/__init__.py +0 -4
- tccli/services/tci/tci_client.py +0 -2327
- tccli/services/tci/v20190318/api.json +0 -4958
- tccli/services/tci/v20190318/examples.json +0 -333
- tccli/services/tic/__init__.py +0 -4
- tccli/services/tic/tic_client.py +0 -843
- tccli/services/tic/v20201117/api.json +0 -1067
- tccli/services/tic/v20201117/examples.json +0 -121
- tccli/services/ticm/__init__.py +0 -4
- tccli/services/ticm/ticm_client.py +0 -313
- tccli/services/ticm/v20181127/api.json +0 -1391
- tccli/services/ticm/v20181127/examples.json +0 -53
- tccli/services/tics/__init__.py +0 -4
- tccli/services/tics/tics_client.py +0 -366
- tccli/services/tics/v20181115/api.json +0 -694
- tccli/services/tics/v20181115/examples.json +0 -37
- tccli/services/tiems/__init__.py +0 -4
- tccli/services/tiems/tiems_client.py +0 -1479
- tccli/services/tiems/v20190416/api.json +0 -3144
- tccli/services/tiems/v20190416/examples.json +0 -217
- tccli/services/trdp/__init__.py +0 -4
- tccli/services/trdp/trdp_client.py +0 -207
- tccli/services/trdp/v20220726/api.json +0 -843
- tccli/services/trdp/v20220726/examples.json +0 -13
- tccli/services/ump/__init__.py +0 -4
- tccli/services/ump/ump_client.py +0 -1055
- tccli/services/ump/v20200918/api.json +0 -2168
- tccli/services/ump/v20200918/examples.json +0 -141
- tccli/services/youmall/__init__.py +0 -4
- tccli/services/youmall/v20180228/api.json +0 -3572
- tccli/services/youmall/v20180228/examples.json +0 -313
- tccli/services/youmall/youmall_client.py +0 -1797
- {tccli-3.0.1348.1.dist-info → tccli-3.0.1350.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1348.1.dist-info → tccli-3.0.1350.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1348.1.dist-info → tccli-3.0.1350.1.dist-info}/license_files/LICENSE +0 -0
@@ -6010,7 +6010,7 @@
|
|
6010
6010
|
"type": "object"
|
6011
6011
|
},
|
6012
6012
|
"CommonApproverOption": {
|
6013
|
-
"document": "
|
6013
|
+
"document": "签署人配置信息。\n此参数对子客和自动签无效,不允许进行修改。",
|
6014
6014
|
"members": [
|
6015
6015
|
{
|
6016
6016
|
"disabled": false,
|
@@ -7698,7 +7698,7 @@
|
|
7698
7698
|
},
|
7699
7699
|
{
|
7700
7700
|
"disabled": false,
|
7701
|
-
"document": "是否可以编辑签署人包括新增,修改,删除 \n<ul><li>(默认) false -可以编辑签署人</li> <li> true - 禁止编辑签署人</li></ul>\n\n
|
7701
|
+
"document": "是否可以编辑签署人包括新增,修改,删除 \n<ul><li>(默认) false -可以编辑签署人</li> <li> true - 禁止编辑签署人</li></ul>\n\n\n\n注意:\n* 如果设置参数为 true, 则 参数签署人 [FlowApproverList](https://qian.tencent.com/developers/partnerApis/embedPages/ChannelCreatePrepareFlow) 不能为空\n* 此参数对子客和自动签无效,不允许进行修改。",
|
7702
7702
|
"example": "false",
|
7703
7703
|
"member": "bool",
|
7704
7704
|
"name": "ForbidEditApprover",
|
@@ -10472,7 +10472,7 @@
|
|
10472
10472
|
},
|
10473
10473
|
{
|
10474
10474
|
"disabled": false,
|
10475
|
-
"document": "使用PDF文件直接发起合同时,签署人指定的签署控件;<br/>使用模板发起合同时,指定本企业印章签署控件的印章ID
|
10475
|
+
"document": "使用PDF文件直接发起合同时,签署人指定的签署控件;<br/>使用模板发起合同时,指定本企业印章签署控件的印章ID:注意:(如果模板里面指定了印章,默认使用模板里面配置的印章,不能进行变更) <br/>通过ComponentId或ComponenetName指定签署控件,ComponentValue为印章ID。\n\n",
|
10476
10476
|
"example": "无",
|
10477
10477
|
"member": "Component",
|
10478
10478
|
"name": "SignComponents",
|
@@ -1107,7 +1107,7 @@
|
|
1107
1107
|
"members": [
|
1108
1108
|
{
|
1109
1109
|
"disabled": false,
|
1110
|
-
"document": "
|
1110
|
+
"document": "传入需要检测的人脸图片或人脸视频(当前仅支持单人脸检测),使用base64编码的形式,如您的场景视频和图片都有,我们更建议您使用视频进行检测,为了提供更好的检测效果,请您注意以下输入数据的限制与建议:\n\n- 图片的Base64值:\n建议整体图像480x640的分辨率,脸部大小在 100X100 以上,由手机前置摄像头拍摄。\nBase64编码后的图片数据大小建议不超过3M、最大不可超过10M,仅支持jpg、png格式。\n请使用标准的Base64编码方式(带=补位),编码规范参考RFC4648。\n\n- 视频的Base64值:\nBase64编码后的大小建议在8M以内、最大不可超过10M,支持mp4、avi、flv格式,由手机前置摄像头拍摄。\n视频建议时长为2~5s,最大不可超过20s。\n视频分辨率建议为480x640(最大支持720p),帧率在25fps~30fps之间。\n请使用标准的Base64编码方式(带=补位),编码规范参考RFC4648。\n\n示例值:/9j/4AAQSkZJRg.....s97n//2Q==",
|
1111
1111
|
"example": "/9j/4AAQSkZJRg.....s97n//2Q==",
|
1112
1112
|
"member": "string",
|
1113
1113
|
"name": "FaceInput",
|
@@ -1149,7 +1149,7 @@
|
|
1149
1149
|
"members": [
|
1150
1150
|
{
|
1151
1151
|
"disabled": false,
|
1152
|
-
"document": "
|
1152
|
+
"document": "对于输入图片/视频的检测结果,检测是否存在人脸攻击。\n- Low:低攻击风险。\n- Mid:中度疑似攻击。\n- High:高度疑似攻击。\n\n建议返回值为High时判断为拦截,Mid和Low判断为通过,以更好平衡安全性和通过率。",
|
1153
1153
|
"example": "Mid",
|
1154
1154
|
"member": "string",
|
1155
1155
|
"name": "AttackRiskLevel",
|
@@ -1159,7 +1159,7 @@
|
|
1159
1159
|
},
|
1160
1160
|
{
|
1161
1161
|
"disabled": false,
|
1162
|
-
"document": "
|
1162
|
+
"document": "检测到的疑似攻击痕迹列表,仅当AttackRiskLevel为High或Mid时返回。\n- 说明:未检测到攻击痕迹时,返回空数组。\n- 此出参仅作为结果判断的参考,实际应用仍建议使用AttackRiskLevel的结果。",
|
1163
1163
|
"example": "[{ Type:\"SuspectedSpoofingAttack\" }]",
|
1164
1164
|
"member": "AttackRiskDetail",
|
1165
1165
|
"name": "AttackRiskDetailList",
|
@@ -1139,6 +1139,16 @@
|
|
1139
1139
|
"type": "string",
|
1140
1140
|
"value_allowed_null": false
|
1141
1141
|
},
|
1142
|
+
{
|
1143
|
+
"disabled": false,
|
1144
|
+
"document": "镜像描述",
|
1145
|
+
"example": "test-image",
|
1146
|
+
"member": "string",
|
1147
|
+
"name": "AndroidInstanceImageDescription",
|
1148
|
+
"output_required": false,
|
1149
|
+
"type": "string",
|
1150
|
+
"value_allowed_null": false
|
1151
|
+
},
|
1142
1152
|
{
|
1143
1153
|
"disabled": false,
|
1144
1154
|
"document": "安卓10",
|
@@ -1148,6 +1158,16 @@
|
|
1148
1158
|
"output_required": false,
|
1149
1159
|
"type": "string",
|
1150
1160
|
"value_allowed_null": false
|
1161
|
+
},
|
1162
|
+
{
|
1163
|
+
"disabled": false,
|
1164
|
+
"document": "创建时间",
|
1165
|
+
"example": "2021-07-02T10:15:36Z",
|
1166
|
+
"member": "string",
|
1167
|
+
"name": "CreateTime",
|
1168
|
+
"output_required": false,
|
1169
|
+
"type": "string",
|
1170
|
+
"value_allowed_null": false
|
1151
1171
|
}
|
1152
1172
|
],
|
1153
1173
|
"usage": "out"
|
@@ -1920,6 +1940,15 @@
|
|
1920
1940
|
"name": "AndroidInstanceId",
|
1921
1941
|
"required": true,
|
1922
1942
|
"type": "string"
|
1943
|
+
},
|
1944
|
+
{
|
1945
|
+
"disabled": false,
|
1946
|
+
"document": "安卓实例镜像描述",
|
1947
|
+
"example": "test-image",
|
1948
|
+
"member": "string",
|
1949
|
+
"name": "AndroidInstanceImageDescription",
|
1950
|
+
"required": false,
|
1951
|
+
"type": "string"
|
1923
1952
|
}
|
1924
1953
|
],
|
1925
1954
|
"type": "object"
|
@@ -2993,6 +3022,15 @@
|
|
2993
3022
|
"name": "Limit",
|
2994
3023
|
"required": false,
|
2995
3024
|
"type": "int"
|
3025
|
+
},
|
3026
|
+
{
|
3027
|
+
"disabled": false,
|
3028
|
+
"document": "字段过滤器。Filter 的 Name 有以下值:\nImageName:镜像名称\nImageState:镜像状态\nAndroidVersion:安卓版本",
|
3029
|
+
"example": "无",
|
3030
|
+
"member": "Filter",
|
3031
|
+
"name": "Filters",
|
3032
|
+
"required": false,
|
3033
|
+
"type": "list"
|
2996
3034
|
}
|
2997
3035
|
],
|
2998
3036
|
"type": "object"
|
@@ -173,6 +173,58 @@ def doModifyInstanceConfig(args, parsed_globals):
|
|
173
173
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
174
174
|
|
175
175
|
|
176
|
+
def doDescribeDetectPackageDetail(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.IgtmClient(cred, g_param[OptionsDefine.Region], profile)
|
203
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
204
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
205
|
+
model = models.DescribeDetectPackageDetailRequest()
|
206
|
+
model.from_json_string(json.dumps(args))
|
207
|
+
start_time = time.time()
|
208
|
+
while True:
|
209
|
+
rsp = client.DescribeDetectPackageDetail(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 doCreateAddressPool(args, parsed_globals):
|
177
229
|
g_param = parse_global_arg(parsed_globals)
|
178
230
|
|
@@ -901,6 +953,58 @@ def doDescribeMonitorDetail(args, parsed_globals):
|
|
901
953
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
902
954
|
|
903
955
|
|
956
|
+
def doDescribeDetectTaskPackageList(args, parsed_globals):
|
957
|
+
g_param = parse_global_arg(parsed_globals)
|
958
|
+
|
959
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
960
|
+
cred = credential.CVMRoleCredential()
|
961
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
962
|
+
cred = credential.STSAssumeRoleCredential(
|
963
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
964
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
965
|
+
)
|
966
|
+
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):
|
967
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
968
|
+
else:
|
969
|
+
cred = credential.Credential(
|
970
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
971
|
+
)
|
972
|
+
http_profile = HttpProfile(
|
973
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
974
|
+
reqMethod="POST",
|
975
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
976
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
977
|
+
)
|
978
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
979
|
+
if g_param[OptionsDefine.Language]:
|
980
|
+
profile.language = g_param[OptionsDefine.Language]
|
981
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
982
|
+
client = mod.IgtmClient(cred, g_param[OptionsDefine.Region], profile)
|
983
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
984
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
985
|
+
model = models.DescribeDetectTaskPackageListRequest()
|
986
|
+
model.from_json_string(json.dumps(args))
|
987
|
+
start_time = time.time()
|
988
|
+
while True:
|
989
|
+
rsp = client.DescribeDetectTaskPackageList(model)
|
990
|
+
result = rsp.to_json_string()
|
991
|
+
try:
|
992
|
+
json_obj = json.loads(result)
|
993
|
+
except TypeError as e:
|
994
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
995
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
996
|
+
break
|
997
|
+
cur_time = time.time()
|
998
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
999
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1000
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1001
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1002
|
+
else:
|
1003
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1004
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1005
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1006
|
+
|
1007
|
+
|
904
1008
|
def doDescribeStrategyList(args, parsed_globals):
|
905
1009
|
g_param = parse_global_arg(parsed_globals)
|
906
1010
|
|
@@ -1213,6 +1317,58 @@ def doDescribeStrategyDetail(args, parsed_globals):
|
|
1213
1317
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1214
1318
|
|
1215
1319
|
|
1320
|
+
def doDescribeInstancePackageList(args, parsed_globals):
|
1321
|
+
g_param = parse_global_arg(parsed_globals)
|
1322
|
+
|
1323
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1324
|
+
cred = credential.CVMRoleCredential()
|
1325
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1326
|
+
cred = credential.STSAssumeRoleCredential(
|
1327
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1328
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1329
|
+
)
|
1330
|
+
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):
|
1331
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1332
|
+
else:
|
1333
|
+
cred = credential.Credential(
|
1334
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1335
|
+
)
|
1336
|
+
http_profile = HttpProfile(
|
1337
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1338
|
+
reqMethod="POST",
|
1339
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1340
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1341
|
+
)
|
1342
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1343
|
+
if g_param[OptionsDefine.Language]:
|
1344
|
+
profile.language = g_param[OptionsDefine.Language]
|
1345
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1346
|
+
client = mod.IgtmClient(cred, g_param[OptionsDefine.Region], profile)
|
1347
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1348
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1349
|
+
model = models.DescribeInstancePackageListRequest()
|
1350
|
+
model.from_json_string(json.dumps(args))
|
1351
|
+
start_time = time.time()
|
1352
|
+
while True:
|
1353
|
+
rsp = client.DescribeInstancePackageList(model)
|
1354
|
+
result = rsp.to_json_string()
|
1355
|
+
try:
|
1356
|
+
json_obj = json.loads(result)
|
1357
|
+
except TypeError as e:
|
1358
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1359
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1360
|
+
break
|
1361
|
+
cur_time = time.time()
|
1362
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1363
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1364
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1365
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1366
|
+
else:
|
1367
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1368
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1369
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1370
|
+
|
1371
|
+
|
1216
1372
|
CLIENT_MAP = {
|
1217
1373
|
"v20231024": igtm_client_v20231024,
|
1218
1374
|
|
@@ -1227,6 +1383,7 @@ ACTION_MAP = {
|
|
1227
1383
|
"DescribeAddressPoolList": doDescribeAddressPoolList,
|
1228
1384
|
"ModifyAddressPool": doModifyAddressPool,
|
1229
1385
|
"ModifyInstanceConfig": doModifyInstanceConfig,
|
1386
|
+
"DescribeDetectPackageDetail": doDescribeDetectPackageDetail,
|
1230
1387
|
"CreateAddressPool": doCreateAddressPool,
|
1231
1388
|
"DescribeInstanceDetail": doDescribeInstanceDetail,
|
1232
1389
|
"DescribeAddressLocation": doDescribeAddressLocation,
|
@@ -1241,12 +1398,14 @@ ACTION_MAP = {
|
|
1241
1398
|
"CreateInstance": doCreateInstance,
|
1242
1399
|
"DescribeInstanceList": doDescribeInstanceList,
|
1243
1400
|
"DescribeMonitorDetail": doDescribeMonitorDetail,
|
1401
|
+
"DescribeDetectTaskPackageList": doDescribeDetectTaskPackageList,
|
1244
1402
|
"DescribeStrategyList": doDescribeStrategyList,
|
1245
1403
|
"DescribeQuotas": doDescribeQuotas,
|
1246
1404
|
"DescribeAddressPoolDetail": doDescribeAddressPoolDetail,
|
1247
1405
|
"ModifyStrategy": doModifyStrategy,
|
1248
1406
|
"DeleteAddressPool": doDeleteAddressPool,
|
1249
1407
|
"DescribeStrategyDetail": doDescribeStrategyDetail,
|
1408
|
+
"DescribeInstancePackageList": doDescribeInstancePackageList,
|
1250
1409
|
|
1251
1410
|
}
|
1252
1411
|
|