tccli 3.0.1325.1__py2.py3-none-any.whl → 3.0.1327.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/ams/v20201229/api.json +9 -9
- tccli/services/cdb/v20170320/api.json +9 -9
- tccli/services/cdc/v20201214/api.json +5 -5
- tccli/services/cfs/v20190719/api.json +19 -19
- tccli/services/cfs/v20190719/examples.json +2 -2
- tccli/services/clb/clb_client.py +53 -0
- tccli/services/clb/v20180317/api.json +100 -0
- tccli/services/clb/v20180317/examples.json +8 -0
- tccli/services/cme/v20191029/api.json +16 -19
- tccli/services/cme/v20191029/examples.json +12 -12
- 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 +29 -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 +4 -4
- tccli/services/essbasic/v20210526/api.json +1 -1
- tccli/services/gs/gs_client.py +269 -4
- tccli/services/gs/v20191118/api.json +412 -7
- tccli/services/gs/v20191118/examples.json +42 -2
- tccli/services/hai/v20230812/api.json +5 -5
- 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/lowcode/v20210108/api.json +60 -0
- tccli/services/monitor/monitor_client.py +170 -11
- tccli/services/monitor/v20180724/api.json +205 -1
- tccli/services/monitor/v20180724/examples.json +24 -0
- tccli/services/mrs/v20200910/api.json +4 -4
- tccli/services/oceanus/v20190422/api.json +15 -5
- tccli/services/oceanus/v20190422/examples.json +8 -2
- 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/privatedns_client.py +53 -0
- tccli/services/privatedns/v20201028/api.json +180 -1
- tccli/services/privatedns/v20201028/examples.json +8 -0
- tccli/services/pts/v20210728/api.json +18 -0
- tccli/services/redis/v20180412/api.json +1 -1
- tccli/services/tcss/v20201101/api.json +190 -32
- tccli/services/tcss/v20201101/examples.json +6 -6
- tccli/services/tms/v20201229/api.json +2 -2
- tccli/services/tms/v20201229/examples.json +1 -1
- tccli/services/vm/v20210922/api.json +13 -13
- tccli/services/vm/v20210922/examples.json +2 -2
- tccli/services/vpc/v20170312/api.json +2 -2
- {tccli-3.0.1325.1.dist-info → tccli-3.0.1327.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1325.1.dist-info → tccli-3.0.1327.1.dist-info}/RECORD +56 -56
- {tccli-3.0.1325.1.dist-info → tccli-3.0.1327.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1325.1.dist-info → tccli-3.0.1327.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1325.1.dist-info → tccli-3.0.1327.1.dist-info}/license_files/LICENSE +0 -0
@@ -164,10 +164,16 @@
|
|
164
164
|
],
|
165
165
|
"DescribeJobEvents": [
|
166
166
|
{
|
167
|
-
"document": "",
|
168
|
-
"input": "POST / HTTP/1.1\nHost: oceanus.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeJobEvents\n<公共请求参数>\n\n{\n \"RunningOrderIds\": [\n 1\n ],\n \"Types\": [\n \"1\",\n \"2\"\n ],\n \"EndTimestamp\": 1630933910,\n \"StartTimestamp\": 1630833910,\n \"JobId\": \"cql-
|
167
|
+
"document": "请求参数不包含 \"RunningOrderIds\"时,接口为查询作业事件接口",
|
168
|
+
"input": "POST / HTTP/1.1\nHost: oceanus.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeJobEvents\n<公共请求参数>\n\n{\n \"RunningOrderIds\": [\n 1\n ],\n \"Types\": [\n \"1\",\n \"2\"\n ],\n \"EndTimestamp\": 1630933910,\n \"StartTimestamp\": 1630833910,\n \"JobId\": \"cql-xxx\"\n}",
|
169
169
|
"output": "{\n \"Response\": {\n \"RunningOrderIds\": [\n 1\n ],\n \"Events\": [\n {\n \"RunningOrderId\": 1,\n \"Description\": \"作业停止事件\",\n \"Timestamp\": 1630933810,\n \"Type\": \"11\"\n }\n ],\n \"TotalCount\": 1,\n \"RequestId\": \"123345be-e89b-52f3-a456-426616274040\"\n }\n}",
|
170
170
|
"title": "查询作业事件"
|
171
|
+
},
|
172
|
+
{
|
173
|
+
"document": "请求参数不包含 \"RunningOrderIds\"时,接口为查询作业实例ID接口",
|
174
|
+
"input": "POST / HTTP/1.1\nHost: oceanus.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeJobEvents\n<公共请求参数>\n\n{\n \"WorkSpaceId\": \"space-xxxx\",\n \"JobId\": \"cql-xxxx\",\n \"StartTimestamp\": 1747994802,\n \"EndTimestamp\": 1748513202\n}",
|
175
|
+
"output": "{\n \"Response\": {\n \"Events\": null,\n \"RequestId\": \"a908a65e-aa94-4406-acc4-2aa64edb40c6\",\n \"RunningOrderIds\": [\n 10,\n 9,\n 8,\n 7\n ],\n \"Versions\": [\n 1,\n 2,\n 3\n ],\n \"TotalCount\": 0\n }\n}",
|
176
|
+
"title": "查询作业运行实例ID"
|
171
177
|
}
|
172
178
|
],
|
173
179
|
"DescribeJobRuntimeInfo": [
|
@@ -3241,58 +3241,6 @@ def doRestartDBInstance(args, parsed_globals):
|
|
3241
3241
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3242
3242
|
|
3243
3243
|
|
3244
|
-
def doCreateDBInstances(args, parsed_globals):
|
3245
|
-
g_param = parse_global_arg(parsed_globals)
|
3246
|
-
|
3247
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3248
|
-
cred = credential.CVMRoleCredential()
|
3249
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3250
|
-
cred = credential.STSAssumeRoleCredential(
|
3251
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3252
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3253
|
-
)
|
3254
|
-
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):
|
3255
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3256
|
-
else:
|
3257
|
-
cred = credential.Credential(
|
3258
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3259
|
-
)
|
3260
|
-
http_profile = HttpProfile(
|
3261
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3262
|
-
reqMethod="POST",
|
3263
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
3264
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3265
|
-
)
|
3266
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3267
|
-
if g_param[OptionsDefine.Language]:
|
3268
|
-
profile.language = g_param[OptionsDefine.Language]
|
3269
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3270
|
-
client = mod.PostgresClient(cred, g_param[OptionsDefine.Region], profile)
|
3271
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
3272
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3273
|
-
model = models.CreateDBInstancesRequest()
|
3274
|
-
model.from_json_string(json.dumps(args))
|
3275
|
-
start_time = time.time()
|
3276
|
-
while True:
|
3277
|
-
rsp = client.CreateDBInstances(model)
|
3278
|
-
result = rsp.to_json_string()
|
3279
|
-
try:
|
3280
|
-
json_obj = json.loads(result)
|
3281
|
-
except TypeError as e:
|
3282
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3283
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3284
|
-
break
|
3285
|
-
cur_time = time.time()
|
3286
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3287
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3288
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3289
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3290
|
-
else:
|
3291
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3292
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3293
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3294
|
-
|
3295
|
-
|
3296
3244
|
def doModifyDBInstanceHAConfig(args, parsed_globals):
|
3297
3245
|
g_param = parse_global_arg(parsed_globals)
|
3298
3246
|
|
@@ -5498,7 +5446,6 @@ ACTION_MAP = {
|
|
5498
5446
|
"ModifyDBInstancesProject": doModifyDBInstancesProject,
|
5499
5447
|
"DescribeDBXlogs": doDescribeDBXlogs,
|
5500
5448
|
"RestartDBInstance": doRestartDBInstance,
|
5501
|
-
"CreateDBInstances": doCreateDBInstances,
|
5502
5449
|
"ModifyDBInstanceHAConfig": doModifyDBInstanceHAConfig,
|
5503
5450
|
"DescribeDBInstances": doDescribeDBInstances,
|
5504
5451
|
"IsolateDBInstances": doIsolateDBInstances,
|
@@ -49,13 +49,6 @@
|
|
49
49
|
"output": "CreateDBInstanceNetworkAccessResponse",
|
50
50
|
"status": "online"
|
51
51
|
},
|
52
|
-
"CreateDBInstances": {
|
53
|
-
"document": "早期接口,不规范,已提供新接口 CreateInstances 替换\n\n本接口(CreateDBInstances)用于创建一个或者多个PostgreSQL实例,仅发货实例不会进行初始化。本接口已废弃,推荐使用接口[CreateInstances](https://cloud.tencent.com/document/api/409/56107)替代。",
|
54
|
-
"input": "CreateDBInstancesRequest",
|
55
|
-
"name": "创建实例(废弃)",
|
56
|
-
"output": "CreateDBInstancesResponse",
|
57
|
-
"status": "deprecated"
|
58
|
-
},
|
59
52
|
"CreateDatabase": {
|
60
53
|
"document": "此接口用于创建数据库,需指定数据库名及所有者。",
|
61
54
|
"input": "CreateDatabaseRequest",
|
@@ -1958,234 +1951,6 @@
|
|
1958
1951
|
],
|
1959
1952
|
"type": "object"
|
1960
1953
|
},
|
1961
|
-
"CreateDBInstancesRequest": {
|
1962
|
-
"document": "CreateDBInstances请求参数结构体",
|
1963
|
-
"members": [
|
1964
|
-
{
|
1965
|
-
"disabled": false,
|
1966
|
-
"document": "售卖规格ID。该参数可以通过调用DescribeClasses的返回值中的SpecCode字段来获取。",
|
1967
|
-
"example": "pg.it.2xlarge16",
|
1968
|
-
"member": "string",
|
1969
|
-
"name": "SpecCode",
|
1970
|
-
"required": true,
|
1971
|
-
"type": "string"
|
1972
|
-
},
|
1973
|
-
{
|
1974
|
-
"disabled": false,
|
1975
|
-
"document": "实例容量大小,单位:GB。",
|
1976
|
-
"example": "64",
|
1977
|
-
"member": "uint64",
|
1978
|
-
"name": "Storage",
|
1979
|
-
"required": true,
|
1980
|
-
"type": "int"
|
1981
|
-
},
|
1982
|
-
{
|
1983
|
-
"disabled": false,
|
1984
|
-
"document": "一次性购买的实例数量。取值1-100",
|
1985
|
-
"example": "1",
|
1986
|
-
"member": "uint64",
|
1987
|
-
"name": "InstanceCount",
|
1988
|
-
"required": true,
|
1989
|
-
"type": "int"
|
1990
|
-
},
|
1991
|
-
{
|
1992
|
-
"disabled": false,
|
1993
|
-
"document": "购买时长,单位:月。目前只支持1,2,3,4,5,6,7,8,9,10,11,12,24,36这些值,按量计费模式下该参数传1。",
|
1994
|
-
"example": "12",
|
1995
|
-
"member": "uint64",
|
1996
|
-
"name": "Period",
|
1997
|
-
"required": true,
|
1998
|
-
"type": "int"
|
1999
|
-
},
|
2000
|
-
{
|
2001
|
-
"disabled": false,
|
2002
|
-
"document": "可用区ID。该参数可以通过调用 DescribeZones 接口的返回值中的Zone字段来获取。",
|
2003
|
-
"example": "ap-guangzhou-6",
|
2004
|
-
"member": "string",
|
2005
|
-
"name": "Zone",
|
2006
|
-
"required": true,
|
2007
|
-
"type": "string"
|
2008
|
-
},
|
2009
|
-
{
|
2010
|
-
"disabled": false,
|
2011
|
-
"document": "项目ID。",
|
2012
|
-
"example": "0",
|
2013
|
-
"member": "int64",
|
2014
|
-
"name": "ProjectId",
|
2015
|
-
"required": false,
|
2016
|
-
"type": "int"
|
2017
|
-
},
|
2018
|
-
{
|
2019
|
-
"disabled": false,
|
2020
|
-
"document": "PostgreSQL社区大版本+小版本号。\n一般场景不推荐传入该参数。如需指定,只能传当前大版本号下最新小版本号。",
|
2021
|
-
"example": "12.4",
|
2022
|
-
"member": "string",
|
2023
|
-
"name": "DBVersion",
|
2024
|
-
"required": false,
|
2025
|
-
"type": "string"
|
2026
|
-
},
|
2027
|
-
{
|
2028
|
-
"disabled": false,
|
2029
|
-
"document": "实例计费类型。目前支持:PREPAID(预付费,即包年包月),POSTPAID_BY_HOUR(后付费,即按量计费)。默认值:PREPAID。",
|
2030
|
-
"example": "POSTPAID_BY_HOUR",
|
2031
|
-
"member": "string",
|
2032
|
-
"name": "InstanceChargeType",
|
2033
|
-
"required": false,
|
2034
|
-
"type": "string"
|
2035
|
-
},
|
2036
|
-
{
|
2037
|
-
"disabled": false,
|
2038
|
-
"document": "是否自动使用代金券。1(是),0(否),默认不使用。",
|
2039
|
-
"example": "0",
|
2040
|
-
"member": "uint64",
|
2041
|
-
"name": "AutoVoucher",
|
2042
|
-
"required": false,
|
2043
|
-
"type": "int"
|
2044
|
-
},
|
2045
|
-
{
|
2046
|
-
"disabled": false,
|
2047
|
-
"document": "代金券ID列表,目前仅支持指定一张代金券。",
|
2048
|
-
"example": "[ \"OZRCGNAV8D9BMI9KMG1FIQ\" ]",
|
2049
|
-
"member": "string",
|
2050
|
-
"name": "VoucherIds",
|
2051
|
-
"required": false,
|
2052
|
-
"type": "list"
|
2053
|
-
},
|
2054
|
-
{
|
2055
|
-
"disabled": false,
|
2056
|
-
"document": "私有网络ID。",
|
2057
|
-
"example": "vpc-8e0ypm3z",
|
2058
|
-
"member": "string",
|
2059
|
-
"name": "VpcId",
|
2060
|
-
"required": false,
|
2061
|
-
"type": "string"
|
2062
|
-
},
|
2063
|
-
{
|
2064
|
-
"disabled": false,
|
2065
|
-
"document": "私有网络子网ID。",
|
2066
|
-
"example": "subnet-bthucmmy",
|
2067
|
-
"member": "string",
|
2068
|
-
"name": "SubnetId",
|
2069
|
-
"required": false,
|
2070
|
-
"type": "string"
|
2071
|
-
},
|
2072
|
-
{
|
2073
|
-
"disabled": false,
|
2074
|
-
"document": "续费标记:0-正常续费(默认);1-自动续费;",
|
2075
|
-
"example": "0",
|
2076
|
-
"member": "int64",
|
2077
|
-
"name": "AutoRenewFlag",
|
2078
|
-
"required": false,
|
2079
|
-
"type": "int"
|
2080
|
-
},
|
2081
|
-
{
|
2082
|
-
"disabled": false,
|
2083
|
-
"document": "活动ID",
|
2084
|
-
"example": "23642",
|
2085
|
-
"member": "int64",
|
2086
|
-
"name": "ActivityId",
|
2087
|
-
"required": false,
|
2088
|
-
"type": "int"
|
2089
|
-
},
|
2090
|
-
{
|
2091
|
-
"disabled": false,
|
2092
|
-
"document": "实例名(后续支持)",
|
2093
|
-
"example": "pg-instance-1",
|
2094
|
-
"member": "string",
|
2095
|
-
"name": "Name",
|
2096
|
-
"required": false,
|
2097
|
-
"type": "string"
|
2098
|
-
},
|
2099
|
-
{
|
2100
|
-
"disabled": false,
|
2101
|
-
"document": "是否需要支持Ipv6,1:是,0:否",
|
2102
|
-
"example": "0",
|
2103
|
-
"member": "uint64",
|
2104
|
-
"name": "NeedSupportIpv6",
|
2105
|
-
"required": false,
|
2106
|
-
"type": "int"
|
2107
|
-
},
|
2108
|
-
{
|
2109
|
-
"disabled": false,
|
2110
|
-
"document": "实例需要绑定的Tag信息,默认为空",
|
2111
|
-
"example": "[ { \"TagKey\": \"abc\", \"TagValue\": \"123\", \"CanDelete\": 1 } ]",
|
2112
|
-
"member": "Tag",
|
2113
|
-
"name": "TagList",
|
2114
|
-
"required": false,
|
2115
|
-
"type": "list"
|
2116
|
-
},
|
2117
|
-
{
|
2118
|
-
"disabled": false,
|
2119
|
-
"document": "安全组id",
|
2120
|
-
"example": "[ { \"SecurityGroupId\": \"sg-05bb4upy\", \"SecurityGroupName\": \"TestGroup\", \"SecurityGroupDesc\": \"test-group-desc\", \"ProjectId\": \"0\", \"IsDefault\": true, \"CreatedTime\": \"2017-04-18 21:02:30\", \"UpdateTime\": \"\", \"TagSet\": [] } ]",
|
2121
|
-
"member": "string",
|
2122
|
-
"name": "SecurityGroupIds",
|
2123
|
-
"required": false,
|
2124
|
-
"type": "list"
|
2125
|
-
},
|
2126
|
-
{
|
2127
|
-
"disabled": false,
|
2128
|
-
"document": "PostgreSQL大版本号(该参数当前必传),版本信息可从[DescribeDBVersions](https://cloud.tencent.com/document/api/409/89018)获取。目前支持10,11,12,13,14,15这几个大版本,详情见[内核版本概述](https://cloud.tencent.com/document/product/409/67018)。\n输入该参数时,会基于此大版本号创建对应的最新小版本的最新内核版本号实例。",
|
2129
|
-
"example": "12",
|
2130
|
-
"member": "string",
|
2131
|
-
"name": "DBMajorVersion",
|
2132
|
-
"required": false,
|
2133
|
-
"type": "string"
|
2134
|
-
},
|
2135
|
-
{
|
2136
|
-
"disabled": false,
|
2137
|
-
"document": "PostgreSQL内核版本号。\n一般场景不推荐传入该参数。如需指定,只能传当前大版本号下最新内核版本号。",
|
2138
|
-
"example": "v12.4_r1.0",
|
2139
|
-
"member": "string",
|
2140
|
-
"name": "DBKernelVersion",
|
2141
|
-
"required": false,
|
2142
|
-
"type": "string"
|
2143
|
-
}
|
2144
|
-
],
|
2145
|
-
"type": "object"
|
2146
|
-
},
|
2147
|
-
"CreateDBInstancesResponse": {
|
2148
|
-
"document": "CreateDBInstances返回参数结构体",
|
2149
|
-
"members": [
|
2150
|
-
{
|
2151
|
-
"disabled": false,
|
2152
|
-
"document": "订单号列表。每个实例对应一个订单号。",
|
2153
|
-
"example": "[ \"20180119110001\" ]",
|
2154
|
-
"member": "string",
|
2155
|
-
"name": "DealNames",
|
2156
|
-
"output_required": true,
|
2157
|
-
"type": "list",
|
2158
|
-
"value_allowed_null": false
|
2159
|
-
},
|
2160
|
-
{
|
2161
|
-
"disabled": false,
|
2162
|
-
"document": "冻结流水号",
|
2163
|
-
"example": "20181225711000768276471",
|
2164
|
-
"member": "string",
|
2165
|
-
"name": "BillId",
|
2166
|
-
"output_required": true,
|
2167
|
-
"type": "string",
|
2168
|
-
"value_allowed_null": false
|
2169
|
-
},
|
2170
|
-
{
|
2171
|
-
"disabled": false,
|
2172
|
-
"document": "创建成功的实例ID集合,只在后付费情景下有返回值",
|
2173
|
-
"example": "[ \"postgres-jdlmoll9\" ]",
|
2174
|
-
"member": "string",
|
2175
|
-
"name": "DBInstanceIdSet",
|
2176
|
-
"output_required": true,
|
2177
|
-
"type": "list",
|
2178
|
-
"value_allowed_null": false
|
2179
|
-
},
|
2180
|
-
{
|
2181
|
-
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
2182
|
-
"member": "string",
|
2183
|
-
"name": "RequestId",
|
2184
|
-
"type": "string"
|
2185
|
-
}
|
2186
|
-
],
|
2187
|
-
"type": "object"
|
2188
|
-
},
|
2189
1954
|
"CreateDatabaseRequest": {
|
2190
1955
|
"document": "CreateDatabase请求参数结构体",
|
2191
1956
|
"members": [
|
@@ -62,14 +62,6 @@
|
|
62
62
|
"title": "创建实例网络"
|
63
63
|
}
|
64
64
|
],
|
65
|
-
"CreateDBInstances": [
|
66
|
-
{
|
67
|
-
"document": "新购实例",
|
68
|
-
"input": "POST / HTTP/1.1\nHost: postgres.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateDBInstances\n<公共请求参数>\n\n{\n \"InstanceCount\": \"1\",\n \"AutoRenewFlag\": \"1\",\n \"Zone\": \"ap-guangzhou-5\",\n \"DBVersion\": \"12.4\",\n \"Storage\": \"10\",\n \"Period\": \"1\",\n \"SpecCode\": \"cdb.pg.z1.2g\",\n \"InstanceChargeType\": \"prepaid\",\n \"AutoVoucher\": \"0\"\n}",
|
69
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"6ace8140-6b9e-4e81-a8ad-ef3f92b2aa90\",\n \"DealNames\": [\n \"20180119110001\"\n ],\n \"DBInstanceIdSet\": [\n \"postgres-xxxx\"\n ],\n \"BillId\": \"xxxxxxxxx\"\n }\n}",
|
70
|
-
"title": "创建PostgreSQL实例"
|
71
|
-
}
|
72
|
-
],
|
73
65
|
"CreateDatabase": [
|
74
66
|
{
|
75
67
|
"document": "",
|
@@ -953,6 +953,58 @@ def doDescribeAccountVpcList(args, parsed_globals):
|
|
953
953
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
954
954
|
|
955
955
|
|
956
|
+
def doDescribeRecord(args, parsed_globals):
|
957
|
+
g_param = parse_global_arg(parsed_globals)
|
958
|
+
|
959
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
960
|
+
cred = credential.CVMRoleCredential()
|
961
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
962
|
+
cred = credential.STSAssumeRoleCredential(
|
963
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
964
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
965
|
+
)
|
966
|
+
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):
|
967
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
968
|
+
else:
|
969
|
+
cred = credential.Credential(
|
970
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
971
|
+
)
|
972
|
+
http_profile = HttpProfile(
|
973
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
974
|
+
reqMethod="POST",
|
975
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
976
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
977
|
+
)
|
978
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
979
|
+
if g_param[OptionsDefine.Language]:
|
980
|
+
profile.language = g_param[OptionsDefine.Language]
|
981
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
982
|
+
client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
|
983
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
984
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
985
|
+
model = models.DescribeRecordRequest()
|
986
|
+
model.from_json_string(json.dumps(args))
|
987
|
+
start_time = time.time()
|
988
|
+
while True:
|
989
|
+
rsp = client.DescribeRecord(model)
|
990
|
+
result = rsp.to_json_string()
|
991
|
+
try:
|
992
|
+
json_obj = json.loads(result)
|
993
|
+
except TypeError as e:
|
994
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
995
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
996
|
+
break
|
997
|
+
cur_time = time.time()
|
998
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
999
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1000
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1001
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1002
|
+
else:
|
1003
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1004
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1005
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1006
|
+
|
1007
|
+
|
956
1008
|
def doModifyRecordsStatus(args, parsed_globals):
|
957
1009
|
g_param = parse_global_arg(parsed_globals)
|
958
1010
|
|
@@ -1294,6 +1346,7 @@ ACTION_MAP = {
|
|
1294
1346
|
"ModifyPrivateZoneVpc": doModifyPrivateZoneVpc,
|
1295
1347
|
"DeletePrivateZone": doDeletePrivateZone,
|
1296
1348
|
"DescribeAccountVpcList": doDescribeAccountVpcList,
|
1349
|
+
"DescribeRecord": doDescribeRecord,
|
1297
1350
|
"ModifyRecordsStatus": doModifyRecordsStatus,
|
1298
1351
|
"DeleteSpecifyPrivateZoneVpc": doDeleteSpecifyPrivateZoneVpc,
|
1299
1352
|
"DescribePrivateZoneService": doDescribePrivateZoneService,
|
@@ -119,6 +119,13 @@
|
|
119
119
|
"output": "DescribeQuotaUsageResponse",
|
120
120
|
"status": "online"
|
121
121
|
},
|
122
|
+
"DescribeRecord": {
|
123
|
+
"document": "获取私有域记录",
|
124
|
+
"input": "DescribeRecordRequest",
|
125
|
+
"name": "根据id获取私有域记录",
|
126
|
+
"output": "DescribeRecordResponse",
|
127
|
+
"status": "online"
|
128
|
+
},
|
122
129
|
"DescribeRequestData": {
|
123
130
|
"document": "获取私有域解析请求量",
|
124
131
|
"input": "DescribeRequestDataRequest",
|
@@ -1448,6 +1455,52 @@
|
|
1448
1455
|
],
|
1449
1456
|
"type": "object"
|
1450
1457
|
},
|
1458
|
+
"DescribeRecordRequest": {
|
1459
|
+
"document": "DescribeRecord请求参数结构体",
|
1460
|
+
"members": [
|
1461
|
+
{
|
1462
|
+
"disabled": false,
|
1463
|
+
"document": "私有域ID",
|
1464
|
+
"example": "zone-abcdef",
|
1465
|
+
"member": "string",
|
1466
|
+
"name": "ZoneId",
|
1467
|
+
"required": true,
|
1468
|
+
"type": "string"
|
1469
|
+
},
|
1470
|
+
{
|
1471
|
+
"disabled": false,
|
1472
|
+
"document": "记录ID",
|
1473
|
+
"example": "10004567",
|
1474
|
+
"member": "string",
|
1475
|
+
"name": "RecordId",
|
1476
|
+
"required": true,
|
1477
|
+
"type": "string"
|
1478
|
+
}
|
1479
|
+
],
|
1480
|
+
"type": "object"
|
1481
|
+
},
|
1482
|
+
"DescribeRecordResponse": {
|
1483
|
+
"document": "DescribeRecord返回参数结构体",
|
1484
|
+
"members": [
|
1485
|
+
{
|
1486
|
+
"disabled": false,
|
1487
|
+
"document": "记录信息",
|
1488
|
+
"example": "无",
|
1489
|
+
"member": "RecordInfo",
|
1490
|
+
"name": "RecordInfo",
|
1491
|
+
"output_required": true,
|
1492
|
+
"type": "object",
|
1493
|
+
"value_allowed_null": false
|
1494
|
+
},
|
1495
|
+
{
|
1496
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
1497
|
+
"member": "string",
|
1498
|
+
"name": "RequestId",
|
1499
|
+
"type": "string"
|
1500
|
+
}
|
1501
|
+
],
|
1502
|
+
"type": "object"
|
1503
|
+
},
|
1451
1504
|
"DescribeRequestDataRequest": {
|
1452
1505
|
"document": "DescribeRequestData请求参数结构体",
|
1453
1506
|
"members": [
|
@@ -2292,7 +2345,7 @@
|
|
2292
2345
|
{
|
2293
2346
|
"disabled": false,
|
2294
2347
|
"document": "附加信息\n注意:此字段可能返回 null,表示取不到有效值。",
|
2295
|
-
"example": "
|
2348
|
+
"example": "附加信息内容",
|
2296
2349
|
"member": "string",
|
2297
2350
|
"name": "Extra",
|
2298
2351
|
"output_required": true,
|
@@ -2369,6 +2422,132 @@
|
|
2369
2422
|
],
|
2370
2423
|
"type": "object"
|
2371
2424
|
},
|
2425
|
+
"RecordInfo": {
|
2426
|
+
"document": "私有域信息",
|
2427
|
+
"members": [
|
2428
|
+
{
|
2429
|
+
"disabled": false,
|
2430
|
+
"document": "记录id",
|
2431
|
+
"example": "12076",
|
2432
|
+
"member": "string",
|
2433
|
+
"name": "RecordId",
|
2434
|
+
"output_required": true,
|
2435
|
+
"type": "string",
|
2436
|
+
"value_allowed_null": false
|
2437
|
+
},
|
2438
|
+
{
|
2439
|
+
"disabled": false,
|
2440
|
+
"document": "私有域id: zone-xxxxxxxx",
|
2441
|
+
"example": "zone-pckv03qy",
|
2442
|
+
"member": "string",
|
2443
|
+
"name": "ZoneId",
|
2444
|
+
"output_required": true,
|
2445
|
+
"type": "string",
|
2446
|
+
"value_allowed_null": false
|
2447
|
+
},
|
2448
|
+
{
|
2449
|
+
"disabled": false,
|
2450
|
+
"document": "子域名",
|
2451
|
+
"example": "www",
|
2452
|
+
"member": "string",
|
2453
|
+
"name": "SubDomain",
|
2454
|
+
"output_required": true,
|
2455
|
+
"type": "string",
|
2456
|
+
"value_allowed_null": false
|
2457
|
+
},
|
2458
|
+
{
|
2459
|
+
"disabled": false,
|
2460
|
+
"document": "记录类型,可选的记录类型为:\"A\", \"AAAA\", \"CNAME\", \"MX\", \"TXT\", \"PTR\"",
|
2461
|
+
"example": "A",
|
2462
|
+
"member": "string",
|
2463
|
+
"name": "RecordType",
|
2464
|
+
"output_required": true,
|
2465
|
+
"type": "string",
|
2466
|
+
"value_allowed_null": false
|
2467
|
+
},
|
2468
|
+
{
|
2469
|
+
"disabled": false,
|
2470
|
+
"document": "记录值",
|
2471
|
+
"example": "1.1.1.1",
|
2472
|
+
"member": "string",
|
2473
|
+
"name": "RecordValue",
|
2474
|
+
"output_required": true,
|
2475
|
+
"type": "string",
|
2476
|
+
"value_allowed_null": false
|
2477
|
+
},
|
2478
|
+
{
|
2479
|
+
"disabled": false,
|
2480
|
+
"document": "记录缓存时间,数值越小生效越快,取值1-86400s, 默认 600",
|
2481
|
+
"example": "300",
|
2482
|
+
"member": "int64",
|
2483
|
+
"name": "TTL",
|
2484
|
+
"output_required": true,
|
2485
|
+
"type": "int",
|
2486
|
+
"value_allowed_null": false
|
2487
|
+
},
|
2488
|
+
{
|
2489
|
+
"disabled": false,
|
2490
|
+
"document": "MX优先级:记录类型为MX时必填。取值范围:5,10,15,20,30,40,50",
|
2491
|
+
"example": "5",
|
2492
|
+
"member": "int64",
|
2493
|
+
"name": "MX",
|
2494
|
+
"output_required": false,
|
2495
|
+
"type": "int",
|
2496
|
+
"value_allowed_null": false
|
2497
|
+
},
|
2498
|
+
{
|
2499
|
+
"disabled": false,
|
2500
|
+
"document": "记录权重,值为1-100",
|
2501
|
+
"example": "1",
|
2502
|
+
"member": "int64",
|
2503
|
+
"name": "Weight",
|
2504
|
+
"output_required": false,
|
2505
|
+
"type": "int",
|
2506
|
+
"value_allowed_null": false
|
2507
|
+
},
|
2508
|
+
{
|
2509
|
+
"disabled": false,
|
2510
|
+
"document": "记录创建时间",
|
2511
|
+
"example": "2021-09-07 19:00:58",
|
2512
|
+
"member": "datetime",
|
2513
|
+
"name": "CreatedOn",
|
2514
|
+
"output_required": true,
|
2515
|
+
"type": "string",
|
2516
|
+
"value_allowed_null": false
|
2517
|
+
},
|
2518
|
+
{
|
2519
|
+
"disabled": false,
|
2520
|
+
"document": "记录更新时间",
|
2521
|
+
"example": "2021-09-07 19:00:58",
|
2522
|
+
"member": "datetime",
|
2523
|
+
"name": "UpdatedOn",
|
2524
|
+
"output_required": true,
|
2525
|
+
"type": "string",
|
2526
|
+
"value_allowed_null": false
|
2527
|
+
},
|
2528
|
+
{
|
2529
|
+
"disabled": false,
|
2530
|
+
"document": "0暂停,1启用",
|
2531
|
+
"example": "1",
|
2532
|
+
"member": "uint64",
|
2533
|
+
"name": "Enabled",
|
2534
|
+
"output_required": false,
|
2535
|
+
"type": "int",
|
2536
|
+
"value_allowed_null": false
|
2537
|
+
},
|
2538
|
+
{
|
2539
|
+
"disabled": false,
|
2540
|
+
"document": "备注",
|
2541
|
+
"example": "这是备注",
|
2542
|
+
"member": "string",
|
2543
|
+
"name": "Remark",
|
2544
|
+
"output_required": false,
|
2545
|
+
"type": "string",
|
2546
|
+
"value_allowed_null": false
|
2547
|
+
}
|
2548
|
+
],
|
2549
|
+
"usage": "out"
|
2550
|
+
},
|
2372
2551
|
"SubscribePrivateZoneServiceRequest": {
|
2373
2552
|
"document": "SubscribePrivateZoneService请求参数结构体",
|
2374
2553
|
"members": [],
|
@@ -160,6 +160,14 @@
|
|
160
160
|
"title": "查询用户额度使用情况"
|
161
161
|
}
|
162
162
|
],
|
163
|
+
"DescribeRecord": [
|
164
|
+
{
|
165
|
+
"document": "",
|
166
|
+
"input": "POST / HTTP/1.1\nHost: privatedns.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeRecord\n<公共请求参数>\n\n{\n \"ZoneId\": \"zone-abcd1234\",\n \"RecordId\": \"10008374\"\n}",
|
167
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"9b19115c-8732-4940-9199-98952a13f159\",\n \"RecordInfo\": {\n \"RecordId\": \"716\",\n \"ZoneId\": \"zone-o85nq234g\",\n \"SubDomain\": \"aaaa\",\n \"RecordType\": \"A\",\n \"RecordValue\": \"1.1.1.35\",\n \"TTL\": 300,\n \"MX\": 0,\n \"Enabled\": 1,\n \"CreatedOn\": \"2025-03-17 18:56:16\",\n \"UpdatedOn\": \"2025-05-27 16:25:23\",\n \"Remark\": \"\",\n \"Weight\": 20\n }\n }\n}",
|
168
|
+
"title": "获取私有域记录示例"
|
169
|
+
}
|
170
|
+
],
|
163
171
|
"DescribeRequestData": [
|
164
172
|
{
|
165
173
|
"document": "",
|
@@ -454,6 +454,24 @@
|
|
454
454
|
"name": "TargetRequestsPerSecond",
|
455
455
|
"required": true,
|
456
456
|
"type": "int"
|
457
|
+
},
|
458
|
+
{
|
459
|
+
"disabled": false,
|
460
|
+
"document": "压测项目ID",
|
461
|
+
"example": "project-12345",
|
462
|
+
"member": "string",
|
463
|
+
"name": "ProjectId",
|
464
|
+
"required": false,
|
465
|
+
"type": "string"
|
466
|
+
},
|
467
|
+
{
|
468
|
+
"disabled": false,
|
469
|
+
"document": "测试场景ID",
|
470
|
+
"example": "scenario-12345",
|
471
|
+
"member": "string",
|
472
|
+
"name": "ScenarioId",
|
473
|
+
"required": false,
|
474
|
+
"type": "string"
|
457
475
|
}
|
458
476
|
],
|
459
477
|
"type": "object"
|