tccli-intl-en 3.0.1260.1__py2.py3-none-any.whl → 3.0.1262.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/__init__.py +3 -0
- tccli/services/cdz/__init__.py +4 -0
- tccli/services/cdz/cdz_client.py +207 -0
- tccli/services/cdz/v20221123/api.json +233 -0
- tccli/services/cdz/v20221123/examples.json +12 -0
- tccli/services/cvm/cvm_client.py +156 -50
- tccli/services/cvm/v20170312/api.json +132 -0
- tccli/services/cvm/v20170312/examples.json +22 -0
- tccli/services/dnspod/dnspod_client.py +106 -0
- tccli/services/dnspod/v20210323/api.json +153 -0
- tccli/services/dnspod/v20210323/examples.json +16 -0
- tccli/services/faceid/v20180301/api.json +4 -4
- tccli/services/mps/v20190612/api.json +1028 -127
- tccli/services/mps/v20190612/examples.json +3 -3
- tccli/services/teo/v20220901/api.json +7 -7
- {tccli_intl_en-3.0.1260.1.dist-info → tccli_intl_en-3.0.1262.1.dist-info}/METADATA +2 -2
- {tccli_intl_en-3.0.1260.1.dist-info → tccli_intl_en-3.0.1262.1.dist-info}/RECORD +22 -18
- {tccli_intl_en-3.0.1260.1.dist-info → tccli_intl_en-3.0.1262.1.dist-info}/LICENSE +0 -0
- {tccli_intl_en-3.0.1260.1.dist-info → tccli_intl_en-3.0.1262.1.dist-info}/WHEEL +0 -0
- {tccli_intl_en-3.0.1260.1.dist-info → tccli_intl_en-3.0.1262.1.dist-info}/entry_points.txt +0 -0
- {tccli_intl_en-3.0.1260.1.dist-info → tccli_intl_en-3.0.1262.1.dist-info}/top_level.txt +0 -0
tccli/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '3.0.
|
|
1
|
+
__version__ = '3.0.1262.1'
|
tccli/services/__init__.py
CHANGED
|
@@ -0,0 +1,207 @@
|
|
|
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
|
+
CLIENT_MAP = {
|
|
73
|
+
"v20221123": cdz_client_v20221123,
|
|
74
|
+
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
MODELS_MAP = {
|
|
78
|
+
"v20221123": models_v20221123,
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
ACTION_MAP = {
|
|
83
|
+
"DescribeCloudDedicatedZoneResourceSummary": doDescribeCloudDedicatedZoneResourceSummary,
|
|
84
|
+
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
AVAILABLE_VERSION_LIST = [
|
|
88
|
+
"v20221123",
|
|
89
|
+
|
|
90
|
+
]
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def action_caller():
|
|
94
|
+
return ACTION_MAP
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def parse_global_arg(parsed_globals):
|
|
98
|
+
g_param = parsed_globals
|
|
99
|
+
cvm_role_flag = True
|
|
100
|
+
for param in parsed_globals.keys():
|
|
101
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
|
102
|
+
OptionsDefine.RoleSessionName]:
|
|
103
|
+
if parsed_globals[param] is not None:
|
|
104
|
+
cvm_role_flag = False
|
|
105
|
+
break
|
|
106
|
+
is_exist_profile = True
|
|
107
|
+
if not parsed_globals["profile"]:
|
|
108
|
+
is_exist_profile = False
|
|
109
|
+
g_param["profile"] = os.environ.get("TCCLI_PROFILE", "default")
|
|
110
|
+
|
|
111
|
+
configure_path = os.path.join(os.path.expanduser("~"), ".tccli")
|
|
112
|
+
is_conf_exist, conf_path = Utils.file_existed(configure_path, g_param["profile"] + ".configure")
|
|
113
|
+
is_cred_exist, cred_path = Utils.file_existed(configure_path, g_param["profile"] + ".credential")
|
|
114
|
+
|
|
115
|
+
conf = {}
|
|
116
|
+
cred = {}
|
|
117
|
+
|
|
118
|
+
if is_conf_exist:
|
|
119
|
+
conf = Utils.load_json_msg(conf_path)
|
|
120
|
+
if is_cred_exist:
|
|
121
|
+
cred = Utils.load_json_msg(cred_path)
|
|
122
|
+
|
|
123
|
+
if not (isinstance(conf, dict) and isinstance(cred, dict)):
|
|
124
|
+
raise ConfigurationError(
|
|
125
|
+
"file: %s or %s is not json format"
|
|
126
|
+
% (g_param["profile"] + ".configure", g_param["profile"] + ".credential"))
|
|
127
|
+
|
|
128
|
+
if OptionsDefine.Token not in cred:
|
|
129
|
+
cred[OptionsDefine.Token] = None
|
|
130
|
+
|
|
131
|
+
if not is_exist_profile:
|
|
132
|
+
if os.environ.get(OptionsDefine.ENV_SECRET_ID) and os.environ.get(OptionsDefine.ENV_SECRET_KEY):
|
|
133
|
+
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
|
134
|
+
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
|
135
|
+
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
|
136
|
+
cvm_role_flag = False
|
|
137
|
+
|
|
138
|
+
if os.environ.get(OptionsDefine.ENV_REGION):
|
|
139
|
+
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
|
140
|
+
|
|
141
|
+
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
|
142
|
+
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
|
143
|
+
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
|
144
|
+
cvm_role_flag = False
|
|
145
|
+
|
|
146
|
+
if cvm_role_flag:
|
|
147
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
|
148
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
|
149
|
+
|
|
150
|
+
for param in g_param.keys():
|
|
151
|
+
if g_param[param] is None:
|
|
152
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.Token]:
|
|
153
|
+
if param in cred:
|
|
154
|
+
g_param[param] = cred[param]
|
|
155
|
+
elif not (g_param[OptionsDefine.UseCVMRole.replace('-', '_')]
|
|
156
|
+
or os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN)):
|
|
157
|
+
raise ConfigurationError("%s is invalid" % param)
|
|
158
|
+
elif param in [OptionsDefine.Region, OptionsDefine.Output, OptionsDefine.Language]:
|
|
159
|
+
if param in conf[OptionsDefine.SysParam]:
|
|
160
|
+
g_param[param] = conf[OptionsDefine.SysParam][param]
|
|
161
|
+
elif param != OptionsDefine.Language:
|
|
162
|
+
raise ConfigurationError("%s is invalid" % param)
|
|
163
|
+
elif param.replace('_', '-') in [OptionsDefine.RoleArn, OptionsDefine.RoleSessionName]:
|
|
164
|
+
if param.replace('_', '-') in cred:
|
|
165
|
+
g_param[param] = cred[param.replace('_', '-')]
|
|
166
|
+
|
|
167
|
+
try:
|
|
168
|
+
if g_param[OptionsDefine.ServiceVersion]:
|
|
169
|
+
g_param[OptionsDefine.Version] = "v" + g_param[OptionsDefine.ServiceVersion].replace('-', '')
|
|
170
|
+
else:
|
|
171
|
+
version = conf["cdz"][OptionsDefine.Version]
|
|
172
|
+
g_param[OptionsDefine.Version] = "v" + version.replace('-', '')
|
|
173
|
+
|
|
174
|
+
if g_param[OptionsDefine.Endpoint] is None:
|
|
175
|
+
g_param[OptionsDefine.Endpoint] = conf["cdz"][OptionsDefine.Endpoint]
|
|
176
|
+
g_param["sts_cred_endpoint"] = conf.get("sts", {}).get("endpoint")
|
|
177
|
+
except Exception as err:
|
|
178
|
+
raise ConfigurationError("config file:%s error, %s" % (conf_path, str(err)))
|
|
179
|
+
|
|
180
|
+
if g_param[OptionsDefine.Version] not in AVAILABLE_VERSION_LIST:
|
|
181
|
+
raise Exception("available versions: %s" % " ".join(AVAILABLE_VERSION_LIST))
|
|
182
|
+
|
|
183
|
+
if g_param[OptionsDefine.Waiter]:
|
|
184
|
+
param = eval(g_param[OptionsDefine.Waiter])
|
|
185
|
+
if 'expr' not in param:
|
|
186
|
+
raise Exception('`expr` in `--waiter` must be defined')
|
|
187
|
+
if 'to' not in param:
|
|
188
|
+
raise Exception('`to` in `--waiter` must be defined')
|
|
189
|
+
if 'timeout' not in param:
|
|
190
|
+
if 'waiter' in conf and 'timeout' in conf['waiter']:
|
|
191
|
+
param['timeout'] = conf['waiter']['timeout']
|
|
192
|
+
else:
|
|
193
|
+
param['timeout'] = 180
|
|
194
|
+
if 'interval' not in param:
|
|
195
|
+
if 'waiter' in conf and 'interval' in conf['waiter']:
|
|
196
|
+
param['interval'] = conf['waiter']['interval']
|
|
197
|
+
else:
|
|
198
|
+
param['interval'] = 5
|
|
199
|
+
param['interval'] = min(param['interval'], param['timeout'])
|
|
200
|
+
g_param['OptionsDefine.WaiterInfo'] = param
|
|
201
|
+
|
|
202
|
+
if six.PY2:
|
|
203
|
+
for key, value in g_param.items():
|
|
204
|
+
if isinstance(value, six.text_type):
|
|
205
|
+
g_param[key] = value.encode('utf-8')
|
|
206
|
+
return g_param
|
|
207
|
+
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
{
|
|
2
|
+
"actions": {
|
|
3
|
+
"DescribeCloudDedicatedZoneResourceSummary": {
|
|
4
|
+
"document": "This API is used to query resource usage of each vertical product in Cloud Dedicated Zone.",
|
|
5
|
+
"input": "DescribeCloudDedicatedZoneResourceSummaryRequest",
|
|
6
|
+
"name": "Query CDZ resource utilization overview",
|
|
7
|
+
"output": "DescribeCloudDedicatedZoneResourceSummaryResponse",
|
|
8
|
+
"status": "online"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"metadata": {
|
|
12
|
+
"apiVersion": "2022-11-23",
|
|
13
|
+
"serviceNameCN": "专属可用区",
|
|
14
|
+
"serviceShortName": "cdz"
|
|
15
|
+
},
|
|
16
|
+
"objects": {
|
|
17
|
+
"CloudDedicatedZoneResourceStatisticsInfo": {
|
|
18
|
+
"document": "Details of the queried data for the statistical item of the CDZ resource, corresponding to a specific vertical product resource statistics.",
|
|
19
|
+
"members": [
|
|
20
|
+
{
|
|
21
|
+
"disabled": false,
|
|
22
|
+
"document": "Specifies the item name of resource statistics.",
|
|
23
|
+
"example": "CPU",
|
|
24
|
+
"member": "string",
|
|
25
|
+
"name": "Item",
|
|
26
|
+
"output_required": false,
|
|
27
|
+
"type": "string",
|
|
28
|
+
"value_allowed_null": false
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"disabled": false,
|
|
32
|
+
"document": "Resource statistics item measurement unit.",
|
|
33
|
+
"example": "核",
|
|
34
|
+
"member": "string",
|
|
35
|
+
"name": "Unit",
|
|
36
|
+
"output_required": false,
|
|
37
|
+
"type": "string",
|
|
38
|
+
"value_allowed_null": false
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"disabled": false,
|
|
42
|
+
"document": "Total resource amount.",
|
|
43
|
+
"example": "300",
|
|
44
|
+
"member": "string",
|
|
45
|
+
"name": "Total",
|
|
46
|
+
"output_required": false,
|
|
47
|
+
"type": "string",
|
|
48
|
+
"value_allowed_null": false
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"disabled": false,
|
|
52
|
+
"document": "Used resources.",
|
|
53
|
+
"example": "16",
|
|
54
|
+
"member": "string",
|
|
55
|
+
"name": "Usage",
|
|
56
|
+
"output_required": false,
|
|
57
|
+
"type": "string",
|
|
58
|
+
"value_allowed_null": false
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"disabled": false,
|
|
62
|
+
"document": "Specifies the percentage of used resources.",
|
|
63
|
+
"example": "5.33%",
|
|
64
|
+
"member": "string",
|
|
65
|
+
"name": "UsageRate",
|
|
66
|
+
"output_required": false,
|
|
67
|
+
"type": "string",
|
|
68
|
+
"value_allowed_null": false
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"disabled": false,
|
|
72
|
+
"document": "Remaining resource.",
|
|
73
|
+
"example": "284",
|
|
74
|
+
"member": "string",
|
|
75
|
+
"name": "Remain",
|
|
76
|
+
"output_required": false,
|
|
77
|
+
"type": "string",
|
|
78
|
+
"value_allowed_null": false
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"disabled": false,
|
|
82
|
+
"document": "Remaining resource percentage.",
|
|
83
|
+
"example": "94.67%",
|
|
84
|
+
"member": "string",
|
|
85
|
+
"name": "RemainRate",
|
|
86
|
+
"output_required": false,
|
|
87
|
+
"type": "string",
|
|
88
|
+
"value_allowed_null": false
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"disabled": false,
|
|
92
|
+
"document": "Resource utilization rate at midnight this monday.",
|
|
93
|
+
"example": "17.29%",
|
|
94
|
+
"member": "string",
|
|
95
|
+
"name": "ThisMondayUsageRate",
|
|
96
|
+
"output_required": false,
|
|
97
|
+
"type": "string",
|
|
98
|
+
"value_allowed_null": false
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"disabled": false,
|
|
102
|
+
"document": "Resource growth rate this week.",
|
|
103
|
+
"example": "0.50%",
|
|
104
|
+
"member": "string",
|
|
105
|
+
"name": "ThisMondayUsageGrowthRate",
|
|
106
|
+
"output_required": false,
|
|
107
|
+
"type": "string",
|
|
108
|
+
"value_allowed_null": false
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"disabled": false,
|
|
112
|
+
"document": "Resource growth rate last week.",
|
|
113
|
+
"example": "-0.12%",
|
|
114
|
+
"member": "string",
|
|
115
|
+
"name": "LastMondayUsageGrowthRate",
|
|
116
|
+
"output_required": false,
|
|
117
|
+
"type": "string",
|
|
118
|
+
"value_allowed_null": false
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"usage": "out"
|
|
122
|
+
},
|
|
123
|
+
"CloudDedicatedZoneResourceSummaryInfo": {
|
|
124
|
+
"document": "Details of the CDZ resource water level, corresponding to a specific vertical product.",
|
|
125
|
+
"members": [
|
|
126
|
+
{
|
|
127
|
+
"disabled": false,
|
|
128
|
+
"document": "Product name",
|
|
129
|
+
"example": "云服务器",
|
|
130
|
+
"member": "string",
|
|
131
|
+
"name": "ProductName",
|
|
132
|
+
"output_required": false,
|
|
133
|
+
"type": "string",
|
|
134
|
+
"value_allowed_null": false
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"disabled": false,
|
|
138
|
+
"document": "Subproduct name",
|
|
139
|
+
"example": "标准型S5",
|
|
140
|
+
"member": "string",
|
|
141
|
+
"name": "SubProductName",
|
|
142
|
+
"output_required": false,
|
|
143
|
+
"type": "string",
|
|
144
|
+
"value_allowed_null": false
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"disabled": false,
|
|
148
|
+
"document": "Statistical detail of the resource.",
|
|
149
|
+
"example": "[ { \"Item\": \"CPU\", \"ItemEn\": \"CPU\", \"Unit\": \"核\", \"UnitEn\": \"核\", \"Total\": \"28160\", \"Usage\": \"27920\", \"UsageRate\": \"99.15%\", \"Remain\": \"240\", \"RemainRate\": \"0.85%\", \"ThisMondayUsageRate\": \"99.15%\", \"ThisMondayUsageGrowthRate\": \"0.00%\", \"LastMondayUsageGrowthRate\": \"0.00%\" } ]",
|
|
150
|
+
"member": "CloudDedicatedZoneResourceStatisticsInfo",
|
|
151
|
+
"name": "Statistics",
|
|
152
|
+
"output_required": false,
|
|
153
|
+
"type": "list",
|
|
154
|
+
"value_allowed_null": false
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"usage": "out"
|
|
158
|
+
},
|
|
159
|
+
"DescribeCloudDedicatedZoneResourceSummaryRequest": {
|
|
160
|
+
"document": "DescribeCloudDedicatedZoneResourceSummary request structure.",
|
|
161
|
+
"members": [
|
|
162
|
+
{
|
|
163
|
+
"disabled": false,
|
|
164
|
+
"document": "Unique id of the cloud dedicated zone.",
|
|
165
|
+
"example": "cdz-8wbc41r9",
|
|
166
|
+
"member": "string",
|
|
167
|
+
"name": "CdzId",
|
|
168
|
+
"required": true,
|
|
169
|
+
"type": "string"
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"type": "object"
|
|
173
|
+
},
|
|
174
|
+
"DescribeCloudDedicatedZoneResourceSummaryResponse": {
|
|
175
|
+
"document": "DescribeCloudDedicatedZoneResourceSummary response structure.",
|
|
176
|
+
"members": [
|
|
177
|
+
{
|
|
178
|
+
"disabled": false,
|
|
179
|
+
"document": "Resource utilization.",
|
|
180
|
+
"example": "无",
|
|
181
|
+
"member": "CloudDedicatedZoneResourceSummaryInfo",
|
|
182
|
+
"name": "ResourceSummarySet",
|
|
183
|
+
"output_required": true,
|
|
184
|
+
"type": "list",
|
|
185
|
+
"value_allowed_null": false
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"disabled": false,
|
|
189
|
+
"document": "Extended information of resource utilization.",
|
|
190
|
+
"example": "无",
|
|
191
|
+
"member": "ExtraInfo",
|
|
192
|
+
"name": "ExtraInfo",
|
|
193
|
+
"output_required": false,
|
|
194
|
+
"type": "object",
|
|
195
|
+
"value_allowed_null": false
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"document": "The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.",
|
|
199
|
+
"member": "string",
|
|
200
|
+
"name": "RequestId",
|
|
201
|
+
"type": "string"
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"type": "object"
|
|
205
|
+
},
|
|
206
|
+
"ExtraInfo": {
|
|
207
|
+
"document": "Extended information of CDZ resource water level data, including availability zone local time and wait for data.",
|
|
208
|
+
"members": [
|
|
209
|
+
{
|
|
210
|
+
"disabled": false,
|
|
211
|
+
"document": "Cloud dedicated zone local time this monday date.",
|
|
212
|
+
"example": "2024-01-22",
|
|
213
|
+
"member": "string",
|
|
214
|
+
"name": "ThisMondayLocalDate",
|
|
215
|
+
"output_required": false,
|
|
216
|
+
"type": "string",
|
|
217
|
+
"value_allowed_null": false
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"disabled": false,
|
|
221
|
+
"document": "Cloud dedicated zone local time last monday date.",
|
|
222
|
+
"example": "2024-01-15",
|
|
223
|
+
"member": "string",
|
|
224
|
+
"name": "LastMondayLocalDate",
|
|
225
|
+
"output_required": false,
|
|
226
|
+
"type": "string",
|
|
227
|
+
"value_allowed_null": false
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"usage": "out"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"actions": {
|
|
3
|
+
"DescribeCloudDedicatedZoneResourceSummary": [
|
|
4
|
+
{
|
|
5
|
+
"document": "",
|
|
6
|
+
"input": "POST / HTTP/1.1\nHost: cdz.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCloudDedicatedZoneResourceSummary\n<Common request parameters>\n\n{\n \"CdzId\": \"cdz-mgk971xw\"\n}",
|
|
7
|
+
"output": "{\n \"Response\": {\n \"ResourceSummarySet\": [\n {\n\"ProductName\": \"Cloud Virtual Machine\"\n\"SubProductName\": \"Standard S5\",\n \"Statistics\": [\n {\n \"Item\": \"CPU\",\n \"Unit\": \"Core\",\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\": \"Memory\",\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\": \"Cloud Block Storage\"\n \"SubProductName\": \"SSD Cloud Disk\"\n \"Statistics\": [\n {\n \"Item\": \"Disk\",\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\": \"Cloud Block Storage\"\n \"SubProductName\": \"High-performance CBS\"\n \"Statistics\": [\n {\n \"Item\": \"Disk\",\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\": \"TencentDB for MySQL\"\n \"SubProductName\": \"TencentDB for MySQL\"\n \"Statistics\": [\n {\n \"Item\": \"Memory\",\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\": \"Disk\",\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\": \"TencentDB for PostgreSQL\"\n \"SubProductName\": \"TencentDB for PostgreSQL\"\n \"Statistics\": [\n {\n \"Item\": \"Memory\",\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\": \"Disk\",\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\": \"TencentDB for Redis\"\n \"SubProductName\": \"TencentDB for Redis\"\n \"Statistics\": [\n {\n \"Item\": \"Memory\",\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}",
|
|
8
|
+
"title": "Querying Resource utilization in Cloud Dedicated Zone"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
}
|