@cloudbase/manager-node 3.12.1 → 4.1.0

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,7 @@
1
+ # 4.0.0
2
+ - 升级 https-proxy-agent 3->5 修复 https://github.com/TencentCloud/tencentcloud-sdk-nodejs/issues/47
3
+
4
+
1
5
  # v3.9.2-beta
2
6
  - 扩展禁用用户接口为变更用户状态接口
3
7
  - 增加修改用户信息接口
package/lib/env/index.js CHANGED
@@ -14,17 +14,12 @@ const cos_nodejs_sdk_v5_1 = __importDefault(require("cos-nodejs-sdk-v5"));
14
14
  const util_1 = __importDefault(require("util"));
15
15
  const error_1 = require("../error");
16
16
  const utils_1 = require("../utils");
17
- const cam_1 = require("../cam");
18
- const constant_1 = require("../constant");
19
- const billing_1 = require("../billing");
20
17
  class EnvService {
21
18
  constructor(environment) {
22
19
  this.environment = environment;
23
20
  this.envId = environment.getEnvId();
24
21
  this.envType = environment.getEnvType();
25
22
  this.cloudService = new utils_1.CloudService(environment.cloudBaseContext, 'tcb', '2018-06-08');
26
- this.camService = new cam_1.CamService(environment.cloudBaseContext);
27
- this.billService = new billing_1.BillingService(environment.cloudBaseContext);
28
23
  }
29
24
  /**
30
25
  * 列出所有环境
@@ -33,208 +28,6 @@ class EnvService {
33
28
  async listEnvs() {
34
29
  return this.cloudService.request('DescribeEnvs');
35
30
  }
36
- /**
37
- * 创建新环境
38
- * @param {string} name 环境名称
39
- * @returns {Promise<ICreateEnvRes>}
40
- */
41
- async createEnv(param) {
42
- // 1. 检查是否开通过TCB服务,若未开通,跳2检查角色 开通则跳5 创建环境
43
- // 2. 查询tcb 角色是否绑定该账户
44
- // 3. 若未绑定,则创建角色并绑定角色
45
- // 4. 开通TCB服务
46
- // 5. 创建环境
47
- // 6. 购买环境,选择预付费 或 后付费 套餐
48
- // 7. 若购买失败,将当前环境销毁,若购买成功,返回envId
49
- const { name, paymentMode, channel = 'qc_console' } = param;
50
- // 1. 检查TCB服务是否开通
51
- const { Initialized } = await this.checkTcbService();
52
- if (!Initialized) {
53
- // 跳2 查询TCB角色是否绑定
54
- let hasTcbRole = false;
55
- try {
56
- const res = await this.camService.getRole(constant_1.ROLE_NAME.TCB);
57
- hasTcbRole = true;
58
- }
59
- catch (e) {
60
- // 判断是否为角色不存在错误
61
- if (e.code !== 'InvalidParameter.RoleNotExist') {
62
- throw e;
63
- }
64
- }
65
- if (!hasTcbRole) {
66
- // 3. 当前账户没有tcbRole,创建角色并绑定
67
- // 创建角色
68
- const createRoleResult = await this.camService.createRole({
69
- RoleName: constant_1.ROLE_NAME.TCB,
70
- Description: '云开发(TCB)操作权限含在访问管理(CAM)创建角色,新增角色载体,给角色绑定策略;含读写对象存储(COS)数据;含读写无服务器云函数(SCF)数据;含读取云监控(Monitor)数据。',
71
- PolicyDocument: '{"version":"2.0","statement":[{"action":"sts:AssumeRole","effect":"allow","principal":{"service":["scf.qcloud.com","tcb.cloud.tencent.com", "cvm.qcloud.com"]}}]}'
72
- });
73
- const { RoleId } = createRoleResult;
74
- // 绑定角色策略
75
- // await this.camService.attachRolePolicy({
76
- // PolicyId: 8825032,
77
- // AttachRoleName: ROLE_NAME.TCB
78
- // })
79
- await this.camService.attachRolePolicies({
80
- RoleName: constant_1.ROLE_NAME.TCB,
81
- PolicyName: [
82
- 'QcloudAccessForTCBRole',
83
- 'QcloudAccessForTCBRoleInAccessCloudBaseRun'
84
- ]
85
- });
86
- }
87
- // 4. 未开通则初始化TCB
88
- await this.initTcb({ Channel: channel, Source: 'qcloud' });
89
- }
90
- // 5. 创建环境
91
- const params = {
92
- Alias: name,
93
- EnvId: `${name}-${utils_1.guid6()}`,
94
- Source: 'qcloud'
95
- };
96
- if (channel) {
97
- params.Channel = channel;
98
- }
99
- const { EnvId } = await this.cloudService.request('CreateEnv', params);
100
- const realPaymentMode = paymentMode ? paymentMode : 'postpay';
101
- // 6. 购买环境
102
- let prepayCreateDeal = false;
103
- let prepayPayDeal = false;
104
- let postpayDeal = false;
105
- let payError = null;
106
- if (realPaymentMode === 'prepay') {
107
- // 预付费
108
- // 1. 创建订单
109
- // 2. 支付订单
110
- const goods = [
111
- {
112
- GoodsCategoryId: 101183,
113
- // action: 'purchase',
114
- // currency: 'CNY',
115
- RegionId: 1,
116
- ZoneId: 0,
117
- GoodsNum: 1,
118
- ProjectId: 0,
119
- PayMode: 1,
120
- Platform: 1,
121
- GoodsDetail: JSON.stringify({
122
- productCode: 'p_tcb',
123
- subProductCode: 'sp_tcb_basic',
124
- resourceId: EnvId,
125
- pid: 16677,
126
- timeUnit: 'm',
127
- timeSpan: 1,
128
- tcb_cos: 1,
129
- tcb_cdn: 1,
130
- tcb_scf: 1,
131
- tcb_mongodb: 1,
132
- region: 'ap-shanghai',
133
- zone: 'ap-shanghai-1',
134
- source: 'qcloud',
135
- envId: EnvId,
136
- packageId: 'basic',
137
- isAutoRenew: 'true',
138
- tranType: 1,
139
- productInfo: [
140
- {
141
- name: '套餐版本',
142
- value: '基础版 1'
143
- },
144
- {
145
- name: '存储空间',
146
- value: '5GB'
147
- },
148
- {
149
- name: 'CDN流量',
150
- value: '5GB'
151
- },
152
- {
153
- name: '云函数资源使用量',
154
- value: '4万GBs'
155
- },
156
- {
157
- name: '数据库容量',
158
- value: '2GB'
159
- },
160
- {
161
- name: '数据库同时连接数',
162
- value: '20个'
163
- }
164
- ]
165
- })
166
- }
167
- ];
168
- let OrderIdsList = [];
169
- try {
170
- const { OrderIds } = await this.billService.GenerateDeals(goods);
171
- OrderIdsList = OrderIds;
172
- prepayCreateDeal = true;
173
- }
174
- catch (e) {
175
- // 预付费下单失败
176
- payError = e;
177
- }
178
- if (prepayCreateDeal) {
179
- // 下单成功
180
- try {
181
- // 购买环境套餐
182
- const { OrderIds: succOrderIds } = await this.billService.PayDeals(OrderIdsList);
183
- // 判断订单是否支付成功
184
- if (succOrderIds[0] === OrderIdsList[0]) {
185
- prepayPayDeal = true;
186
- }
187
- else {
188
- throw new error_1.CloudBaseError('支付成功的订单号不一致');
189
- }
190
- }
191
- catch (e) {
192
- // 预付费订单支付失败
193
- payError = new error_1.CloudBaseError('预付费订单支付失败,请进入订单管理页面(https://console.cloud.tencent.com/deal)重新支付', {
194
- original: e
195
- });
196
- }
197
- }
198
- }
199
- if (realPaymentMode === 'postpay') {
200
- // 后付费
201
- try {
202
- const { TranId } = await this.CreatePostpayPackage(EnvId);
203
- postpayDeal = true;
204
- }
205
- catch (e) {
206
- payError = e;
207
- }
208
- }
209
- // 检查支付状态
210
- // 1. 预付费下单失败 删除环境
211
- // 2. 预付费下单成功过,支付订单失败,提示用户
212
- // 3. 后付费开通失败 删除环境
213
- if (realPaymentMode === 'prepay') {
214
- if (!prepayCreateDeal) {
215
- // 情形1
216
- await this.destroyEnv(EnvId);
217
- throw payError;
218
- }
219
- else {
220
- if (!prepayPayDeal) {
221
- // 情形2
222
- throw payError;
223
- }
224
- }
225
- }
226
- if (realPaymentMode === 'postpay') {
227
- if (!postpayDeal) {
228
- // 情形3
229
- await this.destroyEnv(EnvId);
230
- throw payError;
231
- }
232
- }
233
- // 成功返回envId
234
- return {
235
- envId: EnvId
236
- };
237
- }
238
31
  /**
239
32
  * 拉取安全域名列表
240
33
  * @returns {Promise<IAuthDomainsRes>}
@@ -70,6 +70,14 @@ class CloudService {
70
70
  cam: 'https://cam.tencentcloudapi.com',
71
71
  cdn: 'https://cdn.tencentcloudapi.com'
72
72
  };
73
+ // 检测环境变量,云梯账号走内网域名
74
+ const USE_INTERNAL_ENDPOINT = "USE_INTERNAL_ENDPOINT";
75
+ const intranetUrlMap = Object.keys(urlMap).map((service) => ({
76
+ [service]: `https://${service}.internal.tencentcloudapi.com`,
77
+ })).reduce((acc, cur) => (Object.assign(Object.assign({}, acc), cur)), {});
78
+ if (USE_INTERNAL_ENDPOINT in process.env) {
79
+ return intranetUrlMap[this.service];
80
+ }
73
81
  if (urlMap[this.service]) {
74
82
  return urlMap[this.service];
75
83
  }
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.fetchStream = exports.fetch = void 0;
7
7
  const url_1 = require("url");
8
8
  const node_fetch_1 = __importDefault(require("node-fetch"));
9
- const https_proxy_agent_1 = __importDefault(require("https-proxy-agent"));
9
+ const https_proxy_agent_1 = require("https-proxy-agent");
10
10
  const error_1 = require("../error");
11
11
  // 使用 fetch + 代理
12
12
  async function fetch(url, config = {}, proxy) {
13
13
  if (proxy || process.env.http_proxy) {
14
- config.agent = new https_proxy_agent_1.default(proxy || process.env.http_proxy);
14
+ config.agent = new https_proxy_agent_1.HttpsProxyAgent(proxy || process.env.http_proxy);
15
15
  }
16
16
  // 解决中文编码问题
17
17
  const escapeUrl = new url_1.URL(url).toString();
@@ -35,7 +35,7 @@ async function fetch(url, config = {}, proxy) {
35
35
  exports.fetch = fetch;
36
36
  async function fetchStream(url, config = {}, proxy) {
37
37
  if (proxy || process.env.http_proxy) {
38
- config.agent = new https_proxy_agent_1.default(proxy || process.env.http_proxy);
38
+ config.agent = new https_proxy_agent_1.HttpsProxyAgent(proxy || process.env.http_proxy);
39
39
  }
40
40
  // 解决中文编码问题
41
41
  const escapeUrl = new url_1.URL(url).toString();
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@cloudbase/manager-node",
3
- "version": "3.12.1",
3
+ "version": "4.1.0",
4
4
  "description": "The node manage service api for cloudbase.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
7
7
  "build": "rimraf lib types && npx tsc",
8
8
  "test": "jest --runInBand --detectOpenHandles --coverage --testTimeout=50000",
9
9
  "lint": "eslint \"./**/*.ts\"",
10
- "lint:fix": "eslint --fix \"./**/*.ts\""
10
+ "lint:fix": "eslint --fix \"./**/*.ts\"",
11
+ "prepublishOnly": "npm run build"
11
12
  },
