tccli 3.0.896.1__py2.py3-none-any.whl → 3.0.898.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/examples/cdb/v20170320/CreateDatabase.md +22 -0
- tccli/examples/cdn/v20180606/ModifyDomainConfig.md +88 -0
- tccli/examples/ckafka/v20190819/CreatePostPaidInstance.md +154 -0
- tccli/examples/cynosdb/v20190107/DescribeProxySpecs.md +56 -0
- tccli/examples/cynosdb/v20190107/DescribeSupportProxyVersion.md +24 -0
- tccli/examples/ess/v20201111/CreateFlowApprovers.md +3 -1
- tccli/examples/ess/v20201111/DescribeThirdPartyAuthCode.md +1 -1
- tccli/examples/postgres/v20170312/CreateReadOnlyDBInstance.md +1 -1
- tccli/examples/postgres/v20170312/UpgradeDBInstanceKernelVersion.md +1 -1
- tccli/examples/sqlserver/v20180328/DescribeDBInstancesAttribute.md +6 -1
- tccli/examples/sqlserver/v20180328/DescribeDBs.md +1 -1
- tccli/examples/tdmq/v20200217/CreateCmqQueue.md +2 -2
- tccli/examples/tke/v20180525/CreateClusterEndpointVip.md +1 -1
- tccli/examples/trp/v20210515/CreateCodeBatch.md +11 -5
- tccli/examples/trp/v20210515/DescribeScanLogs.md +1 -1
- tccli/examples/trp/v20210515/DescribeTraceCodeById.md +16 -11
- tccli/examples/trp/v20210515/ModifyCodeBatch.md +3 -3
- tccli/examples/vod/v20180717/CreateQualityInspectTemplate.md +24 -0
- tccli/examples/vod/v20180717/DeleteQualityInspectTemplate.md +20 -0
- tccli/examples/vod/v20180717/DescribeQualityInspectTemplates.md +44 -0
- tccli/examples/vod/v20180717/DescribeTaskDetail.md +4 -0
- tccli/examples/vod/v20180717/InspectMediaQuality.md +22 -0
- tccli/examples/vod/v20180717/ModifyQualityInspectTemplate.md +21 -0
- tccli/examples/yinsuda/v20220527/DescribeKTVMusicAccompanySegmentUrl.md +70 -0
- tccli/services/cdb/cdb_client.py +57 -4
- tccli/services/cdb/v20170320/api.json +52 -0
- tccli/services/cdb/v20170320/examples.json +8 -0
- tccli/services/cdn/cdn_client.py +57 -4
- tccli/services/cdn/v20180606/api.json +52 -0
- tccli/services/cdn/v20180606/examples.json +26 -0
- tccli/services/ckafka/ckafka_client.py +61 -8
- tccli/services/ckafka/v20190819/api.json +303 -7
- tccli/services/ckafka/v20190819/examples.json +20 -0
- tccli/services/clb/v20180317/api.json +3 -1
- tccli/services/cynosdb/cynosdb_client.py +106 -0
- tccli/services/cynosdb/v20190107/api.json +134 -0
- tccli/services/cynosdb/v20190107/examples.json +22 -0
- tccli/services/emr/v20190103/api.json +6 -2
- tccli/services/ess/v20201111/api.json +42 -11
- tccli/services/ess/v20201111/examples.json +3 -3
- tccli/services/essbasic/v20210526/api.json +27 -1
- tccli/services/ocr/v20181119/api.json +4 -2
- tccli/services/postgres/v20170312/api.json +2 -31
- tccli/services/postgres/v20170312/examples.json +2 -2
- tccli/services/sqlserver/v20180328/api.json +72 -15
- tccli/services/sqlserver/v20180328/examples.json +3 -3
- tccli/services/tbaas/tbaas_client.py +4 -322
- tccli/services/tbaas/v20180416/api.json +108 -810
- tccli/services/tbaas/v20180416/examples.json +0 -48
- tccli/services/tbp/v20190311/api.json +10 -10
- tccli/services/tdid/tdid_client.py +67 -1551
- tccli/services/tdid/v20210519/api.json +331 -3504
- tccli/services/tdid/v20210519/examples.json +0 -224
- tccli/services/tdmq/v20200217/api.json +2 -19
- tccli/services/tdmq/v20200217/examples.json +2 -2
- tccli/services/tione/v20211111/api.json +24 -2
- tccli/services/tke/v20180525/api.json +4 -6
- tccli/services/tke/v20180525/examples.json +2 -2
- tccli/services/trp/v20210515/api.json +285 -113
- tccli/services/trp/v20210515/examples.json +6 -6
- tccli/services/vod/v20180717/api.json +1346 -2
- tccli/services/vod/v20180717/examples.json +44 -4
- tccli/services/vod/vod_client.py +287 -22
- tccli/services/yinsuda/v20220527/api.json +159 -0
- tccli/services/yinsuda/v20220527/examples.json +14 -0
- tccli/services/yinsuda/yinsuda_client.py +53 -0
- {tccli-3.0.896.1.dist-info → tccli-3.0.898.1.dist-info}/METADATA +2 -2
- {tccli-3.0.896.1.dist-info → tccli-3.0.898.1.dist-info}/RECORD +72 -61
- {tccli-3.0.896.1.dist-info → tccli-3.0.898.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.896.1.dist-info → tccli-3.0.898.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.896.1.dist-info → tccli-3.0.898.1.dist-info}/license_files/LICENSE +0 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
**Example 1: 修改音画质检测模板。**
|
2
|
+
|
3
|
+
修改音画质检测模板。
|
4
|
+
|
5
|
+
Input:
|
6
|
+
|
7
|
+
```
|
8
|
+
tccli vod ModifyQualityInspectTemplate --cli-unfold-argument \
|
9
|
+
--Definition 20001 \
|
10
|
+
--Name testNewName
|
11
|
+
```
|
12
|
+
|
13
|
+
Output:
|
14
|
+
```
|
15
|
+
{
|
16
|
+
"Response": {
|
17
|
+
"RequestId": "3c140219-cfe9-470e-b241-907877d6fb04"
|
18
|
+
}
|
19
|
+
}
|
20
|
+
```
|
21
|
+
|
@@ -0,0 +1,70 @@
|
|
1
|
+
**Example 1: 获取歌曲伴奏链接**
|
2
|
+
|
3
|
+
获取歌曲伴奏链接
|
4
|
+
|
5
|
+
Input:
|
6
|
+
|
7
|
+
```
|
8
|
+
tccli yinsuda DescribeKTVMusicAccompanySegmentUrl --cli-unfold-argument \
|
9
|
+
--AppName abc \
|
10
|
+
--UserId abc \
|
11
|
+
--MusicId abc \
|
12
|
+
--PlayScene abc \
|
13
|
+
--RoomId abc
|
14
|
+
```
|
15
|
+
|
16
|
+
Output:
|
17
|
+
```
|
18
|
+
{
|
19
|
+
"Response": {
|
20
|
+
"Status": 0,
|
21
|
+
"Url": "abc",
|
22
|
+
"ExtName": "abc",
|
23
|
+
"SegmentBegin": 0,
|
24
|
+
"SegmentEnd": 0,
|
25
|
+
"FileSize": 0,
|
26
|
+
"OtherSegments": [
|
27
|
+
{
|
28
|
+
"SegmentBegin": 0,
|
29
|
+
"SegmentEnd": 0
|
30
|
+
}
|
31
|
+
],
|
32
|
+
"RequestId": "abc"
|
33
|
+
}
|
34
|
+
}
|
35
|
+
```
|
36
|
+
|
37
|
+
**Example 2: 获取歌曲伴奏链接(脱敏)**
|
38
|
+
|
39
|
+
脱敏的实际请求
|
40
|
+
|
41
|
+
Input:
|
42
|
+
|
43
|
+
```
|
44
|
+
tccli yinsuda DescribeKTVMusicAccompanySegmentUrl --cli-unfold-argument \
|
45
|
+
--AppName monk_dev \
|
46
|
+
--UserId monk \
|
47
|
+
--MusicId mid-9Eyb67xe
|
48
|
+
```
|
49
|
+
|
50
|
+
Output:
|
51
|
+
```
|
52
|
+
{
|
53
|
+
"Response": {
|
54
|
+
"ExtName": "mkv",
|
55
|
+
"FileSize": 1087189,
|
56
|
+
"OtherSegments": [
|
57
|
+
{
|
58
|
+
"SegmentBegin": 91798,
|
59
|
+
"SegmentEnd": 120177
|
60
|
+
}
|
61
|
+
],
|
62
|
+
"RequestId": "865e06ab-1aae-42e1-ae29-3137f143fb01",
|
63
|
+
"SegmentBegin": 91798,
|
64
|
+
"SegmentEnd": 120177,
|
65
|
+
"Status": 0,
|
66
|
+
"Url": "http://****/202306151716/****/0db8f1208ee298295cc6c81bac448751"
|
67
|
+
}
|
68
|
+
}
|
69
|
+
```
|
70
|
+
|
tccli/services/cdb/cdb_client.py
CHANGED
@@ -1733,6 +1733,58 @@ def doSwitchDBInstanceMasterSlave(args, parsed_globals):
|
|
1733
1733
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1734
1734
|
|
1735
1735
|
|
1736
|
+
def doDeleteAuditPolicy(args, parsed_globals):
|
1737
|
+
g_param = parse_global_arg(parsed_globals)
|
1738
|
+
|
1739
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1740
|
+
cred = credential.CVMRoleCredential()
|
1741
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1742
|
+
cred = credential.STSAssumeRoleCredential(
|
1743
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1744
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1745
|
+
)
|
1746
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1747
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1748
|
+
else:
|
1749
|
+
cred = credential.Credential(
|
1750
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1751
|
+
)
|
1752
|
+
http_profile = HttpProfile(
|
1753
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1754
|
+
reqMethod="POST",
|
1755
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1756
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1757
|
+
)
|
1758
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1759
|
+
if g_param[OptionsDefine.Language]:
|
1760
|
+
profile.language = g_param[OptionsDefine.Language]
|
1761
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1762
|
+
client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
|
1763
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1764
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1765
|
+
model = models.DeleteAuditPolicyRequest()
|
1766
|
+
model.from_json_string(json.dumps(args))
|
1767
|
+
start_time = time.time()
|
1768
|
+
while True:
|
1769
|
+
rsp = client.DeleteAuditPolicy(model)
|
1770
|
+
result = rsp.to_json_string()
|
1771
|
+
try:
|
1772
|
+
json_obj = json.loads(result)
|
1773
|
+
except TypeError as e:
|
1774
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1775
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1776
|
+
break
|
1777
|
+
cur_time = time.time()
|
1778
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1779
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1780
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1781
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1782
|
+
else:
|
1783
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1784
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1785
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1786
|
+
|
1787
|
+
|
1736
1788
|
def doDisassociateSecurityGroups(args, parsed_globals):
|
1737
1789
|
g_param = parse_global_arg(parsed_globals)
|
1738
1790
|
|
@@ -2929,7 +2981,7 @@ def doCreateCdbProxyAddress(args, parsed_globals):
|
|
2929
2981
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2930
2982
|
|
2931
2983
|
|
2932
|
-
def
|
2984
|
+
def doCreateDatabase(args, parsed_globals):
|
2933
2985
|
g_param = parse_global_arg(parsed_globals)
|
2934
2986
|
|
2935
2987
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2958,11 +3010,11 @@ def doDeleteAuditPolicy(args, parsed_globals):
|
|
2958
3010
|
client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
|
2959
3011
|
client._sdkVersion += ("_CLI_" + __version__)
|
2960
3012
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2961
|
-
model = models.
|
3013
|
+
model = models.CreateDatabaseRequest()
|
2962
3014
|
model.from_json_string(json.dumps(args))
|
2963
3015
|
start_time = time.time()
|
2964
3016
|
while True:
|
2965
|
-
rsp = client.
|
3017
|
+
rsp = client.CreateDatabase(model)
|
2966
3018
|
result = rsp.to_json_string()
|
2967
3019
|
try:
|
2968
3020
|
json_obj = json.loads(result)
|
@@ -7809,6 +7861,7 @@ ACTION_MAP = {
|
|
7809
7861
|
"DescribeDatabases": doDescribeDatabases,
|
7810
7862
|
"DescribeErrorLogData": doDescribeErrorLogData,
|
7811
7863
|
"SwitchDBInstanceMasterSlave": doSwitchDBInstanceMasterSlave,
|
7864
|
+
"DeleteAuditPolicy": doDeleteAuditPolicy,
|
7812
7865
|
"DisassociateSecurityGroups": doDisassociateSecurityGroups,
|
7813
7866
|
"ModifyCdbProxyParam": doModifyCdbProxyParam,
|
7814
7867
|
"DescribeTables": doDescribeTables,
|
@@ -7832,7 +7885,7 @@ ACTION_MAP = {
|
|
7832
7885
|
"ModifyDBInstanceVipVport": doModifyDBInstanceVipVport,
|
7833
7886
|
"DescribeDBInstanceConfig": doDescribeDBInstanceConfig,
|
7834
7887
|
"CreateCdbProxyAddress": doCreateCdbProxyAddress,
|
7835
|
-
"
|
7888
|
+
"CreateDatabase": doCreateDatabase,
|
7836
7889
|
"DescribeProjectSecurityGroups": doDescribeProjectSecurityGroups,
|
7837
7890
|
"CreateDBInstance": doCreateDBInstance,
|
7838
7891
|
"DescribeSlowLogs": doDescribeSlowLogs,
|
@@ -140,6 +140,13 @@
|
|
140
140
|
"output": "CreateDBInstanceHourResponse",
|
141
141
|
"status": "online"
|
142
142
|
},
|
143
|
+
"CreateDatabase": {
|
144
|
+
"document": "本接口(CreateDatabase)用于在云数据库实例中创建数据库。",
|
145
|
+
"input": "CreateDatabaseRequest",
|
146
|
+
"name": "创建数据库",
|
147
|
+
"output": "CreateDatabaseResponse",
|
148
|
+
"status": "online"
|
149
|
+
},
|
143
150
|
"CreateDeployGroup": {
|
144
151
|
"document": "本接口(CreateDeployGroup)用于创建放置实例的置放群组",
|
145
152
|
"input": "CreateDeployGroupRequest",
|
@@ -5637,6 +5644,51 @@
|
|
5637
5644
|
],
|
5638
5645
|
"type": "object"
|
5639
5646
|
},
|
5647
|
+
"CreateDatabaseRequest": {
|
5648
|
+
"document": "CreateDatabase请求参数结构体",
|
5649
|
+
"members": [
|
5650
|
+
{
|
5651
|
+
"disabled": false,
|
5652
|
+
"document": "实例 ID,格式如:cdb-c1nl9rpv,与云数据库控制台页面中显示的实例 ID 相同。",
|
5653
|
+
"example": "cdb-c1nl9rpv",
|
5654
|
+
"member": "string",
|
5655
|
+
"name": "InstanceId",
|
5656
|
+
"required": true,
|
5657
|
+
"type": "string"
|
5658
|
+
},
|
5659
|
+
{
|
5660
|
+
"disabled": false,
|
5661
|
+
"document": "数据库名称。",
|
5662
|
+
"example": "db_test",
|
5663
|
+
"member": "string",
|
5664
|
+
"name": "DBName",
|
5665
|
+
"required": true,
|
5666
|
+
"type": "string"
|
5667
|
+
},
|
5668
|
+
{
|
5669
|
+
"disabled": false,
|
5670
|
+
"document": "字符集,可选值:utf8,gbk,latin1,utf8mb4。",
|
5671
|
+
"example": "utf8",
|
5672
|
+
"member": "string",
|
5673
|
+
"name": "CharacterSetName",
|
5674
|
+
"required": true,
|
5675
|
+
"type": "string"
|
5676
|
+
}
|
5677
|
+
],
|
5678
|
+
"type": "object"
|
5679
|
+
},
|
5680
|
+
"CreateDatabaseResponse": {
|
5681
|
+
"document": "CreateDatabase返回参数结构体",
|
5682
|
+
"members": [
|
5683
|
+
{
|
5684
|
+
"document": "唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。",
|
5685
|
+
"member": "string",
|
5686
|
+
"name": "RequestId",
|
5687
|
+
"type": "string"
|
5688
|
+
}
|
5689
|
+
],
|
5690
|
+
"type": "object"
|
5691
|
+
},
|
5640
5692
|
"CreateDeployGroupRequest": {
|
5641
5693
|
"document": "CreateDeployGroup请求参数结构体",
|
5642
5694
|
"members": [
|
@@ -184,6 +184,14 @@
|
|
184
184
|
"title": "创建云数据库实例(按量计费)"
|
185
185
|
}
|
186
186
|
],
|
187
|
+
"CreateDatabase": [
|
188
|
+
{
|
189
|
+
"document": "创建数据库",
|
190
|
+
"input": "POST / HTTP/1.1\nHost: cdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateDatabase\n<公共请求参数>\n\n{\n \"InstanceId\": \"abc\",\n \"DBName\": \"db_test\",\n \"CharacterSetName\": \"utf8\"\n}",
|
191
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"abc\"\n }\n}",
|
192
|
+
"title": "创建数据库"
|
193
|
+
}
|
194
|
+
],
|
187
195
|
"CreateDeployGroup": [
|
188
196
|
{
|
189
197
|
"document": "用户可以通过该接口创建置放群组",
|
tccli/services/cdn/cdn_client.py
CHANGED
@@ -121,7 +121,7 @@ def doDescribeScdnConfig(args, parsed_globals):
|
|
121
121
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
122
122
|
|
123
123
|
|
124
|
-
def
|
124
|
+
def doModifyDomainConfig(args, parsed_globals):
|
125
125
|
g_param = parse_global_arg(parsed_globals)
|
126
126
|
|
127
127
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -150,11 +150,11 @@ def doListScdnTopBotData(args, parsed_globals):
|
|
150
150
|
client = mod.CdnClient(cred, g_param[OptionsDefine.Region], profile)
|
151
151
|
client._sdkVersion += ("_CLI_" + __version__)
|
152
152
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
153
|
-
model = models.
|
153
|
+
model = models.ModifyDomainConfigRequest()
|
154
154
|
model.from_json_string(json.dumps(args))
|
155
155
|
start_time = time.time()
|
156
156
|
while True:
|
157
|
-
rsp = client.
|
157
|
+
rsp = client.ModifyDomainConfig(model)
|
158
158
|
result = rsp.to_json_string()
|
159
159
|
try:
|
160
160
|
json_obj = json.loads(result)
|
@@ -1993,6 +1993,58 @@ def doDescribeImageConfig(args, parsed_globals):
|
|
1993
1993
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1994
1994
|
|
1995
1995
|
|
1996
|
+
def doListScdnTopBotData(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('-', '_')]
|
2005
|
+
)
|
2006
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_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.CdnClient(cred, g_param[OptionsDefine.Region], profile)
|
2023
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2024
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2025
|
+
model = models.ListScdnTopBotDataRequest()
|
2026
|
+
model.from_json_string(json.dumps(args))
|
2027
|
+
start_time = time.time()
|
2028
|
+
while True:
|
2029
|
+
rsp = client.ListScdnTopBotData(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 doDescribeScdnTopData(args, parsed_globals):
|
1997
2049
|
g_param = parse_global_arg(parsed_globals)
|
1998
2050
|
|
@@ -4190,7 +4242,7 @@ MODELS_MAP = {
|
|
4190
4242
|
ACTION_MAP = {
|
4191
4243
|
"AddCLSTopicDomains": doAddCLSTopicDomains,
|
4192
4244
|
"DescribeScdnConfig": doDescribeScdnConfig,
|
4193
|
-
"
|
4245
|
+
"ModifyDomainConfig": doModifyDomainConfig,
|
4194
4246
|
"DescribeIpStatus": doDescribeIpStatus,
|
4195
4247
|
"DescribeMapInfo": doDescribeMapInfo,
|
4196
4248
|
"DeleteCdnDomain": doDeleteCdnDomain,
|
@@ -4226,6 +4278,7 @@ ACTION_MAP = {
|
|
4226
4278
|
"CreateScdnLogTask": doCreateScdnLogTask,
|
4227
4279
|
"DescribePushQuota": doDescribePushQuota,
|
4228
4280
|
"DescribeImageConfig": doDescribeImageConfig,
|
4281
|
+
"ListScdnTopBotData": doListScdnTopBotData,
|
4229
4282
|
"DescribeScdnTopData": doDescribeScdnTopData,
|
4230
4283
|
"StopCdnDomain": doStopCdnDomain,
|
4231
4284
|
"ListTopData": doListTopData,
|
@@ -462,6 +462,13 @@
|
|
462
462
|
"output": "ManageClsTopicDomainsResponse",
|
463
463
|
"status": "online"
|
464
464
|
},
|
465
|
+
"ModifyDomainConfig": {
|
466
|
+
"document": "ModifyDomainConfig 用于修改内容分发网络加速域名配置信息\n注意:\nRoute 字段,使用点分隔,最后一段称为叶子节点,非叶子节点配置保持不变;\nValue 字段,使用 json 进行序列化,其中固定 update 作为 key,配置路径值参考 https://cloud.tencent.com/document/product/228/41116 接口各配置项复杂类型,为配置路径对应复杂类型下的节点。\n云审计相关:接口的入参可能包含密钥等敏感信息,所以此接口的入参不会上报到云审计。",
|
467
|
+
"input": "ModifyDomainConfigRequest",
|
468
|
+
"name": "变更加速域名配置",
|
469
|
+
"output": "ModifyDomainConfigResponse",
|
470
|
+
"status": "online"
|
471
|
+
},
|
465
472
|
"ModifyPurgeFetchTaskStatus": {
|
466
473
|
"document": "ModifyPurgeFetchTaskStatus 用于上报定时刷新预热任务执行状态",
|
467
474
|
"input": "ModifyPurgeFetchTaskStatusRequest",
|
@@ -12725,6 +12732,51 @@
|
|
12725
12732
|
],
|
12726
12733
|
"usage": "both"
|
12727
12734
|
},
|
12735
|
+
"ModifyDomainConfigRequest": {
|
12736
|
+
"document": "ModifyDomainConfig请求参数结构体",
|
12737
|
+
"members": [
|
12738
|
+
{
|
12739
|
+
"disabled": false,
|
12740
|
+
"document": "域名",
|
12741
|
+
"example": "www.test.com",
|
12742
|
+
"member": "string",
|
12743
|
+
"name": "Domain",
|
12744
|
+
"required": true,
|
12745
|
+
"type": "string"
|
12746
|
+
},
|
12747
|
+
{
|
12748
|
+
"disabled": false,
|
12749
|
+
"document": "配置路径",
|
12750
|
+
"example": "Https.CertInfo.CertId",
|
12751
|
+
"member": "string",
|
12752
|
+
"name": "Route",
|
12753
|
+
"required": true,
|
12754
|
+
"type": "string"
|
12755
|
+
},
|
12756
|
+
{
|
12757
|
+
"disabled": false,
|
12758
|
+
"document": "配置路径值,使用 json 进行序列化,其中固定 update 作为 key",
|
12759
|
+
"example": "{\\\"update\\\":\\\"0VpOXiPz\\\"}",
|
12760
|
+
"member": "string",
|
12761
|
+
"name": "Value",
|
12762
|
+
"required": true,
|
12763
|
+
"type": "string"
|
12764
|
+
}
|
12765
|
+
],
|
12766
|
+
"type": "object"
|
12767
|
+
},
|
12768
|
+
"ModifyDomainConfigResponse": {
|
12769
|
+
"document": "ModifyDomainConfig返回参数结构体",
|
12770
|
+
"members": [
|
12771
|
+
{
|
12772
|
+
"document": "唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。",
|
12773
|
+
"member": "string",
|
12774
|
+
"name": "RequestId",
|
12775
|
+
"type": "string"
|
12776
|
+
}
|
12777
|
+
],
|
12778
|
+
"type": "object"
|
12779
|
+
},
|
12728
12780
|
"ModifyPurgeFetchTaskStatusRequest": {
|
12729
12781
|
"document": "ModifyPurgeFetchTaskStatus请求参数结构体",
|
12730
12782
|
"members": [
|
@@ -528,6 +528,32 @@
|
|
528
528
|
"title": "管理日志主题下域名列表"
|
529
529
|
}
|
530
530
|
],
|
531
|
+
"ModifyDomainConfig": [
|
532
|
+
{
|
533
|
+
"document": "更新 HTTPS 服务器证书 ID(在 SSL 证书管理进行证书托管时自动生成)",
|
534
|
+
"input": "POST / HTTP/1.1\nHost: cdn.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyDomainConfig\n<公共请求参数>\n\n{\n \"Domain\": \"www.test.com\",\n \"Route\": \"Https.CertInfo.CertId\",\n \"Value\": \"{\\\"update\\\":\\\"0VpOXiPz\\\"}\"\n}",
|
535
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"56a166ec-d784-4001-a850-7d62a5c07971\"\n }\n}",
|
536
|
+
"title": "更新 HTTPS 服务器证书 ID(在 SSL 证书管理进行证书托管时自动生成)"
|
537
|
+
},
|
538
|
+
{
|
539
|
+
"document": "更新域名回源建连超时时间",
|
540
|
+
"input": "POST / HTTP/1.1\nHost: cdn.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyDomainConfig\n<公共请求参数>\n\n{\n \"Domain\": \"www.test.com\",\n \"Route\": \"OriginPullTimeout.ConnectTimeout\",\n \"Value\": \"{\\\"update\\\":10}\"\n}",
|
541
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"23cd4005-496f-4bc4-87d8-ab348d5b0c11\"\n }\n}",
|
542
|
+
"title": "更新域名回源建连超时时间"
|
543
|
+
},
|
544
|
+
{
|
545
|
+
"document": "更新域名回源超时配置",
|
546
|
+
"input": "POST / HTTP/1.1\nHost: cdn.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyDomainConfig\n<公共请求参数>\n\n{\n \"Domain\": \"www.test.com\",\n \"Route\": \"OriginPullTimeout\",\n \"Value\": \"{\\\"update\\\":{\\\"ConnectTimeout\\\":10,\\\"ReceiveTimeout\\\":10}}\"\n}",
|
547
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"23cd4005-496f-4bc4-87d8-ab348d5b0c21\"\n }\n}",
|
548
|
+
"title": "更新域名回源超时配置"
|
549
|
+
},
|
550
|
+
{
|
551
|
+
"document": "更新域名源站配置",
|
552
|
+
"input": "POST / HTTP/1.1\nHost: cdn.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyDomainConfig\n<公共请求参数>\n\n{\n \"Domain\": \"www.test.com\",\n \"Route\": \"Origin.Origins\",\n \"Value\": \"{\\\"update\\\":[\\\"1.1.1.1\\\"]}\"\n}",
|
553
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"eb029ee0-7e91-4a18-86f3-7fac952a446e\"\n }\n}",
|
554
|
+
"title": "更新域名源站配置"
|
555
|
+
}
|
556
|
+
],
|
531
557
|
"ModifyPurgeFetchTaskStatus": [
|
532
558
|
{
|
533
559
|
"document": "",
|
@@ -2461,6 +2461,58 @@ def doFetchLatestDatahubMessageList(args, parsed_globals):
|
|
2461
2461
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2462
2462
|
|
2463
2463
|
|
2464
|
+
def doCreateUser(args, parsed_globals):
|
2465
|
+
g_param = parse_global_arg(parsed_globals)
|
2466
|
+
|
2467
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2468
|
+
cred = credential.CVMRoleCredential()
|
2469
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2470
|
+
cred = credential.STSAssumeRoleCredential(
|
2471
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2472
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2473
|
+
)
|
2474
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2475
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2476
|
+
else:
|
2477
|
+
cred = credential.Credential(
|
2478
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2479
|
+
)
|
2480
|
+
http_profile = HttpProfile(
|
2481
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2482
|
+
reqMethod="POST",
|
2483
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2484
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2485
|
+
)
|
2486
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2487
|
+
if g_param[OptionsDefine.Language]:
|
2488
|
+
profile.language = g_param[OptionsDefine.Language]
|
2489
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2490
|
+
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
2491
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2492
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2493
|
+
model = models.CreateUserRequest()
|
2494
|
+
model.from_json_string(json.dumps(args))
|
2495
|
+
start_time = time.time()
|
2496
|
+
while True:
|
2497
|
+
rsp = client.CreateUser(model)
|
2498
|
+
result = rsp.to_json_string()
|
2499
|
+
try:
|
2500
|
+
json_obj = json.loads(result)
|
2501
|
+
except TypeError as e:
|
2502
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2503
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2504
|
+
break
|
2505
|
+
cur_time = time.time()
|
2506
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2507
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2508
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2509
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2510
|
+
else:
|
2511
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2512
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2513
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2514
|
+
|
2515
|
+
|
2464
2516
|
def doDescribeTaskStatus(args, parsed_globals):
|
2465
2517
|
g_param = parse_global_arg(parsed_globals)
|
2466
2518
|
|
@@ -3501,7 +3553,7 @@ def doDescribeTopicProduceConnection(args, parsed_globals):
|
|
3501
3553
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3502
3554
|
|
3503
3555
|
|
3504
|
-
def
|
3556
|
+
def doCreatePostPaidInstance(args, parsed_globals):
|
3505
3557
|
g_param = parse_global_arg(parsed_globals)
|
3506
3558
|
|
3507
3559
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3530,11 +3582,11 @@ def doDescribeTopic(args, parsed_globals):
|
|
3530
3582
|
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
3531
3583
|
client._sdkVersion += ("_CLI_" + __version__)
|
3532
3584
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3533
|
-
model = models.
|
3585
|
+
model = models.CreatePostPaidInstanceRequest()
|
3534
3586
|
model.from_json_string(json.dumps(args))
|
3535
3587
|
start_time = time.time()
|
3536
3588
|
while True:
|
3537
|
-
rsp = client.
|
3589
|
+
rsp = client.CreatePostPaidInstance(model)
|
3538
3590
|
result = rsp.to_json_string()
|
3539
3591
|
try:
|
3540
3592
|
json_obj = json.loads(result)
|
@@ -3813,7 +3865,7 @@ def doDescribeConnectResources(args, parsed_globals):
|
|
3813
3865
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3814
3866
|
|
3815
3867
|
|
3816
|
-
def
|
3868
|
+
def doDescribeTopic(args, parsed_globals):
|
3817
3869
|
g_param = parse_global_arg(parsed_globals)
|
3818
3870
|
|
3819
3871
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3842,11 +3894,11 @@ def doCreateUser(args, parsed_globals):
|
|
3842
3894
|
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
3843
3895
|
client._sdkVersion += ("_CLI_" + __version__)
|
3844
3896
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3845
|
-
model = models.
|
3897
|
+
model = models.DescribeTopicRequest()
|
3846
3898
|
model.from_json_string(json.dumps(args))
|
3847
3899
|
start_time = time.time()
|
3848
3900
|
while True:
|
3849
|
-
rsp = client.
|
3901
|
+
rsp = client.DescribeTopic(model)
|
3850
3902
|
result = rsp.to_json_string()
|
3851
3903
|
try:
|
3852
3904
|
json_obj = json.loads(result)
|
@@ -4131,6 +4183,7 @@ ACTION_MAP = {
|
|
4131
4183
|
"DeleteRouteTriggerTime": doDeleteRouteTriggerTime,
|
4132
4184
|
"CreatePartition": doCreatePartition,
|
4133
4185
|
"FetchLatestDatahubMessageList": doFetchLatestDatahubMessageList,
|
4186
|
+
"CreateUser": doCreateUser,
|
4134
4187
|
"DescribeTaskStatus": doDescribeTaskStatus,
|
4135
4188
|
"BatchModifyGroupOffsets": doBatchModifyGroupOffsets,
|
4136
4189
|
"FetchDatahubMessageByOffset": doFetchDatahubMessageByOffset,
|
@@ -4151,13 +4204,13 @@ ACTION_MAP = {
|
|
4151
4204
|
"DescribeTopicAttributes": doDescribeTopicAttributes,
|
4152
4205
|
"AuthorizeToken": doAuthorizeToken,
|
4153
4206
|
"DescribeTopicProduceConnection": doDescribeTopicProduceConnection,
|
4154
|
-
"
|
4207
|
+
"CreatePostPaidInstance": doCreatePostPaidInstance,
|
4155
4208
|
"CreateAclRule": doCreateAclRule,
|
4156
4209
|
"ModifyInstanceAttributes": doModifyInstanceAttributes,
|
4157
4210
|
"DescribeCkafkaZone": doDescribeCkafkaZone,
|
4158
4211
|
"DescribeRegion": doDescribeRegion,
|
4159
4212
|
"DescribeConnectResources": doDescribeConnectResources,
|
4160
|
-
"
|
4213
|
+
"DescribeTopic": doDescribeTopic,
|
4161
4214
|
"DeleteTopic": doDeleteTopic,
|
4162
4215
|
"ModifyPassword": doModifyPassword,
|
4163
4216
|
"InquireCkafkaPrice": doInquireCkafkaPrice,
|