tccli 3.0.1197.1__py2.py3-none-any.whl → 3.0.1199.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/services/apigateway/apigateway_client.py +57 -4
- tccli/services/apigateway/v20180808/api.json +24 -0
- tccli/services/apigateway/v20180808/examples.json +8 -0
- tccli/services/ccc/ccc_client.py +57 -4
- tccli/services/ccc/v20200210/api.json +188 -0
- tccli/services/ccc/v20200210/examples.json +8 -0
- tccli/services/clb/v20180317/api.json +19 -1
- tccli/services/cme/v20191029/api.json +18 -8
- tccli/services/cvm/v20170312/api.json +24 -24
- tccli/services/cynosdb/cynosdb_client.py +0 -53
- tccli/services/cynosdb/v20190107/api.json +0 -92
- tccli/services/cynosdb/v20190107/examples.json +0 -8
- tccli/services/emr/emr_client.py +114 -8
- tccli/services/emr/v20190103/api.json +300 -7
- tccli/services/emr/v20190103/examples.json +16 -0
- tccli/services/ess/v20201111/api.json +19 -1
- tccli/services/ess/v20201111/examples.json +1 -1
- tccli/services/essbasic/v20210526/api.json +18 -0
- tccli/services/essbasic/v20210526/examples.json +1 -1
- tccli/services/faceid/v20180301/api.json +18 -0
- tccli/services/iecp/iecp_client.py +298 -1358
- tccli/services/iecp/v20210914/api.json +216 -2256
- tccli/services/iecp/v20210914/examples.json +0 -166
- tccli/services/ims/v20201229/api.json +9 -9
- tccli/services/ims/v20201229/examples.json +2 -2
- tccli/services/monitor/monitor_client.py +8 -114
- tccli/services/monitor/v20180724/api.json +0 -85
- tccli/services/monitor/v20180724/examples.json +0 -16
- tccli/services/ocr/v20181119/api.json +3 -3
- tccli/services/postgres/postgres_client.py +159 -0
- tccli/services/postgres/v20170312/api.json +427 -9
- tccli/services/postgres/v20170312/examples.json +40 -4
- tccli/services/rce/v20201103/api.json +17 -8
- tccli/services/sms/v20190711/api.json +8 -8
- tccli/services/sms/v20210111/api.json +13 -13
- tccli/services/tcss/v20201101/api.json +199 -3
- tccli/services/tcss/v20201101/examples.json +5 -5
- tccli/services/teo/v20220901/api.json +56 -6
- tccli/services/tke/v20180525/api.json +9 -9
- tccli/services/tke/v20220501/api.json +5 -5
- tccli/services/tse/v20201207/api.json +22 -0
- tccli/services/tsf/tsf_client.py +4 -57
- tccli/services/tsf/v20180326/api.json +0 -34
- tccli/services/tsf/v20180326/examples.json +0 -8
- tccli/services/vod/v20180717/api.json +3 -3
- tccli/services/vpc/v20170312/examples.json +6 -0
- tccli/services/wedata/v20210820/api.json +11 -0
- {tccli-3.0.1197.1.dist-info → tccli-3.0.1199.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1197.1.dist-info → tccli-3.0.1199.1.dist-info}/RECORD +53 -53
- {tccli-3.0.1197.1.dist-info → tccli-3.0.1199.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1197.1.dist-info → tccli-3.0.1199.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1197.1.dist-info → tccli-3.0.1199.1.dist-info}/license_files/LICENSE +0 -0
@@ -9871,7 +9871,7 @@
|
|
9871
9871
|
"example": "rep-xxxxxxxx",
|
9872
9872
|
"member": "string",
|
9873
9873
|
"name": "TaskId",
|
9874
|
-
"
|
9874
|
+
"output_required": true,
|
9875
9875
|
"type": "string",
|
9876
9876
|
"value_allowed_null": false
|
9877
9877
|
},
|
@@ -9881,7 +9881,7 @@
|
|
9881
9881
|
"example": "ins-xxxxxxxx",
|
9882
9882
|
"member": "string",
|
9883
9883
|
"name": "InstanceId",
|
9884
|
-
"
|
9884
|
+
"output_required": true,
|
9885
9885
|
"type": "string",
|
9886
9886
|
"value_allowed_null": false
|
9887
9887
|
},
|
@@ -9891,7 +9891,7 @@
|
|
9891
9891
|
"example": "test",
|
9892
9892
|
"member": "string",
|
9893
9893
|
"name": "Alias",
|
9894
|
-
"
|
9894
|
+
"output_required": true,
|
9895
9895
|
"type": "string",
|
9896
9896
|
"value_allowed_null": true
|
9897
9897
|
},
|
@@ -9901,7 +9901,7 @@
|
|
9901
9901
|
"example": "101",
|
9902
9902
|
"member": "uint64",
|
9903
9903
|
"name": "TaskTypeId",
|
9904
|
-
"
|
9904
|
+
"output_required": true,
|
9905
9905
|
"type": "int",
|
9906
9906
|
"value_allowed_null": false
|
9907
9907
|
},
|
@@ -9911,7 +9911,7 @@
|
|
9911
9911
|
"example": "实例运行隐患",
|
9912
9912
|
"member": "string",
|
9913
9913
|
"name": "TaskTypeName",
|
9914
|
-
"
|
9914
|
+
"output_required": true,
|
9915
9915
|
"type": "string",
|
9916
9916
|
"value_allowed_null": false
|
9917
9917
|
},
|
@@ -9921,7 +9921,7 @@
|
|
9921
9921
|
"example": "1",
|
9922
9922
|
"member": "uint64",
|
9923
9923
|
"name": "TaskStatus",
|
9924
|
-
"
|
9924
|
+
"output_required": true,
|
9925
9925
|
"type": "int",
|
9926
9926
|
"value_allowed_null": false
|
9927
9927
|
},
|
@@ -9931,7 +9931,7 @@
|
|
9931
9931
|
"example": "1",
|
9932
9932
|
"member": "uint64",
|
9933
9933
|
"name": "DeviceStatus",
|
9934
|
-
"
|
9934
|
+
"output_required": true,
|
9935
9935
|
"type": "int",
|
9936
9936
|
"value_allowed_null": false
|
9937
9937
|
},
|
@@ -9941,7 +9941,7 @@
|
|
9941
9941
|
"example": "1",
|
9942
9942
|
"member": "uint64",
|
9943
9943
|
"name": "OperateStatus",
|
9944
|
-
"
|
9944
|
+
"output_required": true,
|
9945
9945
|
"type": "int",
|
9946
9946
|
"value_allowed_null": false
|
9947
9947
|
},
|
@@ -9951,7 +9951,7 @@
|
|
9951
9951
|
"example": "2017-01-01 12:00:00",
|
9952
9952
|
"member": "datetime",
|
9953
9953
|
"name": "CreateTime",
|
9954
|
-
"
|
9954
|
+
"output_required": true,
|
9955
9955
|
"type": "string",
|
9956
9956
|
"value_allowed_null": false
|
9957
9957
|
},
|
@@ -9961,7 +9961,7 @@
|
|
9961
9961
|
"example": "2017-01-03 12:00:00",
|
9962
9962
|
"member": "datetime",
|
9963
9963
|
"name": "AuthTime",
|
9964
|
-
"
|
9964
|
+
"output_required": true,
|
9965
9965
|
"type": "string",
|
9966
9966
|
"value_allowed_null": true
|
9967
9967
|
},
|
@@ -9971,7 +9971,7 @@
|
|
9971
9971
|
"example": "2017-01-03 14:00:00",
|
9972
9972
|
"member": "datetime",
|
9973
9973
|
"name": "EndTime",
|
9974
|
-
"
|
9974
|
+
"output_required": true,
|
9975
9975
|
"type": "string",
|
9976
9976
|
"value_allowed_null": true
|
9977
9977
|
},
|
@@ -9981,7 +9981,7 @@
|
|
9981
9981
|
"example": "监控到您的云服务器存在隐患,可能导致云服务器高负载或宕机。为尽快修复隐患,需要您授权我们在线迁移。感谢您的支持与理解。",
|
9982
9982
|
"member": "string",
|
9983
9983
|
"name": "TaskDetail",
|
9984
|
-
"
|
9984
|
+
"output_required": true,
|
9985
9985
|
"type": "string",
|
9986
9986
|
"value_allowed_null": true
|
9987
9987
|
},
|
@@ -9991,7 +9991,7 @@
|
|
9991
9991
|
"example": "ap-guangzhou-7",
|
9992
9992
|
"member": "string",
|
9993
9993
|
"name": "Zone",
|
9994
|
-
"
|
9994
|
+
"output_required": true,
|
9995
9995
|
"type": "string",
|
9996
9996
|
"value_allowed_null": true
|
9997
9997
|
},
|
@@ -10001,7 +10001,7 @@
|
|
10001
10001
|
"example": "ap-guangzhou",
|
10002
10002
|
"member": "string",
|
10003
10003
|
"name": "Region",
|
10004
|
-
"
|
10004
|
+
"output_required": true,
|
10005
10005
|
"type": "string",
|
10006
10006
|
"value_allowed_null": true
|
10007
10007
|
},
|
@@ -10011,7 +10011,7 @@
|
|
10011
10011
|
"example": "vpc-xxxxxxxx",
|
10012
10012
|
"member": "string",
|
10013
10013
|
"name": "VpcId",
|
10014
|
-
"
|
10014
|
+
"output_required": true,
|
10015
10015
|
"type": "string",
|
10016
10016
|
"value_allowed_null": true
|
10017
10017
|
},
|
@@ -10021,7 +10021,7 @@
|
|
10021
10021
|
"example": "Default-VPC",
|
10022
10022
|
"member": "string",
|
10023
10023
|
"name": "VpcName",
|
10024
|
-
"
|
10024
|
+
"output_required": true,
|
10025
10025
|
"type": "string",
|
10026
10026
|
"value_allowed_null": true
|
10027
10027
|
},
|
@@ -10031,7 +10031,7 @@
|
|
10031
10031
|
"example": "subnet-xxxxxxxx",
|
10032
10032
|
"member": "string",
|
10033
10033
|
"name": "SubnetId",
|
10034
|
-
"
|
10034
|
+
"output_required": true,
|
10035
10035
|
"type": "string",
|
10036
10036
|
"value_allowed_null": true
|
10037
10037
|
},
|
@@ -10041,7 +10041,7 @@
|
|
10041
10041
|
"example": "Default-Subnet",
|
10042
10042
|
"member": "string",
|
10043
10043
|
"name": "SubnetName",
|
10044
|
-
"
|
10044
|
+
"output_required": true,
|
10045
10045
|
"type": "string",
|
10046
10046
|
"value_allowed_null": true
|
10047
10047
|
},
|
@@ -10051,7 +10051,7 @@
|
|
10051
10051
|
"example": "11.22.33.44",
|
10052
10052
|
"member": "string",
|
10053
10053
|
"name": "WanIp",
|
10054
|
-
"
|
10054
|
+
"output_required": true,
|
10055
10055
|
"type": "string",
|
10056
10056
|
"value_allowed_null": true
|
10057
10057
|
},
|
@@ -10061,7 +10061,7 @@
|
|
10061
10061
|
"example": "10.10.1.9",
|
10062
10062
|
"member": "string",
|
10063
10063
|
"name": "LanIp",
|
10064
|
-
"
|
10064
|
+
"output_required": true,
|
10065
10065
|
"type": "string",
|
10066
10066
|
"value_allowed_null": true
|
10067
10067
|
},
|
@@ -10071,7 +10071,7 @@
|
|
10071
10071
|
"example": "CVM",
|
10072
10072
|
"member": "string",
|
10073
10073
|
"name": "Product",
|
10074
|
-
"
|
10074
|
+
"output_required": true,
|
10075
10075
|
"type": "string",
|
10076
10076
|
"value_allowed_null": true
|
10077
10077
|
},
|
@@ -10081,7 +10081,7 @@
|
|
10081
10081
|
"example": "NA",
|
10082
10082
|
"member": "string",
|
10083
10083
|
"name": "TaskSubType",
|
10084
|
-
"
|
10084
|
+
"output_required": true,
|
10085
10085
|
"type": "string",
|
10086
10086
|
"value_allowed_null": true
|
10087
10087
|
},
|
@@ -10091,7 +10091,7 @@
|
|
10091
10091
|
"example": "1",
|
10092
10092
|
"member": "uint64",
|
10093
10093
|
"name": "AuthType",
|
10094
|
-
"
|
10094
|
+
"output_required": true,
|
10095
10095
|
"type": "int",
|
10096
10096
|
"value_allowed_null": false
|
10097
10097
|
},
|
@@ -10101,7 +10101,7 @@
|
|
10101
10101
|
"example": "Customer_auth",
|
10102
10102
|
"member": "string",
|
10103
10103
|
"name": "AuthSource",
|
10104
|
-
"
|
10104
|
+
"output_required": true,
|
10105
10105
|
"type": "string",
|
10106
10106
|
"value_allowed_null": false
|
10107
10107
|
}
|
@@ -7401,58 +7401,6 @@ def doDescribeClusterInstanceGroups(args, parsed_globals):
|
|
7401
7401
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7402
7402
|
|
7403
7403
|
|
7404
|
-
def doDescribeRollbackTimeValidity(args, parsed_globals):
|
7405
|
-
g_param = parse_global_arg(parsed_globals)
|
7406
|
-
|
7407
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
7408
|
-
cred = credential.CVMRoleCredential()
|
7409
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7410
|
-
cred = credential.STSAssumeRoleCredential(
|
7411
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7412
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7413
|
-
)
|
7414
|
-
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):
|
7415
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
7416
|
-
else:
|
7417
|
-
cred = credential.Credential(
|
7418
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
7419
|
-
)
|
7420
|
-
http_profile = HttpProfile(
|
7421
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
7422
|
-
reqMethod="POST",
|
7423
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
7424
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
7425
|
-
)
|
7426
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
7427
|
-
if g_param[OptionsDefine.Language]:
|
7428
|
-
profile.language = g_param[OptionsDefine.Language]
|
7429
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
7430
|
-
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
7431
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
7432
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7433
|
-
model = models.DescribeRollbackTimeValidityRequest()
|
7434
|
-
model.from_json_string(json.dumps(args))
|
7435
|
-
start_time = time.time()
|
7436
|
-
while True:
|
7437
|
-
rsp = client.DescribeRollbackTimeValidity(model)
|
7438
|
-
result = rsp.to_json_string()
|
7439
|
-
try:
|
7440
|
-
json_obj = json.loads(result)
|
7441
|
-
except TypeError as e:
|
7442
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
7443
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
7444
|
-
break
|
7445
|
-
cur_time = time.time()
|
7446
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
7447
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
7448
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
7449
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
7450
|
-
else:
|
7451
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
7452
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
7453
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7454
|
-
|
7455
|
-
|
7456
7404
|
def doDescribeDBSecurityGroups(args, parsed_globals):
|
7457
7405
|
g_param = parse_global_arg(parsed_globals)
|
7458
7406
|
|
@@ -7918,7 +7866,6 @@ ACTION_MAP = {
|
|
7918
7866
|
"UpgradeInstance": doUpgradeInstance,
|
7919
7867
|
"DescribeBinlogs": doDescribeBinlogs,
|
7920
7868
|
"DescribeClusterInstanceGroups": doDescribeClusterInstanceGroups,
|
7921
|
-
"DescribeRollbackTimeValidity": doDescribeRollbackTimeValidity,
|
7922
7869
|
"DescribeDBSecurityGroups": doDescribeDBSecurityGroups,
|
7923
7870
|
"OpenClusterPasswordComplexity": doOpenClusterPasswordComplexity,
|
7924
7871
|
"OpenAuditService": doOpenAuditService,
|
@@ -525,13 +525,6 @@
|
|
525
525
|
"output": "DescribeRollbackTimeRangeResponse",
|
526
526
|
"status": "online"
|
527
527
|
},
|
528
|
-
"DescribeRollbackTimeValidity": {
|
529
|
-
"document": "历史废弃接口,从云API下线\n\n指定时间和集群查询是否可回滚",
|
530
|
-
"input": "DescribeRollbackTimeValidityRequest",
|
531
|
-
"name": "查询指定时间是否可回滚",
|
532
|
-
"output": "DescribeRollbackTimeValidityResponse",
|
533
|
-
"status": "deprecated"
|
534
|
-
},
|
535
528
|
"DescribeServerlessStrategy": {
|
536
529
|
"document": "查询serverless策略",
|
537
530
|
"input": "DescribeServerlessStrategyRequest",
|
@@ -11515,91 +11508,6 @@
|
|
11515
11508
|
],
|
11516
11509
|
"type": "object"
|
11517
11510
|
},
|
11518
|
-
"DescribeRollbackTimeValidityRequest": {
|
11519
|
-
"document": "DescribeRollbackTimeValidity请求参数结构体",
|
11520
|
-
"members": [
|
11521
|
-
{
|
11522
|
-
"disabled": false,
|
11523
|
-
"document": "集群ID",
|
11524
|
-
"example": "cynosdbmysql-gn65y9nk",
|
11525
|
-
"member": "string",
|
11526
|
-
"name": "ClusterId",
|
11527
|
-
"required": true,
|
11528
|
-
"type": "string"
|
11529
|
-
},
|
11530
|
-
{
|
11531
|
-
"disabled": false,
|
11532
|
-
"document": "期望回滚的时间点",
|
11533
|
-
"example": "2019-01-13 02:12:05",
|
11534
|
-
"member": "string",
|
11535
|
-
"name": "ExpectTime",
|
11536
|
-
"required": true,
|
11537
|
-
"type": "string"
|
11538
|
-
},
|
11539
|
-
{
|
11540
|
-
"disabled": false,
|
11541
|
-
"document": "回滚时间点的允许误差范围",
|
11542
|
-
"example": "0",
|
11543
|
-
"member": "uint64",
|
11544
|
-
"name": "ExpectTimeThresh",
|
11545
|
-
"required": true,
|
11546
|
-
"type": "int"
|
11547
|
-
}
|
11548
|
-
],
|
11549
|
-
"type": "object"
|
11550
|
-
},
|
11551
|
-
"DescribeRollbackTimeValidityResponse": {
|
11552
|
-
"document": "DescribeRollbackTimeValidity返回参数结构体",
|
11553
|
-
"members": [
|
11554
|
-
{
|
11555
|
-
"disabled": false,
|
11556
|
-
"document": "存储poolID",
|
11557
|
-
"example": "\t1050",
|
11558
|
-
"member": "uint64",
|
11559
|
-
"name": "PoolId",
|
11560
|
-
"output_required": true,
|
11561
|
-
"type": "int",
|
11562
|
-
"value_allowed_null": false
|
11563
|
-
},
|
11564
|
-
{
|
11565
|
-
"disabled": false,
|
11566
|
-
"document": "回滚任务ID,后续按该时间点回滚时,需要传入",
|
11567
|
-
"example": "\t2008",
|
11568
|
-
"member": "uint64",
|
11569
|
-
"name": "QueryId",
|
11570
|
-
"output_required": true,
|
11571
|
-
"type": "int",
|
11572
|
-
"value_allowed_null": false
|
11573
|
-
},
|
11574
|
-
{
|
11575
|
-
"disabled": false,
|
11576
|
-
"document": "时间点是否有效:pass,检测通过;fail,检测失败",
|
11577
|
-
"example": "pass",
|
11578
|
-
"member": "string",
|
11579
|
-
"name": "Status",
|
11580
|
-
"output_required": true,
|
11581
|
-
"type": "string",
|
11582
|
-
"value_allowed_null": false
|
11583
|
-
},
|
11584
|
-
{
|
11585
|
-
"disabled": false,
|
11586
|
-
"document": "建议时间点,在Status为fail时,该值才有效",
|
11587
|
-
"example": "\"\"",
|
11588
|
-
"member": "string",
|
11589
|
-
"name": "SuggestTime",
|
11590
|
-
"output_required": true,
|
11591
|
-
"type": "string",
|
11592
|
-
"value_allowed_null": false
|
11593
|
-
},
|
11594
|
-
{
|
11595
|
-
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
11596
|
-
"member": "string",
|
11597
|
-
"name": "RequestId",
|
11598
|
-
"type": "string"
|
11599
|
-
}
|
11600
|
-
],
|
11601
|
-
"type": "object"
|
11602
|
-
},
|
11603
11511
|
"DescribeServerlessStrategyRequest": {
|
11604
11512
|
"document": "DescribeServerlessStrategy请求参数结构体",
|
11605
11513
|
"members": [
|
@@ -624,14 +624,6 @@
|
|
624
624
|
"title": "查询回档时间范围"
|
625
625
|
}
|
626
626
|
],
|
627
|
-
"DescribeRollbackTimeValidity": [
|
628
|
-
{
|
629
|
-
"document": "",
|
630
|
-
"input": "https://cynosdb.tencentcloudapi.com/?Action=DescribeRollbackTimeValidity\n&ClusterId=cynosdbpg-gn65y9nk\n&ExpectTime=2019-01-1302:12:05\n&ExpectTimeThresh=0\n&<公共请求参数>",
|
631
|
-
"output": "{\n \"Response\": {\n \"PoolId\": 1,\n \"QueryId\": 1,\n \"Status\": \"abc\",\n \"SuggestTime\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
|
632
|
-
"title": "查询指定时间点是否看回档"
|
633
|
-
}
|
634
|
-
],
|
635
627
|
"DescribeServerlessStrategy": [
|
636
628
|
{
|
637
629
|
"document": "",
|
tccli/services/emr/emr_client.py
CHANGED
@@ -693,6 +693,58 @@ def doDescribeCvmQuota(args, parsed_globals):
|
|
693
693
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
694
694
|
|
695
695
|
|
696
|
+
def doModifyGlobalConfig(args, parsed_globals):
|
697
|
+
g_param = parse_global_arg(parsed_globals)
|
698
|
+
|
699
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
700
|
+
cred = credential.CVMRoleCredential()
|
701
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
702
|
+
cred = credential.STSAssumeRoleCredential(
|
703
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
704
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
705
|
+
)
|
706
|
+
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):
|
707
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
708
|
+
else:
|
709
|
+
cred = credential.Credential(
|
710
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
711
|
+
)
|
712
|
+
http_profile = HttpProfile(
|
713
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
714
|
+
reqMethod="POST",
|
715
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
716
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
717
|
+
)
|
718
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
719
|
+
if g_param[OptionsDefine.Language]:
|
720
|
+
profile.language = g_param[OptionsDefine.Language]
|
721
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
722
|
+
client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
|
723
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
724
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
725
|
+
model = models.ModifyGlobalConfigRequest()
|
726
|
+
model.from_json_string(json.dumps(args))
|
727
|
+
start_time = time.time()
|
728
|
+
while True:
|
729
|
+
rsp = client.ModifyGlobalConfig(model)
|
730
|
+
result = rsp.to_json_string()
|
731
|
+
try:
|
732
|
+
json_obj = json.loads(result)
|
733
|
+
except TypeError as e:
|
734
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
735
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
736
|
+
break
|
737
|
+
cur_time = time.time()
|
738
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
739
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
740
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
741
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
742
|
+
else:
|
743
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
744
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
745
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
746
|
+
|
747
|
+
|
696
748
|
def doScaleOutInstance(args, parsed_globals):
|
697
749
|
g_param = parse_global_arg(parsed_globals)
|
698
750
|
|
@@ -1161,6 +1213,58 @@ def doDescribeUsersForUserManager(args, parsed_globals):
|
|
1161
1213
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1162
1214
|
|
1163
1215
|
|
1216
|
+
def doAddMetricScaleStrategy(args, parsed_globals):
|
1217
|
+
g_param = parse_global_arg(parsed_globals)
|
1218
|
+
|
1219
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1220
|
+
cred = credential.CVMRoleCredential()
|
1221
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1222
|
+
cred = credential.STSAssumeRoleCredential(
|
1223
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1224
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1225
|
+
)
|
1226
|
+
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):
|
1227
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1228
|
+
else:
|
1229
|
+
cred = credential.Credential(
|
1230
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1231
|
+
)
|
1232
|
+
http_profile = HttpProfile(
|
1233
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1234
|
+
reqMethod="POST",
|
1235
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1236
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1237
|
+
)
|
1238
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1239
|
+
if g_param[OptionsDefine.Language]:
|
1240
|
+
profile.language = g_param[OptionsDefine.Language]
|
1241
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1242
|
+
client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
|
1243
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1244
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1245
|
+
model = models.AddMetricScaleStrategyRequest()
|
1246
|
+
model.from_json_string(json.dumps(args))
|
1247
|
+
start_time = time.time()
|
1248
|
+
while True:
|
1249
|
+
rsp = client.AddMetricScaleStrategy(model)
|
1250
|
+
result = rsp.to_json_string()
|
1251
|
+
try:
|
1252
|
+
json_obj = json.loads(result)
|
1253
|
+
except TypeError as e:
|
1254
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1255
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1256
|
+
break
|
1257
|
+
cur_time = time.time()
|
1258
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1259
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1260
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1261
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1262
|
+
else:
|
1263
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1264
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1265
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1266
|
+
|
1267
|
+
|
1164
1268
|
def doDeleteUserManagerUserList(args, parsed_globals):
|
1165
1269
|
g_param = parse_global_arg(parsed_globals)
|
1166
1270
|
|
@@ -2097,7 +2201,7 @@ def doInquirePriceRenewEmr(args, parsed_globals):
|
|
2097
2201
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2098
2202
|
|
2099
2203
|
|
2100
|
-
def
|
2204
|
+
def doDescribeResourceSchedule(args, parsed_globals):
|
2101
2205
|
g_param = parse_global_arg(parsed_globals)
|
2102
2206
|
|
2103
2207
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2126,11 +2230,11 @@ def doAddMetricScaleStrategy(args, parsed_globals):
|
|
2126
2230
|
client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
|
2127
2231
|
client._sdkVersion += ("_CLI_" + __version__)
|
2128
2232
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2129
|
-
model = models.
|
2233
|
+
model = models.DescribeResourceScheduleRequest()
|
2130
2234
|
model.from_json_string(json.dumps(args))
|
2131
2235
|
start_time = time.time()
|
2132
2236
|
while True:
|
2133
|
-
rsp = client.
|
2237
|
+
rsp = client.DescribeResourceSchedule(model)
|
2134
2238
|
result = rsp.to_json_string()
|
2135
2239
|
try:
|
2136
2240
|
json_obj = json.loads(result)
|
@@ -2565,7 +2669,7 @@ def doDescribeAutoScaleStrategies(args, parsed_globals):
|
|
2565
2669
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2566
2670
|
|
2567
2671
|
|
2568
|
-
def
|
2672
|
+
def doDescribeGlobalConfig(args, parsed_globals):
|
2569
2673
|
g_param = parse_global_arg(parsed_globals)
|
2570
2674
|
|
2571
2675
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2594,11 +2698,11 @@ def doDescribeResourceSchedule(args, parsed_globals):
|
|
2594
2698
|
client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
|
2595
2699
|
client._sdkVersion += ("_CLI_" + __version__)
|
2596
2700
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2597
|
-
model = models.
|
2701
|
+
model = models.DescribeGlobalConfigRequest()
|
2598
2702
|
model.from_json_string(json.dumps(args))
|
2599
2703
|
start_time = time.time()
|
2600
2704
|
while True:
|
2601
|
-
rsp = client.
|
2705
|
+
rsp = client.DescribeGlobalConfig(model)
|
2602
2706
|
result = rsp.to_json_string()
|
2603
2707
|
try:
|
2604
2708
|
json_obj = json.loads(result)
|
@@ -3109,6 +3213,7 @@ ACTION_MAP = {
|
|
3109
3213
|
"InquiryPriceScaleOutInstance": doInquiryPriceScaleOutInstance,
|
3110
3214
|
"DescribeAutoScaleRecords": doDescribeAutoScaleRecords,
|
3111
3215
|
"DescribeCvmQuota": doDescribeCvmQuota,
|
3216
|
+
"ModifyGlobalConfig": doModifyGlobalConfig,
|
3112
3217
|
"ScaleOutInstance": doScaleOutInstance,
|
3113
3218
|
"ModifyUserManagerPwd": doModifyUserManagerPwd,
|
3114
3219
|
"DescribeHBaseTableOverview": doDescribeHBaseTableOverview,
|
@@ -3118,6 +3223,7 @@ ACTION_MAP = {
|
|
3118
3223
|
"TerminateClusterNodes": doTerminateClusterNodes,
|
3119
3224
|
"ResetYarnConfig": doResetYarnConfig,
|
3120
3225
|
"DescribeUsersForUserManager": doDescribeUsersForUserManager,
|
3226
|
+
"AddMetricScaleStrategy": doAddMetricScaleStrategy,
|
3121
3227
|
"DeleteUserManagerUserList": doDeleteUserManagerUserList,
|
3122
3228
|
"TerminateSLInstance": doTerminateSLInstance,
|
3123
3229
|
"AddUsersForUserManager": doAddUsersForUserManager,
|
@@ -3136,7 +3242,7 @@ ACTION_MAP = {
|
|
3136
3242
|
"CreateInstance": doCreateInstance,
|
3137
3243
|
"InquiryPriceCreateInstance": doInquiryPriceCreateInstance,
|
3138
3244
|
"InquirePriceRenewEmr": doInquirePriceRenewEmr,
|
3139
|
-
"
|
3245
|
+
"DescribeResourceSchedule": doDescribeResourceSchedule,
|
3140
3246
|
"DescribeYarnScheduleHistory": doDescribeYarnScheduleHistory,
|
3141
3247
|
"ModifyResourceScheduleConfig": doModifyResourceScheduleConfig,
|
3142
3248
|
"DescribeHiveQueries": doDescribeHiveQueries,
|
@@ -3145,7 +3251,7 @@ ACTION_MAP = {
|
|
3145
3251
|
"TerminateTasks": doTerminateTasks,
|
3146
3252
|
"TerminateInstance": doTerminateInstance,
|
3147
3253
|
"DescribeAutoScaleStrategies": doDescribeAutoScaleStrategies,
|
3148
|
-
"
|
3254
|
+
"DescribeGlobalConfig": doDescribeGlobalConfig,
|
3149
3255
|
"DescribeAutoScaleGroupGlobalConf": doDescribeAutoScaleGroupGlobalConf,
|
3150
3256
|
"DescribeClusterNodes": doDescribeClusterNodes,
|
3151
3257
|
"DescribeTrinoQueryInfo": doDescribeTrinoQueryInfo,
|