12
13
  "repository": {
13
14
  "type": "git",
@@ -36,7 +37,7 @@
36
37
  "archiver": "^3.1.1",
37
38
  "cos-nodejs-sdk-v5": "2.9.0",
38
39
  "del": "^5.1.0",
39
- "https-proxy-agent": "^2.2.4",
40
+ "https-proxy-agent": "^5.0.1",
40
41
  "make-dir": "^3.0.0",
41
42
  "micromatch": "^4.0.2",
42
43
  "node-fetch": "^2.6.0",
package/src/env/index.ts CHANGED
@@ -10,28 +10,9 @@ import {
10
10
  ICreatePostpayRes
11
11
  } from '../interfaces'
12
12
  import { CloudBaseError } from '../error'
13
- import { guid6, rsaEncrypt, CloudService, preLazy } from '../utils'
14
- import { CamService } from '../cam'
15
- import { ROLE_NAME } from '../constant'
16
- import { BillingService } from '../billing'
17
-
18
- interface ICreateEnvParam {
19
- name: string
20
- paymentMode?: PAYMENT_MODE
21
- channel?: QCLOUD_CHANNEL
22
- }
23
-
24
- interface ICreateEnvRes {
25
- // 环境当前状态:NORMAL:正常可用 NOINITIALIZE:尚未初始化 INITIALIZING:初始化过程中
26
- Status: 'NORMAL' | 'NOINITIALIZE' | 'INITIALIZING'
27
- // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
28
- RequestId: string
29
- }
13
+ import { rsaEncrypt, CloudService, preLazy } from '../utils'
30
14
 
31
- type PAYMENT_MODE = 'prepay' | 'postpay'
32
15
  type SOURCE = 'miniapp' | 'qcloud'
33
- type WX_CHANNEL = 'ide' | 'api'
34
- type QCLOUD_CHANNEL = 'cocos' | 'qq' | 'cloudgame' | 'qc_console' | 'dcloud'
35
16
 
36
17
  interface IDeleteDomainRes {
37
18
  RequestId: string
@@ -62,8 +43,6 @@ export class EnvService {
62
43
  private environment: Environment
63
44
  private envId: string
64
45
  private cloudService: CloudService
65
- private camService: CamService
66
- private billService: BillingService
67
46
  private envType?: string
68
47
 
69
48
  constructor(environment: Environment) {
@@ -71,8 +50,6 @@ export class EnvService {
71
50
  this.envId = environment.getEnvId()
72
51
  this.envType = environment.getEnvType()
73
52
  this.cloudService = new CloudService(environment.cloudBaseContext, 'tcb', '2018-06-08')
74
- this.camService = new CamService(environment.cloudBaseContext)
75
- this.billService = new BillingService(environment.cloudBaseContext)
76
53
  }
77
54
 
78
55
  /**
@@ -83,235 +60,6 @@ export class EnvService {
83
60
  return this.cloudService.request('DescribeEnvs')
84
61
  }
85
62
 
86
- /**
87
- * 创建新环境
88
- * @param {string} name 环境名称
89
- * @returns {Promise<ICreateEnvRes>}
90
- */
91
- async createEnv(
92
- param: ICreateEnvParam
93
- ): Promise<{
94
- envId: string
95
- }> {
96
- // 1. 检查是否开通过TCB服务,若未开通,跳2检查角色 开通则跳5 创建环境
97
- // 2. 查询tcb 角色是否绑定该账户
98
- // 3. 若未绑定,则创建角色并绑定角色
99
- // 4. 开通TCB服务
100
- // 5. 创建环境
101
- // 6. 购买环境,选择预付费 或 后付费 套餐
102
- // 7. 若购买失败,将当前环境销毁,若购买成功,返回envId
103
- const { name, paymentMode, channel = 'qc_console' } = param
104
-
105
- // 1. 检查TCB服务是否开通
106
- const { Initialized } = await this.checkTcbService()
107
-
108
- if (!Initialized) {
109
- // 跳2 查询TCB角色是否绑定
110
- let hasTcbRole = false
111
- try {
112
- const res = await this.camService.getRole(ROLE_NAME.TCB)
113
- hasTcbRole = true
114
- } catch (e) {
115
- // 判断是否为角色不存在错误
116
- if (e.code !== 'InvalidParameter.RoleNotExist') {
117
- throw e
118
- }
119
- }
120
-
121
- if (!hasTcbRole) {
122
- // 3. 当前账户没有tcbRole,创建角色并绑定
123
-
124
- // 创建角色
125
- const createRoleResult = await this.camService.createRole({
126
- RoleName: ROLE_NAME.TCB,
127
- Description:
128
- '云开发(TCB)操作权限含在访问管理(CAM)创建角色,新增角色载体,给角色绑定策略;含读写对象存储(COS)数据;含读写无服务器云函数(SCF)数据;含读取云监控(Monitor)数据。',
129
- PolicyDocument:
130
- '{"version":"2.0","statement":[{"action":"sts:AssumeRole","effect":"allow","principal":{"service":["scf.qcloud.com","tcb.cloud.tencent.com", "cvm.qcloud.com"]}}]}'
131
- })
132
-
133
- const { RoleId } = createRoleResult
134
-
135
- // 绑定角色策略
136
- // await this.camService.attachRolePolicy({
137
- // PolicyId: 8825032,
138
- // AttachRoleName: ROLE_NAME.TCB
139
- // })
140
-
141
- await this.camService.attachRolePolicies({
142
- RoleName: ROLE_NAME.TCB,
143
- PolicyName: [
144
- 'QcloudAccessForTCBRole',
145
- 'QcloudAccessForTCBRoleInAccessCloudBaseRun'
146
- ]
147
- })
148
- }
149
-
150
- // 4. 未开通则初始化TCB
151
- await this.initTcb({ Channel: channel, Source: 'qcloud' })
152
- }
153
-
154
- // 5. 创建环境
155
-
156
- const params: any = {
157
- Alias: name,
158
- EnvId: `${name}-${guid6()}`,
159
- Source: 'qcloud'
160
- }
161
-
162
- if (channel) {
163
- params.Channel = channel
164
- }
165
-
166
- const { EnvId } = await this.cloudService.request('CreateEnv', params)
167
-
168
- const realPaymentMode = paymentMode ? paymentMode : 'postpay'
169
- // 6. 购买环境
170
-
171
- let prepayCreateDeal = false
172
- let prepayPayDeal = false
173
- let postpayDeal = false
174
- let payError = null
175
-
176
- if (realPaymentMode === 'prepay') {
177
- // 预付费
178
- // 1. 创建订单
179
- // 2. 支付订单
180
-
181
- const goods = [
182
- {
183
- GoodsCategoryId: 101183,
184
- // action: 'purchase',
185
- // currency: 'CNY',
186
- RegionId: 1,
187
- ZoneId: 0,
188
- GoodsNum: 1,
189
- ProjectId: 0,
190
- PayMode: 1,
191
- Platform: 1,
192
- GoodsDetail: JSON.stringify({
193
- productCode: 'p_tcb',
194
- subProductCode: 'sp_tcb_basic',
195
- resourceId: EnvId,
196
- pid: 16677,
197
- timeUnit: 'm',
198
- timeSpan: 1,
199
- tcb_cos: 1,
200
- tcb_cdn: 1,
201
- tcb_scf: 1,
202
- tcb_mongodb: 1,
203
- region: 'ap-shanghai',
204
- zone: 'ap-shanghai-1',
205
- source: 'qcloud',
206
- envId: EnvId,
207
- packageId: 'basic',
208
- isAutoRenew: 'true',
209
- tranType: 1,
210
- productInfo: [
211
- {
212
- name: '套餐版本',
213
- value: '基础版 1'
214
- },
215
- {
216
- name: '存储空间',
217
- value: '5GB'
218
- },
219
- {
220
- name: 'CDN流量',
221
- value: '5GB'
222
- },
223
- {
224
- name: '云函数资源使用量',
225
- value: '4万GBs'
226
- },
227
- {
228
- name: '数据库容量',
229
- value: '2GB'
230
- },
231
- {
232
- name: '数据库同时连接数',
233
- value: '20个'
234
- }
235
- ]
236
- })
237
- }
238
- ]
239
-
240
- let OrderIdsList = []
241
- try {
242
- const { OrderIds } = await this.billService.GenerateDeals(goods)
243
- OrderIdsList = OrderIds
244
- prepayCreateDeal = true
245
- } catch (e) {
246
- // 预付费下单失败
247
- payError = e
248
- }
249
-
250
- if (prepayCreateDeal) {
251
- // 下单成功
252
- try {
253
- // 购买环境套餐
254
- const { OrderIds: succOrderIds } = await this.billService.PayDeals(OrderIdsList)
255
-
256
- // 判断订单是否支付成功
257
- if (succOrderIds[0] === OrderIdsList[0]) {
258
- prepayPayDeal = true
259
- } else {
260
- throw new CloudBaseError('支付成功的订单号不一致')
261
- }
262
- } catch (e) {
263
- // 预付费订单支付失败
264
- payError = new CloudBaseError(
265
- '预付费订单支付失败,请进入订单管理页面(https://console.cloud.tencent.com/deal)重新支付',
266
- {
267
- original: e
268
- }
269
- )
270
- }
271
- }
272
- }
273
-
274
- if (realPaymentMode === 'postpay') {
275
- // 后付费
276
- try {
277
- const { TranId } = await this.CreatePostpayPackage(EnvId)
278
- postpayDeal = true
279
- } catch (e) {
280
- payError = e
281
- }
282
- }
283
-
284
- // 检查支付状态
285
- // 1. 预付费下单失败 删除环境
286
- // 2. 预付费下单成功过,支付订单失败,提示用户
287
- // 3. 后付费开通失败 删除环境
288
- if (realPaymentMode === 'prepay') {
289
- if (!prepayCreateDeal) {
290
- // 情形1
291
- await this.destroyEnv(EnvId)
292
- throw payError
293
- } else {
294
- if (!prepayPayDeal) {
295
- // 情形2
296
- throw payError
297
- }
298
- }
299
- }
300
-
301
- if (realPaymentMode === 'postpay') {
302
- if (!postpayDeal) {
303
- // 情形3
304
- await this.destroyEnv(EnvId)
305
- throw payError
306
- }
307
- }
308
-
309
- // 成功返回envId
310
- return {
311
- envId: EnvId
312
- }
313
- }
314
-
315
63
  /**
316
64
  * 拉取安全域名列表
317
65
  * @returns {Promise<IAuthDomainsRes>}
@@ -91,6 +91,18 @@ export class CloudService {
91
91
  cam: 'https://cam.tencentcloudapi.com',
92
92
  cdn: 'https://cdn.tencentcloudapi.com'
93
93
  }
94
+
95
+ // 检测环境变量,云梯账号走内网域名
96
+ const USE_INTERNAL_ENDPOINT = "USE_INTERNAL_ENDPOINT"
97
+
98
+ const intranetUrlMap = Object.keys(urlMap).map((service) => ({
99
+ [service]: `https://${service}.internal.tencentcloudapi.com`,
100
+ })).reduce((acc, cur) => ({ ...acc, ...cur }), {})
101
+
102
+ if(USE_INTERNAL_ENDPOINT in process.env) {
103
+ return intranetUrlMap[this.service]
104
+ }
105
+
94
106
  if (urlMap[this.service]) {
95
107
  return urlMap[this.service]
96
108
  } else {
@@ -1,6 +1,6 @@
1
1
  import { URL } from 'url'
2
2
  import _fetch from 'node-fetch'
3
- import HttpsProxyAgent from 'https-proxy-agent'
3
+ import { HttpsProxyAgent } from 'https-proxy-agent'
4
4
  import { CloudBaseError } from '../error'
5
5
 
6
6
  // 使用 fetch + 代理
@@ -1,13 +1,6 @@
1
1
  import { Environment } from '../environment';
2
2
  import { IResponseInfo, AuthDomain, EnvInfo, LoginConfigItem, ICheckTcbServiceRes, ICreatePostpayRes } from '../interfaces';
3
- interface ICreateEnvParam {
4
- name: string;
5
- paymentMode?: PAYMENT_MODE;
6
- channel?: QCLOUD_CHANNEL;
7
- }
8
- declare type PAYMENT_MODE = 'prepay' | 'postpay';
9
3
  declare type SOURCE = 'miniapp' | 'qcloud';
10
- declare type QCLOUD_CHANNEL = 'cocos' | 'qq' | 'cloudgame' | 'qc_console' | 'dcloud';
11
4
  interface IDeleteDomainRes {
12
5
  RequestId: string;
13
6
  Deleted: number;
@@ -32,8 +25,6 @@ export declare class EnvService {
32
25
  private environment;
33
26
  private envId;
34
27
  private cloudService;
35
- private camService;
36
- private billService;
37
28
  private envType?;
38
29
  constructor(environment: Environment);
39
30
  /**
@@ -41,14 +32,6 @@ export declare class EnvService {
41
32
  * @returns {Promise<IListEnvRes>}
42
33
  */
43
34
  listEnvs(): Promise<IListEnvRes>;
44
- /**
45
- * 创建新环境
46
- * @param {string} name 环境名称
47
- * @returns {Promise<ICreateEnvRes>}
48
- */
49
- createEnv(param: ICreateEnvParam): Promise<{
50
- envId: string;
51
- }>;
52
35
  /**
53
36
  * 拉取安全域名列表
54
37
  * @returns {Promise<IAuthDomainsRes>}