tccli 3.0.1296.2__py2.py3-none-any.whl → 3.0.1297.2__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/antiddos/v20200309/api.json +2 -2
- tccli/services/batch/v20170312/api.json +9 -8
- tccli/services/ccc/ccc_client.py +230 -18
- tccli/services/ccc/v20200210/api.json +363 -0
- tccli/services/ccc/v20200210/examples.json +32 -0
- tccli/services/cme/v20191029/examples.json +2 -2
- tccli/services/cynosdb/v20190107/api.json +97 -77
- tccli/services/dnspod/v20210323/api.json +105 -88
- tccli/services/dnspod/v20210323/examples.json +1 -1
- tccli/services/dts/v20211206/api.json +2 -2
- tccli/services/gs/gs_client.py +53 -0
- tccli/services/gs/v20191118/api.json +44 -0
- tccli/services/gs/v20191118/examples.json +8 -0
- tccli/services/iotcloud/v20210408/api.json +11 -15
- tccli/services/iss/iss_client.py +411 -305
- tccli/services/iss/v20230517/api.json +236 -0
- tccli/services/iss/v20230517/examples.json +16 -0
- tccli/services/lighthouse/v20200324/api.json +3 -3
- tccli/services/lke/v20231130/api.json +34 -1
- tccli/services/rce/v20201103/api.json +0 -9
- tccli/services/rce/v20201103/examples.json +1 -1
- tccli/services/tdmq/v20200217/api.json +6 -6
- tccli/services/tione/tione_client.py +220 -8
- tccli/services/tione/v20211111/api.json +359 -0
- tccli/services/tione/v20211111/examples.json +32 -0
- tccli/services/trtc/v20190722/api.json +10 -1
- tccli/services/vod/v20180717/api.json +4 -4
- tccli/services/vod/v20180717/examples.json +4 -4
- {tccli-3.0.1296.2.dist-info → tccli-3.0.1297.2.dist-info}/METADATA +2 -2
- {tccli-3.0.1296.2.dist-info → tccli-3.0.1297.2.dist-info}/RECORD +34 -34
- {tccli-3.0.1296.2.dist-info → tccli-3.0.1297.2.dist-info}/WHEEL +0 -0
- {tccli-3.0.1296.2.dist-info → tccli-3.0.1297.2.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1296.2.dist-info → tccli-3.0.1297.2.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '3.0.
|
1
|
+
__version__ = '3.0.1297.2'
|
@@ -1574,14 +1574,14 @@
|
|
1574
1574
|
},
|
1575
1575
|
{
|
1576
1576
|
"disabled": false,
|
1577
|
-
"document": "
|
1577
|
+
"document": "接入端口值",
|
1578
1578
|
"example": "80",
|
1579
1579
|
"member": "uint64",
|
1580
1580
|
"name": "VirtualPort",
|
1581
1581
|
"output_required": true,
|
1582
1582
|
"required": false,
|
1583
1583
|
"type": "int",
|
1584
|
-
"value_allowed_null":
|
1584
|
+
"value_allowed_null": false
|
1585
1585
|
},
|
1586
1586
|
{
|
1587
1587
|
"disabled": false,
|
@@ -4836,25 +4836,25 @@
|
|
4836
4836
|
"members": [
|
4837
4837
|
{
|
4838
4838
|
"disabled": false,
|
4839
|
-
"document": "CMQ
|
4839
|
+
"document": "CMQ主题名字,要求主题名有效且关联订阅",
|
4840
4840
|
"example": "demo",
|
4841
4841
|
"member": "string",
|
4842
4842
|
"name": "TopicName",
|
4843
4843
|
"output_required": true,
|
4844
4844
|
"required": true,
|
4845
4845
|
"type": "string",
|
4846
|
-
"value_allowed_null":
|
4846
|
+
"value_allowed_null": false
|
4847
4847
|
},
|
4848
4848
|
{
|
4849
4849
|
"disabled": false,
|
4850
|
-
"document": "
|
4850
|
+
"document": "事件配置",
|
4851
4851
|
"example": "无",
|
4852
4852
|
"member": "EventConfig",
|
4853
4853
|
"name": "EventConfigs",
|
4854
4854
|
"output_required": true,
|
4855
4855
|
"required": true,
|
4856
4856
|
"type": "list",
|
4857
|
-
"value_allowed_null":
|
4857
|
+
"value_allowed_null": false
|
4858
4858
|
}
|
4859
4859
|
],
|
4860
4860
|
"usage": "both"
|
@@ -4962,14 +4962,14 @@
|
|
4962
4962
|
},
|
4963
4963
|
{
|
4964
4964
|
"disabled": false,
|
4965
|
-
"document": "
|
4965
|
+
"document": "输出映射选项",
|
4966
4966
|
"example": "无",
|
4967
4967
|
"member": "OutputMappingOption",
|
4968
4968
|
"name": "OutputMappingOption",
|
4969
4969
|
"output_required": true,
|
4970
4970
|
"required": false,
|
4971
4971
|
"type": "object",
|
4972
|
-
"value_allowed_null":
|
4972
|
+
"value_allowed_null": false
|
4973
4973
|
}
|
4974
4974
|
],
|
4975
4975
|
"usage": "both"
|
@@ -5018,13 +5018,14 @@
|
|
5018
5018
|
"members": [
|
5019
5019
|
{
|
5020
5020
|
"disabled": false,
|
5021
|
-
"document": "容器场景下,输出选项从实例映射到容器内的实例侧的工作空间。\nBATCH_WORKSPACE: 工作空间为BATCH在实例内定义的工作空间,BATCH侧保证作业之间的隔离。(默认)\nGLOBAL_WORKSPACE:
|
5021
|
+
"document": "容器场景下,输出选项从实例映射到容器内的实例侧的工作空间。\nBATCH_WORKSPACE: 工作空间为BATCH在实例内定义的工作空间,BATCH侧保证作业之间的隔离。(默认)\nGLOBAL_WORKSPACE: 工作空间为实例操作系统空间。",
|
5022
5022
|
"example": "BATCH_WORKSPACE",
|
5023
5023
|
"member": "string",
|
5024
5024
|
"name": "Workspace",
|
5025
|
+
"output_required": true,
|
5025
5026
|
"required": false,
|
5026
5027
|
"type": "string",
|
5027
|
-
"value_allowed_null":
|
5028
|
+
"value_allowed_null": false
|
5028
5029
|
}
|
5029
5030
|
],
|
5030
5031
|
"usage": "both"
|
tccli/services/ccc/ccc_client.py
CHANGED
@@ -17,7 +17,7 @@ from tencentcloud.ccc.v20200210 import models as models_v20200210
|
|
17
17
|
from jmespath import search
|
18
18
|
import time
|
19
19
|
|
20
|
-
def
|
20
|
+
def doModifyCompanyApply(args, parsed_globals):
|
21
21
|
g_param = parse_global_arg(parsed_globals)
|
22
22
|
|
23
23
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -46,11 +46,11 @@ def doModifyStaff(args, parsed_globals):
|
|
46
46
|
client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
|
47
47
|
client._sdkVersion += ("_CLI_" + __version__)
|
48
48
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
49
|
-
model = models.
|
49
|
+
model = models.ModifyCompanyApplyRequest()
|
50
50
|
model.from_json_string(json.dumps(args))
|
51
51
|
start_time = time.time()
|
52
52
|
while True:
|
53
|
-
rsp = client.
|
53
|
+
rsp = client.ModifyCompanyApply(model)
|
54
54
|
result = rsp.to_json_string()
|
55
55
|
try:
|
56
56
|
json_obj = json.loads(result)
|
@@ -69,7 +69,7 @@ def doModifyStaff(args, parsed_globals):
|
|
69
69
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
70
70
|
|
71
71
|
|
72
|
-
def
|
72
|
+
def doUnbindNumberCallOutSkillGroup(args, parsed_globals):
|
73
73
|
g_param = parse_global_arg(parsed_globals)
|
74
74
|
|
75
75
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -98,11 +98,63 @@ def doDescribeExtensions(args, parsed_globals):
|
|
98
98
|
client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
|
99
99
|
client._sdkVersion += ("_CLI_" + __version__)
|
100
100
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
101
|
-
model = models.
|
101
|
+
model = models.UnbindNumberCallOutSkillGroupRequest()
|
102
102
|
model.from_json_string(json.dumps(args))
|
103
103
|
start_time = time.time()
|
104
104
|
while True:
|
105
|
-
rsp = client.
|
105
|
+
rsp = client.UnbindNumberCallOutSkillGroup(model)
|
106
|
+
result = rsp.to_json_string()
|
107
|
+
try:
|
108
|
+
json_obj = json.loads(result)
|
109
|
+
except TypeError as e:
|
110
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
111
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
112
|
+
break
|
113
|
+
cur_time = time.time()
|
114
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
115
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
116
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
117
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
118
|
+
else:
|
119
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
120
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
121
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
122
|
+
|
123
|
+
|
124
|
+
def doModifyStaff(args, parsed_globals):
|
125
|
+
g_param = parse_global_arg(parsed_globals)
|
126
|
+
|
127
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
128
|
+
cred = credential.CVMRoleCredential()
|
129
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
130
|
+
cred = credential.STSAssumeRoleCredential(
|
131
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
132
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
133
|
+
)
|
134
|
+
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):
|
135
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
136
|
+
else:
|
137
|
+
cred = credential.Credential(
|
138
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
139
|
+
)
|
140
|
+
http_profile = HttpProfile(
|
141
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
142
|
+
reqMethod="POST",
|
143
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
144
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
145
|
+
)
|
146
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
147
|
+
if g_param[OptionsDefine.Language]:
|
148
|
+
profile.language = g_param[OptionsDefine.Language]
|
149
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
150
|
+
client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
|
151
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
152
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
153
|
+
model = models.ModifyStaffRequest()
|
154
|
+
model.from_json_string(json.dumps(args))
|
155
|
+
start_time = time.time()
|
156
|
+
while True:
|
157
|
+
rsp = client.ModifyStaff(model)
|
106
158
|
result = rsp.to_json_string()
|
107
159
|
try:
|
108
160
|
json_obj = json.loads(result)
|
@@ -173,6 +225,58 @@ def doDescribeAutoCalloutTasks(args, parsed_globals):
|
|
173
225
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
174
226
|
|
175
227
|
|
228
|
+
def doAbortAgentCruiseDialingCampaign(args, parsed_globals):
|
229
|
+
g_param = parse_global_arg(parsed_globals)
|
230
|
+
|
231
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
232
|
+
cred = credential.CVMRoleCredential()
|
233
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
234
|
+
cred = credential.STSAssumeRoleCredential(
|
235
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
236
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
237
|
+
)
|
238
|
+
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):
|
239
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
240
|
+
else:
|
241
|
+
cred = credential.Credential(
|
242
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
243
|
+
)
|
244
|
+
http_profile = HttpProfile(
|
245
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
246
|
+
reqMethod="POST",
|
247
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
248
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
249
|
+
)
|
250
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
251
|
+
if g_param[OptionsDefine.Language]:
|
252
|
+
profile.language = g_param[OptionsDefine.Language]
|
253
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
254
|
+
client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
|
255
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
256
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
257
|
+
model = models.AbortAgentCruiseDialingCampaignRequest()
|
258
|
+
model.from_json_string(json.dumps(args))
|
259
|
+
start_time = time.time()
|
260
|
+
while True:
|
261
|
+
rsp = client.AbortAgentCruiseDialingCampaign(model)
|
262
|
+
result = rsp.to_json_string()
|
263
|
+
try:
|
264
|
+
json_obj = json.loads(result)
|
265
|
+
except TypeError as e:
|
266
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
267
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
268
|
+
break
|
269
|
+
cur_time = time.time()
|
270
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
271
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
272
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
273
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
274
|
+
else:
|
275
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
276
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
277
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
278
|
+
|
279
|
+
|
176
280
|
def doCreateAICall(args, parsed_globals):
|
177
281
|
g_param = parse_global_arg(parsed_globals)
|
178
282
|
|
@@ -225,6 +329,58 @@ def doCreateAICall(args, parsed_globals):
|
|
225
329
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
226
330
|
|
227
331
|
|
332
|
+
def doDescribeAgentCruiseDialingCampaign(args, parsed_globals):
|
333
|
+
g_param = parse_global_arg(parsed_globals)
|
334
|
+
|
335
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
336
|
+
cred = credential.CVMRoleCredential()
|
337
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
338
|
+
cred = credential.STSAssumeRoleCredential(
|
339
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
340
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
341
|
+
)
|
342
|
+
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):
|
343
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
344
|
+
else:
|
345
|
+
cred = credential.Credential(
|
346
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
347
|
+
)
|
348
|
+
http_profile = HttpProfile(
|
349
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
350
|
+
reqMethod="POST",
|
351
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
352
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
353
|
+
)
|
354
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
355
|
+
if g_param[OptionsDefine.Language]:
|
356
|
+
profile.language = g_param[OptionsDefine.Language]
|
357
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
358
|
+
client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
|
359
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
360
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
361
|
+
model = models.DescribeAgentCruiseDialingCampaignRequest()
|
362
|
+
model.from_json_string(json.dumps(args))
|
363
|
+
start_time = time.time()
|
364
|
+
while True:
|
365
|
+
rsp = client.DescribeAgentCruiseDialingCampaign(model)
|
366
|
+
result = rsp.to_json_string()
|
367
|
+
try:
|
368
|
+
json_obj = json.loads(result)
|
369
|
+
except TypeError as e:
|
370
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
371
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
372
|
+
break
|
373
|
+
cur_time = time.time()
|
374
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
375
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
376
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
377
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
378
|
+
else:
|
379
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
380
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
381
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
382
|
+
|
383
|
+
|
228
384
|
def doDescribeTelRecordAsr(args, parsed_globals):
|
229
385
|
g_param = parse_global_arg(parsed_globals)
|
230
386
|
|
@@ -745,7 +901,7 @@ def doDeleteStaff(args, parsed_globals):
|
|
745
901
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
746
902
|
|
747
903
|
|
748
|
-
def
|
904
|
+
def doDescribeExtensions(args, parsed_globals):
|
749
905
|
g_param = parse_global_arg(parsed_globals)
|
750
906
|
|
751
907
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -774,11 +930,11 @@ def doModifyCompanyApply(args, parsed_globals):
|
|
774
930
|
client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
|
775
931
|
client._sdkVersion += ("_CLI_" + __version__)
|
776
932
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
777
|
-
model = models.
|
933
|
+
model = models.DescribeExtensionsRequest()
|
778
934
|
model.from_json_string(json.dumps(args))
|
779
935
|
start_time = time.time()
|
780
936
|
while True:
|
781
|
-
rsp = client.
|
937
|
+
rsp = client.DescribeExtensions(model)
|
782
938
|
result = rsp.to_json_string()
|
783
939
|
try:
|
784
940
|
json_obj = json.loads(result)
|
@@ -1421,7 +1577,7 @@ def doResumePredictiveDialingCampaign(args, parsed_globals):
|
|
1421
1577
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1422
1578
|
|
1423
1579
|
|
1424
|
-
def
|
1580
|
+
def doTransferToManual(args, parsed_globals):
|
1425
1581
|
g_param = parse_global_arg(parsed_globals)
|
1426
1582
|
|
1427
1583
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1450,11 +1606,11 @@ def doDescribeSkillGroupInfoList(args, parsed_globals):
|
|
1450
1606
|
client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
|
1451
1607
|
client._sdkVersion += ("_CLI_" + __version__)
|
1452
1608
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1453
|
-
model = models.
|
1609
|
+
model = models.TransferToManualRequest()
|
1454
1610
|
model.from_json_string(json.dumps(args))
|
1455
1611
|
start_time = time.time()
|
1456
1612
|
while True:
|
1457
|
-
rsp = client.
|
1613
|
+
rsp = client.TransferToManual(model)
|
1458
1614
|
result = rsp.to_json_string()
|
1459
1615
|
try:
|
1460
1616
|
json_obj = json.loads(result)
|
@@ -1473,7 +1629,7 @@ def doDescribeSkillGroupInfoList(args, parsed_globals):
|
|
1473
1629
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1474
1630
|
|
1475
1631
|
|
1476
|
-
def
|
1632
|
+
def doDescribeSkillGroupInfoList(args, parsed_globals):
|
1477
1633
|
g_param = parse_global_arg(parsed_globals)
|
1478
1634
|
|
1479
1635
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1502,11 +1658,11 @@ def doUnbindNumberCallOutSkillGroup(args, parsed_globals):
|
|
1502
1658
|
client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
|
1503
1659
|
client._sdkVersion += ("_CLI_" + __version__)
|
1504
1660
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1505
|
-
model = models.
|
1661
|
+
model = models.DescribeSkillGroupInfoListRequest()
|
1506
1662
|
model.from_json_string(json.dumps(args))
|
1507
1663
|
start_time = time.time()
|
1508
1664
|
while True:
|
1509
|
-
rsp = client.
|
1665
|
+
rsp = client.DescribeSkillGroupInfoList(model)
|
1510
1666
|
result = rsp.to_json_string()
|
1511
1667
|
try:
|
1512
1668
|
json_obj = json.loads(result)
|
@@ -1785,6 +1941,58 @@ def doCreateCarrierPrivilegeNumberApplicant(args, parsed_globals):
|
|
1785
1941
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1786
1942
|
|
1787
1943
|
|
1944
|
+
def doCreateAgentCruiseDialingCampaign(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.CccClient(cred, g_param[OptionsDefine.Region], profile)
|
1971
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1972
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1973
|
+
model = models.CreateAgentCruiseDialingCampaignRequest()
|
1974
|
+
model.from_json_string(json.dumps(args))
|
1975
|
+
start_time = time.time()
|
1976
|
+
while True:
|
1977
|
+
rsp = client.CreateAgentCruiseDialingCampaign(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
|
+
|
1788
1996
|
def doDescribeActiveCarrierPrivilegeNumber(args, parsed_globals):
|
1789
1997
|
g_param = parse_global_arg(parsed_globals)
|
1790
1998
|
|
@@ -3356,10 +3564,13 @@ MODELS_MAP = {
|
|
3356
3564
|
}
|
3357
3565
|
|
3358
3566
|
ACTION_MAP = {
|
3567
|
+
"ModifyCompanyApply": doModifyCompanyApply,
|
3568
|
+
"UnbindNumberCallOutSkillGroup": doUnbindNumberCallOutSkillGroup,
|
3359
3569
|
"ModifyStaff": doModifyStaff,
|
3360
|
-
"DescribeExtensions": doDescribeExtensions,
|
3361
3570
|
"DescribeAutoCalloutTasks": doDescribeAutoCalloutTasks,
|
3571
|
+
"AbortAgentCruiseDialingCampaign": doAbortAgentCruiseDialingCampaign,
|
3362
3572
|
"CreateAICall": doCreateAICall,
|
3573
|
+
"DescribeAgentCruiseDialingCampaign": doDescribeAgentCruiseDialingCampaign,
|
3363
3574
|
"DescribeTelRecordAsr": doDescribeTelRecordAsr,
|
3364
3575
|
"ModifyOwnNumberApply": doModifyOwnNumberApply,
|
3365
3576
|
"DescribePredictiveDialingCampaign": doDescribePredictiveDialingCampaign,
|
@@ -3370,7 +3581,7 @@ ACTION_MAP = {
|
|
3370
3581
|
"DescribeIMCdrs": doDescribeIMCdrs,
|
3371
3582
|
"CreatePredictiveDialingCampaign": doCreatePredictiveDialingCampaign,
|
3372
3583
|
"DeleteStaff": doDeleteStaff,
|
3373
|
-
"
|
3584
|
+
"DescribeExtensions": doDescribeExtensions,
|
3374
3585
|
"CreateExtension": doCreateExtension,
|
3375
3586
|
"ResetExtensionPassword": doResetExtensionPassword,
|
3376
3587
|
"CreateStaff": doCreateStaff,
|
@@ -3383,13 +3594,14 @@ ACTION_MAP = {
|
|
3383
3594
|
"DescribePredictiveDialingSessions": doDescribePredictiveDialingSessions,
|
3384
3595
|
"CreateCompanyApply": doCreateCompanyApply,
|
3385
3596
|
"ResumePredictiveDialingCampaign": doResumePredictiveDialingCampaign,
|
3597
|
+
"TransferToManual": doTransferToManual,
|
3386
3598
|
"DescribeSkillGroupInfoList": doDescribeSkillGroupInfoList,
|
3387
|
-
"UnbindNumberCallOutSkillGroup": doUnbindNumberCallOutSkillGroup,
|
3388
3599
|
"StopAutoCalloutTask": doStopAutoCalloutTask,
|
3389
3600
|
"DescribeIvrAudioList": doDescribeIvrAudioList,
|
3390
3601
|
"BindNumberCallOutSkillGroup": doBindNumberCallOutSkillGroup,
|
3391
3602
|
"UploadIvrAudio": doUploadIvrAudio,
|
3392
3603
|
"CreateCarrierPrivilegeNumberApplicant": doCreateCarrierPrivilegeNumberApplicant,
|
3604
|
+
"CreateAgentCruiseDialingCampaign": doCreateAgentCruiseDialingCampaign,
|
3393
3605
|
"DescribeActiveCarrierPrivilegeNumber": doDescribeActiveCarrierPrivilegeNumber,
|
3394
3606
|
"CreateOwnNumberApply": doCreateOwnNumberApply,
|
3395
3607
|
"DescribeCCCBuyInfoList": doDescribeCCCBuyInfoList,
|