tccli 3.0.1324.1__py2.py3-none-any.whl → 3.0.1326.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tccli/__init__.py +1 -1
- tccli/services/autoscaling/v20180419/api.json +1 -1
- tccli/services/cfs/v20190719/api.json +59 -59
- tccli/services/cfs/v20190719/examples.json +3 -3
- tccli/services/cme/v20191029/api.json +16 -19
- tccli/services/cme/v20191029/examples.json +12 -12
- tccli/services/cynosdb/v20190107/api.json +7 -7
- tccli/services/dlc/dlc_client.py +53 -0
- tccli/services/dlc/v20210125/api.json +51 -0
- tccli/services/dlc/v20210125/examples.json +8 -0
- tccli/services/domain/v20180808/api.json +1 -1
- tccli/services/emr/v20190103/api.json +10 -0
- tccli/services/es/es_client.py +4 -57
- tccli/services/es/v20250101/api.json +0 -207
- tccli/services/es/v20250101/examples.json +0 -8
- tccli/services/ess/v20201111/api.json +5 -5
- tccli/services/essbasic/v20210526/api.json +3 -3
- tccli/services/gs/gs_client.py +106 -0
- tccli/services/gs/v20191118/api.json +145 -0
- tccli/services/gs/v20191118/examples.json +16 -0
- tccli/services/hai/v20230812/api.json +5 -5
- tccli/services/iotexplorer/v20190423/api.json +1 -1
- tccli/services/lke/lke_client.py +0 -53
- tccli/services/lke/v20231130/api.json +0 -113
- tccli/services/lke/v20231130/examples.json +0 -8
- tccli/services/lkeap/v20240522/api.json +1 -1
- tccli/services/monitor/monitor_client.py +53 -0
- tccli/services/monitor/v20180724/api.json +54 -1
- tccli/services/monitor/v20180724/examples.json +8 -0
- tccli/services/mqtt/mqtt_client.py +57 -4
- tccli/services/mqtt/v20240516/api.json +260 -124
- tccli/services/mqtt/v20240516/examples.json +9 -1
- tccli/services/mrs/v20200910/api.json +4 -4
- tccli/services/postgres/postgres_client.py +0 -53
- tccli/services/postgres/v20170312/api.json +0 -235
- tccli/services/postgres/v20170312/examples.json +0 -8
- tccli/services/privatedns/v20201028/api.json +1 -1
- tccli/services/pts/v20210728/api.json +18 -0
- tccli/services/redis/v20180412/api.json +1 -1
- {tccli-3.0.1324.1.dist-info → tccli-3.0.1326.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1324.1.dist-info → tccli-3.0.1326.1.dist-info}/RECORD +44 -44
- {tccli-3.0.1324.1.dist-info → tccli-3.0.1326.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1324.1.dist-info → tccli-3.0.1326.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1324.1.dist-info → tccli-3.0.1326.1.dist-info}/license_files/LICENSE +0 -0
@@ -455,6 +455,13 @@
|
|
455
455
|
"output": "DescribeExporterIntegrationsResponse",
|
456
456
|
"status": "online"
|
457
457
|
},
|
458
|
+
"DescribeExternalClusterRegisterCommand": {
|
459
|
+
"document": "查看外部集群注册命令",
|
460
|
+
"input": "DescribeExternalClusterRegisterCommandRequest",
|
461
|
+
"name": "查看外部集群注册命令",
|
462
|
+
"output": "DescribeExternalClusterRegisterCommandResponse",
|
463
|
+
"status": "online"
|
464
|
+
},
|
458
465
|
"DescribeGrafanaChannels": {
|
459
466
|
"document": "列出 Grafana 所有告警通道",
|
460
467
|
"input": "DescribeGrafanaChannelsRequest",
|
@@ -8666,6 +8673,52 @@
|
|
8666
8673
|
],
|
8667
8674
|
"type": "object"
|
8668
8675
|
},
|
8676
|
+
"DescribeExternalClusterRegisterCommandRequest": {
|
8677
|
+
"document": "DescribeExternalClusterRegisterCommand请求参数结构体",
|
8678
|
+
"members": [
|
8679
|
+
{
|
8680
|
+
"disabled": false,
|
8681
|
+
"document": "实例 ID",
|
8682
|
+
"example": "prom-abcd",
|
8683
|
+
"member": "string",
|
8684
|
+
"name": "InstanceId",
|
8685
|
+
"required": true,
|
8686
|
+
"type": "string"
|
8687
|
+
},
|
8688
|
+
{
|
8689
|
+
"disabled": false,
|
8690
|
+
"document": "集群 ID",
|
8691
|
+
"example": "ecls-abcd",
|
8692
|
+
"member": "string",
|
8693
|
+
"name": "ClusterId",
|
8694
|
+
"required": true,
|
8695
|
+
"type": "string"
|
8696
|
+
}
|
8697
|
+
],
|
8698
|
+
"type": "object"
|
8699
|
+
},
|
8700
|
+
"DescribeExternalClusterRegisterCommandResponse": {
|
8701
|
+
"document": "DescribeExternalClusterRegisterCommand返回参数结构体",
|
8702
|
+
"members": [
|
8703
|
+
{
|
8704
|
+
"disabled": false,
|
8705
|
+
"document": "注册命令",
|
8706
|
+
"example": "--- apiVersion: v1 kind: Namespace metadata: name: prom-abcd --- apiVersion: v1 kind: ServiceAccount metadata: name: proxy-agent-installer namespace: prom-abcd --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: install-proxy-agent roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-admin subjects: - kind: ServiceAccount name: proxy-agent-installer namespace: prom-abcd --- apiVersion: batch/v1 kind: Job metadata: name: proxy-agent-installer namespace: prom-abcd spec: backoffLimit: 5 ttlSecondsAfterFinished: 60 template: spec: tolerations: - operator: Exists serviceAccountName: proxy-agent-installer containers: - name: installer image: ccr.ccs.tencentyun.com/cloudmonitor/agent-installer:v0.0.3 args: - upgrade - tmp - ./ - --install - -n - prom-abcd - --set - proxyAgent.enabled=true - --set - proxyAgent.instanceId=prom-abcd - --set - proxyAgent.instanceToken=token - --set - proxyAgent.clusterId=ecls-abcd - --set - proxyAgent.clusterType=external - --set - proxyAgent.serverAddress=1.1.1.1:8008 - --set - proxyAgent.image=ccr.ccs.tencentyun.com/cloudmonitor/multi-proxy:v1.0.12 restartPolicy: Never",
|
8707
|
+
"member": "string",
|
8708
|
+
"name": "Command",
|
8709
|
+
"output_required": true,
|
8710
|
+
"type": "string",
|
8711
|
+
"value_allowed_null": false
|
8712
|
+
},
|
8713
|
+
{
|
8714
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
8715
|
+
"member": "string",
|
8716
|
+
"name": "RequestId",
|
8717
|
+
"type": "string"
|
8718
|
+
}
|
8719
|
+
],
|
8720
|
+
"type": "object"
|
8721
|
+
},
|
8669
8722
|
"DescribeGrafanaChannelsRequest": {
|
8670
8723
|
"document": "DescribeGrafanaChannels请求参数结构体",
|
8671
8724
|
"members": [
|
@@ -18263,7 +18316,7 @@
|
|
18263
18316
|
},
|
18264
18317
|
{
|
18265
18318
|
"disabled": false,
|
18266
|
-
"document": "集群类型。可填入tke、eks、tkeedge、tdcc,分别代表标准集群、弹性集群、边缘集群、注册集群",
|
18319
|
+
"document": "集群类型。可填入tke、eks、tkeedge、tdcc、external,分别代表标准集群、弹性集群、边缘集群、注册集群 和外部集群",
|
18267
18320
|
"example": "tke",
|
18268
18321
|
"member": "string",
|
18269
18322
|
"name": "ClusterType",
|
@@ -676,6 +676,14 @@
|
|
676
676
|
"title": "查询 exporter 集成列表"
|
677
677
|
}
|
678
678
|
],
|
679
|
+
"DescribeExternalClusterRegisterCommand": [
|
680
|
+
{
|
681
|
+
"document": "",
|
682
|
+
"input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeExternalClusterRegisterCommand\n<公共请求参数>\n\n{\n \"InstanceId\": \"prom-abcd\",\n \"ClusterId\": \"ecls-abcd\"\n}",
|
683
|
+
"output": "{\n \"Response\": {\n \"Command\": \"\\n---\\napiVersion: v1\\nkind: Namespace\\nmetadata:\\n name: prom-abcd\\n---\\napiVersion: v1\\nkind: ServiceAccount\\nmetadata:\\n name: proxy-agent-installer\\n namespace: prom-abcd\\n---\\napiVersion: rbac.authorization.k8s.io/v1\\nkind: ClusterRoleBinding\\nmetadata:\\n name: install-proxy-agent\\nroleRef:\\n apiGroup: rbac.authorization.k8s.io\\n kind: ClusterRole\\n name: cluster-admin\\nsubjects:\\n- kind: ServiceAccount\\n name: proxy-agent-installer\\n namespace: prom-abcd\\n---\\napiVersion: batch/v1\\nkind: Job\\nmetadata:\\n name: proxy-agent-installer\\n namespace: prom-abcd\\nspec:\\n backoffLimit: 5\\n ttlSecondsAfterFinished: 60\\n template:\\n spec:\\n tolerations:\\n - operator: Exists\\n serviceAccountName: proxy-agent-installer\\n containers:\\n - name: installer\\n image: ccr.ccs.tencentyun.com/cloudmonitor/agent-installer:v0.0.3\\n args:\\n - upgrade \\n - tmp\\n - ./\\n - --install\\n - -n\\n - prom-abcd\\n - --set\\n - proxyAgent.enabled=true\\n - --set \\n - proxyAgent.instanceId=prom-abcd\\n - --set\\n - proxyAgent.instanceToken=token\\n - --set\\n - proxyAgent.clusterId=ecls-abcd\\n - --set\\n - proxyAgent.clusterType=external\\n - --set\\n - proxyAgent.serverAddress=1.1.1.1:8008\\n - --set\\n - proxyAgent.image=ccr.ccs.tencentyun.com/cloudmonitor/multi-proxy:v1.0.12\\n - --set\\n - kubeStateMetrics.enabled=true\\n - --set\\n - kubeStateMetrics.image=ccr.ccs.tencentyun.com/cloudmonitor/tmp-kube-state-metrics:v2.6.0-shard\\n - --set\\n - nodeExporter.enabled=true\\n - --set\\n - nodeExporter.image=ccr.ccs.tencentyun.com/tkeimages/node-exporter:v1.3.1\\n restartPolicy: Never\\n\",\n \"RequestId\": \"r3mh2ud5r9568u-e4n3tdamu8uqkwvfu\"\n }\n}",
|
684
|
+
"title": "查看外部集群注册命令"
|
685
|
+
}
|
686
|
+
],
|
679
687
|
"DescribeGrafanaChannels": [
|
680
688
|
{
|
681
689
|
"document": "",
|
@@ -1161,7 +1161,7 @@ def doActivateCaCertificate(args, parsed_globals):
|
|
1161
1161
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1162
1162
|
|
1163
1163
|
|
1164
|
-
def
|
1164
|
+
def doDescribeMessageByTopic(args, parsed_globals):
|
1165
1165
|
g_param = parse_global_arg(parsed_globals)
|
1166
1166
|
|
1167
1167
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1190,11 +1190,11 @@ def doCreateTopic(args, parsed_globals):
|
|
1190
1190
|
client = mod.MqttClient(cred, g_param[OptionsDefine.Region], profile)
|
1191
1191
|
client._sdkVersion += ("_CLI_" + __version__)
|
1192
1192
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1193
|
-
model = models.
|
1193
|
+
model = models.DescribeMessageByTopicRequest()
|
1194
1194
|
model.from_json_string(json.dumps(args))
|
1195
1195
|
start_time = time.time()
|
1196
1196
|
while True:
|
1197
|
-
rsp = client.
|
1197
|
+
rsp = client.DescribeMessageByTopic(model)
|
1198
1198
|
result = rsp.to_json_string()
|
1199
1199
|
try:
|
1200
1200
|
json_obj = json.loads(result)
|
@@ -1993,6 +1993,58 @@ def doDescribeInstanceList(args, parsed_globals):
|
|
1993
1993
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1994
1994
|
|
1995
1995
|
|
1996
|
+
def doCreateTopic(args, parsed_globals):
|
1997
|
+
g_param = parse_global_arg(parsed_globals)
|
1998
|
+
|
1999
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2000
|
+
cred = credential.CVMRoleCredential()
|
2001
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2002
|
+
cred = credential.STSAssumeRoleCredential(
|
2003
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2004
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2005
|
+
)
|
2006
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2007
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2008
|
+
else:
|
2009
|
+
cred = credential.Credential(
|
2010
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2011
|
+
)
|
2012
|
+
http_profile = HttpProfile(
|
2013
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2014
|
+
reqMethod="POST",
|
2015
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2016
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2017
|
+
)
|
2018
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2019
|
+
if g_param[OptionsDefine.Language]:
|
2020
|
+
profile.language = g_param[OptionsDefine.Language]
|
2021
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2022
|
+
client = mod.MqttClient(cred, g_param[OptionsDefine.Region], profile)
|
2023
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2024
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2025
|
+
model = models.CreateTopicRequest()
|
2026
|
+
model.from_json_string(json.dumps(args))
|
2027
|
+
start_time = time.time()
|
2028
|
+
while True:
|
2029
|
+
rsp = client.CreateTopic(model)
|
2030
|
+
result = rsp.to_json_string()
|
2031
|
+
try:
|
2032
|
+
json_obj = json.loads(result)
|
2033
|
+
except TypeError as e:
|
2034
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2035
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2036
|
+
break
|
2037
|
+
cur_time = time.time()
|
2038
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2039
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2040
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2041
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2042
|
+
else:
|
2043
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2044
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2045
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2046
|
+
|
2047
|
+
|
1996
2048
|
def doModifyAuthorizationPolicy(args, parsed_globals):
|
1997
2049
|
g_param = parse_global_arg(parsed_globals)
|
1998
2050
|
|
@@ -2754,7 +2806,7 @@ ACTION_MAP = {
|
|
2754
2806
|
"DescribeProductSKUList": doDescribeProductSKUList,
|
2755
2807
|
"DescribeCaCertificates": doDescribeCaCertificates,
|
2756
2808
|
"ActivateCaCertificate": doActivateCaCertificate,
|
2757
|
-
"
|
2809
|
+
"DescribeMessageByTopic": doDescribeMessageByTopic,
|
2758
2810
|
"DeleteDeviceCertificate": doDeleteDeviceCertificate,
|
2759
2811
|
"ApplyRegistrationCode": doApplyRegistrationCode,
|
2760
2812
|
"ModifyJWKSAuthenticator": doModifyJWKSAuthenticator,
|
@@ -2770,6 +2822,7 @@ ACTION_MAP = {
|
|
2770
2822
|
"CreateJWKSAuthenticator": doCreateJWKSAuthenticator,
|
2771
2823
|
"ModifyUser": doModifyUser,
|
2772
2824
|
"DescribeInstanceList": doDescribeInstanceList,
|
2825
|
+
"CreateTopic": doCreateTopic,
|
2773
2826
|
"ModifyAuthorizationPolicy": doModifyAuthorizationPolicy,
|
2774
2827
|
"DeleteAuthorizationPolicy": doDeleteAuthorizationPolicy,
|
2775
2828
|
"ModifyHttpAuthenticator": doModifyHttpAuthenticator,
|