tccli 3.0.1392.1__py2.py3-none-any.whl → 3.0.1393.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/cdb/v20170320/api.json +1 -1
- tccli/services/cdn/v20180606/api.json +46 -9
- tccli/services/clb/v20180317/api.json +9 -0
- tccli/services/csip/v20221121/api.json +1 -1
- tccli/services/dbbrain/dbbrain_client.py +136 -30
- tccli/services/dbbrain/v20210527/api.json +243 -0
- tccli/services/dbbrain/v20210527/examples.json +16 -0
- tccli/services/dsgc/v20190723/api.json +73 -15
- tccli/services/eb/v20210416/api.json +28 -1
- tccli/services/eb/v20210416/examples.json +1 -1
- tccli/services/es/es_client.py +53 -0
- tccli/services/es/v20180416/api.json +182 -0
- tccli/services/es/v20180416/examples.json +8 -0
- tccli/services/gwlb/v20240906/api.json +70 -0
- tccli/services/lcic/v20220817/api.json +49 -3
- tccli/services/lke/lke_client.py +53 -0
- tccli/services/lke/v20231130/api.json +418 -14
- tccli/services/lke/v20231130/examples.json +8 -0
- tccli/services/mps/v20190612/api.json +19 -0
- tccli/services/oceanus/oceanus_client.py +212 -0
- tccli/services/oceanus/v20190422/api.json +294 -0
- tccli/services/oceanus/v20190422/examples.json +32 -0
- tccli/services/redis/v20180412/api.json +62 -32
- tccli/services/redis/v20180412/examples.json +1 -1
- tccli/services/sms/v20190711/api.json +1 -1
- tccli/services/sms/v20210111/api.json +1 -1
- tccli/services/tat/v20201028/api.json +12 -2
- tccli/services/tcss/v20201101/api.json +6 -6
- tccli/services/tcss/v20201101/examples.json +1 -1
- tccli/services/tione/v20211111/api.json +2 -2
- tccli/services/vod/v20180717/api.json +6 -6
- {tccli-3.0.1392.1.dist-info → tccli-3.0.1393.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1392.1.dist-info → tccli-3.0.1393.1.dist-info}/RECORD +37 -37
- {tccli-3.0.1392.1.dist-info → tccli-3.0.1393.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1392.1.dist-info → tccli-3.0.1393.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1392.1.dist-info → tccli-3.0.1393.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '3.0.
|
1
|
+
__version__ = '3.0.1393.1'
|
@@ -15892,7 +15892,7 @@
|
|
15892
15892
|
{
|
15893
15893
|
"disabled": false,
|
15894
15894
|
"document": "云数据库账号。可通过 [DescribeAccounts](https://cloud.tencent.com/document/api/236/17499) 接口获取。",
|
15895
|
-
"example": "
|
15895
|
+
"example": "无",
|
15896
15896
|
"member": "Account",
|
15897
15897
|
"name": "Accounts",
|
15898
15898
|
"required": true,
|
@@ -541,6 +541,15 @@
|
|
541
541
|
"name": "Channel",
|
542
542
|
"required": false,
|
543
543
|
"type": "string"
|
544
|
+
},
|
545
|
+
{
|
546
|
+
"disabled": false,
|
547
|
+
"document": "是否继承域名标签, 默认保留上一次更改的值",
|
548
|
+
"example": "true",
|
549
|
+
"member": "bool",
|
550
|
+
"name": "InheritDomainTags",
|
551
|
+
"required": false,
|
552
|
+
"type": "bool"
|
544
553
|
}
|
545
554
|
],
|
546
555
|
"type": "object"
|
@@ -3340,6 +3349,15 @@
|
|
3340
3349
|
"name": "DomainAreaConfigs",
|
3341
3350
|
"required": false,
|
3342
3351
|
"type": "list"
|
3352
|
+
},
|
3353
|
+
{
|
3354
|
+
"disabled": false,
|
3355
|
+
"document": "是否继承域名标签,默认为false",
|
3356
|
+
"example": "true",
|
3357
|
+
"member": "bool",
|
3358
|
+
"name": "InheritDomainTags",
|
3359
|
+
"required": false,
|
3360
|
+
"type": "bool"
|
3343
3361
|
}
|
3344
3362
|
],
|
3345
3363
|
"type": "object"
|
@@ -4799,7 +4817,7 @@
|
|
4799
4817
|
},
|
4800
4818
|
{
|
4801
4819
|
"disabled": false,
|
4802
|
-
"document": "
|
4820
|
+
"document": "查询区域:mainland: 中国境内节点overseas: 海外节点global: 全球节点",
|
4803
4821
|
"example": "last",
|
4804
4822
|
"member": "string",
|
4805
4823
|
"name": "Area",
|
@@ -4809,7 +4827,7 @@
|
|
4809
4827
|
{
|
4810
4828
|
"disabled": false,
|
4811
4829
|
"document": "是否以IP段的格式返回。",
|
4812
|
-
"example": "true
|
4830
|
+
"example": "true",
|
4813
4831
|
"member": "bool",
|
4814
4832
|
"name": "Segment",
|
4815
4833
|
"required": false,
|
@@ -4818,7 +4836,7 @@
|
|
4818
4836
|
{
|
4819
4837
|
"disabled": false,
|
4820
4838
|
"document": "是否查询节点 IPV6 信息。",
|
4821
|
-
"example": "true
|
4839
|
+
"example": "true",
|
4822
4840
|
"member": "bool",
|
4823
4841
|
"name": "ShowIpv6",
|
4824
4842
|
"required": false,
|
@@ -4827,7 +4845,7 @@
|
|
4827
4845
|
{
|
4828
4846
|
"disabled": false,
|
4829
4847
|
"document": "是否对IPV6进行缩写。",
|
4830
|
-
"example": "true
|
4848
|
+
"example": "true",
|
4831
4849
|
"member": "bool",
|
4832
4850
|
"name": "AbbreviationIpv6",
|
4833
4851
|
"required": false,
|
@@ -8339,8 +8357,8 @@
|
|
8339
8357
|
},
|
8340
8358
|
{
|
8341
8359
|
"disabled": false,
|
8342
|
-
"document": "IP
|
8343
|
-
"example": "
|
8360
|
+
"document": "IP 黑白名单分路径配置。黑白名单 IP 总数不能超过 1000 个。\n注意:此字段可能返回 null,表示取不到有效值。",
|
8361
|
+
"example": "无",
|
8344
8362
|
"member": "IpFilterPathRule",
|
8345
8363
|
"name": "FilterRules",
|
8346
8364
|
"output_required": true,
|
@@ -8786,6 +8804,16 @@
|
|
8786
8804
|
"type": "string",
|
8787
8805
|
"value_allowed_null": false
|
8788
8806
|
},
|
8807
|
+
{
|
8808
|
+
"disabled": false,
|
8809
|
+
"document": "是否继承域名标签",
|
8810
|
+
"example": "true",
|
8811
|
+
"member": "bool",
|
8812
|
+
"name": "InheritDomainTags",
|
8813
|
+
"output_required": false,
|
8814
|
+
"type": "bool",
|
8815
|
+
"value_allowed_null": false
|
8816
|
+
},
|
8789
8817
|
{
|
8790
8818
|
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
8791
8819
|
"member": "string",
|
@@ -9573,6 +9601,15 @@
|
|
9573
9601
|
"name": "DomainAreaConfigs",
|
9574
9602
|
"required": false,
|
9575
9603
|
"type": "list"
|
9604
|
+
},
|
9605
|
+
{
|
9606
|
+
"disabled": false,
|
9607
|
+
"document": "是否继承域名标签",
|
9608
|
+
"example": "true",
|
9609
|
+
"member": "bool",
|
9610
|
+
"name": "InheritDomainTags",
|
9611
|
+
"required": false,
|
9612
|
+
"type": "bool"
|
9576
9613
|
}
|
9577
9614
|
],
|
9578
9615
|
"type": "object"
|
@@ -9914,7 +9951,7 @@
|
|
9914
9951
|
},
|
9915
9952
|
{
|
9916
9953
|
"disabled": false,
|
9917
|
-
"document": "备源站类型\n<font color=red>备源站列表BackupOrigins 不为空时必填</font>\n支持以下类型:\ndomain:域名类型\nip:IP 列表作为源站\n以下备源源站类型尚未全量支持,需要申请试用:\nipv6_domain: 源站列表为多个 IPv6 地址以及域名\nip_ipv6:源站列表为多个 IPv4 地址和IPv6 地址\
|
9954
|
+
"document": "备源站类型\n<font color=red>备源站列表BackupOrigins 不为空时必填</font>\n支持以下类型:\ndomain:域名类型\nip:IP 列表作为源站\n以下备源源站类型尚未全量支持,需要申请试用:\nipv6_domain: 源站列表为多个 IPv6 地址以及域名\nip_ipv6:源站列表为多个 IPv4 地址和IPv6 地址\nip_ipv6_domain:源站列表为多个 IPv4 地址IPv6 地址以及域名\n注意:此字段可能返回 null,表示取不到有效值。",
|
9918
9955
|
"example": "ip",
|
9919
9956
|
"member": "string",
|
9920
9957
|
"name": "BackupOriginType",
|
@@ -9970,7 +10007,7 @@
|
|
9970
10007
|
{
|
9971
10008
|
"disabled": false,
|
9972
10009
|
"document": "HTTPS回源SNI配置\n注意:此字段可能返回 null,表示取不到有效值。",
|
9973
|
-
"example": "
|
10010
|
+
"example": "无",
|
9974
10011
|
"member": "OriginSni",
|
9975
10012
|
"name": "Sni",
|
9976
10013
|
"output_required": true,
|
@@ -9981,7 +10018,7 @@
|
|
9981
10018
|
{
|
9982
10019
|
"disabled": false,
|
9983
10020
|
"document": "HTTPS回源高级配置\n注意:此字段可能返回 null,表示取不到有效值。",
|
9984
|
-
"example": "
|
10021
|
+
"example": "无",
|
9985
10022
|
"member": "AdvanceHttps",
|
9986
10023
|
"name": "AdvanceHttps",
|
9987
10024
|
"output_required": true,
|
@@ -681,6 +681,15 @@
|
|
681
681
|
"name": "ConfigContent",
|
682
682
|
"required": true,
|
683
683
|
"type": "string"
|
684
|
+
},
|
685
|
+
{
|
686
|
+
"disabled": false,
|
687
|
+
"document": "标签",
|
688
|
+
"example": "无",
|
689
|
+
"member": "TagInfo",
|
690
|
+
"name": "Tags",
|
691
|
+
"required": false,
|
692
|
+
"type": "list"
|
684
693
|
}
|
685
694
|
],
|
686
695
|
"type": "object"
|
@@ -12653,7 +12653,7 @@
|
|
12653
12653
|
{
|
12654
12654
|
"disabled": false,
|
12655
12655
|
"document": "风险危害",
|
12656
|
-
"example": "
|
12656
|
+
"example": "云上多种产品都有管理后台功能且具有对公网开放能力,管理后台对外开放后容易存在口令被爆破/被入侵风险,可导致重要数据泄露,服务器遭受入侵等严重后果。",
|
12657
12657
|
"member": "string",
|
12658
12658
|
"name": "RiskInfluence",
|
12659
12659
|
"output_required": true,
|
@@ -71,7 +71,7 @@ def doDescribeDBAutonomyEvents(args, parsed_globals):
|
|
71
71
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
72
72
|
|
73
73
|
|
74
|
-
def
|
74
|
+
def doOpenAuditService(args, parsed_globals):
|
75
75
|
g_param = parse_global_arg(parsed_globals)
|
76
76
|
|
77
77
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -100,11 +100,11 @@ def doVerifyUserAccount(args, parsed_globals):
|
|
100
100
|
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
101
101
|
client._sdkVersion += ("_CLI_" + __version__)
|
102
102
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
103
|
-
model = models.
|
103
|
+
model = models.OpenAuditServiceRequest()
|
104
104
|
model.from_json_string(json.dumps(args))
|
105
105
|
start_time = time.time()
|
106
106
|
while True:
|
107
|
-
rsp = client.
|
107
|
+
rsp = client.OpenAuditService(model)
|
108
108
|
result = rsp.to_json_string()
|
109
109
|
try:
|
110
110
|
json_obj = json.loads(result)
|
@@ -591,7 +591,7 @@ def doDescribeMySqlProcessList(args, parsed_globals):
|
|
591
591
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
592
592
|
|
593
593
|
|
594
|
-
def
|
594
|
+
def doDescribeIndexRecommendInfo(args, parsed_globals):
|
595
595
|
g_param = parse_global_arg(parsed_globals)
|
596
596
|
|
597
597
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -620,11 +620,11 @@ def doCreateMailProfile(args, parsed_globals):
|
|
620
620
|
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
621
621
|
client._sdkVersion += ("_CLI_" + __version__)
|
622
622
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
623
|
-
model = models.
|
623
|
+
model = models.DescribeIndexRecommendInfoRequest()
|
624
624
|
model.from_json_string(json.dumps(args))
|
625
625
|
start_time = time.time()
|
626
626
|
while True:
|
627
|
-
rsp = client.
|
627
|
+
rsp = client.DescribeIndexRecommendInfo(model)
|
628
628
|
result = rsp.to_json_string()
|
629
629
|
try:
|
630
630
|
json_obj = json.loads(result)
|
@@ -747,7 +747,7 @@ def doCancelDBAutonomyEvent(args, parsed_globals):
|
|
747
747
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
748
748
|
|
749
749
|
|
750
|
-
def
|
750
|
+
def doVerifyUserAccount(args, parsed_globals):
|
751
751
|
g_param = parse_global_arg(parsed_globals)
|
752
752
|
|
753
753
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -776,11 +776,11 @@ def doDescribeAuditLogFiles(args, parsed_globals):
|
|
776
776
|
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
777
777
|
client._sdkVersion += ("_CLI_" + __version__)
|
778
778
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
779
|
-
model = models.
|
779
|
+
model = models.VerifyUserAccountRequest()
|
780
780
|
model.from_json_string(json.dumps(args))
|
781
781
|
start_time = time.time()
|
782
782
|
while True:
|
783
|
-
rsp = client.
|
783
|
+
rsp = client.VerifyUserAccount(model)
|
784
784
|
result = rsp.to_json_string()
|
785
785
|
try:
|
786
786
|
json_obj = json.loads(result)
|
@@ -799,7 +799,7 @@ def doDescribeAuditLogFiles(args, parsed_globals):
|
|
799
799
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
800
800
|
|
801
801
|
|
802
|
-
def
|
802
|
+
def doDescribeAuditLogFiles(args, parsed_globals):
|
803
803
|
g_param = parse_global_arg(parsed_globals)
|
804
804
|
|
805
805
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -828,11 +828,11 @@ def doCreateRedisBigKeyAnalysisTask(args, parsed_globals):
|
|
828
828
|
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
829
829
|
client._sdkVersion += ("_CLI_" + __version__)
|
830
830
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
831
|
-
model = models.
|
831
|
+
model = models.DescribeAuditLogFilesRequest()
|
832
832
|
model.from_json_string(json.dumps(args))
|
833
833
|
start_time = time.time()
|
834
834
|
while True:
|
835
|
-
rsp = client.
|
835
|
+
rsp = client.DescribeAuditLogFiles(model)
|
836
836
|
result = rsp.to_json_string()
|
837
837
|
try:
|
838
838
|
json_obj = json.loads(result)
|
@@ -851,7 +851,7 @@ def doCreateRedisBigKeyAnalysisTask(args, parsed_globals):
|
|
851
851
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
852
852
|
|
853
853
|
|
854
|
-
def
|
854
|
+
def doCreateRedisBigKeyAnalysisTask(args, parsed_globals):
|
855
855
|
g_param = parse_global_arg(parsed_globals)
|
856
856
|
|
857
857
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -880,11 +880,11 @@ def doModifyAlarmPolicy(args, parsed_globals):
|
|
880
880
|
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
881
881
|
client._sdkVersion += ("_CLI_" + __version__)
|
882
882
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
883
|
-
model = models.
|
883
|
+
model = models.CreateRedisBigKeyAnalysisTaskRequest()
|
884
884
|
model.from_json_string(json.dumps(args))
|
885
885
|
start_time = time.time()
|
886
886
|
while True:
|
887
|
-
rsp = client.
|
887
|
+
rsp = client.CreateRedisBigKeyAnalysisTask(model)
|
888
888
|
result = rsp.to_json_string()
|
889
889
|
try:
|
890
890
|
json_obj = json.loads(result)
|
@@ -2047,6 +2047,58 @@ def doDescribeRedisCommandCostStatistics(args, parsed_globals):
|
|
2047
2047
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2048
2048
|
|
2049
2049
|
|
2050
|
+
def doDescribeRedisTopCostCommands(args, parsed_globals):
|
2051
|
+
g_param = parse_global_arg(parsed_globals)
|
2052
|
+
|
2053
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2054
|
+
cred = credential.CVMRoleCredential()
|
2055
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2056
|
+
cred = credential.STSAssumeRoleCredential(
|
2057
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2058
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2059
|
+
)
|
2060
|
+
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):
|
2061
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2062
|
+
else:
|
2063
|
+
cred = credential.Credential(
|
2064
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2065
|
+
)
|
2066
|
+
http_profile = HttpProfile(
|
2067
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2068
|
+
reqMethod="POST",
|
2069
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2070
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2071
|
+
)
|
2072
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2073
|
+
if g_param[OptionsDefine.Language]:
|
2074
|
+
profile.language = g_param[OptionsDefine.Language]
|
2075
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2076
|
+
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
2077
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2078
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2079
|
+
model = models.DescribeRedisTopCostCommandsRequest()
|
2080
|
+
model.from_json_string(json.dumps(args))
|
2081
|
+
start_time = time.time()
|
2082
|
+
while True:
|
2083
|
+
rsp = client.DescribeRedisTopCostCommands(model)
|
2084
|
+
result = rsp.to_json_string()
|
2085
|
+
try:
|
2086
|
+
json_obj = json.loads(result)
|
2087
|
+
except TypeError as e:
|
2088
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2089
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2090
|
+
break
|
2091
|
+
cur_time = time.time()
|
2092
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2093
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2094
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2095
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2096
|
+
else:
|
2097
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2098
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2099
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2100
|
+
|
2101
|
+
|
2050
2102
|
def doCreateAuditLogFile(args, parsed_globals):
|
2051
2103
|
g_param = parse_global_arg(parsed_globals)
|
2052
2104
|
|
@@ -2723,6 +2775,58 @@ def doDescribeTopSpaceSchemaTimeSeries(args, parsed_globals):
|
|
2723
2775
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2724
2776
|
|
2725
2777
|
|
2778
|
+
def doDescribeHealthScoreTimeSeries(args, parsed_globals):
|
2779
|
+
g_param = parse_global_arg(parsed_globals)
|
2780
|
+
|
2781
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2782
|
+
cred = credential.CVMRoleCredential()
|
2783
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2784
|
+
cred = credential.STSAssumeRoleCredential(
|
2785
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2786
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2787
|
+
)
|
2788
|
+
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):
|
2789
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2790
|
+
else:
|
2791
|
+
cred = credential.Credential(
|
2792
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2793
|
+
)
|
2794
|
+
http_profile = HttpProfile(
|
2795
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2796
|
+
reqMethod="POST",
|
2797
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2798
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2799
|
+
)
|
2800
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2801
|
+
if g_param[OptionsDefine.Language]:
|
2802
|
+
profile.language = g_param[OptionsDefine.Language]
|
2803
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2804
|
+
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
2805
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2806
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2807
|
+
model = models.DescribeHealthScoreTimeSeriesRequest()
|
2808
|
+
model.from_json_string(json.dumps(args))
|
2809
|
+
start_time = time.time()
|
2810
|
+
while True:
|
2811
|
+
rsp = client.DescribeHealthScoreTimeSeries(model)
|
2812
|
+
result = rsp.to_json_string()
|
2813
|
+
try:
|
2814
|
+
json_obj = json.loads(result)
|
2815
|
+
except TypeError as e:
|
2816
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2817
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2818
|
+
break
|
2819
|
+
cur_time = time.time()
|
2820
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2821
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2822
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2823
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2824
|
+
else:
|
2825
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2826
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2827
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2828
|
+
|
2829
|
+
|
2726
2830
|
def doDeleteSqlFilters(args, parsed_globals):
|
2727
2831
|
g_param = parse_global_arg(parsed_globals)
|
2728
2832
|
|
@@ -2827,7 +2931,7 @@ def doCancelKillTask(args, parsed_globals):
|
|
2827
2931
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2828
2932
|
|
2829
2933
|
|
2830
|
-
def
|
2934
|
+
def doModifyAlarmPolicy(args, parsed_globals):
|
2831
2935
|
g_param = parse_global_arg(parsed_globals)
|
2832
2936
|
|
2833
2937
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2856,11 +2960,11 @@ def doDescribeDiagDBInstances(args, parsed_globals):
|
|
2856
2960
|
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
2857
2961
|
client._sdkVersion += ("_CLI_" + __version__)
|
2858
2962
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2859
|
-
model = models.
|
2963
|
+
model = models.ModifyAlarmPolicyRequest()
|
2860
2964
|
model.from_json_string(json.dumps(args))
|
2861
2965
|
start_time = time.time()
|
2862
2966
|
while True:
|
2863
|
-
rsp = client.
|
2967
|
+
rsp = client.ModifyAlarmPolicy(model)
|
2864
2968
|
result = rsp.to_json_string()
|
2865
2969
|
try:
|
2866
2970
|
json_obj = json.loads(result)
|
@@ -2931,7 +3035,7 @@ def doCreateUserAutonomyProfile(args, parsed_globals):
|
|
2931
3035
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2932
3036
|
|
2933
3037
|
|
2934
|
-
def
|
3038
|
+
def doCreateMailProfile(args, parsed_globals):
|
2935
3039
|
g_param = parse_global_arg(parsed_globals)
|
2936
3040
|
|
2937
3041
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2960,11 +3064,11 @@ def doOpenAuditService(args, parsed_globals):
|
|
2960
3064
|
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
2961
3065
|
client._sdkVersion += ("_CLI_" + __version__)
|
2962
3066
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2963
|
-
model = models.
|
3067
|
+
model = models.CreateMailProfileRequest()
|
2964
3068
|
model.from_json_string(json.dumps(args))
|
2965
3069
|
start_time = time.time()
|
2966
3070
|
while True:
|
2967
|
-
rsp = client.
|
3071
|
+
rsp = client.CreateMailProfile(model)
|
2968
3072
|
result = rsp.to_json_string()
|
2969
3073
|
try:
|
2970
3074
|
json_obj = json.loads(result)
|
@@ -3035,7 +3139,7 @@ def doAddUserContact(args, parsed_globals):
|
|
3035
3139
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3036
3140
|
|
3037
3141
|
|
3038
|
-
def
|
3142
|
+
def doDescribeDiagDBInstances(args, parsed_globals):
|
3039
3143
|
g_param = parse_global_arg(parsed_globals)
|
3040
3144
|
|
3041
3145
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3064,11 +3168,11 @@ def doDescribeIndexRecommendInfo(args, parsed_globals):
|
|
3064
3168
|
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
3065
3169
|
client._sdkVersion += ("_CLI_" + __version__)
|
3066
3170
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3067
|
-
model = models.
|
3171
|
+
model = models.DescribeDiagDBInstancesRequest()
|
3068
3172
|
model.from_json_string(json.dumps(args))
|
3069
3173
|
start_time = time.time()
|
3070
3174
|
while True:
|
3071
|
-
rsp = client.
|
3175
|
+
rsp = client.DescribeDiagDBInstances(model)
|
3072
3176
|
result = rsp.to_json_string()
|
3073
3177
|
try:
|
3074
3178
|
json_obj = json.loads(result)
|
@@ -4193,7 +4297,7 @@ MODELS_MAP = {
|
|
4193
4297
|
|
4194
4298
|
ACTION_MAP = {
|
4195
4299
|
"DescribeDBAutonomyEvents": doDescribeDBAutonomyEvents,
|
4196
|
-
"
|
4300
|
+
"OpenAuditService": doOpenAuditService,
|
4197
4301
|
"DescribeSecurityAuditLogDownloadUrls": doDescribeSecurityAuditLogDownloadUrls,
|
4198
4302
|
"DeleteDBDiagReportTasks": doDeleteDBDiagReportTasks,
|
4199
4303
|
"DescribeMailProfile": doDescribeMailProfile,
|
@@ -4203,12 +4307,12 @@ ACTION_MAP = {
|
|
4203
4307
|
"DescribeDBPerfTimeSeries": doDescribeDBPerfTimeSeries,
|
4204
4308
|
"DescribeTopSpaceSchemas": doDescribeTopSpaceSchemas,
|
4205
4309
|
"DescribeMySqlProcessList": doDescribeMySqlProcessList,
|
4206
|
-
"
|
4310
|
+
"DescribeIndexRecommendInfo": doDescribeIndexRecommendInfo,
|
4207
4311
|
"DescribeDBDiagReportTasks": doDescribeDBDiagReportTasks,
|
4208
4312
|
"CancelDBAutonomyEvent": doCancelDBAutonomyEvent,
|
4313
|
+
"VerifyUserAccount": doVerifyUserAccount,
|
4209
4314
|
"DescribeAuditLogFiles": doDescribeAuditLogFiles,
|
4210
4315
|
"CreateRedisBigKeyAnalysisTask": doCreateRedisBigKeyAnalysisTask,
|
4211
|
-
"ModifyAlarmPolicy": doModifyAlarmPolicy,
|
4212
4316
|
"DeleteAuditLogFile": doDeleteAuditLogFile,
|
4213
4317
|
"DescribeAllUserGroup": doDescribeAllUserGroup,
|
4214
4318
|
"DescribeDBDiagEvents": doDescribeDBDiagEvents,
|
@@ -4231,6 +4335,7 @@ ACTION_MAP = {
|
|
4231
4335
|
"DescribeDBAutonomyActions": doDescribeDBAutonomyActions,
|
4232
4336
|
"ModifyAuditService": doModifyAuditService,
|
4233
4337
|
"DescribeRedisCommandCostStatistics": doDescribeRedisCommandCostStatistics,
|
4338
|
+
"DescribeRedisTopCostCommands": doDescribeRedisTopCostCommands,
|
4234
4339
|
"CreateAuditLogFile": doCreateAuditLogFile,
|
4235
4340
|
"DescribeRedisTopBigKeys": doDescribeRedisTopBigKeys,
|
4236
4341
|
"DescribeSecurityAuditLogExportTasks": doDescribeSecurityAuditLogExportTasks,
|
@@ -4244,13 +4349,14 @@ ACTION_MAP = {
|
|
4244
4349
|
"DescribeRedisTopKeyPrefixList": doDescribeRedisTopKeyPrefixList,
|
4245
4350
|
"DescribeSlowLogTimeSeriesStats": doDescribeSlowLogTimeSeriesStats,
|
4246
4351
|
"DescribeTopSpaceSchemaTimeSeries": doDescribeTopSpaceSchemaTimeSeries,
|
4352
|
+
"DescribeHealthScoreTimeSeries": doDescribeHealthScoreTimeSeries,
|
4247
4353
|
"DeleteSqlFilters": doDeleteSqlFilters,
|
4248
4354
|
"CancelKillTask": doCancelKillTask,
|
4249
|
-
"
|
4355
|
+
"ModifyAlarmPolicy": doModifyAlarmPolicy,
|
4250
4356
|
"CreateUserAutonomyProfile": doCreateUserAutonomyProfile,
|
4251
|
-
"
|
4357
|
+
"CreateMailProfile": doCreateMailProfile,
|
4252
4358
|
"AddUserContact": doAddUserContact,
|
4253
|
-
"
|
4359
|
+
"DescribeDiagDBInstances": doDescribeDiagDBInstances,
|
4254
4360
|
"DescribeIndexRecommendAggregationSlowLogs": doDescribeIndexRecommendAggregationSlowLogs,
|
4255
4361
|
"DescribeProxyProcessStatistics": doDescribeProxyProcessStatistics,
|
4256
4362
|
"CancelDBAutonomyAction": doCancelDBAutonomyAction,
|