tencentcloud-sdk-nodejs 4.0.505 → 4.0.506
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.
- package/CHANGELOG.md +128 -0
- package/README.md +17 -29
- package/SERVICE_CHANGELOG.md +151 -70
- package/examples/cvm_role.js +26 -0
- package/package.json +1 -1
- package/products.md +10 -10
- package/src/common/abstract_client.ts +27 -19
- package/src/common/cvm_role_credential.ts +62 -0
- package/src/common/http/fetch.ts +2 -2
- package/src/common/interface.ts +8 -1
- package/src/common/sdk_version.ts +1 -1
- package/src/services/billing/v20180709/billing_models.ts +4 -6
- package/src/services/cfs/v20190719/cfs_models.ts +12 -0
- package/src/services/cvm/v20170312/cvm_models.ts +7 -2
- package/src/services/essbasic/v20210526/essbasic_client.ts +1 -1
- package/src/services/ssl/v20191205/ssl_client.ts +1 -0
- package/src/services/ssl/v20191205/ssl_models.ts +47 -0
- package/src/services/thpc/v20220401/thpc_models.ts +5 -5
- package/src/services/tione/v20211111/tione_models.ts +25 -3
- package/src/services/trtc/v20190722/trtc_models.ts +4 -4
- package/src/services/vpc/v20170312/vpc_client.ts +1 -1
- package/src/services/vpc/v20170312/vpc_models.ts +14 -8
- package/tencentcloud/common/abstract_client.d.ts +3 -2
- package/tencentcloud/common/abstract_client.js +21 -13
- package/tencentcloud/common/cvm_role_credential.d.ts +17 -0
- package/tencentcloud/common/cvm_role_credential.js +47 -0
- package/tencentcloud/common/http/fetch.d.ts +2 -2
- package/tencentcloud/common/interface.d.ts +7 -1
- package/tencentcloud/common/sdk_version.d.ts +1 -1
- package/tencentcloud/common/sdk_version.js +1 -1
- package/tencentcloud/services/billing/v20180709/billing_models.d.ts +4 -6
- package/tencentcloud/services/cfs/v20190719/cfs_models.d.ts +10 -0
- package/tencentcloud/services/cvm/v20170312/cvm_models.d.ts +6 -2
- package/tencentcloud/services/essbasic/v20210526/essbasic_client.d.ts +1 -1
- package/tencentcloud/services/essbasic/v20210526/essbasic_client.js +1 -1
- package/tencentcloud/services/ssl/v20191205/ssl_models.d.ts +40 -0
- package/tencentcloud/services/thpc/v20220401/thpc_models.d.ts +5 -5
- package/tencentcloud/services/tione/v20211111/tione_models.d.ts +21 -3
- package/tencentcloud/services/trtc/v20190722/trtc_models.d.ts +4 -4
- package/tencentcloud/services/vpc/v20170312/vpc_client.d.ts +1 -1
- package/tencentcloud/services/vpc/v20170312/vpc_client.js +1 -1
- package/tencentcloud/services/vpc/v20170312/vpc_models.d.ts +11 -6
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
ClientConfig,
|
|
6
6
|
SUPPORT_LANGUAGE_LIST,
|
|
7
7
|
HttpProfile,
|
|
8
|
+
DynamicCredential,
|
|
8
9
|
} from "./interface"
|
|
9
10
|
import Sign from "./sign"
|
|
10
11
|
import { HttpConnection } from "./http/http_connection"
|
|
@@ -41,7 +42,7 @@ type ResponseData = any
|
|
|
41
42
|
export class AbstractClient {
|
|
42
43
|
sdkVersion: string
|
|
43
44
|
path: string
|
|
44
|
-
credential: Credential
|
|
45
|
+
credential: Credential | DynamicCredential
|
|
45
46
|
region: string
|
|
46
47
|
apiVersion: string
|
|
47
48
|
endpoint: string
|
|
@@ -64,14 +65,11 @@ export class AbstractClient {
|
|
|
64
65
|
/**
|
|
65
66
|
* 认证信息实例
|
|
66
67
|
*/
|
|
67
|
-
this.credential =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
},
|
|
73
|
-
credential
|
|
74
|
-
)
|
|
68
|
+
this.credential = credential || {
|
|
69
|
+
secretId: null,
|
|
70
|
+
secretKey: null,
|
|
71
|
+
token: null,
|
|
72
|
+
}
|
|
75
73
|
|
|
76
74
|
/**
|
|
77
75
|
* 产品地域
|
|
@@ -106,6 +104,13 @@ export class AbstractClient {
|
|
|
106
104
|
}
|
|
107
105
|
}
|
|
108
106
|
|
|
107
|
+
async getCredential(): Promise<Credential> {
|
|
108
|
+
if ("getCredential" in this.credential) {
|
|
109
|
+
return await this.credential.getCredential()
|
|
110
|
+
}
|
|
111
|
+
return this.credential
|
|
112
|
+
}
|
|
113
|
+
|
|
109
114
|
/**
|
|
110
115
|
* @inner
|
|
111
116
|
*/
|
|
@@ -141,7 +146,7 @@ export class AbstractClient {
|
|
|
141
146
|
return this.doRequestWithSign3(action, req, options)
|
|
142
147
|
}
|
|
143
148
|
let params = this.mergeData(req)
|
|
144
|
-
params = this.formatRequestData(action, params)
|
|
149
|
+
params = await this.formatRequestData(action, params)
|
|
145
150
|
let res
|
|
146
151
|
try {
|
|
147
152
|
res = await HttpConnection.doRequest({
|
|
@@ -170,11 +175,12 @@ export class AbstractClient {
|
|
|
170
175
|
): Promise<ResponseData> {
|
|
171
176
|
let res
|
|
172
177
|
try {
|
|
178
|
+
const credential = await this.getCredential()
|
|
173
179
|
res = await HttpConnection.doRequestWithSign3({
|
|
174
180
|
method: this.profile.httpProfile.reqMethod,
|
|
175
181
|
url: this.profile.httpProfile.protocol + this.endpoint + this.path,
|
|
176
|
-
secretId:
|
|
177
|
-
secretKey:
|
|
182
|
+
secretId: credential.secretId,
|
|
183
|
+
secretKey: credential.secretKey,
|
|
178
184
|
region: this.region,
|
|
179
185
|
data: params || "",
|
|
180
186
|
service: this.endpoint.split(".")[0],
|
|
@@ -182,7 +188,7 @@ export class AbstractClient {
|
|
|
182
188
|
version: this.apiVersion,
|
|
183
189
|
multipart: options && options.multipart,
|
|
184
190
|
timeout: this.profile.httpProfile.reqTimeout * 1000,
|
|
185
|
-
token:
|
|
191
|
+
token: credential.token,
|
|
186
192
|
requestClient: this.sdkVersion,
|
|
187
193
|
language: this.profile.language,
|
|
188
194
|
headers: Object.assign({}, this.profile.httpProfile.headers, options.headers),
|
|
@@ -237,23 +243,25 @@ export class AbstractClient {
|
|
|
237
243
|
/**
|
|
238
244
|
* @inner
|
|
239
245
|
*/
|
|
240
|
-
private formatRequestData(action: string, params: RequestData): RequestData {
|
|
246
|
+
private async formatRequestData(action: string, params: RequestData): Promise<RequestData> {
|
|
241
247
|
params.Action = action
|
|
242
248
|
params.RequestClient = this.sdkVersion
|
|
243
249
|
params.Nonce = Math.round(Math.random() * 65535)
|
|
244
250
|
params.Timestamp = Math.round(Date.now() / 1000)
|
|
245
251
|
params.Version = this.apiVersion
|
|
246
252
|
|
|
247
|
-
|
|
248
|
-
|
|
253
|
+
const credential = await this.getCredential()
|
|
254
|
+
|
|
255
|
+
if (credential.secretId) {
|
|
256
|
+
params.SecretId = credential.secretId
|
|
249
257
|
}
|
|
250
258
|
|
|
251
259
|
if (this.region) {
|
|
252
260
|
params.Region = this.region
|
|
253
261
|
}
|
|
254
262
|
|
|
255
|
-
if (
|
|
256
|
-
params.Token =
|
|
263
|
+
if (credential.token) {
|
|
264
|
+
params.Token = credential.token
|
|
257
265
|
}
|
|
258
266
|
|
|
259
267
|
if (this.profile.language) {
|
|
@@ -265,7 +273,7 @@ export class AbstractClient {
|
|
|
265
273
|
}
|
|
266
274
|
const signStr = this.formatSignString(params)
|
|
267
275
|
|
|
268
|
-
params.Signature = Sign.sign(
|
|
276
|
+
params.Signature = Sign.sign(credential.secretKey, signStr, this.profile.signMethod)
|
|
269
277
|
return params
|
|
270
278
|
}
|
|
271
279
|
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Credential, DynamicCredential } from "./interface"
|
|
2
|
+
import fetch from "./http/fetch"
|
|
3
|
+
|
|
4
|
+
const META_URL = "http://metadata.tencentyun.com/latest/meta-data/"
|
|
5
|
+
const ROLE_URL = META_URL + "cam/security-credentials/"
|
|
6
|
+
const EXPIRE_BUFFER = 30 * 1000
|
|
7
|
+
|
|
8
|
+
interface CvmRoleCredentialResult {
|
|
9
|
+
TmpSecretId: string
|
|
10
|
+
TmpSecretKey: string
|
|
11
|
+
ExpiredTime: 1671330188
|
|
12
|
+
Expiration: string
|
|
13
|
+
Token: string
|
|
14
|
+
Code: string
|
|
15
|
+
}
|
|
16
|
+
export default class CvmRoleCredential implements DynamicCredential {
|
|
17
|
+
protected roleNameTask: Promise<string>
|
|
18
|
+
protected credentialTask: Promise<CvmRoleCredentialResult>
|
|
19
|
+
protected async getRoleName() {
|
|
20
|
+
const response = await fetch(ROLE_URL, {})
|
|
21
|
+
if (!response.ok) {
|
|
22
|
+
throw new Error("Get cvm role name failed, Please confirm whether the role is bound")
|
|
23
|
+
}
|
|
24
|
+
return await response.text()
|
|
25
|
+
}
|
|
26
|
+
protected async getRoleCredential(roleName: string): Promise<CvmRoleCredentialResult> {
|
|
27
|
+
const response = await fetch(ROLE_URL + roleName, {})
|
|
28
|
+
if (!response.ok) {
|
|
29
|
+
throw new Error(
|
|
30
|
+
`Get credential from metadata server by role name ${roleName} failed, http code: ${response.status}`
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
const json: CvmRoleCredentialResult = await response.json()
|
|
34
|
+
if (json.Code !== "Success") {
|
|
35
|
+
throw new Error(
|
|
36
|
+
`Get credential from metadata server by role name ${roleName} failed, Code: ${json.Code}`
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
return json
|
|
40
|
+
}
|
|
41
|
+
async getCredential(): Promise<Credential> {
|
|
42
|
+
if (!this.roleNameTask) {
|
|
43
|
+
this.roleNameTask = this.getRoleName()
|
|
44
|
+
}
|
|
45
|
+
const roleName = await this.roleNameTask
|
|
46
|
+
if (!this.credentialTask) {
|
|
47
|
+
this.credentialTask = this.getRoleCredential(roleName)
|
|
48
|
+
}
|
|
49
|
+
const credential = await this.credentialTask
|
|
50
|
+
// expired
|
|
51
|
+
if (credential.ExpiredTime * 1000 - EXPIRE_BUFFER <= Date.now()) {
|
|
52
|
+
this.credentialTask = null
|
|
53
|
+
return this.getCredential()
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
secretId: credential.TmpSecretId,
|
|
58
|
+
secretKey: credential.TmpSecretKey,
|
|
59
|
+
token: credential.Token,
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
package/src/common/http/fetch.ts
CHANGED
|
@@ -3,9 +3,9 @@ import HttpsProxyAgent = require("https-proxy-agent")
|
|
|
3
3
|
|
|
4
4
|
export interface FetchOptions extends Omit<RequestInit, "signal"> {
|
|
5
5
|
proxy?: string
|
|
6
|
-
headers
|
|
6
|
+
headers?: Record<string, string>
|
|
7
7
|
// node-fetch中的signal声明与ts自带的有点冲突,以ts的为准
|
|
8
|
-
signal
|
|
8
|
+
signal?: AbortSignal
|
|
9
9
|
}
|
|
10
10
|
export default function (url: string, options: FetchOptions): Promise<Response> {
|
|
11
11
|
const instanceOptions = options || ({} as FetchOptions)
|
package/src/common/interface.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface ClientConfig {
|
|
|
7
7
|
* @param {Credential} credential 认证信息
|
|
8
8
|
* 必选
|
|
9
9
|
*/
|
|
10
|
-
credential: Credential
|
|
10
|
+
credential: Credential | DynamicCredential
|
|
11
11
|
/**
|
|
12
12
|
* @param {string} region 产品地域
|
|
13
13
|
* 对于要求区分地域的产品,此参数必选(如 cvm);对于不区分地域的产品(如 sms),无需传入。
|
|
@@ -112,3 +112,10 @@ export interface Credential {
|
|
|
112
112
|
*/
|
|
113
113
|
token?: string
|
|
114
114
|
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* 动态认证信息
|
|
118
|
+
*/
|
|
119
|
+
export interface DynamicCredential {
|
|
120
|
+
getCredential(): Promise<Credential>
|
|
121
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const sdkVersion = "4.0.
|
|
1
|
+
export const sdkVersion = "4.0.506"
|
|
@@ -237,12 +237,10 @@ export interface DescribeDosageDetailByDateRequest {
|
|
|
237
237
|
10195 互动直播-边缘机房
|
|
238
238
|
|
|
239
239
|
cdn业务:
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
10231:CDN静态加速流量(海外)
|
|
245
|
-
10232:CDN静态加速带宽(海外)
|
|
240
|
+
102383:CDN静态加速流量(国内)
|
|
241
|
+
102384:CDN静态加速带宽(国内)
|
|
242
|
+
102385:CDN静态加速流量(海外)
|
|
243
|
+
102386:CDN静态加速带宽(海外)
|
|
246
244
|
|
|
247
245
|
100967:弹性公网IP-按流量计费
|
|
248
246
|
101065:公网负载均衡-按流量计费
|
|
@@ -938,6 +938,18 @@ export interface UserQuota {
|
|
|
938
938
|
* 文件系统ID
|
|
939
939
|
*/
|
|
940
940
|
FileSystemId: string
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* 容量使用,单位GiB
|
|
944
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
945
|
+
*/
|
|
946
|
+
CapacityUsed?: number
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* 文件使用个数,单位个
|
|
950
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
951
|
+
*/
|
|
952
|
+
FileUsed?: number
|
|
941
953
|
}
|
|
942
954
|
|
|
943
955
|
/**
|
|
@@ -4082,7 +4082,7 @@ export interface DescribeInstancesRequest {
|
|
|
4082
4082
|
InstanceIds?: Array<string>
|
|
4083
4083
|
|
|
4084
4084
|
/**
|
|
4085
|
-
* <li><strong>zone</strong></li> <p style="padding-left: 30px;">按照【<strong>可用区</strong>】进行过滤。可用区形如:ap-guangzhou-1。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:<a href="https://cloud.tencent.com/document/product/213/6091">可用区列表</a></p> <li><strong>project-id</strong></li> <p style="padding-left: 30px;">按照【<strong>项目ID</strong>】进行过滤,可通过调用[
|
|
4085
|
+
* <li><strong>zone</strong></li> <p style="padding-left: 30px;">按照【<strong>可用区</strong>】进行过滤。可用区形如:ap-guangzhou-1。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:<a href="https://cloud.tencent.com/document/product/213/6091">可用区列表</a></p> <li><strong>project-id</strong></li> <p style="padding-left: 30px;">按照【<strong>项目ID</strong>】进行过滤,可通过调用[DescribeProjects](https://cloud.tencent.com/document/api/651/78725)查询已创建的项目列表或登录[控制台](https://console.cloud.tencent.com/cvm/index)进行查看;也可以调用[AddProject](https://cloud.tencent.com/document/api/651/81952)创建新的项目。项目ID形如:1002189。</p><p style="padding-left: 30px;">类型:Integer</p><p style="padding-left: 30px;">必选:否</p> <li><strong>host-id</strong></li> <p style="padding-left: 30px;">按照【<strong>[CDH](https://cloud.tencent.com/document/product/416) ID</strong>】进行过滤。[CDH](https://cloud.tencent.com/document/product/416) ID形如:host-xxxxxxxx。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> <li><strong>dedicated-cluster-id</strong></li> <p style="padding-left: 30px;">按照【<strong>[CDC](https://cloud.tencent.com/document/product/1346) ID</strong>】进行过滤。[CDC](https://cloud.tencent.com/document/product/1346) ID形如:cluster-xxxxxxx。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> <li><strong>vpc-id</strong></li> <p style="padding-left: 30px;">按照【<strong>VPC ID</strong>】进行过滤。VPC ID形如:vpc-xxxxxxxx。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> <li><strong>subnet-id</strong></li> <p style="padding-left: 30px;">按照【<strong>子网ID</strong>】进行过滤。子网ID形如:subnet-xxxxxxxx。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> <li><strong>instance-id</strong></li> <p style="padding-left: 30px;">按照【<strong>实例ID</strong>】进行过滤。实例ID形如:ins-xxxxxxxx。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> <li><strong>uuid</strong></li> <p style="padding-left: 30px;">按照【<strong>实例UUID</strong>】进行过滤。实例UUID形如:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> <li><strong>security-group-id</strong></li> <p style="padding-left: 30px;">按照【<strong>安全组ID</strong>】进行过滤。安全组ID形如: sg-8jlk3f3r。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> <li><strong>instance-name</strong></li> <p style="padding-left: 30px;">按照【<strong>实例名称</strong>】进行过滤。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> <li><strong>instance-charge-type</strong></li> <p style="padding-left: 30px;">按照【<strong>实例计费模式</strong>】进行过滤。(PREPAID:表示预付费,即包年包月 | POSTPAID_BY_HOUR:表示后付费,即按量计费 | CDHPAID:表示[CDH](https://cloud.tencent.com/document/product/416)付费,即只对[CDH](https://cloud.tencent.com/document/product/416)计费,不对[CDH](https://cloud.tencent.com/document/product/416)上的实例计费。)</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> <li><strong>instance-state</strong></li> <p style="padding-left: 30px;">按照【<strong>实例状态</strong>】进行过滤。状态类型详见[实例状态表](https://cloud.tencent.com/document/api/213/15753#InstanceStatus)</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> <li><strong>private-ip-address</strong></li> <p style="padding-left: 30px;">按照【<strong>实例主网卡的内网IP</strong>】进行过滤。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> <li><strong>public-ip-address</strong></li> <p style="padding-left: 30px;">按照【<strong>实例主网卡的公网IP</strong>】进行过滤,包含实例创建时自动分配的IP和实例创建后手动绑定的弹性IP。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> <li><strong>ipv6-address</strong></li> <p style="padding-left: 30px;">按照【<strong>实例的IPv6地址</strong>】进行过滤。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> <li><strong>tag-key</strong></li> <p style="padding-left: 30px;">按照【<strong>标签键</strong>】进行过滤。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> <li><strong>tag-value</strong></li> <p style="padding-left: 30px;">按照【<strong>标签值</strong>】进行过滤。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> <li><strong>tag:tag-key</strong></li> <p style="padding-left: 30px;">按照【<strong>标签键值对</strong>】进行过滤。tag-key使用具体的标签键进行替换。使用请参考示例2。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`InstanceIds`和`Filters`。
|
|
4086
4086
|
*/
|
|
4087
4087
|
Filters?: Array<Filter>
|
|
4088
4088
|
|
|
@@ -4868,7 +4868,12 @@ export interface ExportImagesResponse {
|
|
|
4868
4868
|
/**
|
|
4869
4869
|
* 导出镜像任务ID
|
|
4870
4870
|
*/
|
|
4871
|
-
TaskId
|
|
4871
|
+
TaskId?: number
|
|
4872
|
+
|
|
4873
|
+
/**
|
|
4874
|
+
* 导出镜像的COS文件名列表
|
|
4875
|
+
*/
|
|
4876
|
+
CosPaths?: Array<string>
|
|
4872
4877
|
|
|
4873
4878
|
/**
|
|
4874
4879
|
* 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
|
@@ -593,6 +593,30 @@ export interface Certificates {
|
|
|
593
593
|
注意:此字段可能返回 null,表示取不到有效值。
|
|
594
594
|
*/
|
|
595
595
|
EncryptAlgorithm: string
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* 上传CA证书的加密算法
|
|
599
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
600
|
+
*/
|
|
601
|
+
CAEncryptAlgorithms: Array<string>
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* 上传CA证书的过期时间
|
|
605
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
606
|
+
*/
|
|
607
|
+
CAEndTimes: Array<string>
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* 上传CA证书的通用名称
|
|
611
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
612
|
+
*/
|
|
613
|
+
CACommonNames: Array<string>
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* 证书预审核信息
|
|
617
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
618
|
+
*/
|
|
619
|
+
PreAuditInfo: PreAuditInfo
|
|
596
620
|
}
|
|
597
621
|
|
|
598
622
|
/**
|
|
@@ -2517,6 +2541,29 @@ export interface RevokeCertificateRequest {
|
|
|
2517
2541
|
Reason?: string
|
|
2518
2542
|
}
|
|
2519
2543
|
|
|
2544
|
+
/**
|
|
2545
|
+
* 预审核信息列表
|
|
2546
|
+
*/
|
|
2547
|
+
export interface PreAuditInfo {
|
|
2548
|
+
/**
|
|
2549
|
+
* 证书总年限
|
|
2550
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
2551
|
+
*/
|
|
2552
|
+
TotalPeriod: number
|
|
2553
|
+
|
|
2554
|
+
/**
|
|
2555
|
+
* 证书当前年限
|
|
2556
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
2557
|
+
*/
|
|
2558
|
+
NowPeriod: number
|
|
2559
|
+
|
|
2560
|
+
/**
|
|
2561
|
+
* 证书预审核管理人ID
|
|
2562
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
2563
|
+
*/
|
|
2564
|
+
ManagerId: string
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2520
2567
|
/**
|
|
2521
2568
|
* 获取证书列表(DescribeCertificate)返回参数键为 SubmittedData 的内容。
|
|
2522
2569
|
*/
|
|
@@ -362,12 +362,12 @@ export interface LoginNodeOverview {
|
|
|
362
362
|
*/
|
|
363
363
|
export interface CFSOption {
|
|
364
364
|
/**
|
|
365
|
-
*
|
|
365
|
+
* 文件系统本地挂载路径。
|
|
366
366
|
*/
|
|
367
367
|
LocalPath: string
|
|
368
368
|
|
|
369
369
|
/**
|
|
370
|
-
* 文件系统远程挂载ip
|
|
370
|
+
* 文件系统远程挂载ip及路径。
|
|
371
371
|
*/
|
|
372
372
|
RemotePath: string
|
|
373
373
|
|
|
@@ -1021,17 +1021,17 @@ export interface DescribeClustersResponse {
|
|
|
1021
1021
|
*/
|
|
1022
1022
|
export interface GooseFSOption {
|
|
1023
1023
|
/**
|
|
1024
|
-
*
|
|
1024
|
+
* 文件系统本地挂载路径。
|
|
1025
1025
|
*/
|
|
1026
1026
|
LocalPath: string
|
|
1027
1027
|
|
|
1028
1028
|
/**
|
|
1029
|
-
*
|
|
1029
|
+
* 文件系统远程挂载路径。
|
|
1030
1030
|
*/
|
|
1031
1031
|
RemotePath: string
|
|
1032
1032
|
|
|
1033
1033
|
/**
|
|
1034
|
-
* 文件系统master的ip
|
|
1034
|
+
* 文件系统master的ip和端口。
|
|
1035
1035
|
*/
|
|
1036
1036
|
Masters: Array<string>
|
|
1037
1037
|
}
|
|
@@ -173,7 +173,7 @@ HYBRID_PAID:
|
|
|
173
173
|
ServiceLimit?: ServiceLimit
|
|
174
174
|
|
|
175
175
|
/**
|
|
176
|
-
*
|
|
176
|
+
* 回调地址,用于回调创建服务状态信息,回调格式&内容详情见:[TI-ONE 接口回调说明](https://cloud.tencent.com/document/product/851/84292)
|
|
177
177
|
*/
|
|
178
178
|
CallbackUrl?: string
|
|
179
179
|
}
|
|
@@ -1390,6 +1390,11 @@ export interface CreateBatchTaskRequest {
|
|
|
1390
1390
|
* 备注
|
|
1391
1391
|
*/
|
|
1392
1392
|
Remark?: string
|
|
1393
|
+
|
|
1394
|
+
/**
|
|
1395
|
+
* 任务执行结果回调URL,仅支持http和https。回调格式&内容详见: [TI-ONE 接口回调说明](https://cloud.tencent.com/document/product/851/84292)
|
|
1396
|
+
*/
|
|
1397
|
+
CallbackUrl?: string
|
|
1393
1398
|
}
|
|
1394
1399
|
|
|
1395
1400
|
/**
|
|
@@ -3286,7 +3291,7 @@ export interface CreateTrainingTaskResponse {
|
|
|
3286
3291
|
/**
|
|
3287
3292
|
* 训练任务ID
|
|
3288
3293
|
*/
|
|
3289
|
-
Id
|
|
3294
|
+
Id?: string
|
|
3290
3295
|
|
|
3291
3296
|
/**
|
|
3292
3297
|
* 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
|
@@ -3422,6 +3427,11 @@ export interface CreateTrainingTaskRequest {
|
|
|
3422
3427
|
* 数据来源,eg:DATASET、COS、CFS、HDFS
|
|
3423
3428
|
*/
|
|
3424
3429
|
DataSource?: string
|
|
3430
|
+
|
|
3431
|
+
/**
|
|
3432
|
+
* 回调地址,用于创建/启动/停止训练任务的异步回调。回调格式&内容详见:[[TI-ONE接口回调说明]](https://cloud.tencent.com/document/product/851/84292)
|
|
3433
|
+
*/
|
|
3434
|
+
CallbackUrl?: string
|
|
3425
3435
|
}
|
|
3426
3436
|
|
|
3427
3437
|
/**
|
|
@@ -4375,7 +4385,7 @@ export interface CreateModelServiceResponse {
|
|
|
4375
4385
|
* 生成的模型服务
|
|
4376
4386
|
注意:此字段可能返回 null,表示取不到有效值。
|
|
4377
4387
|
*/
|
|
4378
|
-
Service
|
|
4388
|
+
Service?: Service
|
|
4379
4389
|
|
|
4380
4390
|
/**
|
|
4381
4391
|
* 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
|
@@ -5124,6 +5134,12 @@ export interface TrainingTaskDetail {
|
|
|
5124
5134
|
* 任务状态,eg:STARTING启动中、RUNNING运行中、STOPPING停止中、STOPPED已停止、FAILED异常、SUCCEED已完成
|
|
5125
5135
|
*/
|
|
5126
5136
|
Status: string
|
|
5137
|
+
|
|
5138
|
+
/**
|
|
5139
|
+
* 回调地址
|
|
5140
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
5141
|
+
*/
|
|
5142
|
+
CallbackUrl: string
|
|
5127
5143
|
}
|
|
5128
5144
|
|
|
5129
5145
|
/**
|
|
@@ -5542,6 +5558,12 @@ export interface TrainingTaskSetItem {
|
|
|
5542
5558
|
注意:此字段可能返回 null,表示取不到有效值。
|
|
5543
5559
|
*/
|
|
5544
5560
|
Tags: Array<Tag>
|
|
5561
|
+
|
|
5562
|
+
/**
|
|
5563
|
+
* 回调地址
|
|
5564
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
5565
|
+
*/
|
|
5566
|
+
CallbackUrl: string
|
|
5545
5567
|
}
|
|
5546
5568
|
|
|
5547
5569
|
/**
|
|
@@ -890,17 +890,17 @@ export interface SdkAppIdNewTrtcTimeUsage {
|
|
|
890
890
|
*/
|
|
891
891
|
export interface EncodeParams {
|
|
892
892
|
/**
|
|
893
|
-
* 混流-输出流音频采样率。取值为[48000, 44100, 32000, 24000, 16000, 8000],单位是Hz
|
|
893
|
+
* 混流-输出流音频采样率。取值为[48000, 44100, 32000, 24000, 16000, 8000],单位是Hz。混流任务发起过程中,为了保持CDN链接的稳定,不要修改音频参数(codec、采样率、码率、声道数)。
|
|
894
894
|
*/
|
|
895
895
|
AudioSampleRate: number
|
|
896
896
|
|
|
897
897
|
/**
|
|
898
|
-
* 混流-输出流音频码率。取值范围[8,500],单位为kbps
|
|
898
|
+
* 混流-输出流音频码率。取值范围[8,500],单位为kbps。混流任务发起过程中,为了保持CDN链接的稳定,不要修改音频参数(codec、采样率、码率、声道数)。
|
|
899
899
|
*/
|
|
900
900
|
AudioBitrate: number
|
|
901
901
|
|
|
902
902
|
/**
|
|
903
|
-
* 混流-输出流音频声道数,取值范围[1,2],1表示混流输出音频为单声道,2
|
|
903
|
+
* 混流-输出流音频声道数,取值范围[1,2],1表示混流输出音频为单声道,2表示混流输出音频为双声道。混流任务发起过程中,为了保持CDN链接的稳定,不要修改音频参数(codec、采样率、码率、声道数)。
|
|
904
904
|
*/
|
|
905
905
|
AudioChannels: number
|
|
906
906
|
|
|
@@ -947,7 +947,7 @@ export interface EncodeParams {
|
|
|
947
947
|
BackgroundImageId?: number
|
|
948
948
|
|
|
949
949
|
/**
|
|
950
|
-
* 混流-输出流音频编码类型,取值范围[0,1, 2],0为LC-AAC,1为HE-AAC,2为HE-AACv2。默认值为0。当音频编码设置为HE-AACv2时,只支持输出流音频声道数为双声道。HE-AAC和HE-AACv2支持的输出流音频采样率范围为[48000, 44100, 32000, 24000, 16000]
|
|
950
|
+
* 混流-输出流音频编码类型,取值范围[0,1, 2],0为LC-AAC,1为HE-AAC,2为HE-AACv2。默认值为0。当音频编码设置为HE-AACv2时,只支持输出流音频声道数为双声道。HE-AAC和HE-AACv2支持的输出流音频采样率范围为[48000, 44100, 32000, 24000, 16000]。混流任务发起过程中,为了保持CDN链接的稳定,不要修改音频参数(codec、采样率、码率、声道数)。
|
|
951
951
|
*/
|
|
952
952
|
AudioCodec?: number
|
|
953
953
|
|
|
@@ -2810,7 +2810,7 @@ export class Client extends AbstractClient {
|
|
|
2810
2810
|
|
|
2811
2811
|
/**
|
|
2812
2812
|
* 本接口(ReturnNormalAddresses)用于解绑并释放普通公网IP。
|
|
2813
|
-
为完善公网IP的访问管理功能,此接口于2022年12月15日升级优化鉴权功能,升级后子用户调用此接口需向主账号申请CAM策略授权,否则可能调用失败。您可以提前为子账号配置操作授权,详情见
|
|
2813
|
+
为完善公网IP的访问管理功能,此接口于2022年12月15日升级优化鉴权功能,升级后子用户调用此接口需向主账号申请CAM策略授权,否则可能调用失败。您可以提前为子账号配置操作授权,详情见[授权指南](https://cloud.tencent.com/document/product/598/34545)。
|
|
2814
2814
|
*/
|
|
2815
2815
|
async ReturnNormalAddresses(
|
|
2816
2816
|
req: ReturnNormalAddressesRequest,
|
|
@@ -1630,14 +1630,10 @@ export interface ModifyBandwidthPackageAttributeRequest {
|
|
|
1630
1630
|
BandwidthPackageName: string
|
|
1631
1631
|
|
|
1632
1632
|
/**
|
|
1633
|
-
|
|
1634
|
-
|
|
1633
|
+
* 带宽包计费模式,示例 :
|
|
1634
|
+
'TOP5_POSTPAID_BY_MONTH'(后付费-TOP5计费)
|
|
1635
|
+
*/
|
|
1635
1636
|
ChargeType?: string
|
|
1636
|
-
|
|
1637
|
-
/**
|
|
1638
|
-
* 退款时迁移为后付费带宽包。默认值:否
|
|
1639
|
-
*/
|
|
1640
|
-
MigrateOnRefund?: boolean
|
|
1641
1637
|
}
|
|
1642
1638
|
|
|
1643
1639
|
/**
|
|
@@ -7974,9 +7970,14 @@ export interface CreateVpcEndPointServiceRequest {
|
|
|
7974
7970
|
ServiceInstanceId: string
|
|
7975
7971
|
|
|
7976
7972
|
/**
|
|
7977
|
-
*
|
|
7973
|
+
* ~~是否是PassService类型。该字段已废弃,请不要使用该字段。~~
|
|
7978
7974
|
*/
|
|
7979
7975
|
IsPassService?: boolean
|
|
7976
|
+
|
|
7977
|
+
/**
|
|
7978
|
+
* 挂载的PAAS服务类型,CLB,CDB,CRS,不填默认挂载为CLB。
|
|
7979
|
+
*/
|
|
7980
|
+
ServiceType?: string
|
|
7980
7981
|
}
|
|
7981
7982
|
|
|
7982
7983
|
/**
|
|
@@ -8871,6 +8872,11 @@ AnycastEIP是否用于绑定负载均衡。
|
|
|
8871
8872
|
* EIP名称,用于申请EIP时用户自定义该EIP的个性化名称,默认值:未命名
|
|
8872
8873
|
*/
|
|
8873
8874
|
AddressName?: string
|
|
8875
|
+
|
|
8876
|
+
/**
|
|
8877
|
+
* 网络出口,默认是:center_egress1
|
|
8878
|
+
*/
|
|
8879
|
+
Egress?: string
|
|
8874
8880
|
}
|
|
8875
8881
|
|
|
8876
8882
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClientProfile, Credential, ClientConfig, HttpProfile } from "./interface";
|
|
1
|
+
import { ClientProfile, Credential, ClientConfig, HttpProfile, DynamicCredential } from "./interface";
|
|
2
2
|
export declare type ResponseCallback<TReuslt = any> = (error: string, rep: TReuslt) => void;
|
|
3
3
|
export interface RequestOptions extends Partial<Pick<HttpProfile, "headers">> {
|
|
4
4
|
multipart?: boolean;
|
|
@@ -14,7 +14,7 @@ declare type ResponseData = any;
|
|
|
14
14
|
export declare class AbstractClient {
|
|
15
15
|
sdkVersion: string;
|
|
16
16
|
path: string;
|
|
17
|
-
credential: Credential;
|
|
17
|
+
credential: Credential | DynamicCredential;
|
|
18
18
|
region: string;
|
|
19
19
|
apiVersion: string;
|
|
20
20
|
endpoint: string;
|
|
@@ -28,6 +28,7 @@ export declare class AbstractClient {
|
|
|
28
28
|
* @param {ClientProfile} profile 可选配置实例
|
|
29
29
|
*/
|
|
30
30
|
constructor(endpoint: string, version: string, { credential, region, profile }: ClientConfig);
|
|
31
|
+
getCredential(): Promise<Credential>;
|
|
31
32
|
/**
|
|
32
33
|
* @inner
|
|
33
34
|
*/
|