diff --git a/VERSION b/VERSION index d3b5ba4..f2722b1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.11 +0.2.12 diff --git a/lib/services/index.d.ts b/lib/services/index.d.ts index 72bf5e6..297afd8 100644 --- a/lib/services/index.d.ts +++ b/lib/services/index.d.ts @@ -35,6 +35,7 @@ export declare class Client extends BaseClient { uphost(): any; usms(): any; uvms(): any; + uwsc(): any; vpc(): any; } export {}; diff --git a/lib/services/index.js b/lib/services/index.js index 11ebdde..30b22a6 100644 --- a/lib/services/index.js +++ b/lib/services/index.js @@ -31,6 +31,7 @@ const UPhoneClient = require('./uphone').default; const UPHostClient = require('./uphost').default; const USMSClient = require('./usms').default; const UVMSClient = require('./uvms').default; +const UWSCClient = require('./uwsc').default; const VPCClient = require('./vpc').default; class Client extends BaseClient { constructor({ config, credential, }) { @@ -210,6 +211,12 @@ class Client extends BaseClient { credential: this.credential, }); } + uwsc() { + return new UWSCClient({ + config: this.config, + credential: this.credential, + }); + } vpc() { return new VPCClient({ config: this.config, diff --git a/lib/services/uwsc/index.d.ts b/lib/services/uwsc/index.d.ts new file mode 100644 index 0000000..df51f86 --- /dev/null +++ b/lib/services/uwsc/index.d.ts @@ -0,0 +1,544 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **uwsc** service + */ +export default class UWSCClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * AddExportLineRules - 添加加速规则 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/add_export_line_rules + */ + addExportLineRules(request?: AddExportLineRulesRequest): Promise; + /** + * BindCPE - 绑定 CPE + * + * See also: https://docs.ucloud.cn/api/uwsc-api/bind_cpe + */ + bindCPE(request?: BindCPERequest): Promise; + /** + * CreateCPE - 创建 CPE + * + * See also: https://docs.ucloud.cn/api/uwsc-api/create_cpe + */ + createCPE(request?: CreateCPERequest): Promise; + /** + * CreateExportLine - 创建加速线路 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/create_export_line + */ + createExportLine(request?: CreateExportLineRequest): Promise; + /** + * DeleteExportLine - 删除加速线路 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/delete_export_line + */ + deleteExportLine(request?: DeleteExportLineRequest): Promise; + /** + * DeleteExportLineRules - 删除加速规则 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/delete_export_line_rules + */ + deleteExportLineRules(request?: DeleteExportLineRulesRequest): Promise; + /** + * DescribeCPE - 查询 CPE 信息 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/describe_cpe + */ + describeCPE(request?: DescribeCPERequest): Promise; + /** + * DescribeExportLine - 查询CPE绑定的加速线路信息 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/describe_export_line + */ + describeExportLine(request?: DescribeExportLineRequest): Promise; + /** + * DescribeExportLineRules - 查询白名单 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/describe_export_line_rules + */ + describeExportLineRules(request?: DescribeExportLineRulesRequest): Promise; + /** + * UpdateExportLine - 修改加速线路 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/update_export_line + */ + updateExportLine(request?: UpdateExportLineRequest): Promise; + /** + * UpgradeExportLine - 升级加速线路 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/upgrade_export_line + */ + upgradeExportLine(request?: UpgradeExportLineRequest): Promise; +} +/** + * AddExportLineRules - 添加加速规则 + */ +export interface AddExportLineRulesRequest { + /** + * UReach资源ID + */ + ResourceId: string; + /** + * 白名单类型:Developer、CrossBorder + */ + RuleTypes: string[]; +} +/** + * AddExportLineRules - 添加加速规则 + */ +export interface AddExportLineRulesResponse { +} +/** + * BindCPE - 绑定 CPE + */ +export interface BindCPERequest { + /** + * cpe id + */ + CPEId: string; + /** + * sn id + */ + Sn: string; +} +/** + * BindCPE - 绑定 CPE + */ +export interface BindCPEResponse { +} +/** + * CreateCPE - 创建 CPE + */ +export interface CreateCPERequest { + /** + * cpe 名称 + */ + Name: string; + /** + * cpe 备注 + */ + Remark: string; + /** + * 设备型号,枚举值: UCPE3600、UCPE3601 + */ + DeviceType: string; + /** + * 标签:UReach智能网关:Access + */ + Label?: string; + /** + * 结构体,详见UserInfo模型 + */ + UserInfo?: string; + /** + * 数量,默认为1 + */ + Count?: number; +} +/** + * CreateCPE - 创建 CPE + */ +export interface CreateCPEResponse { + /** + * cpe id + */ + CPEId: string; +} +/** + * CreateExportLine - 创建加速线路 + */ +export interface CreateExportLineRequest { + /** + * 本端地域 + */ + FromRegion: string; + /** + * 目标地域 + */ + ToRegion: string; + /** + * IP类型:International、BGP、Native、Resident + */ + IpType: string; + /** + * CPE Id + */ + CPEId: string; + /** + * 套餐类型:2M-Entry、5M-Basic、10M-Enterprise + */ + PkgType?: string; + /** + * 带宽大小 + */ + Bandwidth?: number; + /** + * 资源名称 + */ + Name?: string; + /** + * 业务组名称, 默认为 "Default" + */ + Tag?: string; + /** + * 计费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限)。默认为月付 + */ + ChargeType?: string; + /** + * 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + */ + Quantity?: number; + /** + * 备注 + */ + Remark?: string; + /** + * 计费类型:fixed-bw,固定带宽;traffic,流量计费 + */ + PayMode?: string; + /** + * 代金券ID。请登录用户中心查看 + */ + CouponId?: number; +} +/** + * CreateExportLine - 创建加速线路 + */ +export interface CreateExportLineResponse { + /** + * 资源ID + */ + ResourceId: string; +} +/** + * DeleteExportLine - 删除加速线路 + */ +export interface DeleteExportLineRequest { + /** + * UReach资源ID + */ + ResourceId: string; +} +/** + * DeleteExportLine - 删除加速线路 + */ +export interface DeleteExportLineResponse { +} +/** + * DeleteExportLineRules - 删除加速规则 + */ +export interface DeleteExportLineRulesRequest { + /** + * UReach资源ID + */ + ResourceId: string; + /** + * 白名单类型:Developer、CrossBorder + */ + RuleTypes: string[]; +} +/** + * DeleteExportLineRules - 删除加速规则 + */ +export interface DeleteExportLineRulesResponse { +} +/** + * DescribeCPE - 查询 CPE 信息 + */ +export interface DescribeCPERequest { + /** + * cpe id + */ + CPEId?: string; + /** + * 标签:Access、Network + */ + Label?: string; +} +/** + * DescribeCPE - 查询 CPE 信息 + */ +export interface DescribeCPEResponse { + /** + * cpe 详情 + */ + CPEInfos?: { + /** + * 资源ID + */ + CPEId?: string; + /** + * 资源名称 + */ + CPEName?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 设备型号 + */ + DeviceTypeName?: string; + /** + * 供应商 + */ + Vendor?: string; + /** + * 绑定的UWAN资源ID + */ + PopGwId?: string[]; + /** + * 设备SN + */ + Sn?: string; + /** + * 状态 + */ + Status?: number; + /** + * 配置更新时间 + */ + ConfUpdateTime?: number; + /** + * 端口 + */ + Ports?: string[]; + /** + * 链路数量 + */ + LinkNum?: number; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 是否与线路绑定 + */ + LineStatus?: string; + /** + * 绑定的UReach线路资源ID + */ + ResourceIds?: string[]; + /** + * 有效使用时间(天) + */ + UseTime?: number; + }[]; +} +/** + * DescribeExportLine - 查询CPE绑定的加速线路信息 + */ +export interface DescribeExportLineRequest { + /** + * CPE资源ID + */ + CPEId?: string; + /** + * UReach资源ID + */ + ResourceId?: string; +} +/** + * DescribeExportLine - 查询CPE绑定的加速线路信息 + */ +export interface DescribeExportLineResponse { + /** + * 线路信息 + */ + LineInfos?: { + /** + * 名称 + */ + Name?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 线路资源ID + */ + ResourceId?: string; + /** + * 线路资源ID对应的加速线路ID + */ + InstanceId?: string; + /** + * 带宽大小(Mbps) + */ + Bandwidth?: number; + /** + * 付费方式(按月、按年等) + */ + ChargeType?: string; + /** + * 计费方式(固定带宽: fixed-bw;流量计费:traffic) + */ + PayMode?: string; + /** + * 入口地域 + */ + FromRegion?: string; + /** + * 入口地域名称 + */ + FromRegionName?: string; + /** + * 出口地域 + */ + ToRegion?: string; + /** + * 出口地域名称 + */ + ToRegionName?: string; + /** + * + */ + IP?: string[]; + /** + * 线路是否绑定CPE;"1":已绑定;"0"未绑定 + */ + Status?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 到期时间 + */ + ExpireTime?: number; + /** + * 线路绑定的CPE资源ID + */ + CPEIds?: string[]; + /** + * 套餐类型 + */ + PkgType?: string; + /** + * IP类型 + */ + IpType?: string; + /** + * 是否过期(normal/expire) + */ + InstanceStatus?: string; + /** + * + */ + Socks?: { + /** + * + */ + Addr?: string; + /** + * + */ + Port?: number; + /** + * + */ + Account?: string; + }; + /** + * 源IP地址 + */ + Source?: string[]; + }[]; +} +/** + * DescribeExportLineRules - 查询白名单 + */ +export interface DescribeExportLineRulesRequest { + /** + * UReach资源ID + */ + ResourceId?: string; + /** + * 白名单类型 + */ + RuleType?: string; +} +/** + * DescribeExportLineRules - 查询白名单 + */ +export interface DescribeExportLineRulesResponse { + /** + * 白名单信息 + */ + WhiteListInfos: { + /** + * + */ + RuleType?: string; + /** + * + */ + Name?: string; + /** + * + */ + Remark?: string; + }[]; +} +/** + * UpdateExportLine - 修改加速线路 + */ +export interface UpdateExportLineRequest { + /** + * UReach资源ID + */ + ResourceId: string; + /** + * 带宽大小(仅自定义套餐支持修改) + */ + Bandwidth: string; +} +/** + * UpdateExportLine - 修改加速线路 + */ +export interface UpdateExportLineResponse { +} +/** + * UpgradeExportLine - 升级加速线路 + */ +export interface UpgradeExportLineRequest { + /** + * UReach资源ID + */ + ResourceId: string; + /** + * 目标套餐类型:2M-Entry、5M-Basic、10M-Enterprise + */ + PkgType: string; + /** + * 原IP类型:International、BGP、Native、Resident + */ + IpType: string; + /** + * 带宽大小 + */ + Bandwidth?: number; + /** + * 计费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限)。默认为月付 + */ + ChargeType?: string; + /** + * 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + */ + Quantity?: number; + /** + * 代金券ID。请登录用户中心查看 + */ + CouponId?: number; +} +/** + * UpgradeExportLine - 升级加速线路 + */ +export interface UpgradeExportLineResponse { +} diff --git a/lib/services/uwsc/index.js b/lib/services/uwsc/index.js new file mode 100644 index 0000000..d15b4f7 --- /dev/null +++ b/lib/services/uwsc/index.js @@ -0,0 +1,115 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const client_1 = __importDefault(require("../../core/client")); +const request_1 = __importDefault(require("../../core/request")); +/** + * This client is used to call actions of **uwsc** service + */ +class UWSCClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * AddExportLineRules - 添加加速规则 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/add_export_line_rules + */ + addExportLineRules(request) { + const args = Object.assign({ Action: 'AddExportLineRules' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * BindCPE - 绑定 CPE + * + * See also: https://docs.ucloud.cn/api/uwsc-api/bind_cpe + */ + bindCPE(request) { + const args = Object.assign({ Action: 'BindCPE' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateCPE - 创建 CPE + * + * See also: https://docs.ucloud.cn/api/uwsc-api/create_cpe + */ + createCPE(request) { + const args = Object.assign({ Action: 'CreateCPE' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateExportLine - 创建加速线路 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/create_export_line + */ + createExportLine(request) { + const args = Object.assign({ Action: 'CreateExportLine' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteExportLine - 删除加速线路 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/delete_export_line + */ + deleteExportLine(request) { + const args = Object.assign({ Action: 'DeleteExportLine' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteExportLineRules - 删除加速规则 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/delete_export_line_rules + */ + deleteExportLineRules(request) { + const args = Object.assign({ Action: 'DeleteExportLineRules' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeCPE - 查询 CPE 信息 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/describe_cpe + */ + describeCPE(request) { + const args = Object.assign({ Action: 'DescribeCPE' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeExportLine - 查询CPE绑定的加速线路信息 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/describe_export_line + */ + describeExportLine(request) { + const args = Object.assign({ Action: 'DescribeExportLine' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeExportLineRules - 查询白名单 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/describe_export_line_rules + */ + describeExportLineRules(request) { + const args = Object.assign({ Action: 'DescribeExportLineRules' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateExportLine - 修改加速线路 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/update_export_line + */ + updateExportLine(request) { + const args = Object.assign({ Action: 'UpdateExportLine' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpgradeExportLine - 升级加速线路 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/upgrade_export_line + */ + upgradeExportLine(request) { + const args = Object.assign({ Action: 'UpgradeExportLine' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = UWSCClient; diff --git a/package-lock.json b/package-lock.json index b0a2b85..c5f17ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@ucloud-sdks/ucloud-sdk-js", - "version": "0.2.10", + "version": "0.2.11", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f5469a4..4a494a8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@ucloud-sdks/ucloud-sdk-js", "description": "ucloud-sdk-js", - "version": "0.2.11", + "version": "0.2.12", "author": "oas@ucloud.cn", "license": "MIT", "private": false, diff --git a/src/services/index.ts b/src/services/index.ts index 15e56b2..36f867b 100644 --- a/src/services/index.ts +++ b/src/services/index.ts @@ -31,6 +31,7 @@ const UPhoneClient = require('./uphone').default; const UPHostClient = require('./uphost').default; const USMSClient = require('./usms').default; const UVMSClient = require('./uvms').default; +const UWSCClient = require('./uwsc').default; const VPCClient = require('./vpc').default; export class Client extends BaseClient { @@ -247,6 +248,13 @@ export class Client extends BaseClient { }); } + uwsc() { + return new UWSCClient({ + config: this.config, + credential: this.credential, + }); + } + vpc() { return new VPCClient({ config: this.config, diff --git a/src/services/uwsc/index.ts b/src/services/uwsc/index.ts new file mode 100644 index 0000000..a63339b --- /dev/null +++ b/src/services/uwsc/index.ts @@ -0,0 +1,649 @@ +import Client from '../../core/client'; +import Request from '../../core/request'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; + +/** + * This client is used to call actions of **uwsc** service + */ +export default class UWSCClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * AddExportLineRules - 添加加速规则 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/add_export_line_rules + */ + addExportLineRules( + request?: AddExportLineRulesRequest + ): Promise { + const args = { Action: 'AddExportLineRules', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AddExportLineRulesResponse + ); + } + + /** + * BindCPE - 绑定 CPE + * + * See also: https://docs.ucloud.cn/api/uwsc-api/bind_cpe + */ + bindCPE(request?: BindCPERequest): Promise { + const args = { Action: 'BindCPE', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as BindCPEResponse + ); + } + + /** + * CreateCPE - 创建 CPE + * + * See also: https://docs.ucloud.cn/api/uwsc-api/create_cpe + */ + createCPE(request?: CreateCPERequest): Promise { + const args = { Action: 'CreateCPE', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateCPEResponse + ); + } + + /** + * CreateExportLine - 创建加速线路 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/create_export_line + */ + createExportLine( + request?: CreateExportLineRequest + ): Promise { + const args = { Action: 'CreateExportLine', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateExportLineResponse + ); + } + + /** + * DeleteExportLine - 删除加速线路 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/delete_export_line + */ + deleteExportLine( + request?: DeleteExportLineRequest + ): Promise { + const args = { Action: 'DeleteExportLine', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteExportLineResponse + ); + } + + /** + * DeleteExportLineRules - 删除加速规则 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/delete_export_line_rules + */ + deleteExportLineRules( + request?: DeleteExportLineRulesRequest + ): Promise { + const args = { Action: 'DeleteExportLineRules', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteExportLineRulesResponse + ); + } + + /** + * DescribeCPE - 查询 CPE 信息 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/describe_cpe + */ + describeCPE(request?: DescribeCPERequest): Promise { + const args = { Action: 'DescribeCPE', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeCPEResponse + ); + } + + /** + * DescribeExportLine - 查询CPE绑定的加速线路信息 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/describe_export_line + */ + describeExportLine( + request?: DescribeExportLineRequest + ): Promise { + const args = { Action: 'DescribeExportLine', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeExportLineResponse + ); + } + + /** + * DescribeExportLineRules - 查询白名单 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/describe_export_line_rules + */ + describeExportLineRules( + request?: DescribeExportLineRulesRequest + ): Promise { + const args = { Action: 'DescribeExportLineRules', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeExportLineRulesResponse + ); + } + + /** + * UpdateExportLine - 修改加速线路 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/update_export_line + */ + updateExportLine( + request?: UpdateExportLineRequest + ): Promise { + const args = { Action: 'UpdateExportLine', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateExportLineResponse + ); + } + + /** + * UpgradeExportLine - 升级加速线路 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/upgrade_export_line + */ + upgradeExportLine( + request?: UpgradeExportLineRequest + ): Promise { + const args = { Action: 'UpgradeExportLine', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpgradeExportLineResponse + ); + } +} + +/** + * AddExportLineRules - 添加加速规则 + */ +export interface AddExportLineRulesRequest { + /** + * UReach资源ID + */ + ResourceId: string; + /** + * 白名单类型:Developer、CrossBorder + */ + RuleTypes: string[]; +} + +/** + * AddExportLineRules - 添加加速规则 + */ +export interface AddExportLineRulesResponse {} + +/** + * BindCPE - 绑定 CPE + */ +export interface BindCPERequest { + /** + * cpe id + */ + CPEId: string; + /** + * sn id + */ + Sn: string; +} + +/** + * BindCPE - 绑定 CPE + */ +export interface BindCPEResponse {} + +/** + * CreateCPE - 创建 CPE + */ +export interface CreateCPERequest { + /** + * cpe 名称 + */ + Name: string; + /** + * cpe 备注 + */ + Remark: string; + /** + * 设备型号,枚举值: UCPE3600、UCPE3601 + */ + DeviceType: string; + /** + * 标签:UReach智能网关:Access + */ + Label?: string; + /** + * 结构体,详见UserInfo模型 + */ + UserInfo?: string; + /** + * 数量,默认为1 + */ + Count?: number; +} + +/** + * CreateCPE - 创建 CPE + */ +export interface CreateCPEResponse { + /** + * cpe id + */ + CPEId: string; +} + +/** + * CreateExportLine - 创建加速线路 + */ +export interface CreateExportLineRequest { + /** + * 本端地域 + */ + FromRegion: string; + /** + * 目标地域 + */ + ToRegion: string; + /** + * IP类型:International、BGP、Native、Resident + */ + IpType: string; + /** + * CPE Id + */ + CPEId: string; + /** + * 套餐类型:2M-Entry、5M-Basic、10M-Enterprise + */ + PkgType?: string; + /** + * 带宽大小 + */ + Bandwidth?: number; + /** + * 资源名称 + */ + Name?: string; + /** + * 业务组名称, 默认为 "Default" + */ + Tag?: string; + /** + * 计费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限)。默认为月付 + */ + ChargeType?: string; + /** + * 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + */ + Quantity?: number; + /** + * 备注 + */ + Remark?: string; + /** + * 计费类型:fixed-bw,固定带宽;traffic,流量计费 + */ + PayMode?: string; + /** + * 代金券ID。请登录用户中心查看 + */ + CouponId?: number; +} + +/** + * CreateExportLine - 创建加速线路 + */ +export interface CreateExportLineResponse { + /** + * 资源ID + */ + ResourceId: string; +} + +/** + * DeleteExportLine - 删除加速线路 + */ +export interface DeleteExportLineRequest { + /** + * UReach资源ID + */ + ResourceId: string; +} + +/** + * DeleteExportLine - 删除加速线路 + */ +export interface DeleteExportLineResponse {} + +/** + * DeleteExportLineRules - 删除加速规则 + */ +export interface DeleteExportLineRulesRequest { + /** + * UReach资源ID + */ + ResourceId: string; + /** + * 白名单类型:Developer、CrossBorder + */ + RuleTypes: string[]; +} + +/** + * DeleteExportLineRules - 删除加速规则 + */ +export interface DeleteExportLineRulesResponse {} + +/** + * DescribeCPE - 查询 CPE 信息 + */ +export interface DescribeCPERequest { + /** + * cpe id + */ + CPEId?: string; + /** + * 标签:Access、Network + */ + Label?: string; +} + +/** + * DescribeCPE - 查询 CPE 信息 + */ +export interface DescribeCPEResponse { + /** + * cpe 详情 + */ + CPEInfos?: { + /** + * 资源ID + */ + CPEId?: string; + /** + * 资源名称 + */ + CPEName?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 设备型号 + */ + DeviceTypeName?: string; + /** + * 供应商 + */ + Vendor?: string; + /** + * 绑定的UWAN资源ID + */ + PopGwId?: string[]; + /** + * 设备SN + */ + Sn?: string; + /** + * 状态 + */ + Status?: number; + /** + * 配置更新时间 + */ + ConfUpdateTime?: number; + /** + * 端口 + */ + Ports?: string[]; + /** + * 链路数量 + */ + LinkNum?: number; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 是否与线路绑定 + */ + LineStatus?: string; + /** + * 绑定的UReach线路资源ID + */ + ResourceIds?: string[]; + /** + * 有效使用时间(天) + */ + UseTime?: number; + }[]; +} + +/** + * DescribeExportLine - 查询CPE绑定的加速线路信息 + */ +export interface DescribeExportLineRequest { + /** + * CPE资源ID + */ + CPEId?: string; + /** + * UReach资源ID + */ + ResourceId?: string; +} + +/** + * DescribeExportLine - 查询CPE绑定的加速线路信息 + */ +export interface DescribeExportLineResponse { + /** + * 线路信息 + */ + LineInfos?: { + /** + * 名称 + */ + Name?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 线路资源ID + */ + ResourceId?: string; + /** + * 线路资源ID对应的加速线路ID + */ + InstanceId?: string; + /** + * 带宽大小(Mbps) + */ + Bandwidth?: number; + /** + * 付费方式(按月、按年等) + */ + ChargeType?: string; + /** + * 计费方式(固定带宽: fixed-bw;流量计费:traffic) + */ + PayMode?: string; + /** + * 入口地域 + */ + FromRegion?: string; + /** + * 入口地域名称 + */ + FromRegionName?: string; + /** + * 出口地域 + */ + ToRegion?: string; + /** + * 出口地域名称 + */ + ToRegionName?: string; + /** + * + */ + IP?: string[]; + /** + * 线路是否绑定CPE;"1":已绑定;"0"未绑定 + */ + Status?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 到期时间 + */ + ExpireTime?: number; + /** + * 线路绑定的CPE资源ID + */ + CPEIds?: string[]; + /** + * 套餐类型 + */ + PkgType?: string; + /** + * IP类型 + */ + IpType?: string; + /** + * 是否过期(normal/expire) + */ + InstanceStatus?: string; + /** + * + */ + Socks?: { + /** + * + */ + Addr?: string; + /** + * + */ + Port?: number; + /** + * + */ + Account?: string; + }; + /** + * 源IP地址 + */ + Source?: string[]; + }[]; +} + +/** + * DescribeExportLineRules - 查询白名单 + */ +export interface DescribeExportLineRulesRequest { + /** + * UReach资源ID + */ + ResourceId?: string; + /** + * 白名单类型 + */ + RuleType?: string; +} + +/** + * DescribeExportLineRules - 查询白名单 + */ +export interface DescribeExportLineRulesResponse { + /** + * 白名单信息 + */ + WhiteListInfos: { + /** + * + */ + RuleType?: string; + /** + * + */ + Name?: string; + /** + * + */ + Remark?: string; + }[]; +} + +/** + * UpdateExportLine - 修改加速线路 + */ +export interface UpdateExportLineRequest { + /** + * UReach资源ID + */ + ResourceId: string; + /** + * 带宽大小(仅自定义套餐支持修改) + */ + Bandwidth: string; +} + +/** + * UpdateExportLine - 修改加速线路 + */ +export interface UpdateExportLineResponse {} + +/** + * UpgradeExportLine - 升级加速线路 + */ +export interface UpgradeExportLineRequest { + /** + * UReach资源ID + */ + ResourceId: string; + /** + * 目标套餐类型:2M-Entry、5M-Basic、10M-Enterprise + */ + PkgType: string; + /** + * 原IP类型:International、BGP、Native、Resident + */ + IpType: string; + /** + * 带宽大小 + */ + Bandwidth?: number; + /** + * 计费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限)。默认为月付 + */ + ChargeType?: string; + /** + * 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + */ + Quantity?: number; + /** + * 代金券ID。请登录用户中心查看 + */ + CouponId?: number; +} + +/** + * UpgradeExportLine - 升级加速线路 + */ +export interface UpgradeExportLineResponse {}