tccli 3.0.1150.1__py2.py3-none-any.whl → 3.0.1152.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/__init__.py +3 -0
- tccli/services/asr/v20190614/api.json +2 -2
- tccli/services/cbs/cbs_client.py +61 -8
- tccli/services/cbs/v20170312/api.json +64 -0
- tccli/services/cbs/v20170312/examples.json +8 -0
- tccli/services/ccc/v20200210/api.json +2 -2
- tccli/services/cdc/v20201214/api.json +101 -20
- tccli/services/cdc/v20201214/examples.json +1 -1
- tccli/services/cdz/__init__.py +4 -0
- tccli/services/cdz/cdz_client.py +248 -0
- tccli/services/cdz/v20221123/api.json +305 -0
- tccli/services/cdz/v20221123/examples.json +21 -0
- tccli/services/clb/v20180317/api.json +9 -0
- tccli/services/cvm/v20170312/api.json +10 -10
- tccli/services/cynosdb/v20190107/api.json +1 -1
- tccli/services/dasb/v20191018/api.json +5 -4
- tccli/services/dlc/v20210125/api.json +19 -1
- tccli/services/dlc/v20210125/examples.json +1 -1
- tccli/services/es/v20180416/api.json +19 -1
- tccli/services/es/v20180416/examples.json +1 -1
- tccli/services/ess/v20201111/api.json +4 -4
- tccli/services/essbasic/v20210526/api.json +2 -2
- tccli/services/essbasic/v20210526/examples.json +1 -1
- tccli/services/facefusion/v20220927/api.json +8 -8
- tccli/services/gaap/v20180529/api.json +22 -2
- tccli/services/gaap/v20180529/examples.json +1 -1
- tccli/services/hunyuan/hunyuan_client.py +65 -12
- tccli/services/hunyuan/v20230901/api.json +99 -0
- tccli/services/hunyuan/v20230901/examples.json +8 -0
- tccli/services/lcic/v20220817/api.json +19 -1
- tccli/services/lke/v20231130/api.json +1 -1
- tccli/services/monitor/v20180724/api.json +109 -94
- tccli/services/monitor/v20180724/examples.json +7 -7
- tccli/services/mps/v20190612/api.json +37 -35
- tccli/services/mps/v20190612/examples.json +19 -7
- tccli/services/tdmq/tdmq_client.py +163 -4
- tccli/services/tdmq/v20200217/api.json +279 -0
- tccli/services/tdmq/v20200217/examples.json +24 -0
- tccli/services/tsi/v20210325/api.json +1 -1
- tccli/services/vpc/v20170312/api.json +1573 -157
- tccli/services/vpc/v20170312/examples.json +104 -0
- tccli/services/vpc/vpc_client.py +1974 -1285
- {tccli-3.0.1150.1.dist-info → tccli-3.0.1152.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1150.1.dist-info → tccli-3.0.1152.1.dist-info}/RECORD +48 -44
- {tccli-3.0.1150.1.dist-info → tccli-3.0.1152.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1150.1.dist-info → tccli-3.0.1152.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1150.1.dist-info → tccli-3.0.1152.1.dist-info}/license_files/LICENSE +0 -0
@@ -0,0 +1,248 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
import os
|
3
|
+
import sys
|
4
|
+
import six
|
5
|
+
import json
|
6
|
+
import tccli.options_define as OptionsDefine
|
7
|
+
import tccli.format_output as FormatOutput
|
8
|
+
from tccli import __version__
|
9
|
+
from tccli.utils import Utils
|
10
|
+
from tccli.exceptions import ConfigurationError, ClientError, ParamError
|
11
|
+
from tencentcloud.common import credential
|
12
|
+
from tencentcloud.common.profile.http_profile import HttpProfile
|
13
|
+
from tencentcloud.common.profile.client_profile import ClientProfile
|
14
|
+
from tencentcloud.cdz.v20221123 import cdz_client as cdz_client_v20221123
|
15
|
+
from tencentcloud.cdz.v20221123 import models as models_v20221123
|
16
|
+
|
17
|
+
from jmespath import search
|
18
|
+
import time
|
19
|
+
|
20
|
+
def doDescribeCloudDedicatedZoneResourceSummary(args, parsed_globals):
|
21
|
+
g_param = parse_global_arg(parsed_globals)
|
22
|
+
|
23
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
24
|
+
cred = credential.CVMRoleCredential()
|
25
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
26
|
+
cred = credential.STSAssumeRoleCredential(
|
27
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
28
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
29
|
+
)
|
30
|
+
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):
|
31
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
32
|
+
else:
|
33
|
+
cred = credential.Credential(
|
34
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
35
|
+
)
|
36
|
+
http_profile = HttpProfile(
|
37
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
38
|
+
reqMethod="POST",
|
39
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
40
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
41
|
+
)
|
42
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
43
|
+
if g_param[OptionsDefine.Language]:
|
44
|
+
profile.language = g_param[OptionsDefine.Language]
|
45
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
46
|
+
client = mod.CdzClient(cred, g_param[OptionsDefine.Region], profile)
|
47
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
48
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
49
|
+
model = models.DescribeCloudDedicatedZoneResourceSummaryRequest()
|
50
|
+
model.from_json_string(json.dumps(args))
|
51
|
+
start_time = time.time()
|
52
|
+
while True:
|
53
|
+
rsp = client.DescribeCloudDedicatedZoneResourceSummary(model)
|
54
|
+
result = rsp.to_json_string()
|
55
|
+
try:
|
56
|
+
json_obj = json.loads(result)
|
57
|
+
except TypeError as e:
|
58
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
59
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
60
|
+
break
|
61
|
+
cur_time = time.time()
|
62
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
63
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
64
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
65
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
66
|
+
else:
|
67
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
68
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
69
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
70
|
+
|
71
|
+
|
72
|
+
def doDescribeCloudDedicatedZoneHosts(args, parsed_globals):
|
73
|
+
g_param = parse_global_arg(parsed_globals)
|
74
|
+
|
75
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
76
|
+
cred = credential.CVMRoleCredential()
|
77
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
78
|
+
cred = credential.STSAssumeRoleCredential(
|
79
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
80
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
81
|
+
)
|
82
|
+
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):
|
83
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
84
|
+
else:
|
85
|
+
cred = credential.Credential(
|
86
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
87
|
+
)
|
88
|
+
http_profile = HttpProfile(
|
89
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
90
|
+
reqMethod="POST",
|
91
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
92
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
93
|
+
)
|
94
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
95
|
+
if g_param[OptionsDefine.Language]:
|
96
|
+
profile.language = g_param[OptionsDefine.Language]
|
97
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
98
|
+
client = mod.CdzClient(cred, g_param[OptionsDefine.Region], profile)
|
99
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
100
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
101
|
+
model = models.DescribeCloudDedicatedZoneHostsRequest()
|
102
|
+
model.from_json_string(json.dumps(args))
|
103
|
+
start_time = time.time()
|
104
|
+
while True:
|
105
|
+
rsp = client.DescribeCloudDedicatedZoneHosts(model)
|
106
|
+
result = rsp.to_json_string()
|
107
|
+
try:
|
108
|
+
json_obj = json.loads(result)
|
109
|
+
except TypeError as e:
|
110
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
111
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
112
|
+
break
|
113
|
+
cur_time = time.time()
|
114
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
115
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
116
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
117
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
118
|
+
else:
|
119
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
120
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
121
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
122
|
+
|
123
|
+
|
124
|
+
CLIENT_MAP = {
|
125
|
+
"v20221123": cdz_client_v20221123,
|
126
|
+
|
127
|
+
}
|
128
|
+
|
129
|
+
MODELS_MAP = {
|
130
|
+
"v20221123": models_v20221123,
|
131
|
+
|
132
|
+
}
|
133
|
+
|
134
|
+
ACTION_MAP = {
|
135
|
+
"DescribeCloudDedicatedZoneResourceSummary": doDescribeCloudDedicatedZoneResourceSummary,
|
136
|
+
"DescribeCloudDedicatedZoneHosts": doDescribeCloudDedicatedZoneHosts,
|
137
|
+
|
138
|
+
}
|
139
|
+
|
140
|
+
AVAILABLE_VERSION_LIST = [
|
141
|
+
"v20221123",
|
142
|
+
|
143
|
+
]
|
144
|
+
|
145
|
+
|
146
|
+
def action_caller():
|
147
|
+
return ACTION_MAP
|
148
|
+
|
149
|
+
|
150
|
+
def parse_global_arg(parsed_globals):
|
151
|
+
g_param = parsed_globals
|
152
|
+
|
153
|
+
is_exist_profile = True
|
154
|
+
if not parsed_globals["profile"]:
|
155
|
+
is_exist_profile = False
|
156
|
+
g_param["profile"] = os.environ.get("TCCLI_PROFILE", "default")
|
157
|
+
|
158
|
+
configure_path = os.path.join(os.path.expanduser("~"), ".tccli")
|
159
|
+
is_conf_exist, conf_path = Utils.file_existed(configure_path, g_param["profile"] + ".configure")
|
160
|
+
is_cred_exist, cred_path = Utils.file_existed(configure_path, g_param["profile"] + ".credential")
|
161
|
+
|
162
|
+
conf = {}
|
163
|
+
cred = {}
|
164
|
+
|
165
|
+
if is_conf_exist:
|
166
|
+
conf = Utils.load_json_msg(conf_path)
|
167
|
+
if is_cred_exist:
|
168
|
+
cred = Utils.load_json_msg(cred_path)
|
169
|
+
|
170
|
+
if not (isinstance(conf, dict) and isinstance(cred, dict)):
|
171
|
+
raise ConfigurationError(
|
172
|
+
"file: %s or %s is not json format"
|
173
|
+
% (g_param["profile"] + ".configure", g_param["profile"] + ".credential"))
|
174
|
+
|
175
|
+
if OptionsDefine.Token not in cred:
|
176
|
+
cred[OptionsDefine.Token] = None
|
177
|
+
|
178
|
+
if not is_exist_profile:
|
179
|
+
if os.environ.get(OptionsDefine.ENV_SECRET_ID) and os.environ.get(OptionsDefine.ENV_SECRET_KEY):
|
180
|
+
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
181
|
+
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
182
|
+
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
183
|
+
|
184
|
+
if os.environ.get(OptionsDefine.ENV_REGION):
|
185
|
+
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
186
|
+
|
187
|
+
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
188
|
+
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
189
|
+
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
190
|
+
|
191
|
+
for param in g_param.keys():
|
192
|
+
if g_param[param] is None:
|
193
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.Token]:
|
194
|
+
if param in cred:
|
195
|
+
g_param[param] = cred[param]
|
196
|
+
elif not (g_param[OptionsDefine.UseCVMRole.replace('-', '_')]
|
197
|
+
or os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN)):
|
198
|
+
raise ConfigurationError("%s is invalid" % param)
|
199
|
+
elif param in [OptionsDefine.Region, OptionsDefine.Output, OptionsDefine.Language]:
|
200
|
+
if param in conf[OptionsDefine.SysParam]:
|
201
|
+
g_param[param] = conf[OptionsDefine.SysParam][param]
|
202
|
+
elif param != OptionsDefine.Language:
|
203
|
+
raise ConfigurationError("%s is invalid" % param)
|
204
|
+
elif param.replace('_', '-') in [OptionsDefine.RoleArn, OptionsDefine.RoleSessionName]:
|
205
|
+
if param.replace('_', '-') in cred:
|
206
|
+
g_param[param] = cred[param.replace('_', '-')]
|
207
|
+
|
208
|
+
try:
|
209
|
+
if g_param[OptionsDefine.ServiceVersion]:
|
210
|
+
g_param[OptionsDefine.Version] = "v" + g_param[OptionsDefine.ServiceVersion].replace('-', '')
|
211
|
+
else:
|
212
|
+
version = conf["cdz"][OptionsDefine.Version]
|
213
|
+
g_param[OptionsDefine.Version] = "v" + version.replace('-', '')
|
214
|
+
|
215
|
+
if g_param[OptionsDefine.Endpoint] is None:
|
216
|
+
g_param[OptionsDefine.Endpoint] = conf["cdz"][OptionsDefine.Endpoint]
|
217
|
+
g_param["sts_cred_endpoint"] = conf.get("sts", {}).get("endpoint")
|
218
|
+
except Exception as err:
|
219
|
+
raise ConfigurationError("config file:%s error, %s" % (conf_path, str(err)))
|
220
|
+
|
221
|
+
if g_param[OptionsDefine.Version] not in AVAILABLE_VERSION_LIST:
|
222
|
+
raise Exception("available versions: %s" % " ".join(AVAILABLE_VERSION_LIST))
|
223
|
+
|
224
|
+
if g_param[OptionsDefine.Waiter]:
|
225
|
+
param = eval(g_param[OptionsDefine.Waiter])
|
226
|
+
if 'expr' not in param:
|
227
|
+
raise Exception('`expr` in `--waiter` must be defined')
|
228
|
+
if 'to' not in param:
|
229
|
+
raise Exception('`to` in `--waiter` must be defined')
|
230
|
+
if 'timeout' not in param:
|
231
|
+
if 'waiter' in conf and 'timeout' in conf['waiter']:
|
232
|
+
param['timeout'] = conf['waiter']['timeout']
|
233
|
+
else:
|
234
|
+
param['timeout'] = 180
|
235
|
+
if 'interval' not in param:
|
236
|
+
if 'waiter' in conf and 'interval' in conf['waiter']:
|
237
|
+
param['interval'] = conf['waiter']['interval']
|
238
|
+
else:
|
239
|
+
param['interval'] = 5
|
240
|
+
param['interval'] = min(param['interval'], param['timeout'])
|
241
|
+
g_param['OptionsDefine.WaiterInfo'] = param
|
242
|
+
|
243
|
+
if six.PY2:
|
244
|
+
for key, value in g_param.items():
|
245
|
+
if isinstance(value, six.text_type):
|
246
|
+
g_param[key] = value.encode('utf-8')
|
247
|
+
return g_param
|
248
|
+
|
@@ -0,0 +1,305 @@
|
|
1
|
+
{
|
2
|
+
"actions": {
|
3
|
+
"DescribeCloudDedicatedZoneHosts": {
|
4
|
+
"document": "查询可用区的Host和Host上部署的实例",
|
5
|
+
"input": "DescribeCloudDedicatedZoneHostsRequest",
|
6
|
+
"name": "查询用户的专属可用区的母机及该母机下的子机信息",
|
7
|
+
"output": "DescribeCloudDedicatedZoneHostsResponse",
|
8
|
+
"status": "online"
|
9
|
+
},
|
10
|
+
"DescribeCloudDedicatedZoneResourceSummary": {
|
11
|
+
"document": "查询专属可用区各个垂直产品的资源使用情况",
|
12
|
+
"input": "DescribeCloudDedicatedZoneResourceSummaryRequest",
|
13
|
+
"name": "查询专属可用区资源水位概览",
|
14
|
+
"output": "DescribeCloudDedicatedZoneResourceSummaryResponse",
|
15
|
+
"status": "online"
|
16
|
+
}
|
17
|
+
},
|
18
|
+
"metadata": {
|
19
|
+
"apiVersion": "2022-11-23",
|
20
|
+
"api_brief": "介绍如何使用API对专属可用区进行操作,包括查看专属可用区的基本信息和订单数据,以及获取专属可用区内可用资源情况等。",
|
21
|
+
"serviceNameCN": "专属可用区",
|
22
|
+
"serviceShortName": "cdz"
|
23
|
+
},
|
24
|
+
"objects": {
|
25
|
+
"CloudDedicatedZoneHostsInfo": {
|
26
|
+
"document": "CDZ的母机和子机的对应关系",
|
27
|
+
"members": [
|
28
|
+
{
|
29
|
+
"disabled": false,
|
30
|
+
"document": "Host的唯一标识uuid\n注意:此字段可能返回 null,表示取不到有效值。",
|
31
|
+
"example": "无",
|
32
|
+
"member": "string",
|
33
|
+
"name": "HostUuid",
|
34
|
+
"output_required": false,
|
35
|
+
"type": "string",
|
36
|
+
"value_allowed_null": true
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"disabled": false,
|
40
|
+
"document": "实例名称数组\n注意:此字段可能返回 null,表示取不到有效值。",
|
41
|
+
"example": "无",
|
42
|
+
"member": "string",
|
43
|
+
"name": "InstancesInfo",
|
44
|
+
"output_required": false,
|
45
|
+
"type": "list",
|
46
|
+
"value_allowed_null": true
|
47
|
+
}
|
48
|
+
],
|
49
|
+
"usage": "out"
|
50
|
+
},
|
51
|
+
"CloudDedicatedZoneResourceStatisticsInfo": {
|
52
|
+
"document": "专属可用区资源统计项数据详情,对应一个具体的垂直产品的资源统计项。",
|
53
|
+
"members": [
|
54
|
+
{
|
55
|
+
"disabled": false,
|
56
|
+
"document": "资源统计项名称",
|
57
|
+
"example": "CPU",
|
58
|
+
"member": "string",
|
59
|
+
"name": "Item",
|
60
|
+
"output_required": false,
|
61
|
+
"type": "string",
|
62
|
+
"value_allowed_null": false
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"disabled": false,
|
66
|
+
"document": "资源统计项单位",
|
67
|
+
"example": "核",
|
68
|
+
"member": "string",
|
69
|
+
"name": "Unit",
|
70
|
+
"output_required": false,
|
71
|
+
"type": "string",
|
72
|
+
"value_allowed_null": false
|
73
|
+
},
|
74
|
+
{
|
75
|
+
"disabled": false,
|
76
|
+
"document": "资源总量",
|
77
|
+
"example": "300",
|
78
|
+
"member": "string",
|
79
|
+
"name": "Total",
|
80
|
+
"output_required": false,
|
81
|
+
"type": "string",
|
82
|
+
"value_allowed_null": false
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"disabled": false,
|
86
|
+
"document": "已用资源",
|
87
|
+
"example": "16",
|
88
|
+
"member": "string",
|
89
|
+
"name": "Usage",
|
90
|
+
"output_required": false,
|
91
|
+
"type": "string",
|
92
|
+
"value_allowed_null": false
|
93
|
+
},
|
94
|
+
{
|
95
|
+
"disabled": false,
|
96
|
+
"document": "已用资源占比",
|
97
|
+
"example": "5.33%",
|
98
|
+
"member": "string",
|
99
|
+
"name": "UsageRate",
|
100
|
+
"output_required": false,
|
101
|
+
"type": "string",
|
102
|
+
"value_allowed_null": false
|
103
|
+
},
|
104
|
+
{
|
105
|
+
"disabled": false,
|
106
|
+
"document": "剩余资源",
|
107
|
+
"example": "284",
|
108
|
+
"member": "string",
|
109
|
+
"name": "Remain",
|
110
|
+
"output_required": false,
|
111
|
+
"type": "string",
|
112
|
+
"value_allowed_null": false
|
113
|
+
},
|
114
|
+
{
|
115
|
+
"disabled": false,
|
116
|
+
"document": "剩余资源占比",
|
117
|
+
"example": "94.67%",
|
118
|
+
"member": "string",
|
119
|
+
"name": "RemainRate",
|
120
|
+
"output_required": false,
|
121
|
+
"type": "string",
|
122
|
+
"value_allowed_null": false
|
123
|
+
},
|
124
|
+
{
|
125
|
+
"disabled": false,
|
126
|
+
"document": "本周一零点资源使用率",
|
127
|
+
"example": "17.29%",
|
128
|
+
"member": "string",
|
129
|
+
"name": "ThisMondayUsageRate",
|
130
|
+
"output_required": false,
|
131
|
+
"type": "string",
|
132
|
+
"value_allowed_null": false
|
133
|
+
},
|
134
|
+
{
|
135
|
+
"disabled": false,
|
136
|
+
"document": "本周资源增长比例",
|
137
|
+
"example": "0.50%",
|
138
|
+
"member": "string",
|
139
|
+
"name": "ThisMondayUsageGrowthRate",
|
140
|
+
"output_required": false,
|
141
|
+
"type": "string",
|
142
|
+
"value_allowed_null": false
|
143
|
+
},
|
144
|
+
{
|
145
|
+
"disabled": false,
|
146
|
+
"document": "上周资源增长比例",
|
147
|
+
"example": "-0.12%",
|
148
|
+
"member": "string",
|
149
|
+
"name": "LastMondayUsageGrowthRate",
|
150
|
+
"output_required": false,
|
151
|
+
"type": "string",
|
152
|
+
"value_allowed_null": false
|
153
|
+
}
|
154
|
+
],
|
155
|
+
"usage": "out"
|
156
|
+
},
|
157
|
+
"CloudDedicatedZoneResourceSummaryInfo": {
|
158
|
+
"document": "专属可用区资源水位数据详情,对应一个具体的垂直产品。",
|
159
|
+
"members": [
|
160
|
+
{
|
161
|
+
"disabled": false,
|
162
|
+
"document": "产品名称",
|
163
|
+
"example": "云服务器",
|
164
|
+
"member": "string",
|
165
|
+
"name": "ProductName",
|
166
|
+
"output_required": false,
|
167
|
+
"type": "string",
|
168
|
+
"value_allowed_null": false
|
169
|
+
},
|
170
|
+
{
|
171
|
+
"disabled": false,
|
172
|
+
"document": "子产品名称",
|
173
|
+
"example": "标准型S5",
|
174
|
+
"member": "string",
|
175
|
+
"name": "SubProductName",
|
176
|
+
"output_required": false,
|
177
|
+
"type": "string",
|
178
|
+
"value_allowed_null": false
|
179
|
+
},
|
180
|
+
{
|
181
|
+
"disabled": false,
|
182
|
+
"document": "资源统计详情",
|
183
|
+
"example": "无",
|
184
|
+
"member": "CloudDedicatedZoneResourceStatisticsInfo",
|
185
|
+
"name": "Statistics",
|
186
|
+
"output_required": false,
|
187
|
+
"type": "list",
|
188
|
+
"value_allowed_null": false
|
189
|
+
}
|
190
|
+
],
|
191
|
+
"usage": "out"
|
192
|
+
},
|
193
|
+
"DescribeCloudDedicatedZoneHostsRequest": {
|
194
|
+
"document": "DescribeCloudDedicatedZoneHosts请求参数结构体",
|
195
|
+
"members": [
|
196
|
+
{
|
197
|
+
"disabled": false,
|
198
|
+
"document": "专属可用区ID ",
|
199
|
+
"example": "cdz-xxxxxxxx",
|
200
|
+
"member": "string",
|
201
|
+
"name": "CloudDedicatedZoneID",
|
202
|
+
"required": true,
|
203
|
+
"type": "string"
|
204
|
+
},
|
205
|
+
{
|
206
|
+
"disabled": false,
|
207
|
+
"document": "一个或多个Host面的CVM实例信息。最大支持查询100台Host。",
|
208
|
+
"example": "xxxxx-xxxxx-xxxxx",
|
209
|
+
"member": "string",
|
210
|
+
"name": "HostUuids",
|
211
|
+
"required": false,
|
212
|
+
"type": "list"
|
213
|
+
},
|
214
|
+
{
|
215
|
+
"disabled": false,
|
216
|
+
"document": "查询一个实例或者多个实例所在的Host上面的CVM实例信息。最大支持查询100台实例。",
|
217
|
+
"example": "ins-xxxxxxxx",
|
218
|
+
"member": "string",
|
219
|
+
"name": "InstanceIds",
|
220
|
+
"required": false,
|
221
|
+
"type": "list"
|
222
|
+
},
|
223
|
+
{
|
224
|
+
"disabled": false,
|
225
|
+
"document": "偏移量,默认为0。关于Offset的更进一步介绍请参考 API 简介中的相关小节。该参数仅与CloudDedicatedZoneID有关,传递了HostUuids和InstanceIds则会失效。",
|
226
|
+
"example": "1",
|
227
|
+
"member": "uint64",
|
228
|
+
"name": "Offset",
|
229
|
+
"required": false,
|
230
|
+
"type": "int"
|
231
|
+
},
|
232
|
+
{
|
233
|
+
"disabled": false,
|
234
|
+
"document": "返回数量,默认为20,最大值为100。关于Limit的更进一步介绍请参考 API 简介中的相关小节。该参数仅与CloudDedicatedZoneID有关,传递了HostUuids和InstanceIds则会失效。",
|
235
|
+
"example": "5",
|
236
|
+
"member": "uint64",
|
237
|
+
"name": "Limit",
|
238
|
+
"required": false,
|
239
|
+
"type": "int"
|
240
|
+
}
|
241
|
+
],
|
242
|
+
"type": "object"
|
243
|
+
},
|
244
|
+
"DescribeCloudDedicatedZoneHostsResponse": {
|
245
|
+
"document": "DescribeCloudDedicatedZoneHosts返回参数结构体",
|
246
|
+
"members": [
|
247
|
+
{
|
248
|
+
"disabled": false,
|
249
|
+
"document": "返回Host和Host上部署的实例信息之间的关系",
|
250
|
+
"example": "无",
|
251
|
+
"member": "CloudDedicatedZoneHostsInfo",
|
252
|
+
"name": "CloudDedicatedZoneHostsInfoSet",
|
253
|
+
"output_required": false,
|
254
|
+
"type": "list",
|
255
|
+
"value_allowed_null": false
|
256
|
+
},
|
257
|
+
{
|
258
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
259
|
+
"member": "string",
|
260
|
+
"name": "RequestId",
|
261
|
+
"type": "string"
|
262
|
+
}
|
263
|
+
],
|
264
|
+
"type": "object"
|
265
|
+
},
|
266
|
+
"DescribeCloudDedicatedZoneResourceSummaryRequest": {
|
267
|
+
"document": "DescribeCloudDedicatedZoneResourceSummary请求参数结构体",
|
268
|
+
"members": [
|
269
|
+
{
|
270
|
+
"disabled": false,
|
271
|
+
"document": "专属可用区唯一标识",
|
272
|
+
"example": "cdz-8wbc41r9",
|
273
|
+
"member": "string",
|
274
|
+
"name": "CdzId",
|
275
|
+
"required": true,
|
276
|
+
"type": "string"
|
277
|
+
}
|
278
|
+
],
|
279
|
+
"type": "object"
|
280
|
+
},
|
281
|
+
"DescribeCloudDedicatedZoneResourceSummaryResponse": {
|
282
|
+
"document": "DescribeCloudDedicatedZoneResourceSummary返回参数结构体",
|
283
|
+
"members": [
|
284
|
+
{
|
285
|
+
"disabled": false,
|
286
|
+
"document": "资源水位详情\n注意:此字段可能返回 null,表示取不到有效值。",
|
287
|
+
"example": "无",
|
288
|
+
"member": "CloudDedicatedZoneResourceSummaryInfo",
|
289
|
+
"name": "ResourceSummarySet",
|
290
|
+
"output_required": true,
|
291
|
+
"type": "list",
|
292
|
+
"value_allowed_null": true
|
293
|
+
},
|
294
|
+
{
|
295
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
296
|
+
"member": "string",
|
297
|
+
"name": "RequestId",
|
298
|
+
"type": "string"
|
299
|
+
}
|
300
|
+
],
|
301
|
+
"type": "object"
|
302
|
+
}
|
303
|
+
},
|
304
|
+
"version": "1.0"
|
305
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
{
|
2
|
+
"actions": {
|
3
|
+
"DescribeCloudDedicatedZoneHosts": [
|
4
|
+
{
|
5
|
+
"document": "",
|
6
|
+
"input": "POST / HTTP/1.1\nHost: cdz.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCloudDedicatedZoneHosts\n<公共请求参数>\n\n{\n \"CloudDedicatedZoneID\": \"cdz-xxxxxxxx\",\n \"HostUuids\": [\n \"9e6b54d0-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n ],\n \"InstanceIds\": [\n \"ins-xxxxxxxx\"\n ],\n \"Offset\": 1,\n \"Limit\": 1\n}",
|
7
|
+
"output": "{\n \"Response\": {\n \"CloudDedicatedZoneHostsInfoSet\": [\n {\n \"HostUuid\": \"9e6b54d0-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\n \"InstancesInfo\": [\n \"ins-xxxxxxxx\"\n ]\n }\n ],\n \"RequestId\": \"fbea6b85-00bc-4d47-ada9-fc06b3ece766\"\n }\n}",
|
8
|
+
"title": "查询可用区的Host和Host上部署的实例"
|
9
|
+
}
|
10
|
+
],
|
11
|
+
"DescribeCloudDedicatedZoneResourceSummary": [
|
12
|
+
{
|
13
|
+
"document": "",
|
14
|
+
"input": "POST / HTTP/1.1\nHost: cdz.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCloudDedicatedZoneResourceSummary\n<公共请求参数>\n\n{\n \"CdzId\": \"cdz-mgk971xw\"\n}",
|
15
|
+
"output": "{\n \"Response\": {\n \"ResourceSummarySet\": [\n {\n \"ProductName\": \"云服务器\",\n \"SubProductName\": \"标准型S5\",\n \"Statistics\": [\n {\n \"Item\": \"CPU\",\n \"Unit\": \"核\",\n \"Total\": \"41996\",\n \"Usage\": \"32875\",\n \"UsageRate\": \"78.28%\",\n \"Remain\": \"9121\",\n \"RemainRate\": \"21.72%\",\n \"ThisMondayUsageRate\": \"78.33%\",\n \"ThisMondayUsageGrowthRate\": \"-0.05%\",\n \"LastMondayUsageGrowthRate\": \"-4.41%\"\n },\n {\n \"Item\": \"内存\",\n \"Unit\": \"GB\",\n \"Total\": \"135520\",\n \"Usage\": \"101202\",\n \"UsageRate\": \"74.68%\",\n \"Remain\": \"34318\",\n \"RemainRate\": \"25.32%\",\n \"ThisMondayUsageRate\": \"74.72%\",\n \"ThisMondayUsageGrowthRate\": \"-0.05%\",\n \"LastMondayUsageGrowthRate\": \"-6.19%\"\n }\n ]\n },\n {\n \"ProductName\": \"云硬盘\",\n \"SubProductName\": \"SSD云硬盘\",\n \"Statistics\": [\n {\n \"Item\": \"磁盘\",\n \"Unit\": \"TB\",\n \"Total\": \"64\",\n \"Usage\": \"53.34\",\n \"UsageRate\": \"83.34%\",\n \"Remain\": \"10.66\",\n \"RemainRate\": \"16.66%\",\n \"ThisMondayUsageRate\": \"83.34%\",\n \"ThisMondayUsageGrowthRate\": \"0.00%\",\n \"LastMondayUsageGrowthRate\": \"4.58%\"\n }\n ]\n },\n {\n \"ProductName\": \"云硬盘\",\n \"SubProductName\": \"高性能云硬盘\",\n \"Statistics\": [\n {\n \"Item\": \"磁盘\",\n \"Unit\": \"TB\",\n \"Total\": \"1392\",\n \"Usage\": \"1157.32\",\n \"UsageRate\": \"83.14%\",\n \"Remain\": \"234.68\",\n \"RemainRate\": \"16.86%\",\n \"ThisMondayUsageRate\": \"82.03%\",\n \"ThisMondayUsageGrowthRate\": \"1.11%\",\n \"LastMondayUsageGrowthRate\": \"6.08%\"\n }\n ]\n },\n {\n \"ProductName\": \"云数据库 MySQL\",\n \"SubProductName\": \"云数据库 MySQL\",\n \"Statistics\": [\n {\n \"Item\": \"内存\",\n \"Unit\": \"GB\",\n \"Total\": \"3600\",\n \"Usage\": \"2031\",\n \"UsageRate\": \"56.42%\",\n \"Remain\": \"1569\",\n \"RemainRate\": \"43.58%\",\n \"ThisMondayUsageRate\": \"0.00%\",\n \"ThisMondayUsageGrowthRate\": \"56.42%\",\n \"LastMondayUsageGrowthRate\": \"-56.42%\"\n },\n {\n \"Item\": \"磁盘\",\n \"Unit\": \"TB\",\n \"Total\": \"180\",\n \"Usage\": \"82.12\",\n \"UsageRate\": \"45.62%\",\n \"Remain\": \"97.88\",\n \"RemainRate\": \"54.38%\",\n \"ThisMondayUsageRate\": \"0.00%\",\n \"ThisMondayUsageGrowthRate\": \"45.62%\",\n \"LastMondayUsageGrowthRate\": \"-45.62%\"\n }\n ]\n },\n {\n \"ProductName\": \"云数据库 PostgreSQL\",\n \"SubProductName\": \"云数据库 PostgreSQL\",\n \"Statistics\": [\n {\n \"Item\": \"内存\",\n \"Unit\": \"GB\",\n \"Total\": \"22320\",\n \"Usage\": \"14559\",\n \"UsageRate\": \"65.23%\",\n \"Remain\": \"7761\",\n \"RemainRate\": \"34.77%\",\n \"ThisMondayUsageRate\": \"65.23%\",\n \"ThisMondayUsageGrowthRate\": \"0.00%\",\n \"LastMondayUsageGrowthRate\": \"0.50%\"\n },\n {\n \"Item\": \"磁盘\",\n \"Unit\": \"TB\",\n \"Total\": \"470\",\n \"Usage\": \"304.68\",\n \"UsageRate\": \"64.83%\",\n \"Remain\": \"165.32\",\n \"RemainRate\": \"35.17%\",\n \"ThisMondayUsageRate\": \"64.83%\",\n \"ThisMondayUsageGrowthRate\": \"0.00%\",\n \"LastMondayUsageGrowthRate\": \"0.31%\"\n }\n ]\n },\n {\n \"ProductName\": \"云数据库 Redis\",\n \"SubProductName\": \"云数据库 Redis\",\n \"Statistics\": [\n {\n \"Item\": \"内存\",\n \"Unit\": \"GB\",\n \"Total\": \"2400\",\n \"Usage\": \"0\",\n \"UsageRate\": \"0.00%\",\n \"Remain\": \"2400\",\n \"RemainRate\": \"100.00%\",\n \"ThisMondayUsageRate\": \"0.00%\",\n \"ThisMondayUsageGrowthRate\": \"0.00%\",\n \"LastMondayUsageGrowthRate\": \"0.00%\"\n }\n ]\n }\n ],\n \"RequestId\": \"0b2b5dda-8245-4a5a-b0ac-cbf2e7e47bca\"\n }\n}",
|
16
|
+
"title": "查询专属可用区资源水位"
|
17
|
+
}
|
18
|
+
]
|
19
|
+
},
|
20
|
+
"version": "1.0"
|
21
|
+
}
|
@@ -3028,6 +3028,15 @@
|
|
3028
3028
|
"name": "Egress",
|
3029
3029
|
"required": false,
|
3030
3030
|
"type": "string"
|
3031
|
+
},
|
3032
|
+
{
|
3033
|
+
"disabled": false,
|
3034
|
+
"document": "负载均衡实例的预付费相关属性",
|
3035
|
+
"example": "无",
|
3036
|
+
"member": "LBChargePrepaid",
|
3037
|
+
"name": "LBChargePrepaid",
|
3038
|
+
"required": false,
|
3039
|
+
"type": "object"
|
3031
3040
|
}
|
3032
3041
|
],
|
3033
3042
|
"type": "object"
|