@cloudbase/manager-node 5.8.7 → 5.8.8

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 CHANGED
@@ -1,3 +1,10 @@
1
+ ## @cloudbase/manager-node v5.8.7 版本发布 🚀(2026-09-14)
2
+
3
+ - 新增 HTTP 服务缓存刷新相关 API
4
+ - 重构 移除 ENABLE_TCBF 开关,统一走 TCB 函数接口
5
+
6
+ ---
7
+
1
8
  ## @cloudbase/manager-node v5.8.6 版本发布 🚀(2026-09-09)
2
9
 
3
10
  - 新增 hosting 本地构建拆分 npm install 并导出构建能力供 CLI 复用
package/lib/env/index.js CHANGED
@@ -17,6 +17,7 @@ const signature_nodejs_1 = require("@cloudbase/signature-nodejs");
17
17
  const error_1 = require("../error");
18
18
  const utils_1 = require("../utils");
19
19
  const constant_1 = require("../constant");
20
+ const storage_config_1 = require("../utils/storage-config");
20
21
  const billing_1 = require("../billing");
21
22
  const uuid_1 = require("uuid");
22
23
  class EnvService {
@@ -919,7 +920,16 @@ class EnvService {
919
920
  return res.CORSRules;
920
921
  }
921
922
  // 添加 COS CORS 域名,和 Web 端行为保持一致
923
+ // 共享桶(ExternalStorage)环境直接跳过:桶的 CORS 规则作用于桶内所有环境,不能随单个环境的安全域名覆盖;
924
+ // 调用方未 await 此方法,这里不抛错,避免产生未处理的 Promise rejection
922
925
  async modifyCosCorsDomain(domain, deleted = false) {
926
+ var _a, _b, _c;
927
+ const storage = (_b = (_a = this.environment.lazyEnvironmentConfig) === null || _a === void 0 ? void 0 : _a.Storages) === null || _b === void 0 ? void 0 : _b[0];
928
+ // 环境未开通云存储(Storages 为空)时同样跳过:此时 getStorageConfig() 会抛错,
929
+ // 而调用方未 await 本方法,抛出即为未处理的 Promise rejection
930
+ if (!storage || (!storage.Bucket && ((_c = storage.ExternalStorage) === null || _c === void 0 ? void 0 : _c.Enabled) === true)) {
931
+ return;
932
+ }
923
933
  const cos = this.getCos();
924
934
  const putBucketCors = util_1.default.promisify(cos.putBucketCors).bind(cos);
925
935
  const { bucket, region } = this.getStorageConfig();
@@ -966,15 +976,7 @@ class EnvService {
966
976
  return new cos_nodejs_sdk_v5_1.default(cosConfig);
967
977
  }
968
978
  getStorageConfig() {
969
- var _a;
970
- const envConfig = this.environment.lazyEnvironmentConfig;
971
- const storageConfig = (_a = envConfig === null || envConfig === void 0 ? void 0 : envConfig.Storages) === null || _a === void 0 ? void 0 : _a[0];
972
- const { Region, Bucket } = storageConfig;
973
- return {
974
- env: envConfig.EnvId,
975
- region: Region,
976
- bucket: Bucket
977
- };
979
+ return (0, storage_config_1.resolveStorageConfig)(this.environment.lazyEnvironmentConfig);
978
980
  }
979
981
  parseBillTags(billTags) {
980
982
  if (typeof billTags !== 'string') {
@@ -25,6 +25,7 @@ const sandbox_1 = require("./sandbox");
25
25
  const aiModel_1 = require("./aiModel");
26
26
  const monitor_1 = require("./monitor");
27
27
  const integration_1 = require("./integration");
28
+ const platform_1 = require("./platform");
28
29
  class Environment {
29
30
  constructor(context, envId) {
30
31
  this.inited = false;
@@ -52,6 +53,7 @@ class Environment {
52
53
  this.aiModelService = new aiModel_1.AiModelService(this);
53
54
  this.monitorService = new monitor_1.MonitorService(this);
54
55
  this.integrationService = new integration_1.IntegrationService(this);
56
+ this.platformService = new platform_1.PlatformService(this);
55
57
  }
56
58
  async lazyInit() {
57
59
  if (!this.inited) {
@@ -142,6 +144,12 @@ class Environment {
142
144
  getIntegrationService() {
143
145
  return this.integrationService;
144
146
  }
147
+ /**
148
+ * 获取平台版套餐服务
149
+ */
150
+ getPlatformService() {
151
+ return this.platformService;
152
+ }
145
153
  getCommonService(serviceType = 'tcb', serviceVersion) {
146
154
  return new common_1.CommonService(this, serviceType, serviceVersion);
147
155
  }
package/lib/error.js CHANGED
@@ -5,12 +5,13 @@ class CloudBaseError extends Error {
5
5
  constructor(message, options = {}) {
6
6
  super();
7
7
  this.name = 'CloudBaseError';
8
- const { code = '', action = '', original = null, requestId = '' } = options;
8
+ const { code = '', action = '', original = null, requestId = '', meta } = options;
9
9
  this.message = action ? `[${action}] ${message}` : message;
10
10
  this.original = original;
11
11
  this.code = code;
12
12
  this.requestId = requestId;
13
13
  this.action = action;
14
+ this.meta = meta;
14
15
  }
15
16
  }
16
17
  exports.CloudBaseError = CloudBaseError;
@@ -16,6 +16,7 @@ const make_dir_1 = __importDefault(require("make-dir"));
16
16
  const error_1 = require("../error");
17
17
  const utils_1 = require("../utils");
18
18
  const parallel_1 = require("../utils/parallel");
19
+ const storage_config_1 = require("../utils/storage-config");
19
20
  const envDomainCache = new Map();
20
21
  const HostingStatusMap = {
21
22
  init: '初始化中',
@@ -66,13 +67,13 @@ class HostingService {
66
67
  };
67
68
  }
68
69
  async findFiles(options) {
69
- const hosting = await this.checkStatus();
70
- const { Bucket, Regoin } = hosting;
70
+ const { bucket, region, basePath } = await this.getHostingBucket();
71
71
  const { maxKeys, marker, prefix } = options;
72
72
  const storageService = await this.environment.getStorageService();
73
73
  const res = await storageService.getBucket({
74
- bucket: Bucket,
75
- region: Regoin,
74
+ bucket,
75
+ region,
76
+ basePath,
76
77
  maxKeys,
77
78
  marker,
78
79
  prefix
@@ -83,13 +84,13 @@ class HostingService {
83
84
  * 展示文件列表
84
85
  */
85
86
  async listFiles() {
86
- const hosting = await this.checkStatus();
87
- const { Bucket, Regoin } = hosting;
87
+ const { bucket, region, basePath } = await this.getHostingBucket();
88
88
  const storageService = await this.environment.getStorageService();
89
89
  const list = await storageService.walkCloudDirCustom({
90
90
  prefix: '',
91
- bucket: Bucket,
92
- region: Regoin
91
+ bucket,
92
+ region,
93
+ basePath
93
94
  });
94
95
  return list;
95
96
  }
@@ -132,8 +133,7 @@ class HostingService {
132
133
  */
133
134
  async uploadFiles(options) {
134
135
  const { localPath, cloudPath, entryFiles, files = [], onProgress, onFileFinish, parallel = 20, ignore = ['.DS_Store'], retryCount, retryInterval, verify = false, safe = false, prune = false } = options;
135
- const hosting = await this.checkStatus();
136
- const { Bucket, Regoin } = hosting;
136
+ const { bucket, region, basePath } = await this.getHostingBucket();
137
137
  const storageService = await this.environment.getStorageService();
138
138
  let uploadFiles = Array.isArray(files) ? files : [];
139
139
  // localPath 存在,上传文件夹/文件
@@ -147,8 +147,9 @@ class HostingService {
147
147
  localPath: resolvePath,
148
148
  cloudPath,
149
149
  entries: entryFiles,
150
- bucket: Bucket,
151
- region: Regoin,
150
+ bucket,
151
+ region,
152
+ basePath,
152
153
  onProgress,
153
154
  onFileFinish,
154
155
  fileId: false,
@@ -165,12 +166,14 @@ class HostingService {
165
166
  localPath: resolvePath,
166
167
  cloudPath,
167
168
  entryFiles,
168
- bucket: Bucket,
169
- region: Regoin,
169
+ bucket,
170
+ region,
171
+ basePath,
170
172
  onProgress,
171
173
  onFileFinish,
172
174
  fileId: false,
173
175
  ignore,
176
+ parallel,
174
177
  retryCount,
175
178
  retryInterval,
176
179
  });
@@ -190,8 +193,9 @@ class HostingService {
190
193
  parallel,
191
194
  onProgress,
192
195
  onFileFinish,
193
- bucket: Bucket,
194
- region: Regoin,
196
+ bucket,
197
+ region,
198
+ basePath,
195
199
  files: uploadFiles,
196
200
  fileId: false,
197
201
  retryCount,
@@ -204,19 +208,20 @@ class HostingService {
204
208
  */
205
209
  async deleteFiles(options) {
206
210
  const { cloudPath, isDir } = options;
207
- const hosting = await this.checkStatus();
208
- const { Bucket, Regoin } = hosting;
211
+ const { bucket, region, basePath } = await this.getHostingBucket();
209
212
  const storageService = await this.environment.getStorageService();
210
213
  if (isDir) {
211
214
  return storageService.deleteDirectoryCustom({
212
215
  cloudPath,
213
- bucket: Bucket,
214
- region: Regoin
216
+ bucket,
217
+ region,
218
+ basePath
215
219
  });
216
220
  }
217
221
  else {
218
222
  try {
219
- await storageService.deleteFileCustom([cloudPath], Bucket, Regoin);
223
+ // deleteFileCustom 按 COS 原始 Key 删除,共享桶下需先换算为物理 Key
224
+ await storageService.deleteFileCustom([(0, storage_config_1.toPhysicalKey)(basePath, cloudPath)], bucket, region);
220
225
  return {
221
226
  Deleted: [{ Key: cloudPath }],
222
227
  Error: []
@@ -281,14 +286,15 @@ class HostingService {
281
286
  async downloadDirectory(options) {
282
287
  const { cloudPath, localPath } = options;
283
288
  const resolveLocalPath = path_1.default.resolve(localPath);
284
- const hosting = await this.checkStatus();
285
- const { Bucket, Regoin } = hosting;
289
+ const { bucket, region, basePath } = await this.getHostingBucket();
286
290
  const cloudDirectoryKey = this.getCloudKey(cloudPath);
287
291
  const storageService = await this.environment.getStorageService();
292
+ // 返回逻辑路径,downloadFile 通过托管域名访问,网关会自动拼接 BasePath
288
293
  const files = await storageService.walkCloudDirCustom({
289
294
  prefix: cloudDirectoryKey,
290
- bucket: Bucket,
291
- region: Regoin
295
+ bucket,
296
+ region,
297
+ basePath
292
298
  });
293
299
  const tasks = files.map(file => async () => {
294
300
  const fileRelativePath = file.Key.replace(cloudDirectoryKey, '');
@@ -389,10 +395,9 @@ class HostingService {
389
395
  * @memberof HostingService
390
396
  */
391
397
  async getWebsiteConfig() {
392
- const hosting = await this.checkStatus();
393
- const { Bucket, Regoin } = hosting;
398
+ const { bucket, region } = await this.getHostingBucket();
394
399
  const storageService = await this.environment.getStorageService();
395
- const res = await storageService.getWebsiteConfig({ bucket: Bucket, region: Regoin });
400
+ const res = await storageService.getWebsiteConfig({ bucket, region });
396
401
  return res;
397
402
  }
398
403
  /**
@@ -401,12 +406,15 @@ class HostingService {
401
406
  */
402
407
  async setWebsiteDocument(options) {
403
408
  const { indexDocument, errorDocument, originalHttpStatus, charity404, autoAddressing, routingRules } = options;
404
- const hosting = await this.checkStatus();
405
- const { Bucket, Regoin } = hosting;
409
+ const { bucket, region, basePath } = await this.getHostingBucket();
410
+ // 共享桶的静态网站配置作用于桶内所有环境,按兼容边界(桶级操作不可作用于共享桶本身)明确拒绝
411
+ if (basePath) {
412
+ throw new error_1.CloudBaseError('当前环境的静态托管使用共享桶(ExternalStorage),静态网站配置作用于整个共享桶,由平台统一管理,不支持修改', { code: 'INVALID_OPERATION' });
413
+ }
406
414
  const storageService = await this.environment.getStorageService();
407
415
  const res = await storageService.putBucketWebsite({
408
- bucket: Bucket,
409
- region: Regoin,
416
+ bucket,
417
+ region,
410
418
  indexDocument,
411
419
  errorDocument,
412
420
  originalHttpStatus,
@@ -434,13 +442,27 @@ class HostingService {
434
442
  }
435
443
  return website;
436
444
  }
445
+ /**
446
+ * 检查 hosting 服务状态并解析有效桶,兼容共享桶(ExternalStorage)环境
447
+ * 静态托管的共享桶与 BasePath 独立于云存储,不能复用 StorageService.getStorageConfig
448
+ */
449
+ async getHostingBucket() {
450
+ const website = await this.checkStatus();
451
+ return (0, storage_config_1.resolveBucketConfig)({
452
+ envId: this.environment.getEnvId(),
453
+ bucket: website.Bucket,
454
+ region: website.Regoin,
455
+ externalStorage: website.ExternalStorage
456
+ });
457
+ }
437
458
  /**
438
459
  * 获取配置
439
460
  */
440
461
  getHostingConfig() {
441
- var _a;
462
+ var _a, _b;
442
463
  const envConfig = this.environment.lazyEnvironmentConfig;
443
- const appId = (_a = envConfig.Storages[0]) === null || _a === void 0 ? void 0 : _a.AppId;
464
+ // 环境未开通云存储时 Storages 为空,取 appId 不应崩溃(托管信息不依赖 appId)
465
+ const appId = (_b = (_a = envConfig.Storages) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.AppId;
444
466
  const { proxy } = this.environment.cloudBaseContext;
445
467
  return {
446
468
  appId,
package/lib/index.js CHANGED
@@ -151,6 +151,13 @@ class CloudBase {
151
151
  get monitor() {
152
152
  return this.currentEnvironment().getMonitorService();
153
153
  }
154
+ /**
155
+ * 平台版套餐服务
156
+ * 提供平台版套餐查询、环境管理、资源用量及 HTTP 访问服务路由等能力
157
+ */
158
+ get platform() {
159
+ return this.currentEnvironment().getPlatformService();
160
+ }
154
161
  get docs() {
155
162
  if (!this.docsService) {
156
163
  this.docsService = new docs_1.DocsService();
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlatformService = void 0;
4
+ const error_1 = require("../error");
5
+ const utils_1 = require("../utils");
6
+ /**
7
+ * 平台版服务
8
+ * 提供平台版套餐查询、资源用量统计、环境生命周期管理及 HTTP 访问服务路由管理能力
9
+ */
10
+ class PlatformService {
11
+ constructor(environment) {
12
+ this.environment = environment;
13
+ this.envId = environment.getEnvId();
14
+ this.cloudService = new utils_1.CloudService(environment.cloudBaseContext, 'tcb', '2018-06-08');
15
+ }
16
+ /**
17
+ * 查询在售的平台版套餐列表
18
+ * 返回当前可购买的平台版套餐,包括计费下单配置(BillTags)、套餐规格(Spec)等商品信息,
19
+ * 用于购买前的套餐查询,不涉及用户已购资源。
20
+ * @param {DescribePlatformPackageListParams} params 查询参数,可通过 PackageId 查询指定套餐
21
+ * @returns {Promise<DescribePlatformPackageListRes>} 在售套餐列表
22
+ */
23
+ async describePlatformPackageList(params = {}) {
24
+ return this.cloudService.request('DescribePlatformPackageList', Object.assign({}, params));
25
+ }
26
+ /**
27
+ * 查询当前账号下的平台版资源实例列表
28
+ * 返回已购平台版资源的计费信息(购买与过期时间、计费状态、自动续费),
29
+ * 以及存储、日志、静态托管等底层资源明细。
30
+ * @param {DescribePlatformsParams} params 查询参数,PlatformIds 指定实例(缺省分页返回全部),Limit 取值 [10, 100]
31
+ * @returns {Promise<DescribePlatformsRes>} 平台版资源列表及总数
32
+ * @throws {CloudBaseError} Limit 非法时抛出,须为 10 至 100 的整数
33
+ */
34
+ async describePlatforms(params = {}) {
35
+ const { Limit } = params;
36
+ if (Limit !== undefined && (!Number.isInteger(Limit) || Limit < 10 || Limit > 100)) {
37
+ throw new error_1.CloudBaseError('Limit 必须是 10 至 100 的整数');
38
+ }
39
+ return this.cloudService.request('DescribePlatforms', Object.assign({}, params));
40
+ }
41
+ /**
42
+ * 查询平台版资源当前所处的计费周期
43
+ * 平台版资源点按月结算,计费周期自购买日起算,每个周期各享有一笔抵扣额度。
44
+ * 例如 2026-01-05 购买 3 个月(2026-04-05 到期),则三个周期分别为
45
+ * 01-05 ~ 02-05、02-06 ~ 03-05、03-06 ~ 04-05。
46
+ * @param {DescribePlatformAccountCircleParams} params 查询参数,WithHistoryCircle 为 true 时附带返回最近两个历史周期
47
+ * @returns {Promise<DescribePlatformAccountCircleRes>} 当前周期起止时间及是否过期
48
+ */
49
+ async describePlatformAccountCircle(params) {
50
+ return this.cloudService.request('DescribePlatformAccountCircle', Object.assign({}, params));
51
+ }
52
+ /**
53
+ * 查询平台版资源的资源点用量汇总
54
+ * 返回指定时间范围内的资源点用量统计,包括套餐内抵扣、资源包抵扣、
55
+ * 按量上报、原价消耗四类总量的每日明细。
56
+ * @param {DescribePlatformCreditsUsageParams} params 查询参数,StartDate/EndDate 格式为 'YYYY-MM-DD'
57
+ * @returns {Promise<DescribePlatformCreditsUsageRes>} 四类用量总量及每日明细
58
+ */
59
+ async describePlatformCreditsUsage(params) {
60
+ return this.cloudService.request('DescribePlatformCreditsUsage', Object.assign({}, params));
61
+ }
62
+ /**
63
+ * 查询平台版资源的资源点用量明细
64
+ * 按模块(Usages)→ 指标(MetricUsageDetail)→ 每日明细(ValueDetailList)三个层级,
65
+ * 返回各模块的资源点用量及原始用量明细。
66
+ * @param {DescribePlatformCreditsUsageDetailParams} params 查询参数,Modules 指定查询的模块(如 FLEXDB、SCF、AI、COS 等)
67
+ * @returns {Promise<DescribePlatformCreditsUsageDetailRes>} 各模块的用量明细数据
68
+ */
69
+ async describePlatformCreditsUsageDetail(params) {
70
+ return this.cloudService.request('DescribePlatformCreditsUsageDetail', Object.assign({}, params));
71
+ }
72
+ /**
73
+ * 查询平台版下各环境的资源点用量排行
74
+ * 按 TimeRange 指定的时间范围返回各环境的资源点用量排序,
75
+ * 排行数据由后台定时计算,可能存在小时级延迟。
76
+ * @param {DescribePlatformEnvCreditsRankingParams} params 查询参数,TimeRange 缺省为 Today(近 1 天)
77
+ * @returns {Promise<DescribePlatformEnvCreditsRankingRes>} 环境用量排行列表及分页信息
78
+ */
79
+ async describePlatformEnvCreditsRanking(params = {}) {
80
+ return this.cloudService.request('DescribePlatformEnvCreditsRanking', Object.assign({}, params));
81
+ }
82
+ /**
83
+ * 查询平台版环境内各资源类型的用量
84
+ * 按资源类型(存储、函数、数据库等)返回各指标的用量及按日明细,
85
+ * 包括资源点用量与原始用量值及对应单位。
86
+ * @param {DescribePlatformEnvUsageParams} params 查询参数,EnvId 缺省时使用当前环境,ResourceTypes 指定资源类型
87
+ * @returns {Promise<DescribePlatformEnvUsageRes>} 资源用量明细及资源点总量
88
+ */
89
+ async describePlatformEnvUsage(params) {
90
+ return this.cloudService.request('DescribePlatformEnvUsage', Object.assign(Object.assign({}, params), { EnvId: params.EnvId || this.envId }));
91
+ }
92
+ /**
93
+ * 创建平台版环境
94
+ * 在已购平台版资源下开通新环境。
95
+ * @param {CreatePlatformEnvParams} params 创建参数,ReqKey 为幂等键,可用于防止重复创建
96
+ * @returns {Promise<CreatePlatformEnvRes>} 新创建环境的 EnvId
97
+ */
98
+ async createPlatformEnv(params) {
99
+ return this.cloudService.request('CreatePlatformEnv', Object.assign({}, params));
100
+ }
101
+ /**
102
+ * 修改平台版环境状态
103
+ * 支持启用/禁用环境,以及云存储(Storage)、FlexDB 资源的状态变更,未传入的资源不做更新。
104
+ * @param {ModifyPlatformEnvParams} params 修改参数,EnvId 缺省时使用当前环境
105
+ * @returns {Promise<ModifyPlatformEnvRes>} 环境的最终状态
106
+ * @throws {CloudBaseError} Status 非法时抛出,仅支持 ENABLE / DISABLE
107
+ */
108
+ async modifyPlatformEnv(params) {
109
+ const { Status } = params;
110
+ const validStatus = ['ENABLE', 'DISABLE'];
111
+ if (Status !== undefined && !validStatus.includes(Status)) {
112
+ throw new error_1.CloudBaseError(`Invalid Status value: ${Status}. Only support 'ENABLE', 'DISABLE'`);
113
+ }
114
+ return this.cloudService.request('ModifyPlatformEnv', Object.assign(Object.assign({}, params), { EnvId: params.EnvId || this.envId }));
115
+ }
116
+ /**
117
+ * 删除平台版环境
118
+ * 删除操作不可逆,须显式指定目标环境 ID。
119
+ * @param {DestroyPlatformEnvParams} params 删除参数,EnvId 为必填
120
+ * @returns {Promise<DestroyPlatformEnvRes>} 请求执行结果
121
+ */
122
+ async destroyPlatformEnv(params) {
123
+ return this.cloudService.request('DestroyPlatformEnv', Object.assign({}, params));
124
+ }
125
+ /**
126
+ * 校验 HTTP 访问服务路由配置(预检)
127
+ * 创建路由前的只读预检,覆盖域名归属权、证书、配额、路由冲突、域名占用等检查项,
128
+ * 不创建任何资源。Passed 为 true 时可调用 createPlatformHttpServiceRoute 正式创建;
129
+ * 为 false 时根据各检查项的 Code 定位并修正问题。
130
+ * 预检通过不代表创建必然成功,但预检不通过则创建必然失败。
131
+ * @param {VerifyPlatformHTTPServiceRouteParams} params 校验参数,包含待校验的域名路由信息
132
+ * @returns {Promise<VerifyPlatformHTTPServiceRouteRes>} 整体校验结果及各检查项明细
133
+ */
134
+ async verifyPlatformHttpServiceRoute(params) {
135
+ return this.cloudService.request('VerifyPlatformHTTPServiceRoute', Object.assign({}, params));
136
+ }
137
+ /**
138
+ * 创建 HTTP 访问服务路由
139
+ * 不传 Domain.Routes 时仅创建域名信息。域名与路由均为异步下发,创建后需调用
140
+ * describePlatformHttpServiceRoute 轮询域名状态,直到 SUCCESS 或 FAIL(FAIL 可删除后重新创建);
141
+ * 下发完成前访问域名可能返回 404 或 HTTPS 握手失败。
142
+ * @param {CreatePlatformHTTPServiceRouteParams} params 创建参数
143
+ * @returns {Promise<CreatePlatformHTTPServiceRouteRes>} 域名归属权验证指引(归属校验未通过时返回)
144
+ */
145
+ async createPlatformHttpServiceRoute(params) {
146
+ return this.cloudService.request('CreatePlatformHTTPServiceRoute', Object.assign({}, params));
147
+ }
148
+ /**
149
+ * 修改 HTTP 访问服务路由
150
+ * 增量更新,对应字段未传入则不修改。
151
+ * @param {ModifyPlatformHTTPServiceRouteParams} params 修改参数,包含目标域名及待更新的路由信息
152
+ * @returns {Promise<ModifyPlatformHTTPServiceRouteRes>} 请求执行结果
153
+ */
154
+ async modifyPlatformHttpServiceRoute(params) {
155
+ return this.cloudService.request('ModifyPlatformHTTPServiceRoute', Object.assign({}, params));
156
+ }
157
+ /**
158
+ * 删除 HTTP 访问服务路由
159
+ * Paths 为空时删除域名及其下全部路由,非空时仅删除指定路径的路由。
160
+ * @param {DeletePlatformHTTPServiceRouteParams} params 删除参数,Paths 缺省时删除整个域名
161
+ * @returns {Promise<DeletePlatformHTTPServiceRouteRes>} 请求执行结果
162
+ */
163
+ async deletePlatformHttpServiceRoute(params) {
164
+ return this.cloudService.request('DeletePlatformHTTPServiceRoute', Object.assign({}, params));
165
+ }
166
+ /**
167
+ * 查询 HTTP 访问服务路由
168
+ * 返回各域名及其路由信息列表、自定义接入的源站域名及域名总数,
169
+ * 支持按 Domain、Path、DomainType、UpstreamResourceType 过滤及分页。
170
+ * @param {DescribePlatformHTTPServiceRouteParams} params 查询参数,Limit 默认 20、最大 1000
171
+ * @returns {Promise<DescribePlatformHTTPServiceRouteRes>} 域名路由列表及域名总数
172
+ */
173
+ async describePlatformHttpServiceRoute(params) {
174
+ return this.cloudService.request('DescribePlatformHTTPServiceRoute', Object.assign({}, params));
175
+ }
176
+ }
177
+ exports.PlatformService = PlatformService;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });