tccli 3.0.1324.1__py2.py3-none-any.whl → 3.0.1325.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/autoscaling/v20180419/api.json +1 -1
- tccli/services/cfs/v20190719/api.json +45 -45
- tccli/services/cfs/v20190719/examples.json +1 -1
- tccli/services/cynosdb/v20190107/api.json +7 -7
- tccli/services/ess/v20201111/api.json +2 -2
- tccli/services/essbasic/v20210526/api.json +2 -2
- tccli/services/iotexplorer/v20190423/api.json +1 -1
- tccli/services/mqtt/mqtt_client.py +57 -4
- tccli/services/mqtt/v20240516/api.json +260 -124
- tccli/services/mqtt/v20240516/examples.json +9 -1
- {tccli-3.0.1324.1.dist-info → tccli-3.0.1325.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1324.1.dist-info → tccli-3.0.1325.1.dist-info}/RECORD +16 -16
- {tccli-3.0.1324.1.dist-info → tccli-3.0.1325.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1324.1.dist-info → tccli-3.0.1325.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1324.1.dist-info → tccli-3.0.1325.1.dist-info}/license_files/LICENSE +0 -0
@@ -4022,7 +4022,7 @@
|
|
4022
4022
|
},
|
4023
4023
|
{
|
4024
4024
|
"disabled": false,
|
4025
|
-
"document": "加密类型 ,1表示证书认证,2
|
4025
|
+
"document": "加密类型 ,1表示证书认证,2表示密钥认证,21表示TID认证-SE方式,22表示TID认证-软加固方式",
|
4026
4026
|
"example": "1",
|
4027
4027
|
"member": "string",
|
4028
4028
|
"name": "EncryptionType",
|
@@ -1161,7 +1161,7 @@ def doActivateCaCertificate(args, parsed_globals):
|
|
1161
1161
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1162
1162
|
|
1163
1163
|
|
1164
|
-
def
|
1164
|
+
def doDescribeMessageByTopic(args, parsed_globals):
|
1165
1165
|
g_param = parse_global_arg(parsed_globals)
|
1166
1166
|
|
1167
1167
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1190,11 +1190,11 @@ def doCreateTopic(args, parsed_globals):
|
|
1190
1190
|
client = mod.MqttClient(cred, g_param[OptionsDefine.Region], profile)
|
1191
1191
|
client._sdkVersion += ("_CLI_" + __version__)
|
1192
1192
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1193
|
-
model = models.
|
1193
|
+
model = models.DescribeMessageByTopicRequest()
|
1194
1194
|
model.from_json_string(json.dumps(args))
|
1195
1195
|
start_time = time.time()
|
1196
1196
|
while True:
|
1197
|
-
rsp = client.
|
1197
|
+
rsp = client.DescribeMessageByTopic(model)
|
1198
1198
|
result = rsp.to_json_string()
|
1199
1199
|
try:
|
1200
1200
|
json_obj = json.loads(result)
|
@@ -1993,6 +1993,58 @@ def doDescribeInstanceList(args, parsed_globals):
|
|
1993
1993
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1994
1994
|
|
1995
1995
|
|
1996
|
+
def doCreateTopic(args, parsed_globals):
|
1997
|
+
g_param = parse_global_arg(parsed_globals)
|
1998
|
+
|
1999
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2000
|
+
cred = credential.CVMRoleCredential()
|
2001
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2002
|
+
cred = credential.STSAssumeRoleCredential(
|
2003
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2004
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2005
|
+
)
|
2006
|
+
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):
|
2007
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2008
|
+
else:
|
2009
|
+
cred = credential.Credential(
|
2010
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2011
|
+
)
|
2012
|
+
http_profile = HttpProfile(
|
2013
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2014
|
+
reqMethod="POST",
|
2015
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2016
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2017
|
+
)
|
2018
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2019
|
+
if g_param[OptionsDefine.Language]:
|
2020
|
+
profile.language = g_param[OptionsDefine.Language]
|
2021
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2022
|
+
client = mod.MqttClient(cred, g_param[OptionsDefine.Region], profile)
|
2023
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2024
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2025
|
+
model = models.CreateTopicRequest()
|
2026
|
+
model.from_json_string(json.dumps(args))
|
2027
|
+
start_time = time.time()
|
2028
|
+
while True:
|
2029
|
+
rsp = client.CreateTopic(model)
|
2030
|
+
result = rsp.to_json_string()
|
2031
|
+
try:
|
2032
|
+
json_obj = json.loads(result)
|
2033
|
+
except TypeError as e:
|
2034
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2035
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2036
|
+
break
|
2037
|
+
cur_time = time.time()
|
2038
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2039
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2040
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2041
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2042
|
+
else:
|
2043
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2044
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2045
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2046
|
+
|
2047
|
+
|
1996
2048
|
def doModifyAuthorizationPolicy(args, parsed_globals):
|
1997
2049
|
g_param = parse_global_arg(parsed_globals)
|
1998
2050
|
|
@@ -2754,7 +2806,7 @@ ACTION_MAP = {
|
|
2754
2806
|
"DescribeProductSKUList": doDescribeProductSKUList,
|
2755
2807
|
"DescribeCaCertificates": doDescribeCaCertificates,
|
2756
2808
|
"ActivateCaCertificate": doActivateCaCertificate,
|
2757
|
-
"
|
2809
|
+
"DescribeMessageByTopic": doDescribeMessageByTopic,
|
2758
2810
|
"DeleteDeviceCertificate": doDeleteDeviceCertificate,
|
2759
2811
|
"ApplyRegistrationCode": doApplyRegistrationCode,
|
2760
2812
|
"ModifyJWKSAuthenticator": doModifyJWKSAuthenticator,
|
@@ -2770,6 +2822,7 @@ ACTION_MAP = {
|
|
2770
2822
|
"CreateJWKSAuthenticator": doCreateJWKSAuthenticator,
|
2771
2823
|
"ModifyUser": doModifyUser,
|
2772
2824
|
"DescribeInstanceList": doDescribeInstanceList,
|
2825
|
+
"CreateTopic": doCreateTopic,
|
2773
2826
|
"ModifyAuthorizationPolicy": doModifyAuthorizationPolicy,
|
2774
2827
|
"DeleteAuthorizationPolicy": doDeleteAuthorizationPolicy,
|
2775
2828
|
"ModifyHttpAuthenticator": doModifyHttpAuthenticator,
|