tccli 3.0.1372.1__py2.py3-none-any.whl → 3.0.1373.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/batch/v20170312/api.json +3 -3
- tccli/services/cfs/v20190719/api.json +10 -10
- tccli/services/cfs/v20190719/examples.json +1 -1
- tccli/services/clb/v20180317/api.json +252 -3
- tccli/services/cls/v20201016/api.json +78 -76
- tccli/services/cls/v20201016/examples.json +5 -5
- tccli/services/keewidb/v20220308/api.json +24 -24
- tccli/services/lcic/v20220817/api.json +46 -18
- tccli/services/mongodb/v20190725/api.json +4 -4
- tccli/services/monitor/v20180724/api.json +4 -4
- tccli/services/mps/v20190612/api.json +42 -2
- tccli/services/ocr/v20181119/api.json +21 -12
- tccli/services/postgres/postgres_client.py +12 -171
- tccli/services/postgres/v20170312/api.json +20 -819
- tccli/services/postgres/v20170312/examples.json +6 -30
- tccli/services/scf/v20180416/api.json +2 -0
- tccli/services/sts/v20180813/api.json +4 -4
- tccli/services/tcbr/v20220217/api.json +92 -0
- tccli/services/tcss/v20201101/api.json +32 -2
- tccli/services/tcss/v20201101/examples.json +3 -3
- tccli/services/tke/v20180525/api.json +10 -1
- tccli/services/trabbit/v20230418/api.json +41 -2
- tccli/services/trocket/trocket_client.py +65 -12
- tccli/services/trocket/v20230308/api.json +156 -0
- tccli/services/trocket/v20230308/examples.json +8 -0
- tccli/services/trtc/v20190722/api.json +10 -10
- tccli/services/tsf/v20180326/api.json +433 -328
- tccli/services/tsf/v20180326/examples.json +8 -8
- tccli/services/vod/v20180717/api.json +61 -32
- tccli/services/vod/v20180717/examples.json +1 -1
- tccli/services/waf/v20180125/api.json +717 -38
- tccli/services/waf/v20180125/examples.json +56 -0
- tccli/services/waf/waf_client.py +444 -73
- tccli/services/wedata/v20210820/api.json +138 -6
- {tccli-3.0.1372.1.dist-info → tccli-3.0.1373.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1372.1.dist-info → tccli-3.0.1373.1.dist-info}/RECORD +40 -40
- {tccli-3.0.1372.1.dist-info → tccli-3.0.1373.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1372.1.dist-info → tccli-3.0.1373.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1372.1.dist-info → tccli-3.0.1373.1.dist-info}/license_files/LICENSE +0 -0
@@ -5135,7 +5135,7 @@
|
|
5135
5135
|
},
|
5136
5136
|
{
|
5137
5137
|
"disabled": false,
|
5138
|
-
"document": "配置id支持:\nGeneral -- 通用场景\nOnlineTaxiItinerary -- 网约车行程单\nRideHailingDriverLicense -- 网约车驾驶证\nRideHailingTransportLicense -- 网约车运输证\nWayBill -- 快递运单\nAccountOpeningPermit -- 银行开户许可证\nInvoiceEng --
|
5138
|
+
"document": "配置id支持:\nGeneral -- 通用场景\nOnlineTaxiItinerary -- 网约车行程单\nRideHailingDriverLicense -- 网约车驾驶证\nRideHailingTransportLicense -- 网约车运输证\nWayBill -- 快递运单\nAccountOpeningPermit -- 银行开户许可证\nInvoiceEng -- 国际发票模板\nCoin --钱币识别模板\nOnboardingDocuments -- 入职材料识别\nPropertyOwnershipCertificate -- 房产证识别\nRealEstateCertificate --不动产权证识别\nHouseEncumbranceCertificate -- 他权证识别\nCarInsurance -- 车险保单\nMultiRealEstateCertificate -- 房产证、不动产证、产权证等材料合一模板",
|
5139
5139
|
"example": "General",
|
5140
5140
|
"member": "string",
|
5141
5141
|
"name": "ConfigId",
|
@@ -5160,7 +5160,7 @@
|
|
5160
5160
|
{
|
5161
5161
|
"disabled": false,
|
5162
5162
|
"document": "图片旋转角度(角度制),文本的水平方向\n为 0;顺时针为正,逆时针为负",
|
5163
|
-
"example": "0",
|
5163
|
+
"example": "0.0",
|
5164
5164
|
"member": "float",
|
5165
5165
|
"name": "Angle",
|
5166
5166
|
"output_required": true,
|
@@ -5282,8 +5282,8 @@
|
|
5282
5282
|
},
|
5283
5283
|
{
|
5284
5284
|
"disabled": false,
|
5285
|
-
"document": "
|
5286
|
-
"example": "
|
5285
|
+
"document": "模板的单个属性配置",
|
5286
|
+
"example": "无",
|
5287
5287
|
"member": "ConfigAdvanced",
|
5288
5288
|
"name": "ConfigAdvanced",
|
5289
5289
|
"required": false,
|
@@ -5298,7 +5298,7 @@
|
|
5298
5298
|
{
|
5299
5299
|
"disabled": false,
|
5300
5300
|
"document": "图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负",
|
5301
|
-
"example": "0",
|
5301
|
+
"example": "0.0",
|
5302
5302
|
"member": "float",
|
5303
5303
|
"name": "Angle",
|
5304
5304
|
"output_required": true,
|
@@ -5403,7 +5403,7 @@
|
|
5403
5403
|
},
|
5404
5404
|
{
|
5405
5405
|
"disabled": false,
|
5406
|
-
"document": "配置id支持:\nGeneral -- 通用场景 \nInvoiceEng -- 国际invoice
|
5406
|
+
"document": "配置id支持:\nGeneral -- 通用场景 \nInvoiceEng -- 国际invoice模板 \nWayBillEng --海运订单模板\nCustomsDeclaration -- 进出口报关单\nWeightNote -- 磅单\nMedicalMeter -- 血压仪表识别\nBillOfLading -- 海运提单\nEntrustmentBook -- 海运托书\nStatement -- 对账单识别模板\nBookingConfirmation -- 配舱通知书识别模板\nAirWayBill -- 航空运单识别模板\nTable -- 表格模板\nSteelLabel -- 实物标签识别模板\nCarInsurance -- 车辆保险单识别模板\nMultiRealEstateCertificate -- 房产材料识别模板\nMultiRealEstateMaterial -- 房产证明识别模板\nHongKongUtilityBill -- 中国香港水电煤单识别模板",
|
5407
5407
|
"example": "General",
|
5408
5408
|
"member": "string",
|
5409
5409
|
"name": "ConfigId",
|
@@ -5430,8 +5430,8 @@
|
|
5430
5430
|
},
|
5431
5431
|
{
|
5432
5432
|
"disabled": false,
|
5433
|
-
"document": "
|
5434
|
-
"example": "
|
5433
|
+
"document": "模板的单个属性配置",
|
5434
|
+
"example": "无",
|
5435
5435
|
"member": "ConfigAdvanced",
|
5436
5436
|
"name": "ConfigAdvanced",
|
5437
5437
|
"required": false,
|
@@ -5455,7 +5455,7 @@
|
|
5455
5455
|
{
|
5456
5456
|
"disabled": false,
|
5457
5457
|
"document": "图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负",
|
5458
|
-
"example": "0",
|
5458
|
+
"example": "0.0",
|
5459
5459
|
"member": "float",
|
5460
5460
|
"name": "Angle",
|
5461
5461
|
"output_required": true,
|
@@ -6456,6 +6456,15 @@
|
|
6456
6456
|
"name": "EnableDetectText",
|
6457
6457
|
"required": false,
|
6458
6458
|
"type": "bool"
|
6459
|
+
},
|
6460
|
+
{
|
6461
|
+
"disabled": false,
|
6462
|
+
"document": "配置ID支持: OCR -- 通用场景 MulOCR--多语种场景 ",
|
6463
|
+
"example": "OCR",
|
6464
|
+
"member": "string",
|
6465
|
+
"name": "ConfigID",
|
6466
|
+
"required": false,
|
6467
|
+
"type": "string"
|
6459
6468
|
}
|
6460
6469
|
],
|
6461
6470
|
"type": "object"
|
@@ -7409,7 +7418,7 @@
|
|
7409
7418
|
},
|
7410
7419
|
{
|
7411
7420
|
"disabled": false,
|
7412
|
-
"document": "配置id支持:\nArticleRecognize --
|
7421
|
+
"document": "配置id支持:\nArticleRecognize -- 手写作文模板\n默认:ArticleRecognize",
|
7413
7422
|
"example": "ArticleRecognize",
|
7414
7423
|
"member": "string",
|
7415
7424
|
"name": "ConfigId",
|
@@ -7418,7 +7427,7 @@
|
|
7418
7427
|
},
|
7419
7428
|
{
|
7420
7429
|
"disabled": false,
|
7421
|
-
"document": "
|
7430
|
+
"document": "模板的单个属性配置",
|
7422
7431
|
"example": "only_hw",
|
7423
7432
|
"member": "string",
|
7424
7433
|
"name": "Scene",
|
@@ -7434,7 +7443,7 @@
|
|
7434
7443
|
{
|
7435
7444
|
"disabled": false,
|
7436
7445
|
"document": "图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负",
|
7437
|
-
"example": "0",
|
7446
|
+
"example": "0.0",
|
7438
7447
|
"member": "float",
|
7439
7448
|
"name": "Angle",
|
7440
7449
|
"output_required": true,
|
@@ -17,7 +17,7 @@ from tencentcloud.postgres.v20170312 import models as models_v20170312
|
|
17
17
|
from jmespath import search
|
18
18
|
import time
|
19
19
|
|
20
|
-
def
|
20
|
+
def doModifyMaintainTimeWindow(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 doDescribeTasks(args, parsed_globals):
|
|
46
46
|
client = mod.PostgresClient(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.ModifyMaintainTimeWindowRequest()
|
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.ModifyMaintainTimeWindow(model)
|
54
54
|
result = rsp.to_json_string()
|
55
55
|
try:
|
56
56
|
json_obj = json.loads(result)
|
@@ -849,59 +849,7 @@ def doModifyDBInstanceSecurityGroups(args, parsed_globals):
|
|
849
849
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
850
850
|
|
851
851
|
|
852
|
-
def
|
853
|
-
g_param = parse_global_arg(parsed_globals)
|
854
|
-
|
855
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
856
|
-
cred = credential.CVMRoleCredential()
|
857
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
858
|
-
cred = credential.STSAssumeRoleCredential(
|
859
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
860
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
861
|
-
)
|
862
|
-
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):
|
863
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
864
|
-
else:
|
865
|
-
cred = credential.Credential(
|
866
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
867
|
-
)
|
868
|
-
http_profile = HttpProfile(
|
869
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
870
|
-
reqMethod="POST",
|
871
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
872
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
873
|
-
)
|
874
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
875
|
-
if g_param[OptionsDefine.Language]:
|
876
|
-
profile.language = g_param[OptionsDefine.Language]
|
877
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
878
|
-
client = mod.PostgresClient(cred, g_param[OptionsDefine.Region], profile)
|
879
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
880
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
881
|
-
model = models.ModifyMaintainTimeWindowRequest()
|
882
|
-
model.from_json_string(json.dumps(args))
|
883
|
-
start_time = time.time()
|
884
|
-
while True:
|
885
|
-
rsp = client.ModifyMaintainTimeWindow(model)
|
886
|
-
result = rsp.to_json_string()
|
887
|
-
try:
|
888
|
-
json_obj = json.loads(result)
|
889
|
-
except TypeError as e:
|
890
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
891
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
892
|
-
break
|
893
|
-
cur_time = time.time()
|
894
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
895
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
896
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
897
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
898
|
-
else:
|
899
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
900
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
901
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
902
|
-
|
903
|
-
|
904
|
-
def doRenewInstance(args, parsed_globals):
|
852
|
+
def doDescribeTasks(args, parsed_globals):
|
905
853
|
g_param = parse_global_arg(parsed_globals)
|
906
854
|
|
907
855
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -930,11 +878,11 @@ def doRenewInstance(args, parsed_globals):
|
|
930
878
|
client = mod.PostgresClient(cred, g_param[OptionsDefine.Region], profile)
|
931
879
|
client._sdkVersion += ("_CLI_" + __version__)
|
932
880
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
933
|
-
model = models.
|
881
|
+
model = models.DescribeTasksRequest()
|
934
882
|
model.from_json_string(json.dumps(args))
|
935
883
|
start_time = time.time()
|
936
884
|
while True:
|
937
|
-
rsp = client.
|
885
|
+
rsp = client.DescribeTasks(model)
|
938
886
|
result = rsp.to_json_string()
|
939
887
|
try:
|
940
888
|
json_obj = json.loads(result)
|
@@ -1109,58 +1057,6 @@ def doDescribeProductConfig(args, parsed_globals):
|
|
1109
1057
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1110
1058
|
|
1111
1059
|
|
1112
|
-
def doDescribeDBSlowlogs(args, parsed_globals):
|
1113
|
-
g_param = parse_global_arg(parsed_globals)
|
1114
|
-
|
1115
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1116
|
-
cred = credential.CVMRoleCredential()
|
1117
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1118
|
-
cred = credential.STSAssumeRoleCredential(
|
1119
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1120
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1121
|
-
)
|
1122
|
-
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):
|
1123
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1124
|
-
else:
|
1125
|
-
cred = credential.Credential(
|
1126
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1127
|
-
)
|
1128
|
-
http_profile = HttpProfile(
|
1129
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1130
|
-
reqMethod="POST",
|
1131
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
1132
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1133
|
-
)
|
1134
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1135
|
-
if g_param[OptionsDefine.Language]:
|
1136
|
-
profile.language = g_param[OptionsDefine.Language]
|
1137
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1138
|
-
client = mod.PostgresClient(cred, g_param[OptionsDefine.Region], profile)
|
1139
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
1140
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1141
|
-
model = models.DescribeDBSlowlogsRequest()
|
1142
|
-
model.from_json_string(json.dumps(args))
|
1143
|
-
start_time = time.time()
|
1144
|
-
while True:
|
1145
|
-
rsp = client.DescribeDBSlowlogs(model)
|
1146
|
-
result = rsp.to_json_string()
|
1147
|
-
try:
|
1148
|
-
json_obj = json.loads(result)
|
1149
|
-
except TypeError as e:
|
1150
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1151
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1152
|
-
break
|
1153
|
-
cur_time = time.time()
|
1154
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1155
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1156
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1157
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1158
|
-
else:
|
1159
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1160
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1161
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1162
|
-
|
1163
|
-
|
1164
1060
|
def doDescribeAccountPrivileges(args, parsed_globals):
|
1165
1061
|
g_param = parse_global_arg(parsed_globals)
|
1166
1062
|
|
@@ -1785,7 +1681,7 @@ def doModifyDBInstanceDeployment(args, parsed_globals):
|
|
1785
1681
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1786
1682
|
|
1787
1683
|
|
1788
|
-
def
|
1684
|
+
def doRenewInstance(args, parsed_globals):
|
1789
1685
|
g_param = parse_global_arg(parsed_globals)
|
1790
1686
|
|
1791
1687
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1814,11 +1710,11 @@ def doCreateServerlessDBInstance(args, parsed_globals):
|
|
1814
1710
|
client = mod.PostgresClient(cred, g_param[OptionsDefine.Region], profile)
|
1815
1711
|
client._sdkVersion += ("_CLI_" + __version__)
|
1816
1712
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1817
|
-
model = models.
|
1713
|
+
model = models.RenewInstanceRequest()
|
1818
1714
|
model.from_json_string(json.dumps(args))
|
1819
1715
|
start_time = time.time()
|
1820
1716
|
while True:
|
1821
|
-
rsp = client.
|
1717
|
+
rsp = client.RenewInstance(model)
|
1822
1718
|
result = rsp.to_json_string()
|
1823
1719
|
try:
|
1824
1720
|
json_obj = json.loads(result)
|
@@ -2305,58 +2201,6 @@ def doDisIsolateDBInstances(args, parsed_globals):
|
|
2305
2201
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2306
2202
|
|
2307
2203
|
|
2308
|
-
def doDescribeServerlessDBInstances(args, parsed_globals):
|
2309
|
-
g_param = parse_global_arg(parsed_globals)
|
2310
|
-
|
2311
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2312
|
-
cred = credential.CVMRoleCredential()
|
2313
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2314
|
-
cred = credential.STSAssumeRoleCredential(
|
2315
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2316
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2317
|
-
)
|
2318
|
-
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):
|
2319
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2320
|
-
else:
|
2321
|
-
cred = credential.Credential(
|
2322
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2323
|
-
)
|
2324
|
-
http_profile = HttpProfile(
|
2325
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2326
|
-
reqMethod="POST",
|
2327
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
2328
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2329
|
-
)
|
2330
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2331
|
-
if g_param[OptionsDefine.Language]:
|
2332
|
-
profile.language = g_param[OptionsDefine.Language]
|
2333
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2334
|
-
client = mod.PostgresClient(cred, g_param[OptionsDefine.Region], profile)
|
2335
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
2336
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2337
|
-
model = models.DescribeServerlessDBInstancesRequest()
|
2338
|
-
model.from_json_string(json.dumps(args))
|
2339
|
-
start_time = time.time()
|
2340
|
-
while True:
|
2341
|
-
rsp = client.DescribeServerlessDBInstances(model)
|
2342
|
-
result = rsp.to_json_string()
|
2343
|
-
try:
|
2344
|
-
json_obj = json.loads(result)
|
2345
|
-
except TypeError as e:
|
2346
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2347
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2348
|
-
break
|
2349
|
-
cur_time = time.time()
|
2350
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2351
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2352
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2353
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2354
|
-
else:
|
2355
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2356
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2357
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2358
|
-
|
2359
|
-
|
2360
2204
|
def doDeleteBaseBackup(args, parsed_globals):
|
2361
2205
|
g_param = parse_global_arg(parsed_globals)
|
2362
2206
|
|
@@ -5384,7 +5228,7 @@ MODELS_MAP = {
|
|
5384
5228
|
}
|
5385
5229
|
|
5386
5230
|
ACTION_MAP = {
|
5387
|
-
"
|
5231
|
+
"ModifyMaintainTimeWindow": doModifyMaintainTimeWindow,
|
5388
5232
|
"DescribeDatabaseObjects": doDescribeDatabaseObjects,
|
5389
5233
|
"ModifyDBInstanceChargeType": doModifyDBInstanceChargeType,
|
5390
5234
|
"DescribeDBErrlogs": doDescribeDBErrlogs,
|
@@ -5400,12 +5244,10 @@ ACTION_MAP = {
|
|
5400
5244
|
"CreateDBInstanceNetworkAccess": doCreateDBInstanceNetworkAccess,
|
5401
5245
|
"ModifyDBInstanceSpec": doModifyDBInstanceSpec,
|
5402
5246
|
"ModifyDBInstanceSecurityGroups": doModifyDBInstanceSecurityGroups,
|
5403
|
-
"
|
5404
|
-
"RenewInstance": doRenewInstance,
|
5247
|
+
"DescribeTasks": doDescribeTasks,
|
5405
5248
|
"DescribeDatabases": doDescribeDatabases,
|
5406
5249
|
"DescribeParameterTemplates": doDescribeParameterTemplates,
|
5407
5250
|
"DescribeProductConfig": doDescribeProductConfig,
|
5408
|
-
"DescribeDBSlowlogs": doDescribeDBSlowlogs,
|
5409
5251
|
"DescribeAccountPrivileges": doDescribeAccountPrivileges,
|
5410
5252
|
"DeleteReadOnlyGroupNetworkAccess": doDeleteReadOnlyGroupNetworkAccess,
|
5411
5253
|
"DescribeDefaultParameters": doDescribeDefaultParameters,
|
@@ -5418,7 +5260,7 @@ ACTION_MAP = {
|
|
5418
5260
|
"CreateBaseBackup": doCreateBaseBackup,
|
5419
5261
|
"DescribeParameterTemplateAttributes": doDescribeParameterTemplateAttributes,
|
5420
5262
|
"ModifyDBInstanceDeployment": doModifyDBInstanceDeployment,
|
5421
|
-
"
|
5263
|
+
"RenewInstance": doRenewInstance,
|
5422
5264
|
"CreateDatabase": doCreateDatabase,
|
5423
5265
|
"CreateAccount": doCreateAccount,
|
5424
5266
|
"ModifyDBInstanceParameters": doModifyDBInstanceParameters,
|
@@ -5428,7 +5270,6 @@ ACTION_MAP = {
|
|
5428
5270
|
"ModifyDBInstanceReadOnlyGroup": doModifyDBInstanceReadOnlyGroup,
|
5429
5271
|
"CloneDBInstance": doCloneDBInstance,
|
5430
5272
|
"DisIsolateDBInstances": doDisIsolateDBInstances,
|
5431
|
-
"DescribeServerlessDBInstances": doDescribeServerlessDBInstances,
|
5432
5273
|
"DeleteBaseBackup": doDeleteBaseBackup,
|
5433
5274
|
"ModifyParameterTemplate": doModifyParameterTemplate,
|
5434
5275
|
"CreateParameterTemplate": doCreateParameterTemplate,
|