tccli-intl-en 3.0.1244.1__py2.py3-none-any.whl → 3.0.1245.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/intlpartnersmgt/v20220928/api.json +1 -1
- tccli/services/mdp/mdp_client.py +330 -12
- tccli/services/mdp/v20200527/api.json +593 -0
- tccli/services/mdp/v20200527/examples.json +48 -0
- tccli/services/sqlserver/sqlserver_client.py +118 -12
- tccli/services/sqlserver/v20180328/api.json +446 -45
- tccli/services/sqlserver/v20180328/examples.json +23 -7
- {tccli_intl_en-3.0.1244.1.dist-info → tccli_intl_en-3.0.1245.1.dist-info}/METADATA +2 -2
- {tccli_intl_en-3.0.1244.1.dist-info → tccli_intl_en-3.0.1245.1.dist-info}/RECORD +14 -14
- {tccli_intl_en-3.0.1244.1.dist-info → tccli_intl_en-3.0.1245.1.dist-info}/LICENSE +0 -0
- {tccli_intl_en-3.0.1244.1.dist-info → tccli_intl_en-3.0.1245.1.dist-info}/WHEEL +0 -0
- {tccli_intl_en-3.0.1244.1.dist-info → tccli_intl_en-3.0.1245.1.dist-info}/entry_points.txt +0 -0
- {tccli_intl_en-3.0.1244.1.dist-info → tccli_intl_en-3.0.1245.1.dist-info}/top_level.txt +0 -0
tccli/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '3.0.
|
|
1
|
+
__version__ = '3.0.1245.1'
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
"status": "online"
|
|
219
219
|
},
|
|
220
220
|
"QueryInvitationInfo": {
|
|
221
|
-
"document": "Query usage information of invitation link.
|
|
221
|
+
"document": "Query usage information of invitation link. Invitation link is valid for 30 days.And once created, the data will only be retained for 60 days, and the system will automatically delete the invitation link after 60 days.\nInvokable role types: Distributor, Second-level reseller, Reseller.",
|
|
222
222
|
"input": "QueryInvitationInfoRequest",
|
|
223
223
|
"name": "Query invitation link info",
|
|
224
224
|
"output": "QueryInvitationInfoResponse",
|
tccli/services/mdp/mdp_client.py
CHANGED
|
@@ -121,6 +121,58 @@ def doDescribeLinearAssemblyCDNDomainWithChannels(args, parsed_globals):
|
|
|
121
121
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
122
122
|
|
|
123
123
|
|
|
124
|
+
def doCreateStreamPackageVodRemuxTask(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.MdpClient(cred, g_param[OptionsDefine.Region], profile)
|
|
151
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
152
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
153
|
+
model = models.CreateStreamPackageVodRemuxTaskRequest()
|
|
154
|
+
model.from_json_string(json.dumps(args))
|
|
155
|
+
start_time = time.time()
|
|
156
|
+
while True:
|
|
157
|
+
rsp = client.CreateStreamPackageVodRemuxTask(model)
|
|
158
|
+
result = rsp.to_json_string()
|
|
159
|
+
try:
|
|
160
|
+
json_obj = json.loads(result)
|
|
161
|
+
except TypeError as e:
|
|
162
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
163
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
164
|
+
break
|
|
165
|
+
cur_time = time.time()
|
|
166
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
167
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
168
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
169
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
170
|
+
else:
|
|
171
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
172
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
173
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
174
|
+
|
|
175
|
+
|
|
124
176
|
def doCreateStreamPackageSSAIChannel(args, parsed_globals):
|
|
125
177
|
g_param = parse_global_arg(parsed_globals)
|
|
126
178
|
|
|
@@ -277,7 +329,7 @@ def doDeleteStreamPackageHarvestJobs(args, parsed_globals):
|
|
|
277
329
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
278
330
|
|
|
279
331
|
|
|
280
|
-
def
|
|
332
|
+
def doDeleteStreamPackageVodRemuxTask(args, parsed_globals):
|
|
281
333
|
g_param = parse_global_arg(parsed_globals)
|
|
282
334
|
|
|
283
335
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -306,11 +358,11 @@ def doDeleteStreamPackageSource(args, parsed_globals):
|
|
|
306
358
|
client = mod.MdpClient(cred, g_param[OptionsDefine.Region], profile)
|
|
307
359
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
308
360
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
309
|
-
model = models.
|
|
361
|
+
model = models.DeleteStreamPackageVodRemuxTaskRequest()
|
|
310
362
|
model.from_json_string(json.dumps(args))
|
|
311
363
|
start_time = time.time()
|
|
312
364
|
while True:
|
|
313
|
-
rsp = client.
|
|
365
|
+
rsp = client.DeleteStreamPackageVodRemuxTask(model)
|
|
314
366
|
result = rsp.to_json_string()
|
|
315
367
|
try:
|
|
316
368
|
json_obj = json.loads(result)
|
|
@@ -1265,6 +1317,58 @@ def doDescribeStreamPackageChannels(args, parsed_globals):
|
|
|
1265
1317
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1266
1318
|
|
|
1267
1319
|
|
|
1320
|
+
def doDescribeStreamPackageVodRemuxTasks(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.MdpClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1347
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
1348
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1349
|
+
model = models.DescribeStreamPackageVodRemuxTasksRequest()
|
|
1350
|
+
model.from_json_string(json.dumps(args))
|
|
1351
|
+
start_time = time.time()
|
|
1352
|
+
while True:
|
|
1353
|
+
rsp = client.DescribeStreamPackageVodRemuxTasks(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
|
+
|
|
1268
1372
|
def doCreateStreamPackageSource(args, parsed_globals):
|
|
1269
1373
|
g_param = parse_global_arg(parsed_globals)
|
|
1270
1374
|
|
|
@@ -1525,7 +1629,7 @@ def doUnbindLinearAssemblyCDNDomainWithChannel(args, parsed_globals):
|
|
|
1525
1629
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1526
1630
|
|
|
1527
1631
|
|
|
1528
|
-
def
|
|
1632
|
+
def doStartStreamPackageVodRemuxTask(args, parsed_globals):
|
|
1529
1633
|
g_param = parse_global_arg(parsed_globals)
|
|
1530
1634
|
|
|
1531
1635
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1554,11 +1658,11 @@ def doModifyStreamPackageLinearAssemblyChannel(args, parsed_globals):
|
|
|
1554
1658
|
client = mod.MdpClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1555
1659
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1556
1660
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1557
|
-
model = models.
|
|
1661
|
+
model = models.StartStreamPackageVodRemuxTaskRequest()
|
|
1558
1662
|
model.from_json_string(json.dumps(args))
|
|
1559
1663
|
start_time = time.time()
|
|
1560
1664
|
while True:
|
|
1561
|
-
rsp = client.
|
|
1665
|
+
rsp = client.StartStreamPackageVodRemuxTask(model)
|
|
1562
1666
|
result = rsp.to_json_string()
|
|
1563
1667
|
try:
|
|
1564
1668
|
json_obj = json.loads(result)
|
|
@@ -1785,7 +1889,7 @@ def doDescribeStreamPackageSourceAlerts(args, parsed_globals):
|
|
|
1785
1889
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1786
1890
|
|
|
1787
1891
|
|
|
1788
|
-
def
|
|
1892
|
+
def doDeleteStreamPackageSource(args, parsed_globals):
|
|
1789
1893
|
g_param = parse_global_arg(parsed_globals)
|
|
1790
1894
|
|
|
1791
1895
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1814,11 +1918,63 @@ def doCreateStreamPackageSourceLocation(args, parsed_globals):
|
|
|
1814
1918
|
client = mod.MdpClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1815
1919
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1816
1920
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1817
|
-
model = models.
|
|
1921
|
+
model = models.DeleteStreamPackageSourceRequest()
|
|
1818
1922
|
model.from_json_string(json.dumps(args))
|
|
1819
1923
|
start_time = time.time()
|
|
1820
1924
|
while True:
|
|
1821
|
-
rsp = client.
|
|
1925
|
+
rsp = client.DeleteStreamPackageSource(model)
|
|
1926
|
+
result = rsp.to_json_string()
|
|
1927
|
+
try:
|
|
1928
|
+
json_obj = json.loads(result)
|
|
1929
|
+
except TypeError as e:
|
|
1930
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
1931
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
1932
|
+
break
|
|
1933
|
+
cur_time = time.time()
|
|
1934
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
1935
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
1936
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
1937
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
1938
|
+
else:
|
|
1939
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
1940
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
1941
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1942
|
+
|
|
1943
|
+
|
|
1944
|
+
def doModifyStreamPackageLinearAssemblyChannel(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.MdpClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1971
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
1972
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1973
|
+
model = models.ModifyStreamPackageLinearAssemblyChannelRequest()
|
|
1974
|
+
model.from_json_string(json.dumps(args))
|
|
1975
|
+
start_time = time.time()
|
|
1976
|
+
while True:
|
|
1977
|
+
rsp = client.ModifyStreamPackageLinearAssemblyChannel(model)
|
|
1822
1978
|
result = rsp.to_json_string()
|
|
1823
1979
|
try:
|
|
1824
1980
|
json_obj = json.loads(result)
|
|
@@ -2513,6 +2669,58 @@ def doDescribeStreamPackageLinearAssemblyChannels(args, parsed_globals):
|
|
|
2513
2669
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2514
2670
|
|
|
2515
2671
|
|
|
2672
|
+
def doDeleteStreamPackageVodRemuxTasks(args, parsed_globals):
|
|
2673
|
+
g_param = parse_global_arg(parsed_globals)
|
|
2674
|
+
|
|
2675
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
2676
|
+
cred = credential.CVMRoleCredential()
|
|
2677
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
2678
|
+
cred = credential.STSAssumeRoleCredential(
|
|
2679
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2680
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2681
|
+
)
|
|
2682
|
+
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):
|
|
2683
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2684
|
+
else:
|
|
2685
|
+
cred = credential.Credential(
|
|
2686
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
2687
|
+
)
|
|
2688
|
+
http_profile = HttpProfile(
|
|
2689
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
2690
|
+
reqMethod="POST",
|
|
2691
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2692
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2693
|
+
)
|
|
2694
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
2695
|
+
if g_param[OptionsDefine.Language]:
|
|
2696
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
2697
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
2698
|
+
client = mod.MdpClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2699
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
2700
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2701
|
+
model = models.DeleteStreamPackageVodRemuxTasksRequest()
|
|
2702
|
+
model.from_json_string(json.dumps(args))
|
|
2703
|
+
start_time = time.time()
|
|
2704
|
+
while True:
|
|
2705
|
+
rsp = client.DeleteStreamPackageVodRemuxTasks(model)
|
|
2706
|
+
result = rsp.to_json_string()
|
|
2707
|
+
try:
|
|
2708
|
+
json_obj = json.loads(result)
|
|
2709
|
+
except TypeError as e:
|
|
2710
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
2711
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
2712
|
+
break
|
|
2713
|
+
cur_time = time.time()
|
|
2714
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
2715
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
2716
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
2717
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
2718
|
+
else:
|
|
2719
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
2720
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
2721
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2722
|
+
|
|
2723
|
+
|
|
2516
2724
|
def doCreateStreamPackageChannel(args, parsed_globals):
|
|
2517
2725
|
g_param = parse_global_arg(parsed_globals)
|
|
2518
2726
|
|
|
@@ -2617,6 +2825,58 @@ def doDescribeStreamPackageSourceLocationAlerts(args, parsed_globals):
|
|
|
2617
2825
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2618
2826
|
|
|
2619
2827
|
|
|
2828
|
+
def doCreateStreamPackageSourceLocation(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.MdpClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2855
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
2856
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2857
|
+
model = models.CreateStreamPackageSourceLocationRequest()
|
|
2858
|
+
model.from_json_string(json.dumps(args))
|
|
2859
|
+
start_time = time.time()
|
|
2860
|
+
while True:
|
|
2861
|
+
rsp = client.CreateStreamPackageSourceLocation(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
|
+
|
|
2620
2880
|
def doDeleteStreamPackageChannels(args, parsed_globals):
|
|
2621
2881
|
g_param = parse_global_arg(parsed_globals)
|
|
2622
2882
|
|
|
@@ -2773,6 +3033,58 @@ def doModifyStreamPackageChannel(args, parsed_globals):
|
|
|
2773
3033
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2774
3034
|
|
|
2775
3035
|
|
|
3036
|
+
def doDescribeStreamPackageVodRemuxTask(args, parsed_globals):
|
|
3037
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3038
|
+
|
|
3039
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3040
|
+
cred = credential.CVMRoleCredential()
|
|
3041
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3042
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3043
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3044
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3045
|
+
)
|
|
3046
|
+
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):
|
|
3047
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3048
|
+
else:
|
|
3049
|
+
cred = credential.Credential(
|
|
3050
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3051
|
+
)
|
|
3052
|
+
http_profile = HttpProfile(
|
|
3053
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3054
|
+
reqMethod="POST",
|
|
3055
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3056
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3057
|
+
)
|
|
3058
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
3059
|
+
if g_param[OptionsDefine.Language]:
|
|
3060
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3061
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3062
|
+
client = mod.MdpClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3063
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3064
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3065
|
+
model = models.DescribeStreamPackageVodRemuxTaskRequest()
|
|
3066
|
+
model.from_json_string(json.dumps(args))
|
|
3067
|
+
start_time = time.time()
|
|
3068
|
+
while True:
|
|
3069
|
+
rsp = client.DescribeStreamPackageVodRemuxTask(model)
|
|
3070
|
+
result = rsp.to_json_string()
|
|
3071
|
+
try:
|
|
3072
|
+
json_obj = json.loads(result)
|
|
3073
|
+
except TypeError as e:
|
|
3074
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3075
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3076
|
+
break
|
|
3077
|
+
cur_time = time.time()
|
|
3078
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3079
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3080
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3081
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3082
|
+
else:
|
|
3083
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3084
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3085
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3086
|
+
|
|
3087
|
+
|
|
2776
3088
|
def doDescribeStreamPackageSSAIChannel(args, parsed_globals):
|
|
2777
3089
|
g_param = parse_global_arg(parsed_globals)
|
|
2778
3090
|
|
|
@@ -2838,10 +3150,11 @@ MODELS_MAP = {
|
|
|
2838
3150
|
ACTION_MAP = {
|
|
2839
3151
|
"DeleteStreamPackageLinearAssemblyChannel": doDeleteStreamPackageLinearAssemblyChannel,
|
|
2840
3152
|
"DescribeLinearAssemblyCDNDomainWithChannels": doDescribeLinearAssemblyCDNDomainWithChannels,
|
|
3153
|
+
"CreateStreamPackageVodRemuxTask": doCreateStreamPackageVodRemuxTask,
|
|
2841
3154
|
"CreateStreamPackageSSAIChannel": doCreateStreamPackageSSAIChannel,
|
|
2842
3155
|
"DeleteStreamPackageChannelEndpoints": doDeleteStreamPackageChannelEndpoints,
|
|
2843
3156
|
"DeleteStreamPackageHarvestJobs": doDeleteStreamPackageHarvestJobs,
|
|
2844
|
-
"
|
|
3157
|
+
"DeleteStreamPackageVodRemuxTask": doDeleteStreamPackageVodRemuxTask,
|
|
2845
3158
|
"DescribeStreamPackageLinearAssemblyChannel": doDescribeStreamPackageLinearAssemblyChannel,
|
|
2846
3159
|
"ModifyStreamPackageSSAIChannel": doModifyStreamPackageSSAIChannel,
|
|
2847
3160
|
"DescribeStreamPackageSource": doDescribeStreamPackageSource,
|
|
@@ -2860,17 +3173,19 @@ ACTION_MAP = {
|
|
|
2860
3173
|
"ModifyStreamPackageSourceLocation": doModifyStreamPackageSourceLocation,
|
|
2861
3174
|
"DeleteStreamPackageSSAIChannel": doDeleteStreamPackageSSAIChannel,
|
|
2862
3175
|
"DescribeStreamPackageChannels": doDescribeStreamPackageChannels,
|
|
3176
|
+
"DescribeStreamPackageVodRemuxTasks": doDescribeStreamPackageVodRemuxTasks,
|
|
2863
3177
|
"CreateStreamPackageSource": doCreateStreamPackageSource,
|
|
2864
3178
|
"StartStreamPackageLinearAssemblyChannel": doStartStreamPackageLinearAssemblyChannel,
|
|
2865
3179
|
"DescribeStreamPackageLinearAssemblyChannelAlerts": doDescribeStreamPackageLinearAssemblyChannelAlerts,
|
|
2866
3180
|
"CreateStreamPackageChannelEndpoint": doCreateStreamPackageChannelEndpoint,
|
|
2867
3181
|
"UnbindLinearAssemblyCDNDomainWithChannel": doUnbindLinearAssemblyCDNDomainWithChannel,
|
|
2868
|
-
"
|
|
3182
|
+
"StartStreamPackageVodRemuxTask": doStartStreamPackageVodRemuxTask,
|
|
2869
3183
|
"CreateStreamPackageLinearAssemblyChannel": doCreateStreamPackageLinearAssemblyChannel,
|
|
2870
3184
|
"DescribeStreamPackageSources": doDescribeStreamPackageSources,
|
|
2871
3185
|
"DescribeStreamPackageLinearAssemblyProgram": doDescribeStreamPackageLinearAssemblyProgram,
|
|
2872
3186
|
"DescribeStreamPackageSourceAlerts": doDescribeStreamPackageSourceAlerts,
|
|
2873
|
-
"
|
|
3187
|
+
"DeleteStreamPackageSource": doDeleteStreamPackageSource,
|
|
3188
|
+
"ModifyStreamPackageLinearAssemblyChannel": doModifyStreamPackageLinearAssemblyChannel,
|
|
2874
3189
|
"CreateStreamPackageLinearAssemblyProgram": doCreateStreamPackageLinearAssemblyProgram,
|
|
2875
3190
|
"DeleteStreamPackageLinearAssemblyPrograms": doDeleteStreamPackageLinearAssemblyPrograms,
|
|
2876
3191
|
"DescribeStreamPackageLinearAssemblyProgramSchedules": doDescribeStreamPackageLinearAssemblyProgramSchedules,
|
|
@@ -2884,11 +3199,14 @@ ACTION_MAP = {
|
|
|
2884
3199
|
"DeleteStreamPackageLinearAssemblyChannels": doDeleteStreamPackageLinearAssemblyChannels,
|
|
2885
3200
|
"DescribeStreamPackageChannel": doDescribeStreamPackageChannel,
|
|
2886
3201
|
"DescribeStreamPackageLinearAssemblyChannels": doDescribeStreamPackageLinearAssemblyChannels,
|
|
3202
|
+
"DeleteStreamPackageVodRemuxTasks": doDeleteStreamPackageVodRemuxTasks,
|
|
2887
3203
|
"CreateStreamPackageChannel": doCreateStreamPackageChannel,
|
|
2888
3204
|
"DescribeStreamPackageSourceLocationAlerts": doDescribeStreamPackageSourceLocationAlerts,
|
|
3205
|
+
"CreateStreamPackageSourceLocation": doCreateStreamPackageSourceLocation,
|
|
2889
3206
|
"DeleteStreamPackageChannels": doDeleteStreamPackageChannels,
|
|
2890
3207
|
"UnbindCdnDomainWithChannel": doUnbindCdnDomainWithChannel,
|
|
2891
3208
|
"ModifyStreamPackageChannel": doModifyStreamPackageChannel,
|
|
3209
|
+
"DescribeStreamPackageVodRemuxTask": doDescribeStreamPackageVodRemuxTask,
|
|
2892
3210
|
"DescribeStreamPackageSSAIChannel": doDescribeStreamPackageSSAIChannel,
|
|
2893
3211
|
|
|
2894
3212
|
}
|