diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..e3158ae --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + parser: 'typescript-eslint-parser', + plugins: ['typescript'], + rules: { + 'typescript/no-unused-vars': 'error', + }, +}; diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..42eac9b --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,10 @@ + + +FEATURES: + + +ENHANCEMENTS: + + +BUG FIXES: + diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..67feca4 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,32 @@ +name: Running Code Coverage + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x, 14.x] + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 2 + + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: npm install + + - name: Run the tests + run: npm run coverage + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b4a0bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*.swp +.idea/ +dist/ +node_modules/ +yarn-error.log +coverage/ diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..348ad87 --- /dev/null +++ b/.npmignore @@ -0,0 +1,3 @@ +* +!lib/index.js +README.md diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..6e82787 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +@types diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..5375b9e --- /dev/null +++ b/.prettierrc @@ -0,0 +1,15 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "semi": true, + "singleQuote": true, + "trailingComma": "es5", + "useTabs": false, + "parser": "babel-ts", + "overrides": [ + { + "files": "*.json", + "options": { "parser": "json", "printWidth": 200 } + } + ] +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8418c4e --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 oas@ucloud.cn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8c3e953 --- /dev/null +++ b/Makefile @@ -0,0 +1,46 @@ +help: + @echo "help" + +.PHONY: test +test: + npm run test + +test-cov: + npm run coverage + +lint: + npm run tslint + npm run prettier:check + +fmt: + npm run prettier:write + +build: + npm run publish + +gen: + ucloud-spec create opensdk \ + --only "UFS" \ + --only "UDisk" \ + --only "UHost" \ + --only "PathX" \ + --only "UDDB" \ + --only "UCDN" \ + --only "UNet" \ + --only "VPC2.0" \ + --only "UDB" \ + --only "UMem" \ + --only "ULB" \ + --only "Cube" \ + --only "UK8S" \ + --only "IPSecVPN" \ + --only "UAccount" \ + --only "UDPN" \ + --only "UBill" \ + --only "UPHost" \ + --only "UFile" \ + --only "USMS" \ + --only "UEC" \ + --public \ + -s https://git.ucloudadmin.com/apispec/apispec.git \ + /Users/user/code/oas/plugins/template-opensdk-js . diff --git a/README.md b/README.md new file mode 100644 index 0000000..f087f78 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# ucloud-sdk-js diff --git a/docs/configure.md b/docs/configure.md new file mode 100644 index 0000000..2432861 --- /dev/null +++ b/docs/configure.md @@ -0,0 +1,44 @@ +# 通用配置 + +了解如何配置 SDK,如日志、重试、服务访问端点(公有云、专有云)等。 + +## 配置项清单 + +| 配置 | 类型 | 描述 | +| --------------- | ---- | ------------------------------------------------------------ | +| **region** | string | (必填)服务所在地域,可参考 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) | +| **projectId** | string | (选填)项目的唯一标识,用于组织资源,大多数资源都需要 ProjectId,如果是主账号或财务账号,默认值为默认 ProjectId,如果是子账号非财务账号,则该字段必须填写。 | +| **baseUrl** | string | (选填) API 服务的访问端点,默认是 https://api.ucloud.cn | +| **userAgent** | string | (选填)UserAgent 是 SDK 客户端特有的属性,用于区分使用 SDK 的版本。User-Agent 的定义请参考 [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent)。用户自定义的 UserAgent 将追加到 SDK 版本号的末尾。例如, “MyAPP/0.10.1” -> “PHP/8.0.6 PHP-SDK/0.1.0 MyAPP/0.10.1” | +| **timeout** | number | (选填)请求超时时间,默认 30s | +| **maxRetries** | number | (选填)最大重试次数. 默认重试 3 次。设置该值大于 0 将对网络和服务可用性问题进行自动重试,使用指数退避的重试间隔,并自动跳过资源创建类的接口。 | +| **logger** | logger | (选填)自定义 Logger | + +## 进阶配置选项 + +### 修改默认日志 + +关闭日志: + +```javascript +const client = new Client({ + config: { + // ... + logger: null, + }, + // ... +}); +``` + +### 访问专有云/渠道云或其它网关 + +```javascript +const client = new Client({ + config: { + // ... + region: "专有云地域", + baseUrl: "foo.api.ucloud.cn", // 替换成专有云网关 + }, + // ... +}); +``` diff --git a/docs/error.md b/docs/error.md new file mode 100644 index 0000000..013d118 --- /dev/null +++ b/docs/error.md @@ -0,0 +1,14 @@ +# 错误处理 + +了解如何处理不同类型的 SDK 异常,包括参数错误,RetCode 不为 0 的业务异常等。 + +```javascript +try { + resp = await client.uhost().describeImage(); +} catch (e) { + console.log(e.typ); + console.log(e.retCode); + console.log(e.requestId); + throw e; +} +``` diff --git a/docs/generic.md b/docs/generic.md new file mode 100644 index 0000000..0ab3d4b --- /dev/null +++ b/docs/generic.md @@ -0,0 +1,38 @@ +# 泛化调用 + +如何调用 SDK 尚未支持的 API ?可以使用泛化调用方式。 + +**NOTE** 如果没有必须使用的理由,不建议使用泛化方式调用 API,因为无法享受 OpenAPI 提供的兼容性保证。 + +## 调用方式 + +```javascript +const {Client} = require("../../lib/services"); +const Request = require("../../lib/core/request").default; + +async function main() { + // Build client + const client = new Client({ + config: { + region: 'cn-bj2', + projectId: process.env.UCLOUD_PROJECT_ID || '', + }, + credential: { + publicKey: process.env.UCLOUD_PUBLIC_KEY || '', + privateKey: process.env.UCLOUD_PRIVATE_KEY || '', + } + }); + let resp = null; + + try { + resp = await client.invoke(new Request({ + Action: "DescribeImage", + })); + } catch (e) { + throw e; + } + const image = resp.toObject()["ImageSet"][0]; +} + +main().catch(e => { console.error(e) }) +``` diff --git a/docs/middleware.md b/docs/middleware.md new file mode 100644 index 0000000..0b065fc --- /dev/null +++ b/docs/middleware.md @@ -0,0 +1,25 @@ +# 请求中间件 + +了解如何拦截 SDK 发起的请求,并统一添加额外的逻辑。 + +UCloud SDK 为请求提供了请求中间件的特性。 + +该特性允许在 请求/响应 的生命周期中添加自定义的逻辑。 + +例如,Client 级别的中间件,可以拦截参数/响应字典: + +```php +client.useMiddleware({ + request: function (ctx: Context) { + ctx.config.logger.info(ctx.request.toObject()); + return ctx.request; + }, + response: function (ctx: Context) { + ctx.config.logger.info(ctx.response.toObject()); + return ctx.response; + }, + error: function (ctx: Context) { + ctx.config.logger.error(ctx.exception?.message); + }, +}) +``` diff --git a/docs/quickstart.md b/docs/quickstart.md new file mode 100644 index 0000000..3a7eed5 --- /dev/null +++ b/docs/quickstart.md @@ -0,0 +1,105 @@ +# 快速开始 + +## 安装 + +使用 `npm` 安装(推荐): + +```bash +$ npm install @ucloud/ucloud-sdk-js +``` + +> 注意:内测阶段,未注册到官方仓库,只能采用源码安装,npm registry 方式暂时不可用。 + +```bash +git clone https://git.ucloudadmin.com/ucloud-sdk/ucloud-sdk-nodejs.git +cd ucloud-sdk-nodejs && npm install +cd examples/uhost && node index.js +``` + +## 初次使用 + +目前,SDK 使用 PublicKey/PrivateKey 作为唯一的鉴权方式,该公私钥可以从以下途径获取: + +- [UAPI 密钥管理](https://console.ucloud.cn/uapi/apikey) + +下面提供一个简单的示例: + +```javascript +const {Client} = require("ucloud-sdk-js/lib/services"); + +function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)) +} + +async function main() { + // Build client + const client = new Client({ + config: { + region: 'cn-bj2', + projectId: process.env.UCLOUD_PROJECT_ID || '', + }, + credential: { + publicKey: process.env.UCLOUD_PUBLIC_KEY || '', + privateKey: process.env.UCLOUD_PRIVATE_KEY || '', + } + }); + const zone = "cn-bj2-05"; + + let resp = null; + + // Describe Image + try { + resp = await client.uhost().describeImage(); + } catch (e) { + throw e; + } + const image = resp["ImageSet"][0]; + + // Create Instance + try { + resp = await client.uhost().createUHostInstance({ + Name: "sdk-js-example", + Zone: zone, + ImageId: image["ImageId"], + LoginMode: "Password", + Password: new Buffer("UCloud1234!").toString('base64'), + CPU: 1, + Memory: 1024, + Disks: [{ + Size: image["ImageSize"], + Type: "CLOUD_SSD", + IsBoot: "true", + }], + }); + } catch (e) { + throw e; + } +} + +main().catch(e => { console.error(e) }) +``` + +将上述代码中 client 相关配置,以及主机的 image id 等,替换成自己的配置,即可创建一台云主机。 + +在该示例中,使用 SDK 完成了一个创建云主机的请求。至此,已经涵盖了 SDK 的基本核心用法,可以构建自己的脚本啦! + +SDK 中的每一个 api 调用都有详细的注释文档, +可以通过 Editor/IDE 跳转到具体的方法中查看(也可以 [查看接口文档](https://docs.ucloud.cn/api/summary/README) ), +并根据 IDE 自动补全和报错信息继续探索 SDK 的用法。 + +如果需要了解这段代码提及但未完全覆盖的使用技巧,请参考: + +- [通用配置](configure.md),了解如何配置 SDK,如日志、重试、服务访问端点(公有云、专有云)等 +- [错误处理](error.md),了解如何处理不同类型的 SDK 异常,包括参数错误,RetCode 不为 0 的业务异常等 +- [类型系统](typesystem.md),了解 SDK 如何校验参数,并规范化 API 的返回值。 +- [请求中间件](middleware.md),了解如何拦截 SDK 发起的请求,并统一添加额外的逻辑。 +- [泛化调用](generic.md),如何调用 SDK 尚未支持的 API(不建议使用此类 API,因为没有兼容性保证) + +## 获取更多示例 + +### 基于场景的示例 + +SDK 提供了部分基于场景的示例,并提供了对应的资源销毁逻辑,可以点击以下链接查看源码: + +- [批量创建云主机](../examples/uhost) +- [创建基于负载均衡器的两层架构](../examples/two-tier) diff --git a/docs/typesystem.md b/docs/typesystem.md new file mode 100644 index 0000000..98d1907 --- /dev/null +++ b/docs/typesystem.md @@ -0,0 +1,3 @@ +# 类型系统 + +待定。 diff --git a/examples/two-tier/README.md b/examples/two-tier/README.md new file mode 100644 index 0000000..87567c2 --- /dev/null +++ b/examples/two-tier/README.md @@ -0,0 +1,19 @@ +# UCloud SDK Two-Tier Example + +## What is the goal + +Build a two-tier architecture with ulb and uhost, and remove all example data. + +## Setup Environment + +```go +export UCLOUD_PUBLIC_KEY="your public key" +export UCLOUD_PRIVATE_KEY="your private key" +export UCLOUD_PROJECT_ID="your project id" +``` + +## How to run + +```sh +node index.js +``` diff --git a/examples/two-tier/index.js b/examples/two-tier/index.js new file mode 100644 index 0000000..42db455 --- /dev/null +++ b/examples/two-tier/index.js @@ -0,0 +1 @@ +throw "not implemented" diff --git a/examples/uhost/README.md b/examples/uhost/README.md new file mode 100644 index 0000000..279caac --- /dev/null +++ b/examples/uhost/README.md @@ -0,0 +1,21 @@ +# UCloud SDK UHost Example + +## What is the goal + +Create an uhost, wait it created, and remove all example data. + +## Setup Environment + +```go +export UCLOUD_PUBLIC_KEY="your public key" +export UCLOUD_PRIVATE_KEY="your private key" +export UCLOUD_PROJECT_ID="your project id" +``` + +## How to run + +change directory to here. + +```sh +node index.js +``` diff --git a/examples/uhost/index.js b/examples/uhost/index.js new file mode 100644 index 0000000..70ce55e --- /dev/null +++ b/examples/uhost/index.js @@ -0,0 +1,110 @@ +const {Client} = require("../../lib/services"); + +function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)) +} + +async function main() { + // Build client + const client = new Client({ + config: { + region: 'cn-bj2', + projectId: process.env.UCLOUD_PROJECT_ID || '', + }, + credential: { + publicKey: process.env.UCLOUD_PUBLIC_KEY || '', + privateKey: process.env.UCLOUD_PRIVATE_KEY || '', + } + }); + const zone = "cn-bj2-05"; + + let resp = null; + + // Describe Image + try { + resp = await client.uhost().describeImage(); + } catch (e) { + throw e; + } + const image = resp["ImageSet"][0]; + + + // Create Instance + try { + resp = await client.uhost().createUHostInstance({ + Name: "sdk-js-example", + Zone: zone, + ImageId: image["ImageId"], + LoginMode: "Password", + Password: new Buffer("UCloud1234!").toString('base64'), + CPU: 1, + Memory: 1024, + Disks: [{ + Size: image["ImageSize"], + Type: "CLOUD_SSD", + IsBoot: "true", + }], + }); + } catch (e) { + throw e; + } + const id = resp["UHostIds"][0]; + + // Wait instance to boot + while (true) { + try { + resp = await client.uhost().describeUHostInstance({ + Zone: zone, + UHostIds: [id], + }); + } catch (e) { + break; + } + await sleep(3000); + const instance = resp["UHostSet"][0]; + console.log(`waiting ${id} to boot, got ${instance["State"]}`); + if (["Running"].includes(instance["State"])) { + break; + } + } + + // Stop the instance + try { + resp = await client.uhost().stopUHostInstance({ + Zone: zone, + UHostId: id, + }); + } catch (e) { + throw e; + } + + // Wait instance to boot + while (true) { + try { + resp = await client.uhost().describeUHostInstance({ + Zone: zone, + UHostIds: [id], + }); + } catch (e) { + break; + } + await sleep(3000); + const instance = resp["UHostSet"][0]; + console.log(`waiting ${id} to stopped, got ${instance["State"]}`); + if (["Stopped"].includes(instance["State"])) { + break; + } + } + + // Cleanup the instance + try { + resp = await client.uhost().terminateUHostInstance({ + Zone: zone, + UHostId: id, + }); + } catch (e) { + throw e; + } +} + +main().catch(e => { console.error(e) }) diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..dec77d7 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,13 @@ +module.exports = { + roots: ['/src'], + transform: { + '^.+\\.tsx?$': 'ts-jest', + }, + testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$', + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], + collectCoverageFrom: [ + "src/core/**/*.{ts,js}", + ], + collectCoverage: true, + coverageReporters: ["json", "lcov", "text", "clover", "html"] +}; diff --git a/lib/core/client.d.ts b/lib/core/client.d.ts new file mode 100644 index 0000000..417352b --- /dev/null +++ b/lib/core/client.d.ts @@ -0,0 +1,19 @@ +import Config, { ConfigOptions } from './config'; +import Credential, { CredentialOptions } from './credential'; +import Request from './request'; +import Response from './response'; +import { MiddlewareOptions } from './middleware'; +import { Transport } from './transport'; +export default class Client { + config: Config; + credential: Credential; + middlewares: MiddlewareOptions[]; + transport: Transport; + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + useMiddleware(options: MiddlewareOptions): void; + withTransport(transport: Transport): void; + invoke(req: Request): Promise; +} diff --git a/lib/core/client.js b/lib/core/client.js new file mode 100644 index 0000000..d002503 --- /dev/null +++ b/lib/core/client.js @@ -0,0 +1,101 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const config_1 = __importDefault(require("./config")); +const credential_1 = __importDefault(require("./credential")); +const middleware_1 = require("./middleware"); +const transport_1 = require("./transport"); +const version_1 = require("../version"); +const exception_1 = require("./exception"); +const middlewares_1 = require("./middlewares"); +class Client { + constructor({ config, credential, }) { + this.config = new config_1.default(config); + this.credential = new credential_1.default(credential); + this.middlewares = [ + middlewares_1.defaultsMiddleware, + middlewares_1.credentialMiddleware, + middlewares_1.logMiddleware, + ]; + let ua = `JS-SDK/${version_1.VERSION}`; + if (!!config.userAgent) { + ua += config.userAgent; + } + this.transport = new transport_1.Transport({ + baseUrl: this.config.baseUrl, + userAgent: ua, + }); + } + useMiddleware(options) { + this.middlewares.push(options); + } + withTransport(transport) { + this.transport = transport; + } + invoke(req) { + return __awaiter(this, void 0, void 0, function* () { + const ctx = new middleware_1.Context({ + config: this.config, + credential: this.credential, + request: req, + }); + // resolve request + this.middlewares.forEach((middleware) => { + if (!middleware.request) { + return; + } + ctx.request = middleware.request(ctx); + }); + // do invoking + let resp; + const maxRetries = this.config.maxRetries || 3; + for (let k = 0; k <= maxRetries; k++) { + try { + resp = yield this.transport.invoke(ctx.request); + break; // success, stop retrying + } + catch (e) { + ctx.exception = e; + this.middlewares.forEach((middleware) => { + if (!middleware.error) { + return; + } + middleware.error(ctx); + }); + if (k == maxRetries) { + throw e; + } + } + } + // resolve response + ctx.response = resp; + this.middlewares.forEach((middleware) => { + if (!middleware.response) { + return; + } + ctx.response = middleware.response(ctx); + }); + if (!resp) { + throw new exception_1.UCloudError({ + typ: exception_1.EXC_TYPE_TRANSPORT, + retCode: -1, + message: 'invalid response', + requestId: '', + }); + } + return resp; + }); + } +} +exports.default = Client; diff --git a/lib/core/config/index.d.ts b/lib/core/config/index.d.ts new file mode 100644 index 0000000..b9839b3 --- /dev/null +++ b/lib/core/config/index.d.ts @@ -0,0 +1,52 @@ +import { Logger } from '../logger'; +export declare type ConfigOptions = { + region?: string; + projectId?: string; + baseUrl?: string; + userAgent?: string; + timeout?: number; + maxRetries?: number; + logger?: Logger | null; +}; +export default class Config { + /** + * Region is the region of backend service. + * See also ... + */ + region?: string; + /** + * ProjectId is the unique identify of project, used for organize resources, + * Most of resources should belong to a project. + * Sub-Account must have an project id. + * See also ... + */ + projectId?: string; + /** + * BaseUrl is the url of backend api. + * See also ... + */ + baseUrl?: string; + /** + * UserAgent is an attribute for sdk client, used for distinguish who is using sdk. + * See also https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent + * It will be appended to the end of sdk user-agent. + * eg. "Terraform/0.10.1" -> "GO/1.9.1 GO-SDK/0.1.0 Terraform/0.10.1" + * NOTE: it will conflict with the User-Agent of HTTPHeaders + */ + userAgent?: string; + /** + * Timeout is timeout for every request. + */ + timeout?: number; + /** + * MaxRetries is the number of max retry times. + * Set MaxRetries more than 0 to enable auto-retry for network and service availability problem + * if auto-retry is enabled, it will enable default retry policy using exponential backoff. + */ + maxRetries?: number; + /** + * Logger + */ + logger?: Logger | null; + constructor({ region, projectId, baseUrl, userAgent, timeout, maxRetries, logger, }: ConfigOptions); +} diff --git a/lib/core/config/index.js b/lib/core/config/index.js new file mode 100644 index 0000000..e451f31 --- /dev/null +++ b/lib/core/config/index.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const logger_1 = require("../logger"); +class Config { + constructor({ region = '', projectId = '', baseUrl = 'https://api.ucloud.cn', userAgent = '', timeout = 30, maxRetries = 3, logger = new logger_1.DefaultLogger(logger_1.LogLevel.Info), }) { + this.region = region; + this.projectId = projectId; + this.baseUrl = baseUrl; + this.userAgent = userAgent; + this.timeout = timeout; + this.maxRetries = maxRetries; + this.logger = logger; + } +} +exports.default = Config; diff --git a/lib/core/credential/index.d.ts b/lib/core/credential/index.d.ts new file mode 100644 index 0000000..50a45ed --- /dev/null +++ b/lib/core/credential/index.d.ts @@ -0,0 +1,15 @@ +declare type argsT = { + [index: string]: any; +}; +export declare type CredentialOptions = { + publicKey: string; + privateKey: string; +}; +export default class Credential { + publicKey: string; + privateKey: string; + constructor({ publicKey, privateKey }: CredentialOptions); + verifyAc(args: argsT): any; + sign(args: argsT): argsT; +} +export {}; diff --git a/lib/core/credential/index.js b/lib/core/credential/index.js new file mode 100644 index 0000000..83ab4fb --- /dev/null +++ b/lib/core/credential/index.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const { createHash } = require('crypto'); +class Credential { + constructor({ publicKey, privateKey }) { + this.publicKey = publicKey; + this.privateKey = privateKey; + } + verifyAc(args) { + const obj = Object.assign({}, args); + obj['PublicKey'] = this.publicKey; + // key sorting + const keys = Object.keys(obj); + keys.sort(); + // concat string + let s = ''; + keys.forEach((key) => { + const value = obj[key]; + if (value == null) { + return; + } + s += key; + s += value.toString(); + }); + s += this.privateKey; + // hash by sha1 + let hash = createHash('sha1'); + hash.update(s); + return hash.digest('hex'); + } + sign(args) { + const obj = Object.assign({}, args); + obj['Signature'] = this.verifyAc(obj); + obj['PublicKey'] = this.publicKey; + return obj; + } +} +exports.default = Credential; diff --git a/lib/core/exception/index.d.ts b/lib/core/exception/index.d.ts new file mode 100644 index 0000000..5432a25 --- /dev/null +++ b/lib/core/exception/index.d.ts @@ -0,0 +1,14 @@ +export declare const EXC_TYPE_RET_CODE = "RetCode"; +export declare const EXC_TYPE_TRANSPORT = "Transport"; +export declare const EXC_TYPE_UNKNOWN = "Unknown"; +export declare class UCloudError extends Error { + typ: string; + retCode?: number; + requestId?: string; + constructor({ typ, message, retCode, requestId, }: { + typ: string; + message: string; + retCode?: number; + requestId?: string; + }); +} diff --git a/lib/core/exception/index.js b/lib/core/exception/index.js new file mode 100644 index 0000000..537b5df --- /dev/null +++ b/lib/core/exception/index.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UCloudError = exports.EXC_TYPE_UNKNOWN = exports.EXC_TYPE_TRANSPORT = exports.EXC_TYPE_RET_CODE = void 0; +exports.EXC_TYPE_RET_CODE = 'RetCode'; +exports.EXC_TYPE_TRANSPORT = 'Transport'; +exports.EXC_TYPE_UNKNOWN = 'Unknown'; +class UCloudError extends Error { + constructor({ typ, message, retCode, requestId, }) { + super(message); + this.typ = typ; + this.retCode = retCode; + this.requestId = requestId; + } +} +exports.UCloudError = UCloudError; diff --git a/lib/core/logger/index.d.ts b/lib/core/logger/index.d.ts new file mode 100644 index 0000000..9a3daab --- /dev/null +++ b/lib/core/logger/index.d.ts @@ -0,0 +1,18 @@ +export declare enum LogLevel { + Debug = 0, + Info = 1, + Error = 2 +} +export interface Logger { + debug(message: any, extras?: object): void; + info(message: any, extras?: object): void; + error(message: any, extras?: object): void; +} +export declare class DefaultLogger { + level: LogLevel; + constructor(level: LogLevel); + log(level: LogLevel, message: string, extras?: object): void; + debug(message: string, extras?: object): void; + info(message: string, extras?: object): void; + error(message: string, extras?: object): void; +} diff --git a/lib/core/logger/index.js b/lib/core/logger/index.js new file mode 100644 index 0000000..00d4e57 --- /dev/null +++ b/lib/core/logger/index.js @@ -0,0 +1,48 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DefaultLogger = exports.LogLevel = void 0; +var LogLevel; +(function (LogLevel) { + LogLevel[LogLevel["Debug"] = 0] = "Debug"; + LogLevel[LogLevel["Info"] = 1] = "Info"; + LogLevel[LogLevel["Error"] = 2] = "Error"; +})(LogLevel = exports.LogLevel || (exports.LogLevel = {})); +class DefaultLogger { + constructor(level) { + this.level = level; + } + log(level, message, extras) { + switch (level) { + case LogLevel.Debug: + console.log(message); + break; + case LogLevel.Info: + console.log(message); + break; + case LogLevel.Error: + console.log(message); + break; + default: + console.log(message); + } + } + debug(message, extras) { + if (LogLevel.Debug < this.level) { + return; + } + this.log(LogLevel.Debug, message, extras); + } + info(message, extras) { + if (LogLevel.Info < this.level) { + return; + } + this.log(LogLevel.Info, message, extras); + } + error(message, extras) { + if (LogLevel.Error < this.level) { + return; + } + this.log(LogLevel.Error, message, extras); + } +} +exports.DefaultLogger = DefaultLogger; diff --git a/lib/core/middleware/context.d.ts b/lib/core/middleware/context.d.ts new file mode 100644 index 0000000..13b6586 --- /dev/null +++ b/lib/core/middleware/context.d.ts @@ -0,0 +1,19 @@ +import Credential from '../credential'; +import Config from '../config'; +import Request from '../request'; +import Response from '../response'; +import { UCloudError } from '../exception'; +export declare class Context { + credential: Credential; + config: Config; + request: Request; + response?: Response; + exception?: UCloudError; + constructor({ credential, config, request, response, exception, }: { + credential: Credential; + config: Config; + request: Request; + response?: Response; + exception?: UCloudError; + }); +} diff --git a/lib/core/middleware/context.js b/lib/core/middleware/context.js new file mode 100644 index 0000000..1bd853d --- /dev/null +++ b/lib/core/middleware/context.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Context = void 0; +class Context { + constructor({ credential, config, request, response, exception, }) { + this.credential = credential; + this.config = config; + this.request = request; + this.response = response; + this.exception = exception; + } +} +exports.Context = Context; diff --git a/lib/core/middleware/index.d.ts b/lib/core/middleware/index.d.ts new file mode 100644 index 0000000..3eaafa4 --- /dev/null +++ b/lib/core/middleware/index.d.ts @@ -0,0 +1,6 @@ +export { Context } from './context'; +export declare type MiddlewareOptions = { + request?: Function; + response?: Function; + error?: Function; +}; diff --git a/lib/core/middleware/index.js b/lib/core/middleware/index.js new file mode 100644 index 0000000..36d8acb --- /dev/null +++ b/lib/core/middleware/index.js @@ -0,0 +1,4 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var context_1 = require("./context"); +Object.defineProperty(exports, "Context", { enumerable: true, get: function () { return context_1.Context; } }); diff --git a/lib/core/middlewares.d.ts b/lib/core/middlewares.d.ts new file mode 100644 index 0000000..6bb2b51 --- /dev/null +++ b/lib/core/middlewares.d.ts @@ -0,0 +1,4 @@ +import { MiddlewareOptions } from './middleware'; +export declare const credentialMiddleware: MiddlewareOptions; +export declare const defaultsMiddleware: MiddlewareOptions; +export declare const logMiddleware: MiddlewareOptions; diff --git a/lib/core/middlewares.js b/lib/core/middlewares.js new file mode 100644 index 0000000..8605cb5 --- /dev/null +++ b/lib/core/middlewares.js @@ -0,0 +1,52 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.logMiddleware = exports.defaultsMiddleware = exports.credentialMiddleware = void 0; +const request_1 = __importDefault(require("./request")); +exports.credentialMiddleware = { + request: function (ctx) { + const signed = ctx.credential.sign(ctx.request.toObject()); + return new request_1.default(signed); + }, +}; +exports.defaultsMiddleware = { + request: function (ctx) { + const req = ctx.request; + const cfg = ctx.config; + if (!req.data['Region'] && cfg.region) { + req.data['Region'] = cfg.region; + } + if (!req.data['ProjectId'] && cfg.projectId) { + req.data['ProjectId'] = cfg.projectId; + } + return req; + }, +}; +exports.logMiddleware = { + request: function (ctx) { + if (!ctx.config.logger) { + return ctx.request; + } + ctx.config.logger.info(ctx.request.toObject()); + return ctx.request; + }, + response: function (ctx) { + if (!ctx.config.logger) { + return ctx.response; + } + if (ctx.response) { + ctx.config.logger.info(ctx.response.toObject()); + } + return ctx.response; + }, + error: function (ctx) { + var _a; + console.log("debug", !ctx.config.logger); + if (!ctx.config.logger) { + return; + } + ctx.config.logger.error((_a = ctx.exception) === null || _a === void 0 ? void 0 : _a.message); + }, +}; diff --git a/lib/core/request/index.d.ts b/lib/core/request/index.d.ts new file mode 100644 index 0000000..a45596e --- /dev/null +++ b/lib/core/request/index.d.ts @@ -0,0 +1,10 @@ +declare type argsT = { + [index: string]: any; +}; +export default class Request { + data: argsT; + constructor(data: object, options?: object); + toObject(): argsT; + private encode; +} +export {}; diff --git a/lib/core/request/index.js b/lib/core/request/index.js new file mode 100644 index 0000000..e3ce3be --- /dev/null +++ b/lib/core/request/index.js @@ -0,0 +1,43 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +class Request { + constructor(data, options) { + this.data = data; + } + toObject() { + return this.encode(this.data); + } + encode(args) { + const result = {}; + for (const k in args) { + if (args.hasOwnProperty(k)) { + const v = args[k]; + if (v == null) { + continue; + } + if (Object.prototype.toString.call(v) === '[object Array]') { + v.forEach((value, index) => { + if (value instanceof Object) { + Object.entries(this.encode(value)).forEach(([key, value]) => { + result[`${k}.${index}.${key}`] = value; + }); + } + else { + result[`${k}.${index}`] = value; + } + }); + } + else if (Object.prototype.toString.call(v) === '[object Object]') { + Object.entries(this.encode(v)).forEach(([key, value]) => { + result[`${k}.${key}`] = value; + }); + } + else { + result[k] = v; + } + } + } + return result; + } +} +exports.default = Request; diff --git a/lib/core/response/index.d.ts b/lib/core/response/index.d.ts new file mode 100644 index 0000000..017fde1 --- /dev/null +++ b/lib/core/response/index.d.ts @@ -0,0 +1,11 @@ +export default class Response { + data: { + [index: string]: any; + }; + requestId?: string; + constructor(data: object, requestId?: string); + toObject(): object; + getMessage(): string; + getRetCode(): number; + getRequestId(): string; +} diff --git a/lib/core/response/index.js b/lib/core/response/index.js new file mode 100644 index 0000000..3f76bc3 --- /dev/null +++ b/lib/core/response/index.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +class Response { + constructor(data, requestId) { + this.data = data; + this.requestId = requestId; + } + toObject() { + return this.data; + } + getMessage() { + return this.data['Message'] || ''; + } + getRetCode() { + return this.data['RetCode'] || 0; + } + getRequestId() { + return this.requestId || ''; + } +} +exports.default = Response; diff --git a/lib/core/transport/index.d.ts b/lib/core/transport/index.d.ts new file mode 100644 index 0000000..5273325 --- /dev/null +++ b/lib/core/transport/index.d.ts @@ -0,0 +1,13 @@ +import Request from '../request'; +import Response from '../response'; +export declare class Transport { + baseUrl?: string; + userAgent?: string; + options?: object; + constructor({ baseUrl, userAgent, options, }: { + baseUrl?: string; + userAgent?: string; + options?: object; + }); + invoke(req: Request): Promise; +} diff --git a/lib/core/transport/index.js b/lib/core/transport/index.js new file mode 100644 index 0000000..035c602 --- /dev/null +++ b/lib/core/transport/index.js @@ -0,0 +1,55 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Transport = void 0; +const response_1 = __importDefault(require("../response")); +const exception_1 = require("../exception"); +const axios_1 = __importDefault(require("axios")); +class Transport { + constructor({ baseUrl, userAgent, options, }) { + this.baseUrl = baseUrl; + this.userAgent = userAgent; + this.options = options; + } + invoke(req) { + return __awaiter(this, void 0, void 0, function* () { + let resp; + try { + const httpResp = yield axios_1.default(Object.assign({ method: 'post', baseURL: this.baseUrl, headers: { + 'User-Agent': this.userAgent, + 'Content-Type': 'application/json', + }, data: req.toObject() }, this.options)); + const requestId = httpResp.headers['x-ucloud-request-uuid']; + resp = new response_1.default(httpResp.data, requestId); + } + catch (e) { + throw new exception_1.UCloudError({ + typ: exception_1.EXC_TYPE_TRANSPORT, + message: e.message, + retCode: -1, + }); + } + if (resp != null && resp.getRetCode() != 0) { + throw new exception_1.UCloudError({ + typ: exception_1.EXC_TYPE_TRANSPORT, + message: resp.getMessage(), + retCode: resp.getRetCode(), + requestId: resp.getRequestId(), + }); + } + return resp; + }); + } +} +exports.Transport = Transport; diff --git a/lib/index.d.ts b/lib/index.d.ts new file mode 100644 index 0000000..067458b --- /dev/null +++ b/lib/index.d.ts @@ -0,0 +1,7 @@ +export { Client } from './services'; +export { default as Credential } from './core/credential'; +export { default as Config } from './core/config'; +export { default as Request } from './core/request'; +export { default as Response } from './core/response'; +export { UCloudError } from './core/exception'; +export { Context as MiddlewareContext, MiddlewareOptions } from './core/middleware'; diff --git a/lib/index.js b/lib/index.js new file mode 100644 index 0000000..ee43bf8 --- /dev/null +++ b/lib/index.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var services_1 = require("./services"); +Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return services_1.Client; } }); +var credential_1 = require("./core/credential"); +Object.defineProperty(exports, "Credential", { enumerable: true, get: function () { return credential_1.default; } }); +var config_1 = require("./core/config"); +Object.defineProperty(exports, "Config", { enumerable: true, get: function () { return config_1.default; } }); +var request_1 = require("./core/request"); +Object.defineProperty(exports, "Request", { enumerable: true, get: function () { return request_1.default; } }); +var response_1 = require("./core/response"); +Object.defineProperty(exports, "Response", { enumerable: true, get: function () { return response_1.default; } }); +var exception_1 = require("./core/exception"); +Object.defineProperty(exports, "UCloudError", { enumerable: true, get: function () { return exception_1.UCloudError; } }); +var middleware_1 = require("./core/middleware"); +Object.defineProperty(exports, "MiddlewareContext", { enumerable: true, get: function () { return middleware_1.Context; } }); diff --git a/lib/services/cube/index.d.ts b/lib/services/cube/index.d.ts new file mode 100644 index 0000000..34ebe83 --- /dev/null +++ b/lib/services/cube/index.d.ts @@ -0,0 +1,645 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **cube** service + */ +export default class CubeClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * CreateCubeDeployment - 创建Cube的Deployment + * + * See also: https://docs.ucloud.cn/api/cube-api/create_cube_deployment + */ + createCubeDeployment(request?: CreateCubeDeploymentRequest): Promise; + /** + * CreateCubePod - 创建Pod + * + * See also: https://docs.ucloud.cn/api/cube-api/create_cube_pod + */ + createCubePod(request?: CreateCubePodRequest): Promise; + /** + * DeleteCubeDeployment - 删除Cube的Deployment + * + * See also: https://docs.ucloud.cn/api/cube-api/delete_cube_deployment + */ + deleteCubeDeployment(request?: DeleteCubeDeploymentRequest): Promise; + /** + * DeleteCubePod - 删除Pod + * + * See also: https://docs.ucloud.cn/api/cube-api/delete_cube_pod + */ + deleteCubePod(request?: DeleteCubePodRequest): Promise; + /** + * GetCubeDeployment - 获取Deployment的详细信息 + * + * See also: https://docs.ucloud.cn/api/cube-api/get_cube_deployment + */ + getCubeDeployment(request?: GetCubeDeploymentRequest): Promise; + /** + * GetCubeExtendInfo - 获取Cube的额外信息 + * + * See also: https://docs.ucloud.cn/api/cube-api/get_cube_extend_info + */ + getCubeExtendInfo(request?: GetCubeExtendInfoRequest): Promise; + /** + * GetCubeMetrics - 获取Cube实例(Pod,PodX,Deploy等)监控数据时间序列 + * + * See also: https://docs.ucloud.cn/api/cube-api/get_cube_metrics + */ + getCubeMetrics(request?: GetCubeMetricsRequest): Promise; + /** + * GetCubePod - 获取Pod的详细信息 + * + * See also: https://docs.ucloud.cn/api/cube-api/get_cube_pod + */ + getCubePod(request?: GetCubePodRequest): Promise; + /** + * GetCubePrice - 获取cube的价格 + * + * See also: https://docs.ucloud.cn/api/cube-api/get_cube_price + */ + getCubePrice(request?: GetCubePriceRequest): Promise; + /** + * ListCubePod - 获取Pods列表 + * + * See also: https://docs.ucloud.cn/api/cube-api/list_cube_pod + */ + listCubePod(request?: ListCubePodRequest): Promise; + /** + * ModifyCubeExtendInfo - 修改Cube额外信息 + * + * See also: https://docs.ucloud.cn/api/cube-api/modify_cube_extend_info + */ + modifyCubeExtendInfo(request?: ModifyCubeExtendInfoRequest): Promise; + /** + * ModifyCubeTag - 修改业务组名字 + * + * See also: https://docs.ucloud.cn/api/cube-api/modify_cube_tag + */ + modifyCubeTag(request?: ModifyCubeTagRequest): Promise; + /** + * RenewCubePod - 更新Pod + * + * See also: https://docs.ucloud.cn/api/cube-api/renew_cube_pod + */ + renewCubePod(request?: RenewCubePodRequest): Promise; + /** + * UpdateCubeDeployment - 更新Deployment + * + * See also: https://docs.ucloud.cn/api/cube-api/update_cube_deployment + */ + updateCubeDeployment(request?: UpdateCubeDeploymentRequest): Promise; +} +/** + * CreateCubeDeployment - 创建Cube的Deployment + */ +export interface CreateCubeDeploymentRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * VPCId + */ + VPCId: string; + /** + * 子网Id + */ + SubnetId: string; + /** + * base64编码的Deployment的yaml。大小不超过16KB + */ + Deployment: string; + /** + * Deployment名称 + */ + Name?: string; + /** + * 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Postpay, \\ 后付费;默认为后付费 + */ + ChargeType?: string; + /** + * Cpu平台(V6:Intel、A2:AMD),默认V6。支持的地域(北京2B、北京2E、上海2A、广东、香港 、东京)目前北京2E仅有A2,其余地域仅有V6 + */ + CpuPlatform?: string; + /** + * base64编码的kubeconfig。大小不超过16KB + */ + KubeConfig?: string; + /** + * 购买时长。默认:值 1。 月付时,此参数传0,代表购买至月末。 + */ + Quantity?: number; + /** + * 业务组。默认:Default(Default即为未分组) + */ + Tag?: string; +} +/** + * CreateCubeDeployment - 创建Cube的Deployment + */ +export interface CreateCubeDeploymentResponse { + /** + * 控制器ID + */ + DeploymentId: string; + /** + * 经过base64编码的Deployment的yaml + */ + Deployment?: string; +} +/** + * CreateCubePod - 创建Pod + */ +export interface CreateCubePodRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * VPCId + */ + VPCId: string; + /** + * 子网Id + */ + SubnetId: string; + /** + * base64编码的Pod的yaml。大小不超过16KB + */ + Pod: string; + /** + * pod所在组 + */ + Group?: string; + /** + * pod的名字 + */ + Name?: string; + /** + * 业务组。默认:Default(Default即为未分组) + */ + Tag?: string; + /** + * Cpu平台(V6:Intel、A2:AMD、Auto),默认Auto。支持的地域(北京2B、北京2E、上海2A、广东、香港 、东京)目前北京2E仅有A2,其余地域仅有V6 + */ + CpuPlatform?: string; + /** + * 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Postpay, \\ 后付费;默认为后付费 + */ + ChargeType?: string; + /** + * 购买时长。默认:值 1。 月付时,此参数传0,代表购买至月末。 + */ + Quantity?: number; + /** + * base64编码的kubeconfig。大小不超过16KB + */ + KubeConfig?: string; + /** + * 代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 + */ + CouponId?: string; +} +/** + * CreateCubePod - 创建Pod + */ +export interface CreateCubePodResponse { + /** + * base64编码的yaml + */ + Pod: string; + /** + * cube的资源Id + */ + CubeId?: string; +} +/** + * DeleteCubeDeployment - 删除Cube的Deployment + */ +export interface DeleteCubeDeploymentRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 控制器Id + */ + DeploymentId: string; +} +/** + * DeleteCubeDeployment - 删除Cube的Deployment + */ +export interface DeleteCubeDeploymentResponse { +} +/** + * DeleteCubePod - 删除Pod + */ +export interface DeleteCubePodRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * cubeid和uid任意一个(必须) + */ + Uid?: string; + /** + * cubeid和uid任意一个(必须) + */ + CubeId?: string; + /** + * 删除cube时是否释放绑定的EIP。默认为false。 + */ + ReleaseEIP?: boolean; +} +/** + * DeleteCubePod - 删除Pod + */ +export interface DeleteCubePodResponse { +} +/** + * GetCubeDeployment - 获取Deployment的详细信息 + */ +export interface GetCubeDeploymentRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * Deployment的Id + */ + DeploymentId: string; +} +/** + * GetCubeDeployment - 获取Deployment的详细信息 + */ +export interface GetCubeDeploymentResponse { + /** + * 经过base64编码的Deployment的yaml + */ + Deployment: string; +} +/** + * GetCubeExtendInfo - 获取Cube的额外信息 + */ +export interface GetCubeExtendInfoRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * id列表以逗号(,)分割 + */ + CubeIds: string; +} +/** + * GetCubeExtendInfo - 获取Cube的额外信息 + */ +export interface GetCubeExtendInfoResponse { + /** + * CubeExtendInfo + */ + ExtendInfo: { + /** + * Cube的Id + */ + CubeId: string; + /** + * Cube的名称 + */ + Name?: string; + /** + * EIPSet + */ + Eip?: { + /** + * EIP带宽值 + */ + Bandwidth?: number; + /** + * 带宽类型0标准普通带宽,1表示共享带宽 + */ + BandwidthType?: number; + /** + * EIP创建时间 + */ + CreateTime?: number; + /** + * EIP地址 + */ + EIPAddr?: { + /** + * IP地址 + */ + IP?: string; + /** + * 线路名称BGP或者internalation + */ + OperatorName?: string; + }[]; + /** + * EIPId + */ + EIPId?: string; + /** + * 付费模式,带宽付费或者流量付费 + */ + PayMode?: string; + /** + * EIP绑定对象的资源Id + */ + Resource?: string; + /** + * EIP状态,表示使用中或者空闲 + */ + Status?: string; + /** + * EIP权重 + */ + Weight?: number; + }[]; + /** + * 资源有效期 + */ + Expiration?: number; + /** + * 业务组名称 + */ + Tag?: string; + }[]; +} +/** + * GetCubeMetrics - 获取Cube实例(Pod,PodX,Deploy等)监控数据时间序列 + */ +export interface GetCubeMetricsRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * Cube实例资源ID + */ + ResourceId: string; + /** + * 监控指标名称 + */ + MetricName: string[]; + /** + * 开始时间 + */ + BeginTime: number; + /** + * 结束时间,必须大于开始时间 + */ + EndTime: number; + /** + * Pod内容器名称 + */ + ContainerName: string; +} +/** + * GetCubeMetrics - 获取Cube实例(Pod,PodX,Deploy等)监控数据时间序列 + */ +export interface GetCubeMetricsResponse { + /** + * 时间序列集合 + */ + DataSets?: { + /** + * + */ + MetricName?: string; + /** + * + */ + Values?: { + /** + * + */ + Value: number; + /** + * + */ + Timestamp?: number; + }[]; + }[]; +} +/** + * GetCubePod - 获取Pod的详细信息 + */ +export interface GetCubePodRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * CubeId和Uid任意一个 + */ + CubeId?: string; + /** + * CubeId和Uid任意一个 + */ + Uid?: string; +} +/** + * GetCubePod - 获取Pod的详细信息 + */ +export interface GetCubePodResponse { + /** + * base64编码的pod的yaml + */ + Pod: string; +} +/** + * GetCubePrice - 获取cube的价格 + */ +export interface GetCubePriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 购买数量 + */ + Count: string; + /** + * CPU 配置,单位为毫核,例如如 1 核则须输入 1000 + */ + Cpu: string; + /** + * 内存配置,单位为 Mi,例如 1Gi 须输入 1024 + */ + Mem: string; + /** + * 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按秒后付费,默认为月付 + */ + ChargeType: string; + /** + * 购买时长。默认:值 1。按小时购买(Dynamic/Postpay)时无需此参数。 月付时,此参数传0,代表购买至月末。 + */ + Quantity: number; +} +/** + * GetCubePrice - 获取cube的价格 + */ +export interface GetCubePriceResponse { + /** + * 折扣后价格,单位为分 + */ + Price: number; + /** + * 列表价格,单位为分 + */ + OriginalPrice: number; +} +/** + * ListCubePod - 获取Pods列表 + */ +export interface ListCubePodRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * VPC的Id + */ + VPCId?: string; + /** + * 子网Id + */ + SubnetId?: string; + /** + * 组名称 + */ + Group?: string; + /** + * 默认0 + */ + Offset?: number; + /** + * 默认20 + */ + Limit?: number; +} +/** + * ListCubePod - 获取Pods列表 + */ +export interface ListCubePodResponse { + /** + * Pod列表,每条数据都做了base64编码 + */ + Pods: string[]; + /** + * Cube的总数 + */ + TotalCount?: number; +} +/** + * ModifyCubeExtendInfo - 修改Cube额外信息 + */ +export interface ModifyCubeExtendInfoRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * cube的id + */ + CubeId: string; + /** + * 修改的名字,规则(^[a-zA-Z0-9-_.\u4e00-\u9fa5]{1,32}) + */ + Name?: string; +} +/** + * ModifyCubeExtendInfo - 修改Cube额外信息 + */ +export interface ModifyCubeExtendInfoResponse { +} +/** + * ModifyCubeTag - 修改业务组名字 + */ +export interface ModifyCubeTagRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * CubeId + */ + CubeId: string; + /** + * 业务组名称 + */ + Tag: string; +} +/** + * ModifyCubeTag - 修改业务组名字 + */ +export interface ModifyCubeTagResponse { + /** + * CubeId + */ + CubeId: string; +} +/** + * RenewCubePod - 更新Pod + */ +export interface RenewCubePodRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 容器Id + */ + CubeId: string; + /** + * base64编码的Pod的yaml + */ + Pod: string; +} +/** + * RenewCubePod - 更新Pod + */ +export interface RenewCubePodResponse { + /** + * base64编码过的yaml,需要解码获取信息 + */ + Pod: string; +} +/** + * UpdateCubeDeployment - 更新Deployment + */ +export interface UpdateCubeDeploymentRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * Deployment的Id + */ + DeploymentId: string; + /** + * base64编码的Deployment的yaml。大小不超过16KB + */ + Deployment: string; + /** + * Deployment的name + */ + Name?: string; +} +/** + * UpdateCubeDeployment - 更新Deployment + */ +export interface UpdateCubeDeploymentResponse { + /** + * 经过base64编码的Deployment的yaml + */ + Deployment?: string; +} diff --git a/lib/services/cube/index.js b/lib/services/cube/index.js new file mode 100644 index 0000000..7d12dd3 --- /dev/null +++ b/lib/services/cube/index.js @@ -0,0 +1,142 @@ +"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 **cube** service + */ +class CubeClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * CreateCubeDeployment - 创建Cube的Deployment + * + * See also: https://docs.ucloud.cn/api/cube-api/create_cube_deployment + */ + createCubeDeployment(request) { + const args = Object.assign({ Action: 'CreateCubeDeployment' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateCubePod - 创建Pod + * + * See also: https://docs.ucloud.cn/api/cube-api/create_cube_pod + */ + createCubePod(request) { + const args = Object.assign({ Action: 'CreateCubePod' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteCubeDeployment - 删除Cube的Deployment + * + * See also: https://docs.ucloud.cn/api/cube-api/delete_cube_deployment + */ + deleteCubeDeployment(request) { + const args = Object.assign({ Action: 'DeleteCubeDeployment' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteCubePod - 删除Pod + * + * See also: https://docs.ucloud.cn/api/cube-api/delete_cube_pod + */ + deleteCubePod(request) { + const args = Object.assign({ Action: 'DeleteCubePod' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetCubeDeployment - 获取Deployment的详细信息 + * + * See also: https://docs.ucloud.cn/api/cube-api/get_cube_deployment + */ + getCubeDeployment(request) { + const args = Object.assign({ Action: 'GetCubeDeployment' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetCubeExtendInfo - 获取Cube的额外信息 + * + * See also: https://docs.ucloud.cn/api/cube-api/get_cube_extend_info + */ + getCubeExtendInfo(request) { + const args = Object.assign({ Action: 'GetCubeExtendInfo' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetCubeMetrics - 获取Cube实例(Pod,PodX,Deploy等)监控数据时间序列 + * + * See also: https://docs.ucloud.cn/api/cube-api/get_cube_metrics + */ + getCubeMetrics(request) { + const args = Object.assign({ Action: 'GetCubeMetrics' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetCubePod - 获取Pod的详细信息 + * + * See also: https://docs.ucloud.cn/api/cube-api/get_cube_pod + */ + getCubePod(request) { + const args = Object.assign({ Action: 'GetCubePod' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetCubePrice - 获取cube的价格 + * + * See also: https://docs.ucloud.cn/api/cube-api/get_cube_price + */ + getCubePrice(request) { + const args = Object.assign({ Action: 'GetCubePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ListCubePod - 获取Pods列表 + * + * See also: https://docs.ucloud.cn/api/cube-api/list_cube_pod + */ + listCubePod(request) { + const args = Object.assign({ Action: 'ListCubePod' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyCubeExtendInfo - 修改Cube额外信息 + * + * See also: https://docs.ucloud.cn/api/cube-api/modify_cube_extend_info + */ + modifyCubeExtendInfo(request) { + const args = Object.assign({ Action: 'ModifyCubeExtendInfo' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyCubeTag - 修改业务组名字 + * + * See also: https://docs.ucloud.cn/api/cube-api/modify_cube_tag + */ + modifyCubeTag(request) { + const args = Object.assign({ Action: 'ModifyCubeTag' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * RenewCubePod - 更新Pod + * + * See also: https://docs.ucloud.cn/api/cube-api/renew_cube_pod + */ + renewCubePod(request) { + const args = Object.assign({ Action: 'RenewCubePod' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateCubeDeployment - 更新Deployment + * + * See also: https://docs.ucloud.cn/api/cube-api/update_cube_deployment + */ + updateCubeDeployment(request) { + const args = Object.assign({ Action: 'UpdateCubeDeployment' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = CubeClient; diff --git a/lib/services/index.d.ts b/lib/services/index.d.ts new file mode 100644 index 0000000..6bc92d1 --- /dev/null +++ b/lib/services/index.d.ts @@ -0,0 +1,31 @@ +import { ConfigOptions } from '../core/config'; +import { CredentialOptions } from '../core/credential'; +declare const BaseClient: any; +export declare class Client extends BaseClient { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + cube(): any; + ipsecvpn(): any; + pathx(): any; + uaccount(): any; + ubill(): any; + ucdn(): any; + udb(): any; + uddb(): any; + udisk(): any; + udpn(): any; + uec(): any; + ufile(): any; + ufs(): any; + uhost(): any; + uk8s(): any; + ulb(): any; + umem(): any; + unet(): any; + uphost(): any; + usms(): any; + vpc(): any; +} +export {}; diff --git a/lib/services/index.js b/lib/services/index.js new file mode 100644 index 0000000..7753eb3 --- /dev/null +++ b/lib/services/index.js @@ -0,0 +1,118 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Client = void 0; +const BaseClient = require('../core/client').default; +const CubeClient = require('./cube').default; +const IPSecVPNClient = require('./ipsecvpn').default; +const PathXClient = require('./pathx').default; +const UAccountClient = require('./uaccount').default; +const UBillClient = require('./ubill').default; +const UCDNClient = require('./ucdn').default; +const UDBClient = require('./udb').default; +const UDDBClient = require('./uddb').default; +const UDiskClient = require('./udisk').default; +const UDPNClient = require('./udpn').default; +const UECClient = require('./uec').default; +const UFileClient = require('./ufile').default; +const UFSClient = require('./ufs').default; +const UHostClient = require('./uhost').default; +const UK8SClient = require('./uk8s').default; +const ULBClient = require('./ulb').default; +const UMemClient = require('./umem').default; +const UNetClient = require('./unet').default; +const UPHostClient = require('./uphost').default; +const USMSClient = require('./usms').default; +const VPCClient = require('./vpc').default; +class Client extends BaseClient { + constructor({ config, credential, }) { + super({ config, credential }); + } + cube() { + return new CubeClient({ config: this.config, credential: this.credential }); + } + ipsecvpn() { + return new IPSecVPNClient({ + config: this.config, + credential: this.credential, + }); + } + pathx() { + return new PathXClient({ + config: this.config, + credential: this.credential, + }); + } + uaccount() { + return new UAccountClient({ + config: this.config, + credential: this.credential, + }); + } + ubill() { + return new UBillClient({ + config: this.config, + credential: this.credential, + }); + } + ucdn() { + return new UCDNClient({ config: this.config, credential: this.credential }); + } + udb() { + return new UDBClient({ config: this.config, credential: this.credential }); + } + uddb() { + return new UDDBClient({ config: this.config, credential: this.credential }); + } + udisk() { + return new UDiskClient({ + config: this.config, + credential: this.credential, + }); + } + udpn() { + return new UDPNClient({ config: this.config, credential: this.credential }); + } + uec() { + return new UECClient({ config: this.config, credential: this.credential }); + } + ufile() { + return new UFileClient({ + config: this.config, + credential: this.credential, + }); + } + ufs() { + return new UFSClient({ config: this.config, credential: this.credential }); + } + uhost() { + return new UHostClient({ + config: this.config, + credential: this.credential, + }); + } + uk8s() { + return new UK8SClient({ config: this.config, credential: this.credential }); + } + ulb() { + return new ULBClient({ config: this.config, credential: this.credential }); + } + umem() { + return new UMemClient({ config: this.config, credential: this.credential }); + } + unet() { + return new UNetClient({ config: this.config, credential: this.credential }); + } + uphost() { + return new UPHostClient({ + config: this.config, + credential: this.credential, + }); + } + usms() { + return new USMSClient({ config: this.config, credential: this.credential }); + } + vpc() { + return new VPCClient({ config: this.config, credential: this.credential }); + } +} +exports.Client = Client; diff --git a/lib/services/ipsecvpn/index.d.ts b/lib/services/ipsecvpn/index.d.ts new file mode 100644 index 0000000..567837f --- /dev/null +++ b/lib/services/ipsecvpn/index.d.ts @@ -0,0 +1,802 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **ipsecvpn** service + */ +export default class IPSecVPNClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * CreateRemoteVPNGateway - 创建客户VPN网关 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/create_remote_vpn_gateway + */ + createRemoteVPNGateway(request?: CreateRemoteVPNGatewayRequest): Promise; + /** + * CreateVPNGateway - 创建VPN网关 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/create_vpn_gateway + */ + createVPNGateway(request?: CreateVPNGatewayRequest): Promise; + /** + * CreateVPNTunnel - 创建VPN隧道 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/create_vpn_tunnel + */ + createVPNTunnel(request?: CreateVPNTunnelRequest): Promise; + /** + * DeleteRemoteVPNGateway - 删除客户VPN网关 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/delete_remote_vpn_gateway + */ + deleteRemoteVPNGateway(request?: DeleteRemoteVPNGatewayRequest): Promise; + /** + * DeleteVPNGateway - 删除VPN网关 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/delete_vpn_gateway + */ + deleteVPNGateway(request?: DeleteVPNGatewayRequest): Promise; + /** + * DeleteVPNTunnel - 删除VPN隧道 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/delete_vpn_tunnel + */ + deleteVPNTunnel(request?: DeleteVPNTunnelRequest): Promise; + /** + * DescribeRemoteVPNGateway - 获取客户VPN网关信息 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/describe_remote_vpn_gateway + */ + describeRemoteVPNGateway(request?: DescribeRemoteVPNGatewayRequest): Promise; + /** + * DescribeVPNGateway - 获取VPN网关信息 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/describe_vpn_gateway + */ + describeVPNGateway(request?: DescribeVPNGatewayRequest): Promise; + /** + * DescribeVPNTunnel - 获取VPN隧道信息 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/describe_vpn_tunnel + */ + describeVPNTunnel(request?: DescribeVPNTunnelRequest): Promise; + /** + * GetVPNGatewayPrice - 获取VPN价格 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/get_vpn_gateway_price + */ + getVPNGatewayPrice(request?: GetVPNGatewayPriceRequest): Promise; + /** + * GetVPNGatewayUpgradePrice - 获取VPN网关规格改动价格 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/get_vpn_gateway_upgrade_price + */ + getVPNGatewayUpgradePrice(request?: GetVPNGatewayUpgradePriceRequest): Promise; + /** + * UpdateVPNGateway - 更改VPN网关规格 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/update_vpn_gateway + */ + updateVPNGateway(request?: UpdateVPNGatewayRequest): Promise; + /** + * UpdateVPNTunnelAttribute - 更新VPN隧道属性 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/update_vpn_tunnel_attribute + */ + updateVPNTunnelAttribute(request?: UpdateVPNTunnelAttributeRequest): Promise; +} +/** + * CreateRemoteVPNGateway - 创建客户VPN网关 + */ +export interface CreateRemoteVPNGatewayRequest { + /** + * 客户VPN网关名称 + */ + RemoteVPNGatewayName: string; + /** + * 客户VPN网关地址 + */ + RemoteVPNGatewayAddr: string; + /** + * 业务组名称,默认为 "Default" + */ + Tag?: string; + /** + * 备注,默认为空 + */ + Remark?: string; +} +/** + * CreateRemoteVPNGateway - 创建客户VPN网关 + */ +export interface CreateRemoteVPNGatewayResponse { + /** + * 新建客户VPN网关的资源ID + */ + RemoteVPNGatewayId?: string; +} +/** + * CreateVPNGateway - 创建VPN网关 + */ +export interface CreateVPNGatewayRequest { + /** + * 新建VPN网关名称 + */ + VPNGatewayName: string; + /** + * 新建VPN网关所属VPC的资源ID + */ + VPCId: string; + /** + * 购买的VPN网关规格,枚举值为: Standard, 标准型; Enhanced, 增强型 + */ + Grade: string; + /** + * 备注,默认为空 + */ + Remark?: string; + /** + * 业务组名称,默认为 "Default" + */ + Tag?: string; + /** + * 购买时长, 默认: 1 + */ + Quantity?: number; + /** + * 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费;Dynamic, 按需付费(需开启权限);Trial, 试用(需开启权限);默认为按月付费 + */ + ChargeType?: string; + /** + * 业务组ID + */ + BusinessId?: string; + /** + * 若要绑定EIP,在此填上EIP的资源ID + */ + EIPId?: string; + /** + * 代金券ID, 默认不使用 + */ + CouponId?: string; +} +/** + * CreateVPNGateway - 创建VPN网关 + */ +export interface CreateVPNGatewayResponse { + /** + * 新建VPN网关的资源ID + */ + VPNGatewayId?: string; +} +/** + * CreateVPNTunnel - 创建VPN隧道 + */ +export interface CreateVPNTunnelRequest { + /** + * VPN隧道名称 + */ + VPNTunnelName: string; + /** + * VPN网关的资源ID + */ + VPNGatewayId: string; + /** + * 客户VPN网关的资源ID + */ + RemoteVPNGatewayId: string; + /** + * 预共享密钥 + */ + IKEPreSharedKey: string; + /** + * vpcId + */ + VPCId: string; + /** + * 指定VPN连接的本地子网的资源ID,最多可填写10个。 + */ + IPSecLocalSubnetIds: string[]; + /** + * 指定VPN连接的客户网段,最多可填写20个。 + */ + IPSecRemoteSubnets: string[]; + /** + * ike版本,枚举值: "IKE V1","IKE V2",默认v1 + */ + IKEVersion: string; + /** + * 业务组,默认为“Default” + */ + Tag?: string; + /** + * 备注,默认为空 + */ + Remark?: string; + /** + * IKE协商过程中使用的加密算法,枚举值,"aes128", "aes192", "aes256", "aes512", "3des"。默认值为“aes128” + */ + IKEEncryptionAlgorithm?: string; + /** + * IKE协商过程中使用的认证算法,"md5", "sha1", "sha2-256"。默认值为“sha1” + */ + IKEAuthenticationAlgorithm?: string; + /** + * IKE协商过程中使用的模式,枚举值,主模式,“main”;野蛮模式,“aggressive”。IKEV1默认为主模式“main”,IKEV2时不使用该参数。 + */ + IKEExchangeMode?: string; + /** + * 本端标识。枚举值,自动识别,“auto”;IP地址或域名。默认为自动识别“auto”。IKEV2必填该参数 + */ + IKELocalId?: string; + /** + * 客户端标识。枚举值,自动识别,“auto”;IP地址或域名。默认为“自动识别“auto”。IKEV2必填该参数 + */ + IKERemoteId?: string; + /** + * IKE协商过程中使用的DH组,枚举值,"1", "2", "5", "14", "15", "16"。默认为“15” + */ + IKEDhGroup?: string; + /** + * IKE中SA的生存时间,可填写范围为600-604800。默认为86400。 + */ + IKESALifetime?: string; + /** + * 使用的安全协议,枚举值,“esp”,“ah”。默认为“esp” + */ + IPSecProtocol?: string; + /** + * IPSec隧道中使用的加密算法,枚举值,"aes128", "aes192", "aes256", "aes512", "3des"。默认值为“aes128” + */ + IPSecEncryptionAlgorithm?: string; + /** + * IPSec隧道中使用的认证算法,枚举值,"md5", "sha1"。默认值为“sha1” + */ + IPSecAuthenticationAlgorithm?: string; + /** + * IPSec中SA的生存时间,可填写范围为1200 - 604800。默认为3600 + */ + IPSecSALifetime?: string; + /** + * IPSec中SA的生存时间(以字节计)。可选为8000 – 20000000。默认使用SA生存时间, + */ + IPSecSALifetimeBytes?: string; + /** + * IPSec的PFS是否开启,枚举值,,不开启,"disable";数字表示DH组, "1", "2", "5", "14", "15", "16"。默认为“disable”。 + */ + IPSecPFSDhGroup?: string; +} +/** + * CreateVPNTunnel - 创建VPN隧道 + */ +export interface CreateVPNTunnelResponse { + /** + * VPN隧道的资源ID + */ + VPNTunnelId?: string; +} +/** + * DeleteRemoteVPNGateway - 删除客户VPN网关 + */ +export interface DeleteRemoteVPNGatewayRequest { + /** + * 客户VPN网关的资源ID + */ + RemoteVPNGatewayId: string; +} +/** + * DeleteRemoteVPNGateway - 删除客户VPN网关 + */ +export interface DeleteRemoteVPNGatewayResponse { +} +/** + * DeleteVPNGateway - 删除VPN网关 + */ +export interface DeleteVPNGatewayRequest { + /** + * VPN网关的资源ID + */ + VPNGatewayId: string; + /** + * 删除VPN时是否一并释放EIP。false,只解绑EIP不删除EIP;true,解绑并释放EIP。默认是false + */ + ReleaseEip?: boolean; +} +/** + * DeleteVPNGateway - 删除VPN网关 + */ +export interface DeleteVPNGatewayResponse { +} +/** + * DeleteVPNTunnel - 删除VPN隧道 + */ +export interface DeleteVPNTunnelRequest { + /** + * VPN隧道的资源ID + */ + VPNTunnelId: string; +} +/** + * DeleteVPNTunnel - 删除VPN隧道 + */ +export interface DeleteVPNTunnelResponse { +} +/** + * DescribeRemoteVPNGateway - 获取客户VPN网关信息 + */ +export interface DescribeRemoteVPNGatewayRequest { + /** + * 客户VPN网关的资源ID,例如RemoteVPNGatewayIds.0代表希望获取客户VPN网关1的信息,RemoteVPNGatewayIds.1代表客户VPN网关2,如果为空,则返回当前Region中所有客户VPN网关实例的信息 + */ + RemoteVPNGatewayIds?: string[]; + /** + * 业务组名称,若指定则返回业务组下所有客户VPN网关信息 + */ + Tag?: string; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 数据分页值, 默认为20 + */ + Limit?: number; +} +/** + * DescribeRemoteVPNGateway - 获取客户VPN网关信息 + */ +export interface DescribeRemoteVPNGatewayResponse { + /** + * 符合条件的客户VPN网关总数 + */ + TotalCount?: number; + /** + * 客户VPN网关列表, 每项参数详见 RemoteVPNGatewayDataSet + */ + DataSet?: { + /** + * 客户网关ID + */ + RemoteVPNGatewayId?: string; + /** + * 客户网关名称 + */ + RemoteVPNGatewayName?: string; + /** + * 客户网关IP地址 + */ + RemoteVPNGatewayAddr?: string; + /** + * 用户组 + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 活跃的隧道数量 + */ + TunnelCount?: number; + }[]; +} +/** + * DescribeVPNGateway - 获取VPN网关信息 + */ +export interface DescribeVPNGatewayRequest { + /** + * VPN网关的资源ID,例如VPNGatewayIds.0代表希望获取VPN网关1的信息,VPNGatewayIds.1代表VPN网关2,如果为空,则返回当前Region中所有VPN网关的信息 + */ + VPNGatewayIds?: string[]; + /** + * VPC的资源ID,返回指定的VPC下的所有VPN网关的信息。默认返回当前Region中所有VPN网关实例的信息 + */ + VPCId?: string; + /** + * 数据偏移量。默认为0 + */ + Offset?: number; + /** + * 业务组名称,若指定则返回指定的业务组下的所有VPN网关的信息。 + */ + Tag?: string; + /** + * 数据分页值。默认为20 + */ + Limit?: number; +} +/** + * DescribeVPNGateway - 获取VPN网关信息 + */ +export interface DescribeVPNGatewayResponse { + /** + * 满足条件的VPN网关总数 + */ + TotalCount?: number; + /** + * 获取的VPN网关信息列表,每项参数详见 VPNGatewayDataSet + */ + DataSet?: { + /** + * 网关Id + */ + VPNGatewayId?: string; + /** + * 网关名字 + */ + VPNGatewayName?: string; + /** + * 网关业务组 + */ + Tag?: string; + /** + * 网关备注 + */ + Remark?: string; + /** + * 所属VPCId + */ + VPCId?: string; + /** + * 所属VPC名字 + */ + VPCName?: string; + /** + * 付费类型 + */ + ChargeType?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 到期时间 + */ + ExpireTime?: number; + /** + * 是否自动续费 + */ + AutoRenew?: string; + /** + * 网关类型 + */ + Grade?: string; + /** + * 绑定EIP的IP地址 + */ + EIP?: string; + /** + * EIP类型 + */ + EIPType?: string; + /** + * EIPID + */ + EIPId?: string; + }[]; +} +/** + * DescribeVPNTunnel - 获取VPN隧道信息 + */ +export interface DescribeVPNTunnelRequest { + /** + * VPN隧道的资源ID,例如VPNTunnelIds.0代表希望获取信息的VPN隧道1,VPNTunneIds.1代表VPN隧道2,如果为空,则返回当前Region中所有的VPN隧道实例 + */ + VPNTunnelIds?: string[]; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 数据分页值, 默认为20 + */ + Limit?: number; + /** + * 业务组名称,若指定则返回指定的业务组下的所有VPN网关的信息 + */ + Tag?: string; +} +/** + * DescribeVPNTunnel - 获取VPN隧道信息 + */ +export interface DescribeVPNTunnelResponse { + /** + * VPN隧道总数 + */ + TotalCount?: number; + /** + * 获取的VPN隧道信息列表,每项参数详见 VPNTunnelDataSet + */ + DataSet?: { + /** + * 隧道id + */ + VPNTunnelId?: string; + /** + * 隧道名称 + */ + VPNTunnelName?: string; + /** + * 用户组 + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 所属VPN网关id + */ + VPNGatewayId?: string; + /** + * 对端网关Id + */ + RemoteVPNGatewayId?: string; + /** + * VPN网关名字 + */ + VPNGatewayName?: string; + /** + * 对端网关名字 + */ + RemoteVPNGatewayName?: string; + /** + * 所属VPCId + */ + VPCId?: string; + /** + * 所属VOC名字 + */ + VPCName?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * IKE参数 + */ + IKEData?: { + /** + * IKE认证算法 + */ + IKEAuthenticationAlgorithm?: string; + /** + * IKEDH组 + */ + IKEDhGroup?: string; + /** + * IKE加密算法 + */ + IKEEncryptionAlgorithm?: string; + /** + * IKEv1协商模式 + */ + IKEExchangeMode?: string; + /** + * IKE本地ID标识 + */ + IKELocalId?: string; + /** + * IKE预共享秘钥 + */ + IKEPreSharedKey?: string; + /** + * IKE对端ID标识 + */ + IKERemoteId?: string; + /** + * IKE秘钥生存时间 + */ + IKESALifetime?: string; + /** + * IKE版本 + */ + IKEVersion?: string; + }; + /** + * IPSec参数 + */ + IPSecData?: { + /** + * IPSec通道中使用的认证算法 + */ + IPSecAuthenticationAlgorithm?: string; + /** + * IPSec通道中使用的加密算法 + */ + IPSecEncryptionAlgorithm?: string; + /** + * 指定VPN连接的本地子网,用逗号分隔 + */ + IPSecLocalSubnetIds?: string[]; + /** + * 使用的安全协议,ESP或AH + */ + IPSecProtocol?: string; + /** + * 指定VPN连接的客户网段,用逗号分隔 + */ + IPSecRemoteSubnets?: string[]; + /** + * IPSec中SA的生存时间 + */ + IPSecSALifetime?: string; + /** + * IPSec中SA的生存时间(以字节计) + */ + IPSecSALifetimeBytes?: string; + /** + * 是否开启PFS功能,Disable表示关闭,数字表示DH组 + */ + IPSecPFSDhGroup?: string; + }; + }[]; +} +/** + * GetVPNGatewayPrice - 获取VPN价格 + */ +export interface GetVPNGatewayPriceRequest { + /** + * VPN网关规格。枚举值,包括:标准型:Standard,增强型:Enhanced。 + */ + Grade: string; + /** + * 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按需付费(需开启权限); 默认为获取三种价格 + */ + ChargeType?: string; + /** + * 购买时长, 默认: 1 + */ + Quantity?: number; +} +/** + * GetVPNGatewayPrice - 获取VPN价格 + */ +export interface GetVPNGatewayPriceResponse { + /** + * 获取的VPN网关价格信息列表,每项参数详见 VPNGatewayPriceSet + */ + PriceSet?: { + /** + * VPN网关付费方式 + */ + ChargeType?: string; + /** + * VPN网关价格, 单位"元" + */ + Price?: number; + /** + * 资源有效期, 以Unix Timestamp表示 + */ + PurchaseValue?: number; + }[]; +} +/** + * GetVPNGatewayUpgradePrice - 获取VPN网关规格改动价格 + */ +export interface GetVPNGatewayUpgradePriceRequest { + /** + * VPN网关的资源ID + */ + VPNGatewayId: string; + /** + * 更改的VPN网关规格,枚举值为: Standard, 标准型; Enhanced, 增强型。 + */ + Grade: string; +} +/** + * GetVPNGatewayUpgradePrice - 获取VPN网关规格改动价格 + */ +export interface GetVPNGatewayUpgradePriceResponse { + /** + * 调整规格后的VPN网关价格, 单位为"元", 如需退费此处为负值 + */ + Price?: number; +} +/** + * UpdateVPNGateway - 更改VPN网关规格 + */ +export interface UpdateVPNGatewayRequest { + /** + * VPN网关的资源ID + */ + VPNGatewayId: string; + /** + * 网关规格。枚举值为: Standard, 标准型; Enhanced, 增强型。 + */ + Grade: string; +} +/** + * UpdateVPNGateway - 更改VPN网关规格 + */ +export interface UpdateVPNGatewayResponse { +} +/** + * UpdateVPNTunnelAttribute - 更新VPN隧道属性 + */ +export interface UpdateVPNTunnelAttributeRequest { + /** + * VPN隧道的资源ID + */ + VPNTunnelId: string; + /** + * 预共享密钥 + */ + IKEPreSharedKey?: string; + /** + * IKE协商过程中使用的加密算法 + */ + IKEEncryptionAlgorithm?: string; + /** + * IKE协商过程中使用的认证算法 + */ + IKEAuthenticationAlgorithm?: string; + /** + * IKE协商过程中使用的模式,可选“主动模式”与“野蛮模式”。IKEV2不使用该参数。 + */ + IKEExchangeMode?: string; + /** + * 本端标识。不填时默认使用之前的参数,结合IKEversion进行校验,IKEV2时不能为auto。 + */ + IKELocalId?: string; + /** + * 客户端标识。不填时默认使用之前的参数,结合IKEversion进行校验,IKEV2时不能为auto。 + */ + IKERemoteId?: string; + /** + * IKE协商过程中使用的DH组 + */ + IKEDhGroup?: string; + /** + * IKE中SA的生存时间 + */ + IKESALifetime?: string; + /** + * 使用的安全协议,ESP或AH + */ + IPSecProtocol?: string; + /** + * 指定VPN连接的本地子网的id,用逗号分隔 + */ + IPSecLocalSubnetIds?: string[]; + /** + * 指定VPN连接的客户网段,用逗号分隔 + */ + IPSecRemoteSubnets?: string[]; + /** + * IPSec隧道中使用的加密算法 + */ + IPSecEncryptionAlgorithm?: string; + /** + * IPSec隧道中使用的认证算法 + */ + IPSecAuthenticationAlgorithm?: string; + /** + * IPSec中SA的生存时间 + */ + IPSecSALifetime?: string; + /** + * IPSec中SA的生存时间(以字节计) + */ + IPSecSALifetimeBytes?: string; + /** + * IPSec中的PFS是否开启 + */ + IPSecPFSDhGroup?: string; + /** + * 枚举值:"IKE V1","IKE V2" + */ + IKEVersion?: string; +} +/** + * UpdateVPNTunnelAttribute - 更新VPN隧道属性 + */ +export interface UpdateVPNTunnelAttributeResponse { +} diff --git a/lib/services/ipsecvpn/index.js b/lib/services/ipsecvpn/index.js new file mode 100644 index 0000000..e66af98 --- /dev/null +++ b/lib/services/ipsecvpn/index.js @@ -0,0 +1,133 @@ +"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 **ipsecvpn** service + */ +class IPSecVPNClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * CreateRemoteVPNGateway - 创建客户VPN网关 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/create_remote_vpn_gateway + */ + createRemoteVPNGateway(request) { + const args = Object.assign({ Action: 'CreateRemoteVPNGateway' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateVPNGateway - 创建VPN网关 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/create_vpn_gateway + */ + createVPNGateway(request) { + const args = Object.assign({ Action: 'CreateVPNGateway' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateVPNTunnel - 创建VPN隧道 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/create_vpn_tunnel + */ + createVPNTunnel(request) { + const args = Object.assign({ Action: 'CreateVPNTunnel' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteRemoteVPNGateway - 删除客户VPN网关 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/delete_remote_vpn_gateway + */ + deleteRemoteVPNGateway(request) { + const args = Object.assign({ Action: 'DeleteRemoteVPNGateway' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteVPNGateway - 删除VPN网关 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/delete_vpn_gateway + */ + deleteVPNGateway(request) { + const args = Object.assign({ Action: 'DeleteVPNGateway' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteVPNTunnel - 删除VPN隧道 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/delete_vpn_tunnel + */ + deleteVPNTunnel(request) { + const args = Object.assign({ Action: 'DeleteVPNTunnel' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeRemoteVPNGateway - 获取客户VPN网关信息 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/describe_remote_vpn_gateway + */ + describeRemoteVPNGateway(request) { + const args = Object.assign({ Action: 'DescribeRemoteVPNGateway' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeVPNGateway - 获取VPN网关信息 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/describe_vpn_gateway + */ + describeVPNGateway(request) { + const args = Object.assign({ Action: 'DescribeVPNGateway' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeVPNTunnel - 获取VPN隧道信息 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/describe_vpn_tunnel + */ + describeVPNTunnel(request) { + const args = Object.assign({ Action: 'DescribeVPNTunnel' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetVPNGatewayPrice - 获取VPN价格 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/get_vpn_gateway_price + */ + getVPNGatewayPrice(request) { + const args = Object.assign({ Action: 'GetVPNGatewayPrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetVPNGatewayUpgradePrice - 获取VPN网关规格改动价格 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/get_vpn_gateway_upgrade_price + */ + getVPNGatewayUpgradePrice(request) { + const args = Object.assign({ Action: 'GetVPNGatewayUpgradePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateVPNGateway - 更改VPN网关规格 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/update_vpn_gateway + */ + updateVPNGateway(request) { + const args = Object.assign({ Action: 'UpdateVPNGateway' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateVPNTunnelAttribute - 更新VPN隧道属性 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/update_vpn_tunnel_attribute + */ + updateVPNTunnelAttribute(request) { + const args = Object.assign({ Action: 'UpdateVPNTunnelAttribute' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = IPSecVPNClient; diff --git a/lib/services/pathx/index.d.ts b/lib/services/pathx/index.d.ts new file mode 100644 index 0000000..4fa85cf --- /dev/null +++ b/lib/services/pathx/index.d.ts @@ -0,0 +1,1360 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **pathx** service + */ +export default class PathXClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * BindPathXSSL - 绑定PathX SSL证书 + * + * See also: https://docs.ucloud.cn/api/pathx-api/bind_path_xssl + */ + bindPathXSSL(request?: BindPathXSSLRequest): Promise; + /** + * CreateGlobalSSHInstance - 创建GlobalSSH实例 + * + * See also: https://docs.ucloud.cn/api/pathx-api/create_global_ssh_instance + */ + createGlobalSSHInstance(request?: CreateGlobalSSHInstanceRequest): Promise; + /** + * CreatePathXSSL - 创建SSL证书,可以把整个 Pem 证书内容传到SSLContent,或者把证书、私钥、CA证书分别传过来 + * + * See also: https://docs.ucloud.cn/api/pathx-api/create_path_xssl + */ + createPathXSSL(request?: CreatePathXSSLRequest): Promise; + /** + * CreateUGAForwarder - 创建加速实例转发器,支持HTTPS接入HTTPS回源、HTTPS接入HTTP回源、HTTP接入HTTP回源、TCP接入TCP回源、UDP接入UDP回源、 支持WSS接入WSS回源、WSS接入WS回源、WS接入WS回源 + * + * See also: https://docs.ucloud.cn/api/pathx-api/create_uga_forwarder + */ + createUGAForwarder(request?: CreateUGAForwarderRequest): Promise; + /** + * CreateUGAInstance - 创建全球加速配置项 + * + * See also: https://docs.ucloud.cn/api/pathx-api/create_uga_instance + */ + createUGAInstance(request?: CreateUGAInstanceRequest): Promise; + /** + * CreateUPath - 创建UPath + * + * See also: https://docs.ucloud.cn/api/pathx-api/create_upath + */ + createUPath(request?: CreateUPathRequest): Promise; + /** + * DeleteGlobalSSHInstance - 删除GlobalSSH实例 + * + * See also: https://docs.ucloud.cn/api/pathx-api/delete_global_ssh_instance + */ + deleteGlobalSSHInstance(request?: DeleteGlobalSSHInstanceRequest): Promise; + /** + * DeletePathXSSL - 删除PathX SSL证书 + * + * See also: https://docs.ucloud.cn/api/pathx-api/delete_path_xssl + */ + deletePathXSSL(request?: DeletePathXSSLRequest): Promise; + /** + * DeleteUGAForwarder - 删除加速实例转发器 按接入端口删除 + * + * See also: https://docs.ucloud.cn/api/pathx-api/delete_uga_forwarder + */ + deleteUGAForwarder(request?: DeleteUGAForwarderRequest): Promise; + /** + * DeleteUGAInstance - 删除全球加速服务加速配置 + * + * See also: https://docs.ucloud.cn/api/pathx-api/delete_uga_instance + */ + deleteUGAInstance(request?: DeleteUGAInstanceRequest): Promise; + /** + * DeleteUPath - 删除UPath + * + * See also: https://docs.ucloud.cn/api/pathx-api/delete_upath + */ + deleteUPath(request?: DeleteUPathRequest): Promise; + /** + * DescribeGlobalSSHInstance - 获取GlobalSSH实例列表(传实例ID获取单个实例信息,不传获取项目下全部实例) + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_global_ssh_instance + */ + describeGlobalSSHInstance(request?: DescribeGlobalSSHInstanceRequest): Promise; + /** + * DescribePathXLineConfig - 获取全球加速线路信息 + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_path_x_line_config + */ + describePathXLineConfig(request?: DescribePathXLineConfigRequest): Promise; + /** + * DescribePathXSSL - 获取SSL证书信息,支持分页,支持按证书名称 证书域名模糊搜索 + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_path_xssl + */ + describePathXSSL(request?: DescribePathXSSLRequest): Promise; + /** + * DescribeUGAInstance - 获取全球加速服务加速配置信息,指定实例ID返回单个实例。未指定实例ID时 指定分页参数 则按创建时间降序 返回记录 + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_uga_instance + */ + describeUGAInstance(request?: DescribeUGAInstanceRequest): Promise; + /** + * DescribeUPath - 获取加速线路信息 + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_upath + */ + describeUPath(request?: DescribeUPathRequest): Promise; + /** + * DescribeUPathTemplate - 查询UPath的监控模板 + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_upath_template + */ + describeUPathTemplate(request?: DescribeUPathTemplateRequest): Promise; + /** + * GetGlobalSSHPrice - 获取GlobalSSH价格 + * + * See also: https://docs.ucloud.cn/api/pathx-api/get_global_ssh_price + */ + getGlobalSSHPrice(request?: GetGlobalSSHPriceRequest): Promise; + /** + * GetGlobalSSHUpdatePrice - 获取GlobalSSH升级价格 + * + * See also: https://docs.ucloud.cn/api/pathx-api/get_global_ssh_update_price + */ + getGlobalSSHUpdatePrice(request?: GetGlobalSSHUpdatePriceRequest): Promise; + /** + * GetPathXMetric - 获取全球加速监控信息 + * + * See also: https://docs.ucloud.cn/api/pathx-api/get_path_x_metric + */ + getPathXMetric(request?: GetPathXMetricRequest): Promise; + /** + * ModifyGlobalSSHPort - 修改GlobalSSH端口 + * + * See also: https://docs.ucloud.cn/api/pathx-api/modify_global_ssh_port + */ + modifyGlobalSSHPort(request?: ModifyGlobalSSHPortRequest): Promise; + /** + * ModifyGlobalSSHType - 修改GlobalSSH实例类型,仅支持低版本升级到高版本,不支持高版本降级到低版本 + * + * See also: https://docs.ucloud.cn/api/pathx-api/modify_global_ssh_type + */ + modifyGlobalSSHType(request?: ModifyGlobalSSHTypeRequest): Promise; + /** + * ModifyUPathBandwidth - 修改加速线路带宽 + * + * See also: https://docs.ucloud.cn/api/pathx-api/modify_upath_bandwidth + */ + modifyUPathBandwidth(request?: ModifyUPathBandwidthRequest): Promise; + /** + * ModifyUPathTemplate - 修改UPath监控告警项 + * + * See also: https://docs.ucloud.cn/api/pathx-api/modify_upath_template + */ + modifyUPathTemplate(request?: ModifyUPathTemplateRequest): Promise; + /** + * UGABindUPath - UGA绑定UPath + * + * See also: https://docs.ucloud.cn/api/pathx-api/uga_bind_upath + */ + uGABindUPath(request?: UGABindUPathRequest): Promise; + /** + * UGAUnBindUPath - UGA与UPath解绑 + * + * See also: https://docs.ucloud.cn/api/pathx-api/uga_un_bind_upath + */ + uGAUnBindUPath(request?: UGAUnBindUPathRequest): Promise; + /** + * UnBindPathXSSL - 解绑PathX SSL 证书 + * + * See also: https://docs.ucloud.cn/api/pathx-api/un_bind_path_xssl + */ + unBindPathXSSL(request?: UnBindPathXSSLRequest): Promise; +} +/** + * BindPathXSSL - 绑定PathX SSL证书 + */ +export interface BindPathXSSLRequest { + /** + * 证书ID,如果没有指定证书ID也没有申请免费证书,HTTPS接入无法正常工作 + */ + SSLId: string; + /** + * UGA实例ID + */ + UGAId: string; + /** + * 绑定SSL证书的HTTPS端口。Port.0 Port.1对应多个Port。如果Port不存在则不会绑定 + */ + Port: number[]; +} +/** + * BindPathXSSL - 绑定PathX SSL证书 + */ +export interface BindPathXSSLResponse { +} +/** + * CreateGlobalSSHInstance - 创建GlobalSSH实例 + */ +export interface CreateGlobalSSHInstanceRequest { + /** + * 填写支持SSH访问IP的地区名称,如“洛杉矶”,“新加坡”,“香港”,“东京”,“华盛顿”,“法兰克福”。Area和AreaCode两者必填一个 + */ + Area: string; + /** + * 被SSH访问的源站IP,仅支持IPv4地址。 + */ + TargetIP: string; + /** + * 源站服务器监听的SSH端口,可取范围[1-65535],不能使用80,443, 65123端口。如果InstanceType=Free,取值范围缩小为[22,3389],linux系统选择22,windows系统自动选3389。 + */ + Port: number; + /** + * AreaCode, 区域航空港国际通用代码。Area和AreaCode两者必填一个 + */ + AreaCode: string; + /** + * 备注信息 + */ + Remark?: string; + /** + * 支付方式,如按月、按年、按时 + */ + ChargeType?: string; + /** + * 购买数量 + */ + Quantity?: number; + /** + * 枚举值:["Enterprise","Basic","Free"], 分别代表企业版,基础版,免费版 + */ + InstanceType?: string; + /** + * Ultimate版本带宽包大小,枚举值:[0,20,40]。单位MB + */ + BandwidthPackage?: number; + /** + * InstanceType等于Basic时可以在["cn-bj2","cn-sh2","cn-gd"]中选择1个作为转发机房,Free版本固定为cn-bj2,其他付费版默认配置三个转发机房 + */ + ForwardRegion?: string; + /** + * 使用代金券可冲抵部分费用 + */ + CouponId?: string; +} +/** + * CreateGlobalSSHInstance - 创建GlobalSSH实例 + */ +export interface CreateGlobalSSHInstanceResponse { + /** + * 实例ID,资源唯一标识 + */ + InstanceId: string; + /** + * 加速域名,访问该域名可就近接入 + */ + AcceleratingDomain?: string; +} +/** + * CreatePathXSSL - 创建SSL证书,可以把整个 Pem 证书内容传到SSLContent,或者把证书、私钥、CA证书分别传过来 + */ +export interface CreatePathXSSLRequest { + /** + * SSL证书的名字 + */ + SSLName: string; + /** + * 所添加的SSL证书类型,目前只支持Pem格式 + */ + SSLType?: string; + /** + * SSL证书的完整内容,私钥不可使用密码,包括加密证书的私钥、用户证书或CA证书等 + */ + SSLContent?: string; + /** + * 用户自签证书内容 + */ + UserCert?: string; + /** + * 加密证书的私钥,不可使用密码保护,开启密码保护后,重启服务需要输入密码 + */ + PrivateKey?: string; + /** + * CA颁发证书内容 + */ + CACert?: string; +} +/** + * CreatePathXSSL - 创建SSL证书,可以把整个 Pem 证书内容传到SSLContent,或者把证书、私钥、CA证书分别传过来 + */ +export interface CreatePathXSSLResponse { + /** + * SSL证书的Id + */ + SSLId: string; +} +/** + * CreateUGAForwarder - 创建加速实例转发器,支持HTTPS接入HTTPS回源、HTTPS接入HTTP回源、HTTP接入HTTP回源、TCP接入TCP回源、UDP接入UDP回源、 支持WSS接入WSS回源、WSS接入WS回源、WS接入WS回源 + */ +export interface CreateUGAForwarderRequest { + /** + * 加速配置实例ID + */ + UGAId: string; + /** + * HTTP接入HTTP回源转发,接入端口。禁用65123端口 + */ + HTTPHTTP?: number[]; + /** + * HTTP接入HTTP回源转发,源站监听端口 + */ + HTTPHTTPRS?: number[]; + /** + * HTTPS接入HTTP回源转发,接入端口。禁用65123端口 + */ + HTTPSHTTP?: number[]; + /** + * HTTPS接入HTTP回源转发,回源端口 + */ + HTTPSHTTPRS?: number[]; + /** + * HTTPS接入HTTPS回源转发,接入端口。禁用65123端口 + */ + HTTPSHTTPS?: number[]; + /** + * HTTPS接入HTTPS回源转发,源站监听端口 + */ + HTTPSHTTPSRS?: number[]; + /** + * TCP接入端口 + */ + TCP?: number[]; + /** + * TCP回源端口 + */ + TCPRS?: number[]; + /** + * UDP接入端口 + */ + UDP?: number[]; + /** + * UDP回源端口 + */ + UDPRS?: number[]; +} +/** + * CreateUGAForwarder - 创建加速实例转发器,支持HTTPS接入HTTPS回源、HTTPS接入HTTP回源、HTTP接入HTTP回源、TCP接入TCP回源、UDP接入UDP回源、 支持WSS接入WSS回源、WSS接入WS回源、WS接入WS回源 + */ +export interface CreateUGAForwarderResponse { +} +/** + * CreateUGAInstance - 创建全球加速配置项 + */ +export interface CreateUGAInstanceRequest { + /** + * 加速配置实例名称 + */ + Name: string; + /** + * 加速源IP,多个IP用英文半角逗号(,)隔开;IPList和Domain二选一必填 + */ + IPList?: string; + /** + * 加速源域名,IPList和Domain二选一必填 + */ + Domain?: string; + /** + * TCP端口号,已废弃。请使用 CreateUGAForwarder API 创建端口 + */ + TCP?: string[]; + /** + * UDP端口号,已废弃。请使用 CreateUGAForwarder API 创建端口 + */ + UDP?: string[]; +} +/** + * CreateUGAInstance - 创建全球加速配置项 + */ +export interface CreateUGAInstanceResponse { + /** + * 加速配置ID + */ + UGAId: string; + /** + * 加速域名 用户可把业务域名CName到此域名上。注意:未绑定线路情况时 加速域名解析不出IP。 + */ + CName?: string; +} +/** + * CreateUPath - 创建UPath + */ +export interface CreateUPathRequest { + /** + * UPath名字 + */ + Name: string; + /** + * 选择的线路 + */ + LineId: string; + /** + * 线路带宽,最小1Mbps,最大带宽由 DescribePathXLineConfig 接口获得。如需更大带宽,请联系产品团队。 + */ + Bandwidth: number; + /** + * 计费模式,默认为Month 按月收费,可选范围['Month','Year','Dynamic'] + */ + ChargeType?: string; + /** + * 购买周期,ChargeType为Month时,Quantity默认为0代表购买到月底,按时和按年付费该参数必须大于0 + */ + Quantity?: number; + /** + * 是否开启后付费, 默认为false + */ + PostPaid?: boolean; + /** + * 代金券Id + */ + CouponId?: string; +} +/** + * CreateUPath - 创建UPath + */ +export interface CreateUPathResponse { + /** + * 加速线路实例Id + */ + UPathId: string; +} +/** + * DeleteGlobalSSHInstance - 删除GlobalSSH实例 + */ +export interface DeleteGlobalSSHInstanceRequest { + /** + * 实例Id,资源的唯一标识 + */ + InstanceId: string; +} +/** + * DeleteGlobalSSHInstance - 删除GlobalSSH实例 + */ +export interface DeleteGlobalSSHInstanceResponse { +} +/** + * DeletePathXSSL - 删除PathX SSL证书 + */ +export interface DeletePathXSSLRequest { + /** + * SSL证书的ID + */ + SSLId: string; +} +/** + * DeletePathXSSL - 删除PathX SSL证书 + */ +export interface DeletePathXSSLResponse { +} +/** + * DeleteUGAForwarder - 删除加速实例转发器 按接入端口删除 + */ +export interface DeleteUGAForwarderRequest { + /** + * 加速配置实例ID + */ + UGAId: string; + /** + * HTTP接入HTTP回源,接入端口。禁用65123端口 + */ + HTTPHTTP?: number[]; + /** + * HTTPS接入HTTP回源, 接入端口。禁用65123端口 + */ + HTTPSHTTP?: number[]; + /** + * HTTPS接入HTTPS回源, 接入端口。禁用65123端口 + */ + HTTPSHTTPS?: number[]; + /** + * TCP接入端口 + */ + TCP?: number[]; + /** + * UDP接入端口 + */ + UDP?: number[]; +} +/** + * DeleteUGAForwarder - 删除加速实例转发器 按接入端口删除 + */ +export interface DeleteUGAForwarderResponse { +} +/** + * DeleteUGAInstance - 删除全球加速服务加速配置 + */ +export interface DeleteUGAInstanceRequest { + /** + * 加速配置实例ID + */ + UGAId: string; +} +/** + * DeleteUGAInstance - 删除全球加速服务加速配置 + */ +export interface DeleteUGAInstanceResponse { +} +/** + * DeleteUPath - 删除UPath + */ +export interface DeleteUPathRequest { + /** + * 加速线路实例ID + */ + UPathId: string; +} +/** + * DeleteUPath - 删除UPath + */ +export interface DeleteUPathResponse { +} +/** + * DescribeGlobalSSHInstance - 获取GlobalSSH实例列表(传实例ID获取单个实例信息,不传获取项目下全部实例) + */ +export interface DescribeGlobalSSHInstanceRequest { + /** + * 实例ID,资源唯一标识 + */ + InstanceId?: string; +} +/** + * DescribeGlobalSSHInstance - 获取GlobalSSH实例列表(传实例ID获取单个实例信息,不传获取项目下全部实例) + */ +export interface DescribeGlobalSSHInstanceResponse { + /** + * GlobalSSH实例列表,实例的属性参考GlobalSSHInfo模型 + */ + InstanceSet?: { + /** + * 实例ID,资源唯一标识 + */ + InstanceId: string; + /** + * 枚举值:["Enterprise","Basic","Free","Welfare"], 分别代表企业版,基础版本,免费版本,较早的公测免费版 + */ + InstanceType: string; + /** + * GlobalSSH分配的加速域名。 + */ + AcceleratingDomain: string; + /** + * 被SSH访问的IP所在地区 + */ + Area: string; + /** + * 被SSH访问的源站 IPv4地址。 + */ + TargetIP: string; + /** + * 备注信息 + */ + Remark: string; + /** + * 源站服务器监听的SSH端口,windows系统为RDP端口 + */ + Port: number; + /** + * InstanceType等于Free时,由系统自动分配,不等于源站Port值。InstanceType不等于Free时,与源站Port值相同。 + */ + GlobalSSHPort: number; + /** + * 支付周期,如Month,Year,Dynamic等 + */ + ChargeType: string; + /** + * 资源创建时间戳 + */ + CreateTime: number; + /** + * 资源过期时间戳 + */ + ExpireTime: number; + /** + * 是否过期 + */ + Expire: boolean; + /** + * globalssh Ultimate带宽包大小 + */ + BandwidthPackage?: number; + /** + * InstanceType为Basic版本时,需要展示具体分配的转发机房 + */ + ForwardRegion?: string; + }[]; +} +/** + * DescribePathXLineConfig - 获取全球加速线路信息 + */ +export interface DescribePathXLineConfigRequest { +} +/** + * DescribePathXLineConfig - 获取全球加速线路信息 + */ +export interface DescribePathXLineConfigResponse { + /** + * UGAA线路列表,参考UGAALine字段定义 + */ + LineSet?: { + /** + * 线路源 + */ + LineFrom: string; + /** + * 线路目的 + */ + LineTo: string; + /** + * 线路源中文名称 + */ + LineFromName: string; + /** + * 线路目的中文名称 + */ + LineToName: string; + /** + * 线路可售最大带宽 + */ + MaxBandwidth: number; + /** + * 线路计费Id + */ + LineId?: string; + /** + * 子线路信息 + */ + LineDetail?: { + /** + * 线路源 + */ + LineFrom: string; + /** + * 线路目的 + */ + LineTo: string; + /** + * 线路计费Id + */ + LineId?: string; + /** + * 线路源中文名称 + */ + LineFromName: string; + /** + * 线路目的中文名称 + */ + LineToName: string; + }[]; + }[]; +} +/** + * DescribePathXSSL - 获取SSL证书信息,支持分页,支持按证书名称 证书域名模糊搜索 + */ +export interface DescribePathXSSLRequest { + /** + * SSL证书的Id,不传分页获取证书列表 + */ + SSLId?: string; + /** + * 不为空则按证书名称、证书域名模糊搜索 分页返回结果 + */ + SearchValue?: string; + /** + * 最大返回条数,默认100,最大400 + */ + Limit?: number; + /** + * 偏移值 默认为0 + */ + Offset?: number; +} +/** + * DescribePathXSSL - 获取SSL证书信息,支持分页,支持按证书名称 证书域名模糊搜索 + */ +export interface DescribePathXSSLResponse { + /** + * SSL证书详细信息,具体结构见 PathXSSLSet + */ + DataSet?: { + /** + * SSL证书的Id + */ + SSLId?: string; + /** + * SSL证书的名字 + */ + SSLName?: string; + /** + * 证书域名 + */ + SubjectName?: string; + /** + * 证书过期时间 时间戳 + */ + ExpireTime?: number; + /** + * 证书来源,0:用户上传 1: 免费颁发 + */ + SourceType?: number; + /** + * SSL证书(用户证书、私钥、ca证书合并)内容md5值 + */ + SSLMD5?: string; + /** + * SSL证书的创建时间 时间戳 + */ + CreateTime?: number; + /** + * SSL证书绑定的对象 + */ + SSLBindedTargetSet?: { + /** + * SSL证书绑定到的实例ID + */ + ResourceId: string; + /** + * SSL证书绑定到的实例名称 + */ + ResourceName?: string; + }[]; + /** + * SSL证书内容 + */ + SSLContent?: string; + }[]; + /** + * 符合条件的证书总数 + */ + TotalCount?: number; +} +/** + * DescribeUGAInstance - 获取全球加速服务加速配置信息,指定实例ID返回单个实例。未指定实例ID时 指定分页参数 则按创建时间降序 返回记录 + */ +export interface DescribeUGAInstanceRequest { + /** + * 加速配置实例ID,如果传了实例ID 则返回匹配实例ID的记录;如果没传则返回 ProjectId 下全部实例且符合分页要求 + */ + UGAId?: string; + /** + * 返回的最大条数,默认为100,最大值400 + */ + Limit?: number; + /** + * 偏移量,默认为0 + */ + Offset?: number; +} +/** + * DescribeUGAInstance - 获取全球加速服务加速配置信息,指定实例ID返回单个实例。未指定实例ID时 指定分页参数 则按创建时间降序 返回记录 + */ +export interface DescribeUGAInstanceResponse { + /** + * 全球加速实例信息列表 + */ + UGAList?: { + /** + * 加速配置实例ID + */ + UGAId: string; + /** + * 加速域名,请在加速区域配置您的业务域名的CName记录值为加速域名 + */ + CName: string; + /** + * 加速配置名称 + */ + UGAName: string; + /** + * 源站IP列表,多个值由半角英文逗号相隔 + */ + IPList?: string[]; + /** + * 源站域名 + */ + Domain?: string; + /** + * 源站所在区域,加速实例在绑定线路后会自动设置该值。console页面上通过该值过滤加速实例可以绑定的upath实例。注意:缺少该值会导致在console上无法修改线路 + */ + Location?: string; + /** + * 绑定的加速线路 + */ + UPathSet?: { + /** + * UPath名字 + */ + UPathName?: string; + /** + * UPath 实例ID + */ + UPathId?: string; + /** + * 带宽 Mbps, 1~800Mbps + */ + Bandwidth?: number; + /** + * 线路ID + */ + LineId?: string; + /** + * 线路起点中文名字,加速区域 + */ + LineFromName?: string; + /** + * 线路对端中文名字,源站区域 + */ + LineToName?: string; + /** + * 线路起点英文代号,加速区域 + */ + LineFrom?: string; + /** + * 线路对端英文代号,源站区域 + */ + LineTo?: string; + }[]; + /** + * 端口配置信息(不再维护,建议使用ForwarderSet) + */ + TaskSet?: { + /** + * 接入端口 + */ + Port: number; + /** + * 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 + */ + Protocol: string; + }[]; + /** + * UGA 4层转发器配置,记录接入或回源端口,接入或回源协议信息 + */ + L4ForwarderSet?: { + /** + * 接入端口 + */ + Port: number; + /** + * 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 + */ + Protocol: string; + /** + * RSPort,源站监听端口 + */ + RSPort: number; + }[]; + /** + * UGA 7层转发器配置,记录接入或回源端口,接入或回源协议信息 如绑定证书会返回证书ID + */ + L7ForwarderSet?: { + /** + * 接入端口 + */ + Port: number; + /** + * 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 + */ + Protocol: string; + /** + * RSPort,源站监听端口 + */ + RSPort: number; + /** + * 证书ID + */ + SSLId?: string; + /** + * 证书名称 + */ + SSLName?: string; + }[]; + /** + * 线路出口IP地址 + */ + OutPublicIpList?: { + /** + * 线路出口EIP + */ + IP?: string; + /** + * 线路出口机房代号 + */ + Area?: string; + }[]; + }[]; + /** + * 符合条件的总数 + */ + TotalCount?: number; +} +/** + * DescribeUPath - 获取加速线路信息 + */ +export interface DescribeUPathRequest { + /** + * 如果不填参数 返回 ProjectId 下所有的线路资源,填此参数则返回upath实例ID匹配的线路 + */ + UPathId?: string; +} +/** + * DescribeUPath - 获取加速线路信息 + */ +export interface DescribeUPathResponse { + /** + * 线路信息数组 + */ + UPathSet: { + /** + * 是否为后付费实例 + */ + PostPaid?: boolean; + /** + * 计费模式,默认为Month 按月收费,可选范围['Month','Year','Dynamic'] + */ + ChargeType?: string; + /** + * UPath实例名字 + */ + Name?: string; + /** + * UPath加速线路实例ID + */ + UPathId?: string; + /** + * 带宽,单位Mbps + */ + Bandwidth?: number; + /** + * 选择的线路 + */ + LineId?: string; + /** + * 与该UPath绑定的UGA列表 + */ + UGAList?: { + /** + * 加速配置ID + */ + UGAId?: string; + /** + * 源站IP列表,多个值由半角英文逗号相隔 + */ + IPList?: string[]; + /** + * 源站域名 + */ + Domain?: string; + }[]; + /** + * UPath创建的时间,10位时间戳 + */ + CreateTime?: number; + /** + * UPath的过期时间,10位时间戳 + */ + ExpireTime?: number; + /** + * 线路入口名称 + */ + LineFromName?: string; + /** + * 线路出口名称 + */ + LineToName?: string; + /** + * 线路出口IP数组 + */ + OutPublicIpList?: { + /** + * 线路出口EIP + */ + IP?: string; + /** + * 线路出口机房代号 + */ + Area?: string; + }[]; + }[]; +} +/** + * DescribeUPathTemplate - 查询UPath的监控模板 + */ +export interface DescribeUPathTemplateRequest { + /** + * 加速线路实例ID,格式 upath-xxxx + */ + UPathId: string; +} +/** + * DescribeUPathTemplate - 查询UPath的监控模板 + */ +export interface DescribeUPathTemplateResponse { + /** + * 监控模板详情 + */ + DataSet: { + /** + * 收敛策略,可选范围 ['Exponential','Continuous','Once'],分别对应指数递增、连续告警、单次告警 + */ + AlarmStrategy: string; + /** + * 告警探测周期,单位秒 + */ + AlarmFrequency: number; + /** + * 比较策略,可选 ['GE','LE'] 分别代表不小于和不大于 + */ + Compare: string; + /** + * 联系组ID + */ + ContactGroupId: number; + /** + * 告警指标名称, 所有n的个数必须一致。目前仅允许以下四项:UpathNetworkOut:出向带宽,UpathNetworkIn:入向带宽,UpathNetworkOutUsage:出向带宽使用率,UpathNetworkInUsage:入向带宽使用率 + */ + MetricName: string; + /** + * 告警阈值,带宽使用率的阈值范围是[50,100]的正整数,带宽告警阈值为1000000的倍数, 如大于2Mbps则告警 阈值应该传 2000000 + */ + Threshold: number; + /** + * 告警触发周期(次数) + */ + TriggerCount: number; + /** + * 告警模板策略ID + */ + AlarmTemplateRuleId: number; + /** + * 资源类型 + */ + ResourceType?: string; + }[]; +} +/** + * GetGlobalSSHPrice - 获取GlobalSSH价格 + */ +export interface GetGlobalSSHPriceRequest { + /** + * 购买周期,如果ChargeType为Month,Quantity默认为0;其他情况必须为大于0的整数 + */ + Quantity?: number; + /** + * 计费类型:Dynamic,Month,Year + */ + ChargeType?: string; + /** + * 版本类型。枚举值,Enterprise:企业版;Basic:基础版。可不填,默认为Basic。 + */ + InstanceType?: string; +} +/** + * GetGlobalSSHPrice - 获取GlobalSSH价格 + */ +export interface GetGlobalSSHPriceResponse { + /** + * 价格,返回单位为元 + */ + Price?: number; +} +/** + * GetGlobalSSHUpdatePrice - 获取GlobalSSH升级价格 + */ +export interface GetGlobalSSHUpdatePriceRequest { + /** + * 升级后的实例类型。枚举值,Enterprise:企业版;Basic:基础版。 + */ + InstanceType: string; + /** + * 实例ID,唯一资源标识。从免费版升级到付费版可不填,其他情况必填。 + */ + InstanceId?: string; + /** + * 购买周期,如果ChargeType为Month,Quantity可以不填默认为0;其他情况必须为正整数。 + */ + Quantity?: number; + /** + * 计费类型:Dynamic,Month,Year。从免费版升级到付费版必须传,其他情况不需要传 + */ + ChargeType?: string; +} +/** + * GetGlobalSSHUpdatePrice - 获取GlobalSSH升级价格 + */ +export interface GetGlobalSSHUpdatePriceResponse { + /** + * 价格,返回单位为元。正数表示付费升级,负数表示降级退费。 + */ + Price?: number; +} +/** + * GetPathXMetric - 获取全球加速监控信息 + */ +export interface GetPathXMetricRequest { + /** + * ResourceId,如upath ID 和 uga ID + */ + ResourceId: string; + /** + * 查询起始时间,10位长度时间戳 + */ + BeginTime: number; + /** + * 查询结束时间,10位长度时间戳 + */ + EndTime: number; + /** + * 查询监控的指标项。目前仅允许以下四项:NetworkOut:出向带宽,NetworkIn:入向带宽,NetworkOutUsage:出向带宽使用率,NetworkInUsage:入向带宽使用率 + */ + MetricName: string[]; + /** + * upath:加速线路,uga:加速实例 + */ + ResourceType: string; + /** + * 具体线路id,调用DescribePathXLineConfig接口获取线路列表 + */ + LineId: string; +} +/** + * GetPathXMetric - 获取全球加速监控信息 + */ +export interface GetPathXMetricResponse { + /** + * 监控数据结果集 + */ + DataSet?: { + /** + * 出向带宽 + */ + NetworkOut?: { + /** + * 时间戳 + */ + Timestamp?: number; + /** + * 监控点数值 + */ + Value?: number; + }[]; + /** + * 入向带宽 + */ + NetworkIn?: { + /** + * 时间戳 + */ + Timestamp?: number; + /** + * 监控点数值 + */ + Value?: number; + }[]; + /** + * 出向带宽使用率 + */ + NetworkOutUsage?: { + /** + * 时间戳 + */ + Timestamp?: number; + /** + * 监控点数值 + */ + Value?: number; + }[]; + /** + * 入向带宽使用率 + */ + NetworkInUsage?: { + /** + * 时间戳 + */ + Timestamp?: number; + /** + * 监控点数值 + */ + Value?: number; + }[]; + }; +} +/** + * ModifyGlobalSSHPort - 修改GlobalSSH端口 + */ +export interface ModifyGlobalSSHPortRequest { + /** + * 实例ID,资源唯一标识。当前仅收费版GlobalSSH实例可以修改端口。 + */ + InstanceId: string; + /** + * 源站服务器监听的SSH端口号。收费版本端口范围[1,65535]且不能为80,443,65123端口。免费版不支持修改端口。 + */ + Port: number; +} +/** + * ModifyGlobalSSHPort - 修改GlobalSSH端口 + */ +export interface ModifyGlobalSSHPortResponse { +} +/** + * ModifyGlobalSSHType - 修改GlobalSSH实例类型,仅支持低版本升级到高版本,不支持高版本降级到低版本 + */ +export interface ModifyGlobalSSHTypeRequest { + /** + * 实例ID,资源唯一标识 + */ + InstanceId: string; + /** + * 取值范围["Enterprise","Basic"],分别对应企业版和基础版,表示升级后的实例类型。比如从Free版本升级为Basic版或Enterprise版,不可从收费版降级为免费版,或从企业版降级为基础版 + */ + InstanceType: string; + /** + * 支付方式,如按月、按年、按时 + */ + ChargeType?: string; + /** + * 购买时间,当ChargeType为Month,Quantity为0代表购买到月底 + */ + Quantity?: string; + /** + * 可抵扣费用的券,通常不使用 + */ + CouponId?: string; +} +/** + * ModifyGlobalSSHType - 修改GlobalSSH实例类型,仅支持低版本升级到高版本,不支持高版本降级到低版本 + */ +export interface ModifyGlobalSSHTypeResponse { +} +/** + * ModifyUPathBandwidth - 修改加速线路带宽 + */ +export interface ModifyUPathBandwidthRequest { + /** + * UPath 加速线路实例Id + */ + UPathId: string; + /** + * 线路带宽,单位Mbps。最小1Mbps,最大带宽由 DescribePathXLineConfig 接口获得。如需更大带宽,请联系产品团队。 + */ + Bandwidth: number; +} +/** + * ModifyUPathBandwidth - 修改加速线路带宽 + */ +export interface ModifyUPathBandwidthResponse { +} +/** + * ModifyUPathTemplate - 修改UPath监控告警项 + */ +export interface ModifyUPathTemplateRequest { + /** + * 加速线路实例ID + */ + UPathId: string; + /** + * 告警指标名称, 所有n的个数必须一致。目前仅允许以下四项:UpathNetworkOut:出向带宽,UpathNetworkIn:入向带宽,UpathNetworkOutUsage:出向带宽使用率,UpathNetworkInUsage:入向带宽使用率 + */ + MetricName?: string[]; + /** + * 告警阈值,带宽使用率的阈值范围是[50,100]的正整数,带宽告警阈值为1000000的倍数, 如大于2Mbps则告警 阈值应该传 2000000 + */ + Threshold?: number[]; + /** + * 告警探测周期,单位:秒 + */ + AlarmFrequency?: number[]; + /** + * 告警组id + */ + ContactGroupId?: number[]; + /** + * 比较策略,可选 ['GE','LE'] 分别代表不小于和不大于 + */ + Compare?: string[]; + /** + * 收敛策略,可选范围 ['Exponential','Continuous','Once'],分别对应指数递增、连续告警、单次告警 + */ + AlarmStrategy?: string[]; + /** + * 告警触发周期(次数) + */ + TriggerCount?: number[]; +} +/** + * ModifyUPathTemplate - 修改UPath监控告警项 + */ +export interface ModifyUPathTemplateResponse { +} +/** + * UGABindUPath - UGA绑定UPath + */ +export interface UGABindUPathRequest { + /** + * 加速配置实例ID,格式uga-xxxx + */ + UGAId: string; + /** + * 加速线路实例ID,格式upath-xxx + */ + UPathId: string; + /** + * 代金券 + */ + CouponId?: string; +} +/** + * UGABindUPath - UGA绑定UPath + */ +export interface UGABindUPathResponse { +} +/** + * UGAUnBindUPath - UGA与UPath解绑 + */ +export interface UGAUnBindUPathRequest { + /** + * 加速配置实例ID 格式uga-xxx + */ + UGAId: string; + /** + * 加速线路实例ID 格式upath-xxx + */ + UPathId: string; +} +/** + * UGAUnBindUPath - UGA与UPath解绑 + */ +export interface UGAUnBindUPathResponse { +} +/** + * UnBindPathXSSL - 解绑PathX SSL 证书 + */ +export interface UnBindPathXSSLRequest { + /** + * UGA实例ID。 + */ + UGAId: string; + /** + * SSL证书ID。 + */ + SSLId: string; + /** + * 解绑SSL证书的HTTPS端口。Port.0 Port.1格式 端口错误则解绑失败。 + */ + Port: number[]; +} +/** + * UnBindPathXSSL - 解绑PathX SSL 证书 + */ +export interface UnBindPathXSSLResponse { +} diff --git a/lib/services/pathx/index.js b/lib/services/pathx/index.js new file mode 100644 index 0000000..17a01f4 --- /dev/null +++ b/lib/services/pathx/index.js @@ -0,0 +1,259 @@ +"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 **pathx** service + */ +class PathXClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * BindPathXSSL - 绑定PathX SSL证书 + * + * See also: https://docs.ucloud.cn/api/pathx-api/bind_path_xssl + */ + bindPathXSSL(request) { + const args = Object.assign({ Action: 'BindPathXSSL' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateGlobalSSHInstance - 创建GlobalSSH实例 + * + * See also: https://docs.ucloud.cn/api/pathx-api/create_global_ssh_instance + */ + createGlobalSSHInstance(request) { + const args = Object.assign({ Action: 'CreateGlobalSSHInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreatePathXSSL - 创建SSL证书,可以把整个 Pem 证书内容传到SSLContent,或者把证书、私钥、CA证书分别传过来 + * + * See also: https://docs.ucloud.cn/api/pathx-api/create_path_xssl + */ + createPathXSSL(request) { + const args = Object.assign({ Action: 'CreatePathXSSL' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUGAForwarder - 创建加速实例转发器,支持HTTPS接入HTTPS回源、HTTPS接入HTTP回源、HTTP接入HTTP回源、TCP接入TCP回源、UDP接入UDP回源、 支持WSS接入WSS回源、WSS接入WS回源、WS接入WS回源 + * + * See also: https://docs.ucloud.cn/api/pathx-api/create_uga_forwarder + */ + createUGAForwarder(request) { + const args = Object.assign({ Action: 'CreateUGAForwarder' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUGAInstance - 创建全球加速配置项 + * + * See also: https://docs.ucloud.cn/api/pathx-api/create_uga_instance + */ + createUGAInstance(request) { + const args = Object.assign({ Action: 'CreateUGAInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUPath - 创建UPath + * + * See also: https://docs.ucloud.cn/api/pathx-api/create_upath + */ + createUPath(request) { + const args = Object.assign({ Action: 'CreateUPath' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteGlobalSSHInstance - 删除GlobalSSH实例 + * + * See also: https://docs.ucloud.cn/api/pathx-api/delete_global_ssh_instance + */ + deleteGlobalSSHInstance(request) { + const args = Object.assign({ Action: 'DeleteGlobalSSHInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeletePathXSSL - 删除PathX SSL证书 + * + * See also: https://docs.ucloud.cn/api/pathx-api/delete_path_xssl + */ + deletePathXSSL(request) { + const args = Object.assign({ Action: 'DeletePathXSSL' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUGAForwarder - 删除加速实例转发器 按接入端口删除 + * + * See also: https://docs.ucloud.cn/api/pathx-api/delete_uga_forwarder + */ + deleteUGAForwarder(request) { + const args = Object.assign({ Action: 'DeleteUGAForwarder' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUGAInstance - 删除全球加速服务加速配置 + * + * See also: https://docs.ucloud.cn/api/pathx-api/delete_uga_instance + */ + deleteUGAInstance(request) { + const args = Object.assign({ Action: 'DeleteUGAInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUPath - 删除UPath + * + * See also: https://docs.ucloud.cn/api/pathx-api/delete_upath + */ + deleteUPath(request) { + const args = Object.assign({ Action: 'DeleteUPath' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeGlobalSSHInstance - 获取GlobalSSH实例列表(传实例ID获取单个实例信息,不传获取项目下全部实例) + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_global_ssh_instance + */ + describeGlobalSSHInstance(request) { + const args = Object.assign({ Action: 'DescribeGlobalSSHInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribePathXLineConfig - 获取全球加速线路信息 + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_path_x_line_config + */ + describePathXLineConfig(request) { + const args = Object.assign({ Action: 'DescribePathXLineConfig' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribePathXSSL - 获取SSL证书信息,支持分页,支持按证书名称 证书域名模糊搜索 + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_path_xssl + */ + describePathXSSL(request) { + const args = Object.assign({ Action: 'DescribePathXSSL' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUGAInstance - 获取全球加速服务加速配置信息,指定实例ID返回单个实例。未指定实例ID时 指定分页参数 则按创建时间降序 返回记录 + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_uga_instance + */ + describeUGAInstance(request) { + const args = Object.assign({ Action: 'DescribeUGAInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUPath - 获取加速线路信息 + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_upath + */ + describeUPath(request) { + const args = Object.assign({ Action: 'DescribeUPath' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUPathTemplate - 查询UPath的监控模板 + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_upath_template + */ + describeUPathTemplate(request) { + const args = Object.assign({ Action: 'DescribeUPathTemplate' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetGlobalSSHPrice - 获取GlobalSSH价格 + * + * See also: https://docs.ucloud.cn/api/pathx-api/get_global_ssh_price + */ + getGlobalSSHPrice(request) { + const args = Object.assign({ Action: 'GetGlobalSSHPrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetGlobalSSHUpdatePrice - 获取GlobalSSH升级价格 + * + * See also: https://docs.ucloud.cn/api/pathx-api/get_global_ssh_update_price + */ + getGlobalSSHUpdatePrice(request) { + const args = Object.assign({ Action: 'GetGlobalSSHUpdatePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetPathXMetric - 获取全球加速监控信息 + * + * See also: https://docs.ucloud.cn/api/pathx-api/get_path_x_metric + */ + getPathXMetric(request) { + const args = Object.assign({ Action: 'GetPathXMetric' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyGlobalSSHPort - 修改GlobalSSH端口 + * + * See also: https://docs.ucloud.cn/api/pathx-api/modify_global_ssh_port + */ + modifyGlobalSSHPort(request) { + const args = Object.assign({ Action: 'ModifyGlobalSSHPort' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyGlobalSSHType - 修改GlobalSSH实例类型,仅支持低版本升级到高版本,不支持高版本降级到低版本 + * + * See also: https://docs.ucloud.cn/api/pathx-api/modify_global_ssh_type + */ + modifyGlobalSSHType(request) { + const args = Object.assign({ Action: 'ModifyGlobalSSHType' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyUPathBandwidth - 修改加速线路带宽 + * + * See also: https://docs.ucloud.cn/api/pathx-api/modify_upath_bandwidth + */ + modifyUPathBandwidth(request) { + const args = Object.assign({ Action: 'ModifyUPathBandwidth' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyUPathTemplate - 修改UPath监控告警项 + * + * See also: https://docs.ucloud.cn/api/pathx-api/modify_upath_template + */ + modifyUPathTemplate(request) { + const args = Object.assign({ Action: 'ModifyUPathTemplate' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UGABindUPath - UGA绑定UPath + * + * See also: https://docs.ucloud.cn/api/pathx-api/uga_bind_upath + */ + uGABindUPath(request) { + const args = Object.assign({ Action: 'UGABindUPath' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UGAUnBindUPath - UGA与UPath解绑 + * + * See also: https://docs.ucloud.cn/api/pathx-api/uga_un_bind_upath + */ + uGAUnBindUPath(request) { + const args = Object.assign({ Action: 'UGAUnBindUPath' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UnBindPathXSSL - 解绑PathX SSL 证书 + * + * See also: https://docs.ucloud.cn/api/pathx-api/un_bind_path_xssl + */ + unBindPathXSSL(request) { + const args = Object.assign({ Action: 'UnBindPathXSSL' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = PathXClient; diff --git a/lib/services/uaccount/index.d.ts b/lib/services/uaccount/index.d.ts new file mode 100644 index 0000000..1d3fbde --- /dev/null +++ b/lib/services/uaccount/index.d.ts @@ -0,0 +1,295 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **uaccount** service + */ +export default class UAccountClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * AddMemberToProject - 添加成员到项目 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/add_member_to_project + */ + addMemberToProject(request?: AddMemberToProjectRequest): Promise; + /** + * CreateProject - 创建项目 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/create_project + */ + createProject(request?: CreateProjectRequest): Promise; + /** + * FreezeMember - 冻结成员 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/freeze_member + */ + freezeMember(request?: FreezeMemberRequest): Promise; + /** + * GetNetworkMask - 查询登录与API调用的网络掩码 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/get_network_mask + */ + getNetworkMask(request?: GetNetworkMaskRequest): Promise; + /** + * GetProjectList - 获取项目列表 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/get_project_list + */ + getProjectList(request?: GetProjectListRequest): Promise; + /** + * GetRegion - 获取用户在各数据中心的权限等信息 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/get_region + */ + getRegion(request?: GetRegionRequest): Promise; + /** + * InviteSubaccount - 邀请子帐号成员 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/invite_subaccount + */ + inviteSubaccount(request?: InviteSubaccountRequest): Promise; + /** + * RemoveMemberFromProject - 从项目中移除成员 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/remove_member_from_project + */ + removeMemberFromProject(request?: RemoveMemberFromProjectRequest): Promise; + /** + * SetNetworkMask - 设置登录与API调用的网络掩码 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/set_network_mask + */ + setNetworkMask(request?: SetNetworkMaskRequest): Promise; +} +/** + * AddMemberToProject - 添加成员到项目 + */ +export interface AddMemberToProjectRequest { + /** + * 被加入成员Email + */ + MemberEmail: string; + /** + * 被加入成员归属角色ID + */ + CharacterId: string; +} +/** + * AddMemberToProject - 添加成员到项目 + */ +export interface AddMemberToProjectResponse { +} +/** + * CreateProject - 创建项目 + */ +export interface CreateProjectRequest { + /** + * 项目名称,不得与现有项目重名 + */ + ProjectName: string; +} +/** + * CreateProject - 创建项目 + */ +export interface CreateProjectResponse { + /** + * 所创建项目的Id + */ + ProjectId: string; +} +/** + * FreezeMember - 冻结成员 + */ +export interface FreezeMemberRequest { + /** + * 需要被冻结的成员Email + */ + MemberEmail: string; +} +/** + * FreezeMember - 冻结成员 + */ +export interface FreezeMemberResponse { +} +/** + * GetNetworkMask - 查询登录与API调用的网络掩码 + */ +export interface GetNetworkMaskRequest { +} +/** + * GetNetworkMask - 查询登录与API调用的网络掩码 + */ +export interface GetNetworkMaskResponse { + /** + * 接口返回数据 + */ + Data?: { + /** + * API调用网络掩码,默认空字符串,不限制登录IP,多个IP以英文逗号分隔。 + */ + APINetworkMask: string; + /** + * 登录网络掩码,默认空字符串,不限制登录IP,多个IP以英文逗号分隔。 + */ + LoginNetworkMask: string; + }; +} +/** + * GetProjectList - 获取项目列表 + */ +export interface GetProjectListRequest { + /** + * 是否是财务账号(Yes:是,No:否) + */ + IsFinance?: string; +} +/** + * GetProjectList - 获取项目列表 + */ +export interface GetProjectListResponse { + /** + * 项目总数 + */ + ProjectCount: number; + /** + * JSON格式的项目列表实例 + */ + ProjectSet: { + /** + * 项目ID + */ + ProjectId: string; + /** + * 项目名称 + */ + ProjectName: string; + /** + * 创建时间(Unix时间戳) + */ + CreateTime: number; + /** + * 是否为默认项目 + */ + IsDefault: boolean; + /** + * 项目下资源数量(已废弃,不建议使用) + */ + ResourceCount: number; + /** + * 项目下成员数量 + */ + MemberCount: number; + /** + * 父项目ID(已废弃) + */ + ParentId?: string; + /** + * 父项目名称(已废弃) + */ + ParentName?: string; + }[]; +} +/** + * GetRegion - 获取用户在各数据中心的权限等信息 + */ +export interface GetRegionRequest { +} +/** + * GetRegion - 获取用户在各数据中心的权限等信息 + */ +export interface GetRegionResponse { + /** + * 各数据中心信息 + */ + Regions?: { + /** + * 数据中心ID + */ + RegionId: number; + /** + * 数据中心名称 + */ + RegionName: string; + /** + * 是否用户当前默认数据中心 + */ + IsDefault: boolean; + /** + * 用户在此数据中心的权限位 + */ + BitMaps: string; + /** + * 地域名字,如cn-bj + */ + Region: string; + /** + * 可用区名字,如cn-bj-01 + */ + Zone: string; + }[]; +} +/** + * InviteSubaccount - 邀请子帐号成员 + */ +export interface InviteSubaccountRequest { + /** + * 受邀成员邮箱地址,不得重复 + */ + UserEmail: string; + /** + * 受邀成员手机号码 + */ + UserPhone: string; + /** + * 受邀成员姓名 + */ + UserName: string; + /** + * 是否有财务权限(true:是,false:否,默认为否) + */ + IsFinance: string; +} +/** + * InviteSubaccount - 邀请子帐号成员 + */ +export interface InviteSubaccountResponse { +} +/** + * RemoveMemberFromProject - 从项目中移除成员 + */ +export interface RemoveMemberFromProjectRequest { + /** + * 需要被移除成员Email + */ + MemberEmail: string; +} +/** + * RemoveMemberFromProject - 从项目中移除成员 + */ +export interface RemoveMemberFromProjectResponse { +} +/** + * SetNetworkMask - 设置登录与API调用的网络掩码 + */ +export interface SetNetworkMaskRequest { + /** + * 短信验证码 + */ + Code: string; + /** + * API调用网络掩码,多个IP以英文逗号分隔。默认空字符串,不限制登录IP。 + */ + APINetworkMask?: string; + /** + * 登录网络掩码,多个IP以英文逗号分隔。默认空字符串,不限制登录IP。 + */ + LoginNetworkMask?: string; +} +/** + * SetNetworkMask - 设置登录与API调用的网络掩码 + */ +export interface SetNetworkMaskResponse { +} diff --git a/lib/services/uaccount/index.js b/lib/services/uaccount/index.js new file mode 100644 index 0000000..9039c8d --- /dev/null +++ b/lib/services/uaccount/index.js @@ -0,0 +1,97 @@ +"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 **uaccount** service + */ +class UAccountClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * AddMemberToProject - 添加成员到项目 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/add_member_to_project + */ + addMemberToProject(request) { + const args = Object.assign({ Action: 'AddMemberToProject' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateProject - 创建项目 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/create_project + */ + createProject(request) { + const args = Object.assign({ Action: 'CreateProject' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * FreezeMember - 冻结成员 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/freeze_member + */ + freezeMember(request) { + const args = Object.assign({ Action: 'FreezeMember' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetNetworkMask - 查询登录与API调用的网络掩码 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/get_network_mask + */ + getNetworkMask(request) { + const args = Object.assign({ Action: 'GetNetworkMask' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetProjectList - 获取项目列表 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/get_project_list + */ + getProjectList(request) { + const args = Object.assign({ Action: 'GetProjectList' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetRegion - 获取用户在各数据中心的权限等信息 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/get_region + */ + getRegion(request) { + const args = Object.assign({ Action: 'GetRegion' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * InviteSubaccount - 邀请子帐号成员 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/invite_subaccount + */ + inviteSubaccount(request) { + const args = Object.assign({ Action: 'InviteSubaccount' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * RemoveMemberFromProject - 从项目中移除成员 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/remove_member_from_project + */ + removeMemberFromProject(request) { + const args = Object.assign({ Action: 'RemoveMemberFromProject' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * SetNetworkMask - 设置登录与API调用的网络掩码 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/set_network_mask + */ + setNetworkMask(request) { + const args = Object.assign({ Action: 'SetNetworkMask' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = UAccountClient; diff --git a/lib/services/ubill/index.d.ts b/lib/services/ubill/index.d.ts new file mode 100644 index 0000000..611fbcb --- /dev/null +++ b/lib/services/ubill/index.d.ts @@ -0,0 +1,93 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **ubill** service + */ +export default class UBillClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * GetBalance - 获取账户余额 + * + * See also: https://docs.ucloud.cn/api/ubill-api/get_balance + */ + getBalance(request?: GetBalanceRequest): Promise; + /** + * GetBillDataFileUrl - 生成账单数据文件下载的 url + * + * See also: https://docs.ucloud.cn/api/ubill-api/get_bill_data_file_url + */ + getBillDataFileUrl(request?: GetBillDataFileUrlRequest): Promise; +} +/** + * GetBalance - 获取账户余额 + */ +export interface GetBalanceRequest { +} +/** + * GetBalance - 获取账户余额 + */ +export interface GetBalanceResponse { + /** + * 账户余额信息 + */ + AccountInfo: { + /** + * 冻结账户金额 + */ + AmountFreeze?: string; + /** + * 信用账户余额 + */ + AmountCredit?: string; + /** + * 赠送账户余额 + */ + AmountFree?: string; + /** + * 账户余额 + */ + Amount?: string; + /** + * 账户可用余额 + */ + AmountAvailable?: string; + }; +} +/** + * GetBillDataFileUrl - 生成账单数据文件下载的 url + */ +export interface GetBillDataFileUrlRequest { + /** + * 账期(时间戳格式) + */ + BillPeriod: number; + /** + * 账单类型,传 0 时获取账单总览报表,传 1 获取账单明细报表 + */ + BillType: number; + /** + * 获取账单总览报表时,账单的支付状态,传 0 时获取待支付账单,传 1 时获取已支付账单。获取账单明细报表时该参数无效 + */ + PaidType?: number; + /** + * 如需求其他语言版本的账单则使用此参数。默认中文。如 RequireVersion = "EN",则提供英文版本账单。 + */ + RequireVersion?: string; +} +/** + * GetBillDataFileUrl - 生成账单数据文件下载的 url + */ +export interface GetBillDataFileUrlResponse { + /** + * 交易账单数据下载URL + */ + FileUrl?: string; + /** + * 生成的 URL是否有效,即有对应数据文件 + */ + IsValid?: string; +} diff --git a/lib/services/ubill/index.js b/lib/services/ubill/index.js new file mode 100644 index 0000000..ae9f7c8 --- /dev/null +++ b/lib/services/ubill/index.js @@ -0,0 +1,34 @@ +"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 **ubill** service + */ +class UBillClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * GetBalance - 获取账户余额 + * + * See also: https://docs.ucloud.cn/api/ubill-api/get_balance + */ + getBalance(request) { + const args = Object.assign({ Action: 'GetBalance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetBillDataFileUrl - 生成账单数据文件下载的 url + * + * See also: https://docs.ucloud.cn/api/ubill-api/get_bill_data_file_url + */ + getBillDataFileUrl(request) { + const args = Object.assign({ Action: 'GetBillDataFileUrl' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = UBillClient; diff --git a/lib/services/ucdn/index.d.ts b/lib/services/ucdn/index.d.ts new file mode 100644 index 0000000..30bf268 --- /dev/null +++ b/lib/services/ucdn/index.d.ts @@ -0,0 +1,3221 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **ucdn** service + */ +export default class UCDNClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * DescribeNewUcdnPrefetchCacheTask - 获取预取任务状态 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/describe_new_ucdn_prefetch_cache_task + */ + describeNewUcdnPrefetchCacheTask(request?: DescribeNewUcdnPrefetchCacheTaskRequest): Promise; + /** + * DescribeNewUcdnRefreshCacheTask - 获取域名刷新任务状态 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/describe_new_ucdn_refresh_cache_task + */ + describeNewUcdnRefreshCacheTask(request?: DescribeNewUcdnRefreshCacheTaskRequest): Promise; + /** + * GetNewUcdnDomainBandwidth - 获取域名带宽数据 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_new_ucdn_domain_bandwidth + */ + getNewUcdnDomainBandwidth(request?: GetNewUcdnDomainBandwidthRequest): Promise; + /** + * GetNewUcdnDomainHitRate - 获取域名命中率 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_new_ucdn_domain_hit_rate + */ + getNewUcdnDomainHitRate(request?: GetNewUcdnDomainHitRateRequest): Promise; + /** + * GetNewUcdnDomainHttpCode - 获取域名状态码监控 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_new_ucdn_domain_http_code + */ + getNewUcdnDomainHttpCode(request?: GetNewUcdnDomainHttpCodeRequest): Promise; + /** + * GetNewUcdnDomainHttpCodeV2 - 获取域名详细状态码监控 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_new_ucdn_domain_http_code_v2 + */ + getNewUcdnDomainHttpCodeV2(request?: GetNewUcdnDomainHttpCodeV2Request): Promise; + /** + * GetUcdnDomain95BandwidthV2 - 获取域名九五峰值带宽数据 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain95_bandwidth_v2 + */ + getUcdnDomain95BandwidthV2(request?: GetUcdnDomain95BandwidthV2Request): Promise; + /** + * GetUcdnDomainBandwidthV2 - 获取域名带宽数据(新) + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_bandwidth_v2 + */ + getUcdnDomainBandwidthV2(request?: GetUcdnDomainBandwidthV2Request): Promise; + /** + * GetUcdnDomainConfig - 批量获取加速域名配置 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_config + */ + getUcdnDomainConfig(request?: GetUcdnDomainConfigRequest): Promise; + /** + * GetUcdnDomainHitRate - 获取域名命中率 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_hit_rate + */ + getUcdnDomainHitRate(request?: GetUcdnDomainHitRateRequest): Promise; + /** + * GetUcdnDomainHttpCodeV2 - 获取域名状态码信息 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_http_code_v2 + */ + getUcdnDomainHttpCodeV2(request?: GetUcdnDomainHttpCodeV2Request): Promise; + /** + * GetUcdnDomainInfoList - 获取域名基本信息 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_info_list + */ + getUcdnDomainInfoList(request?: GetUcdnDomainInfoListRequest): Promise; + /** + * GetUcdnDomainLog - 获取加速域名原始日志 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_log + */ + getUcdnDomainLog(request?: GetUcdnDomainLogRequest): Promise; + /** + * GetUcdnDomainOriginRequestNum - 获取域名回源请求数 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_origin_request_num + */ + getUcdnDomainOriginRequestNum(request?: GetUcdnDomainOriginRequestNumRequest): Promise; + /** + * GetUcdnDomainPrefetchEnable - 获取域名预取开启状态 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_prefetch_enable + */ + getUcdnDomainPrefetchEnable(request?: GetUcdnDomainPrefetchEnableRequest): Promise; + /** + * GetUcdnDomainRequestNumV2 - 获取域名请求数 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_request_num_v2 + */ + getUcdnDomainRequestNumV2(request?: GetUcdnDomainRequestNumV2Request): Promise; + /** + * GetUcdnDomainRequestNumV3 - 获取域名请求数 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_request_num_v3 + */ + getUcdnDomainRequestNumV3(request?: GetUcdnDomainRequestNumV3Request): Promise; + /** + * GetUcdnDomainTraffic - 获取加速域名流量使用信息 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_traffic + */ + getUcdnDomainTraffic(request?: GetUcdnDomainTrafficRequest): Promise; + /** + * GetUcdnPassBandwidth - 获取回源带宽数据(cdn回客户源站部分) + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_pass_bandwidth + */ + getUcdnPassBandwidth(request?: GetUcdnPassBandwidthRequest): Promise; + /** + * GetUcdnPassBandwidthV2 - 获取回源带宽数据(cdn回客户源站部分) + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_pass_bandwidth_v2 + */ + getUcdnPassBandwidthV2(request?: GetUcdnPassBandwidthV2Request): Promise; + /** + * GetUcdnProIspBandwidthV2 - 按省份运营商获取域名带宽数据 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_pro_isp_bandwidth_v2 + */ + getUcdnProIspBandwidthV2(request?: GetUcdnProIspBandwidthV2Request): Promise; + /** + * GetUcdnProIspRequestNumV2 - 按省份运营商获取域名请求数 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_pro_isp_request_num_v2 + */ + getUcdnProIspRequestNumV2(request?: GetUcdnProIspRequestNumV2Request): Promise; + /** + * GetUcdnTraffic - 获取流量信息 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_traffic + */ + getUcdnTraffic(request?: GetUcdnTrafficRequest): Promise; + /** + * GetUcdnTrafficV2 - 获取流量信息 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_traffic_v2 + */ + getUcdnTrafficV2(request?: GetUcdnTrafficV2Request): Promise; + /** + * PrefetchNewUcdnDomainCache - 提交预取任务 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/prefetch_new_ucdn_domain_cache + */ + prefetchNewUcdnDomainCache(request?: PrefetchNewUcdnDomainCacheRequest): Promise; + /** + * RefreshNewUcdnDomainCache - 刷新缓存 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/refresh_new_ucdn_domain_cache + */ + refreshNewUcdnDomainCache(request?: RefreshNewUcdnDomainCacheRequest): Promise; + /** + * SwitchUcdnChargeType - 切换账号计费方式 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/switch_ucdn_charge_type + */ + switchUcdnChargeType(request?: SwitchUcdnChargeTypeRequest): Promise; +} +/** + * DescribeNewUcdnPrefetchCacheTask - 获取预取任务状态 + */ +export interface DescribeNewUcdnPrefetchCacheTaskRequest { + /** + * 提交任务时返回的任务ID + */ + TaskId?: string[]; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; + /** + * 需要获取的内容预热的状态,枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败; unknow:未知,默认选择所有状态 + */ + Status?: string; + /** + * 数据偏移量,默认为0,自然数 + */ + Offset?: number; + /** + * 返回数据长度,默认全部,自然数 + */ + Limit?: number; +} +/** + * DescribeNewUcdnPrefetchCacheTask - 获取预取任务状态 + */ +export interface DescribeNewUcdnPrefetchCacheTaskResponse { + /** + * 预热任务的总数 + */ + TotalCount?: number; + /** + * 预热任务信息,参考TaskInfo + */ + TaskList?: { + /** + * 提交任务时返回的任务ID + */ + TaskId?: string; + /** + * 任务url的信息列表,参考UrlProgressInfo + */ + UrlLists?: { + /** + * 刷新的单条url + */ + Url?: string; + /** + * 刷新任务创建的时间。格式为Unix Timestamp + */ + CreateTime?: number; + /** + * 任务完成时间。格式为Unix Timestamp + */ + FinishTime?: number; + /** + * 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知 + */ + Status?: string; + /** + * 刷新进度,单位% + */ + Progress?: number; + }[]; + /** + * 刷新任务创建的时间。格式为Unix Timestamp + */ + CreateTime?: number; + /** + * 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知 + */ + Status?: string; + }[]; +} +/** + * DescribeNewUcdnRefreshCacheTask - 获取域名刷新任务状态 + */ +export interface DescribeNewUcdnRefreshCacheTaskRequest { + /** + * 提交任务时返回的任务ID + */ + TaskId?: string[]; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; + /** + * 需要获取的内容刷新的状态,枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败; unknow:未知,默认选择所有状态 + */ + Status?: string; + /** + * 数据偏移量,默认为0,自然数 + */ + Offset?: number; + /** + * 返回数据长度,默认全部,自然数 + */ + Limit?: number; +} +/** + * DescribeNewUcdnRefreshCacheTask - 获取域名刷新任务状态 + */ +export interface DescribeNewUcdnRefreshCacheTaskResponse { + /** + * 刷新任务的总数 + */ + TotalCount?: number; + /** + * 刷新任务信息,参考TaskInfo + */ + TaskList?: { + /** + * 提交任务时返回的任务ID + */ + TaskId?: string; + /** + * 任务url的信息列表,参考UrlProgressInfo + */ + UrlLists?: { + /** + * 刷新的单条url + */ + Url?: string; + /** + * 刷新任务创建的时间。格式为Unix Timestamp + */ + CreateTime?: number; + /** + * 任务完成时间。格式为Unix Timestamp + */ + FinishTime?: number; + /** + * 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知 + */ + Status?: string; + /** + * 刷新进度,单位% + */ + Progress?: number; + }[]; + /** + * 刷新任务创建的时间。格式为Unix Timestamp + */ + CreateTime?: number; + /** + * 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知 + */ + Status?: string; + }[]; +} +/** + * GetNewUcdnDomainBandwidth - 获取域名带宽数据 + */ +export interface GetNewUcdnDomainBandwidthRequest { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度) + */ + Type: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域 + */ + Areacode?: string; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; +} +/** + * GetNewUcdnDomainBandwidth - 获取域名带宽数据 + */ +export interface GetNewUcdnDomainBandwidthResponse { + /** + * 带宽信息列表,参见BandwidthInfo + */ + BandwidthList?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps(如果请求参数Type为0,则Value是五分钟粒度的带宽值,如果Type为1,则Value是1小时的带宽峰值,如果Type为2,则Value是一天内的带宽峰值) + */ + CdnBandwidth?: number; + }[]; + /** + * 从起始时间到结束时间内的所使用的CDN总流量,单位GB + */ + Traffic?: number; +} +/** + * GetNewUcdnDomainHitRate - 获取域名命中率 + */ +export interface GetNewUcdnDomainHitRateRequest { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度)默认5分钟 + */ + Type?: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; +} +/** + * GetNewUcdnDomainHitRate - 获取域名命中率 + */ +export interface GetNewUcdnDomainHitRateResponse { + /** + * 请求数实例表。 + */ + HitRateList?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 流量命中率,单位% + */ + FlowHitRate?: number; + /** + * 请求数命中率,单位% + */ + RequestHitRate?: number; + }[]; +} +/** + * GetNewUcdnDomainHttpCode - 获取域名状态码监控 + */ +export interface GetNewUcdnDomainHttpCodeRequest { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度) + */ + Type: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; +} +/** + * GetNewUcdnDomainHttpCode - 获取域名状态码监控 + */ +export interface GetNewUcdnDomainHttpCodeResponse { + /** + * 状态码实例表。详细见HttpCodeInfo + */ + HttpCodeDetail?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 1xx数量 + */ + HttpOneXX?: number; + /** + * 2xx数量 + */ + HttpTwoXX?: number; + /** + * 3xx数量 + */ + HttpThreeXX?: number; + /** + * 4xx数量 + */ + HttpFourXX?: number; + /** + * 5xx数量 + */ + HttpFiveXX?: number; + }[]; +} +/** + * GetNewUcdnDomainHttpCodeV2 - 获取域名详细状态码监控 + */ +export interface GetNewUcdnDomainHttpCodeV2Request { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天粒度,3表示按照一分钟粒度) + */ + Type: number; + /** + * 查询的起始时间,格式为Unix Timestamp。 + */ + BeginTime: number; + /** + * 查询的结束时间,格式为Unix Timestamp。 + */ + EndTime: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; +} +/** + * GetNewUcdnDomainHttpCodeV2 - 获取域名详细状态码监控 + */ +export interface GetNewUcdnDomainHttpCodeV2Response { + /** + * 状态码详情 + */ + HttpCodeV2Detail?: { + /** + * 时间 + */ + Time?: number; + /** + * 当前分组的总状态码数 + */ + Total?: number; + /** + * http100数量 + */ + Http100?: number; + /** + * http101数量 + */ + Http101?: number; + /** + * http102数量 + */ + Http102?: number; + /** + * http200数量 + */ + Http200?: number; + /** + * http201数量 + */ + Http201?: number; + /** + * http202数量 + */ + Http202?: number; + /** + * http203数量 + */ + Http203?: number; + /** + * http204数量 + */ + Http204?: number; + /** + * http205数量 + */ + Http205?: number; + /** + * http206数量 + */ + Http206?: number; + /** + * http207数量 + */ + Http207?: number; + /** + * http300数量 + */ + Http300?: number; + /** + * http301数量 + */ + Http301?: number; + /** + * http302数量 + */ + Http302?: number; + /** + * http303数量 + */ + Http303?: number; + /** + * http304数量 + */ + Http304?: number; + /** + * http305数量 + */ + Http305?: number; + /** + * http306数量 + */ + Http306?: number; + /** + * http307数量 + */ + Http307?: number; + /** + * http400数量 + */ + Http400?: number; + /** + * http401数量 + */ + Http401?: number; + /** + * http402数量 + */ + Http402?: number; + /** + * http403数量 + */ + Http403?: number; + /** + * http404数量 + */ + Http404?: number; + /** + * http405数量 + */ + Http405?: number; + /** + * http406数量 + */ + Http406?: number; + /** + * http407数量 + */ + Http407?: number; + /** + * http408数量 + */ + Http408?: number; + /** + * http409数量 + */ + Http409?: number; + /** + * http410数量 + */ + Http410?: number; + /** + * http411数量 + */ + Http411?: number; + /** + * http412数量 + */ + Http412?: number; + /** + * http413数量 + */ + Http413?: number; + /** + * http414数量 + */ + Http414?: number; + /** + * http415数量 + */ + Http415?: number; + /** + * http416数量 + */ + Http416?: number; + /** + * http417数量 + */ + Http417?: number; + /** + * http418数量 + */ + Http418?: number; + /** + * http421数量 + */ + Http421?: number; + /** + * http422数量 + */ + Http422?: number; + /** + * http423数量 + */ + Http423?: number; + /** + * http424数量 + */ + Http424?: number; + /** + * http425数量 + */ + Http425?: number; + /** + * http426数量 + */ + Http426?: number; + /** + * http449数量 + */ + Http449?: number; + /** + * http451数量 + */ + Http451?: number; + /** + * http500数量 + */ + Http500?: number; + /** + * http501数量 + */ + Http501?: number; + /** + * http502数量 + */ + Http502?: number; + /** + * http503数量 + */ + Http503?: number; + /** + * http504数量 + */ + Http504?: number; + /** + * http505数量 + */ + Http505?: number; + /** + * http506数量 + */ + Http506?: number; + /** + * http507数量 + */ + Http507?: number; + /** + * http509数量 + */ + Http509?: number; + /** + * http510数量 + */ + Http510?: number; + }[]; +} +/** + * GetUcdnDomain95BandwidthV2 - 获取域名九五峰值带宽数据 + */ +export interface GetUcdnDomain95BandwidthV2Request { + /** + * 查询的起始日期,格式为Unix Timestamp + */ + BeginTime: number; + /** + * 查询的结束日期,格式为Unix Timestamp + */ + EndTime: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域 + */ + Areacode?: string; +} +/** + * GetUcdnDomain95BandwidthV2 - 获取域名九五峰值带宽数据 + */ +export interface GetUcdnDomain95BandwidthV2Response { + /** + * 查询时间期间的95带宽时间点 Unix时间戳 + */ + Time: number; + /** + * 查询期间的CDN的95带宽值,单位Mbps + */ + CdnBandwidth?: number; +} +/** + * GetUcdnDomainBandwidthV2 - 获取域名带宽数据(新) + */ +export interface GetUcdnDomainBandwidthV2Request { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照1分钟粒度) + */ + Type: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域 + */ + Areacode?: string; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; + /** + * 协议,http、https 不传则查所有协议的带宽 + */ + Protocol?: string; +} +/** + * GetUcdnDomainBandwidthV2 - 获取域名带宽数据(新) + */ +export interface GetUcdnDomainBandwidthV2Response { + /** + * 带宽信息列表,参见BandwidthTrafficInfo + */ + BandwidthTrafficList?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time: number; + /** + * 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps(如果请求参数Type为0,则Value是五分钟粒度的带宽值,如果Type为1,则Value是1小时的带宽峰值,如果Type为2,则Value是一天内的带宽峰值) + */ + CdnBandwidth: number; + /** + * 对应时间粒度的流量,单位字节 + */ + Traffic: number; + }[]; +} +/** + * GetUcdnDomainConfig - 批量获取加速域名配置 + */ +export interface GetUcdnDomainConfigRequest { + /** + * 数据偏移量,默认0,非负整数 + */ + Offset?: number; + /** + * 返回数据长度, 默认全部,非负整数 + */ + Limit?: number; + /** + * 域名id,创建域名时生成的id。默认获取账号下的所有域名信息,n为自然数,从DomainId.0开始。 + */ + DomainId?: string[]; + /** + * 产品类型ucdn,可不填,默认为ucdn + */ + ChannelType?: string; +} +/** + * GetUcdnDomainConfig - 批量获取加速域名配置 + */ +export interface GetUcdnDomainConfigResponse { + /** + * 获取的域名信息,具体参考下面DomainConfig + */ + DomainList: { + /** + * 查询带宽区域 cn代表国内 abroad代表海外 all表示全部区域 + */ + AreaCode: string; + /** + * 加速域名的业务类型,web代表网站,stream代表视频 ,download 代表下载 + */ + CdnType: string; + /** + * 创建的加速域名的当前的状态。check代表审核中,checkSuccess代表审核通过,checkFail代表审核失败,enable代表加速中,disable代表停止加速,delete代表删除加速enableing代表正在开启加速,disableing代表正在停止加速中,deleteing代表删除中 + */ + Status: string; + /** + * cdn域名。创建加速域名生成的cdn域名,用于设置CNAME记录 + */ + Cname: string; + /** + * 域名创建的时间。格式:时间戳 + */ + CreateTime: number; + /** + * 测试url。用于域名创建加速时的测试 + */ + TestUrl: string; + /** + * 国内https状态 enableing-开启中 fail-开启失败 enable-启用 disable-未启用 + */ + HttpsStatusCn: string; + /** + * 国外https状态 enableing-开启中 fail-开启失败 enable-启用 disable-未启用 + */ + HttpsStatusAbroad: string; + /** + * 国内证书名称 + */ + CertNameCn: string; + /** + * 国外证书名称 + */ + CertNameAbroad: string; + /** + * 业务组:Default + */ + Tag: string; + /** + * 域名Id + */ + DomainId?: string; + /** + * 域名 + */ + Domain?: string; + /** + * 源站配置 参考OriginConf + */ + OriginConf?: { + /** + * 源站ip即cdn服务器回源访问的ip地址。多个源站ip,可以这样表述,如:["1.1.1.1","2.2.2.2"] + */ + OriginIpList?: string[]; + /** + * 回源Http请求头部Host,默认是加速域名 + */ + OriginHost?: string; + /** + * 回源端口 + */ + OriginPort?: number; + /** + * 1如果为false表示BackupOriginIp为空,表示没有备份源站,忽略BackupOriginIp,BackupOriginHost字段2如果为true表示BackupOriginIp.n必须至少有一个备份源站地址 + */ + BackupOriginEnable?: boolean; + /** + * 备份源站ip即cdn服务器回源访问的ip地址。多个源站ip,可以这样表述,如:["1.1.1.1","2.2.2.2"] + */ + BackupOriginIpList?: string[]; + /** + * 备份回源Http请求头部Host,默认是加速域名 + */ + BackupOriginHost?: string; + /** + * 主源响应的回源错误码(如:404|500),默认空字符串 + */ + OriginErrorCode?: string; + /** + * 回主源的回源失败数,默认1 + */ + OriginErrorNum?: number; + /** + * 源站协议http,http|https 默认http + */ + OriginProtocol?: string; + /** + * 跟随301跳转 0=不跟随 1=跟随 + */ + OriginFollow301?: number; + }; + /** + * 访问控制配置 参考AccessControlConf + */ + AccessControlConf?: { + /** + * ip黑名单,多个ip,可表示为:IpBlackList.0=1.1.1.1,IpBlackList.1=2.2.2.2 + */ + IpBlackList?: string[]; + /** + * refer配置 + */ + ReferConf?: { + /** + * Refer防盗链配置 0白名单,1黑名单 + */ + ReferType?: number; + /** + * ReferType为白名单时(删除),NullRefer为0代表不允许NULL refer访问,为1代表允许Null refer访问 + */ + NullRefer?: number; + /** + * Refer防盗链规则列表,支持正则表达式 + */ + ReferList?: string[]; + }; + }; + /** + * 缓存配置 参考CacheAllConfig + */ + CacheConf?: { + /** + * 缓存Host,不同的域名可以配置为同一个CacheHost来实现缓存共享,默认为加速域名 + */ + CacheHost?: string; + /** + * 缓存配置列表,参见CacheConf + */ + CacheList?: { + /** + * 状态码模式,非200,206状态码,多个状态码用竖线(|)分隔,该属性仅仅在状态码缓存配置列表中返回 + */ + HttpCodePattern?: string; + /** + * 路径模式,支持正则 + */ + PathPattern?: string; + /** + * 缓存规则描述 + */ + Description?: string; + /** + * 缓存时间 + */ + CacheTTL?: number; + /** + * 缓存时间的单位。sec(秒),min(分钟),hour(小时),day(天)。上限1年。 + */ + CacheUnit?: string; + /** + * 是否缓存,true为缓存,flase为不缓存。为flase的情况下,CacheTTL和CacheUnit强制不生效 + */ + CacheBehavior?: boolean; + /** + * 是否优先遵循源站头部缓存策略,false为不优先遵循源站,true为优先遵循源站缓存头部。默认为0 + */ + FollowOriginRule?: boolean; + }[]; + /** + * 状态码缓存配置列表,参见CacheConf + */ + HttpCodeCacheList?: { + /** + * 状态码模式,非200,206状态码,多个状态码用竖线(|)分隔,该属性仅仅在状态码缓存配置列表中返回 + */ + HttpCodePattern?: string; + /** + * 路径模式,支持正则 + */ + PathPattern?: string; + /** + * 缓存规则描述 + */ + Description?: string; + /** + * 缓存时间 + */ + CacheTTL?: number; + /** + * 缓存时间的单位。sec(秒),min(分钟),hour(小时),day(天)。上限1年。 + */ + CacheUnit?: string; + /** + * 是否缓存,true为缓存,flase为不缓存。为flase的情况下,CacheTTL和CacheUnit强制不生效 + */ + CacheBehavior?: boolean; + /** + * 是否优先遵循源站头部缓存策略,false为不优先遵循源站,true为优先遵循源站缓存头部。默认为0 + */ + FollowOriginRule?: boolean; + }[]; + /** + * 忽略参数缓存配置列表,参见CacheKeyInfo + */ + CacheKeyList?: { + /** + * 是否忽略 + */ + Ignore?: boolean; + /** + * 路径模式,支持正则 + */ + PathPattern?: string; + /** + * 自定义变量,以$符号开头,多个变量用加号(+)连接,$querystring表示所有变量 + */ + QueryString?: string; + }[]; + }; + /** + * 高级配置 参考AdvancedConf + */ + AdvancedConf?: { + /** + * 客户端响应http头列表 + */ + HttpClientHeader?: string[]; + /** + * 源站http头列表 + */ + HttpOriginHeader?: string[]; + /** + * http转https回源 true是,false否 + */ + Http2Https?: boolean; + }; + }[]; +} +/** + * GetUcdnDomainHitRate - 获取域名命中率 + */ +export interface GetUcdnDomainHitRateRequest { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照一分钟的粒度)默认5分钟 + */ + Type: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; + /** + * 命中类型:0=整体命中 1=边缘命中 默认是0 + */ + HitType?: number; +} +/** + * GetUcdnDomainHitRate - 获取域名命中率 + */ +export interface GetUcdnDomainHitRateResponse { + /** + * 请求数实例表。 + */ + HitRateList?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 总流量命中率,单位% + */ + FlowHitRate?: number; + /** + * 请求数命中率,单位% + */ + RequestHitRate?: number; + }[]; +} +/** + * GetUcdnDomainHttpCodeV2 - 获取域名状态码信息 + */ +export interface GetUcdnDomainHttpCodeV2Request { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示1分钟粒度) + */ + Type: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; + /** + * 指定获取的状态码是边缘还是上层 edge 表示边缘 layer 表示上层 + */ + Layer?: string; +} +/** + * GetUcdnDomainHttpCodeV2 - 获取域名状态码信息 + */ +export interface GetUcdnDomainHttpCodeV2Response { + /** + * 状态码实例表。详细见HttpCodeInfoV2 + */ + HttpCodeDetail?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 1xx信息,参考HttpCodeV2Detail结构 + */ + Http1XX?: { + /** + * 时间 + */ + Time?: number; + /** + * 当前分组的总状态码数 + */ + Total?: number; + /** + * http100数量 + */ + Http100?: number; + /** + * http101数量 + */ + Http101?: number; + /** + * http102数量 + */ + Http102?: number; + /** + * http200数量 + */ + Http200?: number; + /** + * http201数量 + */ + Http201?: number; + /** + * http202数量 + */ + Http202?: number; + /** + * http203数量 + */ + Http203?: number; + /** + * http204数量 + */ + Http204?: number; + /** + * http205数量 + */ + Http205?: number; + /** + * http206数量 + */ + Http206?: number; + /** + * http207数量 + */ + Http207?: number; + /** + * http300数量 + */ + Http300?: number; + /** + * http301数量 + */ + Http301?: number; + /** + * http302数量 + */ + Http302?: number; + /** + * http303数量 + */ + Http303?: number; + /** + * http304数量 + */ + Http304?: number; + /** + * http305数量 + */ + Http305?: number; + /** + * http306数量 + */ + Http306?: number; + /** + * http307数量 + */ + Http307?: number; + /** + * http400数量 + */ + Http400?: number; + /** + * http401数量 + */ + Http401?: number; + /** + * http402数量 + */ + Http402?: number; + /** + * http403数量 + */ + Http403?: number; + /** + * http404数量 + */ + Http404?: number; + /** + * http405数量 + */ + Http405?: number; + /** + * http406数量 + */ + Http406?: number; + /** + * http407数量 + */ + Http407?: number; + /** + * http408数量 + */ + Http408?: number; + /** + * http409数量 + */ + Http409?: number; + /** + * http410数量 + */ + Http410?: number; + /** + * http411数量 + */ + Http411?: number; + /** + * http412数量 + */ + Http412?: number; + /** + * http413数量 + */ + Http413?: number; + /** + * http414数量 + */ + Http414?: number; + /** + * http415数量 + */ + Http415?: number; + /** + * http416数量 + */ + Http416?: number; + /** + * http417数量 + */ + Http417?: number; + /** + * http418数量 + */ + Http418?: number; + /** + * http421数量 + */ + Http421?: number; + /** + * http422数量 + */ + Http422?: number; + /** + * http423数量 + */ + Http423?: number; + /** + * http424数量 + */ + Http424?: number; + /** + * http425数量 + */ + Http425?: number; + /** + * http426数量 + */ + Http426?: number; + /** + * http449数量 + */ + Http449?: number; + /** + * http451数量 + */ + Http451?: number; + /** + * http500数量 + */ + Http500?: number; + /** + * http501数量 + */ + Http501?: number; + /** + * http502数量 + */ + Http502?: number; + /** + * http503数量 + */ + Http503?: number; + /** + * http504数量 + */ + Http504?: number; + /** + * http505数量 + */ + Http505?: number; + /** + * http506数量 + */ + Http506?: number; + /** + * http507数量 + */ + Http507?: number; + /** + * http509数量 + */ + Http509?: number; + /** + * http510数量 + */ + Http510?: number; + }; + /** + * 2xx信息,参考HttpCodeV2Detail结构 + */ + Http2XX?: { + /** + * 时间 + */ + Time?: number; + /** + * 当前分组的总状态码数 + */ + Total?: number; + /** + * http100数量 + */ + Http100?: number; + /** + * http101数量 + */ + Http101?: number; + /** + * http102数量 + */ + Http102?: number; + /** + * http200数量 + */ + Http200?: number; + /** + * http201数量 + */ + Http201?: number; + /** + * http202数量 + */ + Http202?: number; + /** + * http203数量 + */ + Http203?: number; + /** + * http204数量 + */ + Http204?: number; + /** + * http205数量 + */ + Http205?: number; + /** + * http206数量 + */ + Http206?: number; + /** + * http207数量 + */ + Http207?: number; + /** + * http300数量 + */ + Http300?: number; + /** + * http301数量 + */ + Http301?: number; + /** + * http302数量 + */ + Http302?: number; + /** + * http303数量 + */ + Http303?: number; + /** + * http304数量 + */ + Http304?: number; + /** + * http305数量 + */ + Http305?: number; + /** + * http306数量 + */ + Http306?: number; + /** + * http307数量 + */ + Http307?: number; + /** + * http400数量 + */ + Http400?: number; + /** + * http401数量 + */ + Http401?: number; + /** + * http402数量 + */ + Http402?: number; + /** + * http403数量 + */ + Http403?: number; + /** + * http404数量 + */ + Http404?: number; + /** + * http405数量 + */ + Http405?: number; + /** + * http406数量 + */ + Http406?: number; + /** + * http407数量 + */ + Http407?: number; + /** + * http408数量 + */ + Http408?: number; + /** + * http409数量 + */ + Http409?: number; + /** + * http410数量 + */ + Http410?: number; + /** + * http411数量 + */ + Http411?: number; + /** + * http412数量 + */ + Http412?: number; + /** + * http413数量 + */ + Http413?: number; + /** + * http414数量 + */ + Http414?: number; + /** + * http415数量 + */ + Http415?: number; + /** + * http416数量 + */ + Http416?: number; + /** + * http417数量 + */ + Http417?: number; + /** + * http418数量 + */ + Http418?: number; + /** + * http421数量 + */ + Http421?: number; + /** + * http422数量 + */ + Http422?: number; + /** + * http423数量 + */ + Http423?: number; + /** + * http424数量 + */ + Http424?: number; + /** + * http425数量 + */ + Http425?: number; + /** + * http426数量 + */ + Http426?: number; + /** + * http449数量 + */ + Http449?: number; + /** + * http451数量 + */ + Http451?: number; + /** + * http500数量 + */ + Http500?: number; + /** + * http501数量 + */ + Http501?: number; + /** + * http502数量 + */ + Http502?: number; + /** + * http503数量 + */ + Http503?: number; + /** + * http504数量 + */ + Http504?: number; + /** + * http505数量 + */ + Http505?: number; + /** + * http506数量 + */ + Http506?: number; + /** + * http507数量 + */ + Http507?: number; + /** + * http509数量 + */ + Http509?: number; + /** + * http510数量 + */ + Http510?: number; + }; + /** + * 3xx信息,参考HttpCodeV2Detail结构 + */ + Http3XX?: { + /** + * 时间 + */ + Time?: number; + /** + * 当前分组的总状态码数 + */ + Total?: number; + /** + * http100数量 + */ + Http100?: number; + /** + * http101数量 + */ + Http101?: number; + /** + * http102数量 + */ + Http102?: number; + /** + * http200数量 + */ + Http200?: number; + /** + * http201数量 + */ + Http201?: number; + /** + * http202数量 + */ + Http202?: number; + /** + * http203数量 + */ + Http203?: number; + /** + * http204数量 + */ + Http204?: number; + /** + * http205数量 + */ + Http205?: number; + /** + * http206数量 + */ + Http206?: number; + /** + * http207数量 + */ + Http207?: number; + /** + * http300数量 + */ + Http300?: number; + /** + * http301数量 + */ + Http301?: number; + /** + * http302数量 + */ + Http302?: number; + /** + * http303数量 + */ + Http303?: number; + /** + * http304数量 + */ + Http304?: number; + /** + * http305数量 + */ + Http305?: number; + /** + * http306数量 + */ + Http306?: number; + /** + * http307数量 + */ + Http307?: number; + /** + * http400数量 + */ + Http400?: number; + /** + * http401数量 + */ + Http401?: number; + /** + * http402数量 + */ + Http402?: number; + /** + * http403数量 + */ + Http403?: number; + /** + * http404数量 + */ + Http404?: number; + /** + * http405数量 + */ + Http405?: number; + /** + * http406数量 + */ + Http406?: number; + /** + * http407数量 + */ + Http407?: number; + /** + * http408数量 + */ + Http408?: number; + /** + * http409数量 + */ + Http409?: number; + /** + * http410数量 + */ + Http410?: number; + /** + * http411数量 + */ + Http411?: number; + /** + * http412数量 + */ + Http412?: number; + /** + * http413数量 + */ + Http413?: number; + /** + * http414数量 + */ + Http414?: number; + /** + * http415数量 + */ + Http415?: number; + /** + * http416数量 + */ + Http416?: number; + /** + * http417数量 + */ + Http417?: number; + /** + * http418数量 + */ + Http418?: number; + /** + * http421数量 + */ + Http421?: number; + /** + * http422数量 + */ + Http422?: number; + /** + * http423数量 + */ + Http423?: number; + /** + * http424数量 + */ + Http424?: number; + /** + * http425数量 + */ + Http425?: number; + /** + * http426数量 + */ + Http426?: number; + /** + * http449数量 + */ + Http449?: number; + /** + * http451数量 + */ + Http451?: number; + /** + * http500数量 + */ + Http500?: number; + /** + * http501数量 + */ + Http501?: number; + /** + * http502数量 + */ + Http502?: number; + /** + * http503数量 + */ + Http503?: number; + /** + * http504数量 + */ + Http504?: number; + /** + * http505数量 + */ + Http505?: number; + /** + * http506数量 + */ + Http506?: number; + /** + * http507数量 + */ + Http507?: number; + /** + * http509数量 + */ + Http509?: number; + /** + * http510数量 + */ + Http510?: number; + }; + /** + * 4xx信息,参考HttpCodeV2Detail结构 + */ + Http4XX?: { + /** + * 时间 + */ + Time?: number; + /** + * 当前分组的总状态码数 + */ + Total?: number; + /** + * http100数量 + */ + Http100?: number; + /** + * http101数量 + */ + Http101?: number; + /** + * http102数量 + */ + Http102?: number; + /** + * http200数量 + */ + Http200?: number; + /** + * http201数量 + */ + Http201?: number; + /** + * http202数量 + */ + Http202?: number; + /** + * http203数量 + */ + Http203?: number; + /** + * http204数量 + */ + Http204?: number; + /** + * http205数量 + */ + Http205?: number; + /** + * http206数量 + */ + Http206?: number; + /** + * http207数量 + */ + Http207?: number; + /** + * http300数量 + */ + Http300?: number; + /** + * http301数量 + */ + Http301?: number; + /** + * http302数量 + */ + Http302?: number; + /** + * http303数量 + */ + Http303?: number; + /** + * http304数量 + */ + Http304?: number; + /** + * http305数量 + */ + Http305?: number; + /** + * http306数量 + */ + Http306?: number; + /** + * http307数量 + */ + Http307?: number; + /** + * http400数量 + */ + Http400?: number; + /** + * http401数量 + */ + Http401?: number; + /** + * http402数量 + */ + Http402?: number; + /** + * http403数量 + */ + Http403?: number; + /** + * http404数量 + */ + Http404?: number; + /** + * http405数量 + */ + Http405?: number; + /** + * http406数量 + */ + Http406?: number; + /** + * http407数量 + */ + Http407?: number; + /** + * http408数量 + */ + Http408?: number; + /** + * http409数量 + */ + Http409?: number; + /** + * http410数量 + */ + Http410?: number; + /** + * http411数量 + */ + Http411?: number; + /** + * http412数量 + */ + Http412?: number; + /** + * http413数量 + */ + Http413?: number; + /** + * http414数量 + */ + Http414?: number; + /** + * http415数量 + */ + Http415?: number; + /** + * http416数量 + */ + Http416?: number; + /** + * http417数量 + */ + Http417?: number; + /** + * http418数量 + */ + Http418?: number; + /** + * http421数量 + */ + Http421?: number; + /** + * http422数量 + */ + Http422?: number; + /** + * http423数量 + */ + Http423?: number; + /** + * http424数量 + */ + Http424?: number; + /** + * http425数量 + */ + Http425?: number; + /** + * http426数量 + */ + Http426?: number; + /** + * http449数量 + */ + Http449?: number; + /** + * http451数量 + */ + Http451?: number; + /** + * http500数量 + */ + Http500?: number; + /** + * http501数量 + */ + Http501?: number; + /** + * http502数量 + */ + Http502?: number; + /** + * http503数量 + */ + Http503?: number; + /** + * http504数量 + */ + Http504?: number; + /** + * http505数量 + */ + Http505?: number; + /** + * http506数量 + */ + Http506?: number; + /** + * http507数量 + */ + Http507?: number; + /** + * http509数量 + */ + Http509?: number; + /** + * http510数量 + */ + Http510?: number; + }; + /** + * 5xx信息,参考HttpCodeV2Detail结构 + */ + Http5XX?: { + /** + * 时间 + */ + Time?: number; + /** + * 当前分组的总状态码数 + */ + Total?: number; + /** + * http100数量 + */ + Http100?: number; + /** + * http101数量 + */ + Http101?: number; + /** + * http102数量 + */ + Http102?: number; + /** + * http200数量 + */ + Http200?: number; + /** + * http201数量 + */ + Http201?: number; + /** + * http202数量 + */ + Http202?: number; + /** + * http203数量 + */ + Http203?: number; + /** + * http204数量 + */ + Http204?: number; + /** + * http205数量 + */ + Http205?: number; + /** + * http206数量 + */ + Http206?: number; + /** + * http207数量 + */ + Http207?: number; + /** + * http300数量 + */ + Http300?: number; + /** + * http301数量 + */ + Http301?: number; + /** + * http302数量 + */ + Http302?: number; + /** + * http303数量 + */ + Http303?: number; + /** + * http304数量 + */ + Http304?: number; + /** + * http305数量 + */ + Http305?: number; + /** + * http306数量 + */ + Http306?: number; + /** + * http307数量 + */ + Http307?: number; + /** + * http400数量 + */ + Http400?: number; + /** + * http401数量 + */ + Http401?: number; + /** + * http402数量 + */ + Http402?: number; + /** + * http403数量 + */ + Http403?: number; + /** + * http404数量 + */ + Http404?: number; + /** + * http405数量 + */ + Http405?: number; + /** + * http406数量 + */ + Http406?: number; + /** + * http407数量 + */ + Http407?: number; + /** + * http408数量 + */ + Http408?: number; + /** + * http409数量 + */ + Http409?: number; + /** + * http410数量 + */ + Http410?: number; + /** + * http411数量 + */ + Http411?: number; + /** + * http412数量 + */ + Http412?: number; + /** + * http413数量 + */ + Http413?: number; + /** + * http414数量 + */ + Http414?: number; + /** + * http415数量 + */ + Http415?: number; + /** + * http416数量 + */ + Http416?: number; + /** + * http417数量 + */ + Http417?: number; + /** + * http418数量 + */ + Http418?: number; + /** + * http421数量 + */ + Http421?: number; + /** + * http422数量 + */ + Http422?: number; + /** + * http423数量 + */ + Http423?: number; + /** + * http424数量 + */ + Http424?: number; + /** + * http425数量 + */ + Http425?: number; + /** + * http426数量 + */ + Http426?: number; + /** + * http449数量 + */ + Http449?: number; + /** + * http451数量 + */ + Http451?: number; + /** + * http500数量 + */ + Http500?: number; + /** + * http501数量 + */ + Http501?: number; + /** + * http502数量 + */ + Http502?: number; + /** + * http503数量 + */ + Http503?: number; + /** + * http504数量 + */ + Http504?: number; + /** + * http505数量 + */ + Http505?: number; + /** + * http506数量 + */ + Http506?: number; + /** + * http507数量 + */ + Http507?: number; + /** + * http509数量 + */ + Http509?: number; + /** + * http510数量 + */ + Http510?: number; + }; + /** + * 6xx信息,参考HttpCodeV2Detail结构 + */ + Http6XX?: { + /** + * 时间 + */ + Time?: number; + /** + * 当前分组的总状态码数 + */ + Total?: number; + /** + * http100数量 + */ + Http100?: number; + /** + * http101数量 + */ + Http101?: number; + /** + * http102数量 + */ + Http102?: number; + /** + * http200数量 + */ + Http200?: number; + /** + * http201数量 + */ + Http201?: number; + /** + * http202数量 + */ + Http202?: number; + /** + * http203数量 + */ + Http203?: number; + /** + * http204数量 + */ + Http204?: number; + /** + * http205数量 + */ + Http205?: number; + /** + * http206数量 + */ + Http206?: number; + /** + * http207数量 + */ + Http207?: number; + /** + * http300数量 + */ + Http300?: number; + /** + * http301数量 + */ + Http301?: number; + /** + * http302数量 + */ + Http302?: number; + /** + * http303数量 + */ + Http303?: number; + /** + * http304数量 + */ + Http304?: number; + /** + * http305数量 + */ + Http305?: number; + /** + * http306数量 + */ + Http306?: number; + /** + * http307数量 + */ + Http307?: number; + /** + * http400数量 + */ + Http400?: number; + /** + * http401数量 + */ + Http401?: number; + /** + * http402数量 + */ + Http402?: number; + /** + * http403数量 + */ + Http403?: number; + /** + * http404数量 + */ + Http404?: number; + /** + * http405数量 + */ + Http405?: number; + /** + * http406数量 + */ + Http406?: number; + /** + * http407数量 + */ + Http407?: number; + /** + * http408数量 + */ + Http408?: number; + /** + * http409数量 + */ + Http409?: number; + /** + * http410数量 + */ + Http410?: number; + /** + * http411数量 + */ + Http411?: number; + /** + * http412数量 + */ + Http412?: number; + /** + * http413数量 + */ + Http413?: number; + /** + * http414数量 + */ + Http414?: number; + /** + * http415数量 + */ + Http415?: number; + /** + * http416数量 + */ + Http416?: number; + /** + * http417数量 + */ + Http417?: number; + /** + * http418数量 + */ + Http418?: number; + /** + * http421数量 + */ + Http421?: number; + /** + * http422数量 + */ + Http422?: number; + /** + * http423数量 + */ + Http423?: number; + /** + * http424数量 + */ + Http424?: number; + /** + * http425数量 + */ + Http425?: number; + /** + * http426数量 + */ + Http426?: number; + /** + * http449数量 + */ + Http449?: number; + /** + * http451数量 + */ + Http451?: number; + /** + * http500数量 + */ + Http500?: number; + /** + * http501数量 + */ + Http501?: number; + /** + * http502数量 + */ + Http502?: number; + /** + * http503数量 + */ + Http503?: number; + /** + * http504数量 + */ + Http504?: number; + /** + * http505数量 + */ + Http505?: number; + /** + * http506数量 + */ + Http506?: number; + /** + * http507数量 + */ + Http507?: number; + /** + * http509数量 + */ + Http509?: number; + /** + * http510数量 + */ + Http510?: number; + }; + }[]; +} +/** + * GetUcdnDomainInfoList - 获取域名基本信息 + */ +export interface GetUcdnDomainInfoListRequest { + /** + * 分页的大小,不填默认每页20个 + */ + PageSize?: number; + /** + * 返回第几页,不填默认是第1页 + */ + PageIndex?: number; +} +/** + * GetUcdnDomainInfoList - 获取域名基本信息 + */ +export interface GetUcdnDomainInfoListResponse { + /** + * 账户下域名总个数 + */ + TotalCount: number; + /** + * 域名基本信息 + */ + DomainInfoList: { + /** + * 域名 + */ + Domain: string; + /** + * 域名的资源id + */ + DomainId: string; + }[]; +} +/** + * GetUcdnDomainLog - 获取加速域名原始日志 + */ +export interface GetUcdnDomainLogRequest { + /** + * 域名ID,创建加速域名时生成。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; + /** + * 查询粒度 0=default(没有粒度) 1=按小时 2=按天 + */ + Type?: number; +} +/** + * GetUcdnDomainLog - 获取加速域名原始日志 + */ +export interface GetUcdnDomainLogResponse { + /** + * 获取日志的连接地址。具体参考下面LogSetList + */ + LogSet?: { + /** + * 域名 + */ + Domain?: string; + /** + * 域名信息列表,参考LogSetInfo + */ + Logs?: { + /** + * 日志时间UnixTime + */ + Time?: number; + /** + * 国内日志url列表 + */ + CnLog?: string[]; + /** + * 国外日志url列表 + */ + AbroadLog?: string[]; + }[]; + }[]; +} +/** + * GetUcdnDomainOriginRequestNum - 获取域名回源请求数 + */ +export interface GetUcdnDomainOriginRequestNumRequest { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟) + */ + Type: number; + /** + * 查询的起始时间,格式为Unix Timestamp + */ + BeginTime: number; + /** + * 查询的结束时间,格式为Unix Timestamp + */ + EndTime: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; +} +/** + * GetUcdnDomainOriginRequestNum - 获取域名回源请求数 + */ +export interface GetUcdnDomainOriginRequestNumResponse { + /** + * 请求数实例表。 + */ + RequestList?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 返回值返回指定时间区间内的cdn收到的请求次数之和 + */ + CdnRequest?: number; + }[]; +} +/** + * GetUcdnDomainPrefetchEnable - 获取域名预取开启状态 + */ +export interface GetUcdnDomainPrefetchEnableRequest { + /** + * 域名ID,创建加速域名时生成。 + */ + DomainId: string; +} +/** + * GetUcdnDomainPrefetchEnable - 获取域名预取开启状态 + */ +export interface GetUcdnDomainPrefetchEnableResponse { + /** + * 0表示该域名未开启预取,1表示该域名已开启预取 + */ + Enable?: number; +} +/** + * GetUcdnDomainRequestNumV2 - 获取域名请求数 + */ +export interface GetUcdnDomainRequestNumV2Request { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟) + */ + Type: number; + /** + * 查询的起始时间,格式为Unix Timestamp + */ + BeginTime: number; + /** + * 查询的结束时间,格式为Unix Timestamp + */ + EndTime: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; +} +/** + * GetUcdnDomainRequestNumV2 - 获取域名请求数 + */ +export interface GetUcdnDomainRequestNumV2Response { + /** + * 请求数实例表。 + */ + RequestList?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 返回值返回指定时间区间内的cdn收到的请求次数之和 + */ + CdnRequest?: number; + /** + * 返回值返回指定时间区间内的cdn回源的请求次数之和 + */ + OriginRequest?: number; + }[]; +} +/** + * GetUcdnDomainRequestNumV3 - 获取域名请求数 + */ +export interface GetUcdnDomainRequestNumV3Request { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟) + */ + Type: number; + /** + * 查询的起始时间,格式为Unix Timestamp + */ + BeginTime: number; + /** + * 查询的结束时间,格式为Unix Timestamp + */ + EndTime: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; + /** + * 协议,http、https 不传则查所有协议的带宽 + */ + Protocol?: string; +} +/** + * GetUcdnDomainRequestNumV3 - 获取域名请求数 + */ +export interface GetUcdnDomainRequestNumV3Response { + /** + * 请求数实例表。 + */ + RequestList?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 返回值返回指定时间区间内的cdn收到的请求次数之和 + */ + CdnRequest?: number; + }[]; +} +/** + * GetUcdnDomainTraffic - 获取加速域名流量使用信息 + */ +export interface GetUcdnDomainTrafficRequest { + /** + * 指定按项目查询,还是按整个账户查询 取值 top 表示按整个账户查询,取值org表示按项目查询 + */ + AccountType?: string; + /** + * 域名ID,创建加速域名时生成,n从自然数0开始。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询流量区域 cn代表国内 abroad代表海外,默认全部区域 + */ + Areacode?: string; + /** + * 查询的起始日期,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值 + */ + BeginTime?: number; + /** + * 查询的结束日期,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天 + */ + EndTime?: number; +} +/** + * GetUcdnDomainTraffic - 获取加速域名流量使用信息 + */ +export interface GetUcdnDomainTrafficResponse { + /** + * 流量实例表,具体结构见 UcdnDomainTrafficSet + */ + TrafficSet?: { + /** + * 流量获取的时间点,格式为Unix Timestamp + */ + Time?: number; + /** + * 查询每日流量总值,单位:GB + */ + Value?: number; + }[]; +} +/** + * GetUcdnPassBandwidth - 获取回源带宽数据(cdn回客户源站部分) + */ +export interface GetUcdnPassBandwidthRequest { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度) + */ + Type: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; +} +/** + * GetUcdnPassBandwidth - 获取回源带宽数据(cdn回客户源站部分) + */ +export interface GetUcdnPassBandwidthResponse { + /** + * 回源带宽数据 + */ + BandwidthDetail?: { + /** + * 宽获取的时间点。格式:时间戳 + */ + Time: number; + /** + * 返回值带宽值数据。 + */ + Bandwidth: number; + }[]; +} +/** + * GetUcdnPassBandwidthV2 - 获取回源带宽数据(cdn回客户源站部分) + */ +export interface GetUcdnPassBandwidthV2Request { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照1分钟粒度) + */ + Type: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; +} +/** + * GetUcdnPassBandwidthV2 - 获取回源带宽数据(cdn回客户源站部分) + */ +export interface GetUcdnPassBandwidthV2Response { + /** + * 回源带宽数据 + */ + BandwidthList?: { + /** + * 宽获取的时间点。格式:时间戳 + */ + Time: number; + /** + * 返回值带宽值数据。 + */ + Bandwidth: number; + }[]; +} +/** + * GetUcdnProIspBandwidthV2 - 按省份运营商获取域名带宽数据 + */ +export interface GetUcdnProIspBandwidthV2Request { + /** + * 查询的起始日期,格式为Unix Timestamp + */ + BeginTime: number; + /** + * 查询的结束日期,格式为Unix Timestamp + */ + EndTime: number; + /** + * 时间粒度0 (按5分钟粒度)1 (按小时粒度)2(按天粒度)3(按分钟粒度) + */ + Type: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 省份代码,可以传多个,不传则查询所有省份 + */ + Province?: string[]; + /** + * 运营商代码,一次只能查询一个运营商,不传递默认取所有运营商 + */ + Isp?: string; +} +/** + * GetUcdnProIspBandwidthV2 - 按省份运营商获取域名带宽数据 + */ +export interface GetUcdnProIspBandwidthV2Response { + /** + * 按省份的带宽流量实例表。具体参考下面BandwidthSet + */ + BandwidthSet: { + /** + * 省份代码 + */ + Province: string; + /** + * 省份带宽流量实例表 + */ + BandwidthTrafficList: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps + */ + CdnBandwidth?: number; + /** + * 对应时间粒度的流量,单位字节 + */ + Traffic?: number; + }[]; + }[]; +} +/** + * GetUcdnProIspRequestNumV2 - 按省份运营商获取域名请求数 + */ +export interface GetUcdnProIspRequestNumV2Request { + /** + * 查询的起始日期,格式为Unix Timestamp 忽略时间部分 + */ + BeginTime: number; + /** + * 查询的结束日期,格式为Unix Timestamp 忽略时间部分 + */ + EndTime: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 省份代码,可以传多个,不传则查询所有省份 + */ + Province?: string[]; + /** + * 运营商代码,一次只能查询一个运营商,不传递默认取所有运营商 + */ + Isp?: string; + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天粒度,3表示按照一分钟粒度) + */ + Type?: number; +} +/** + * GetUcdnProIspRequestNumV2 - 按省份运营商获取域名请求数 + */ +export interface GetUcdnProIspRequestNumV2Response { + /** + * 按省份的请求数实例表。具体参考下面RequestList + */ + RequestNumSet: { + /** + * 省份代码 + */ + Province: string; + /** + * 省份请求数实例表 ProIspRequestListV2 + */ + RequestList: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 返回值返回指定时间区间内的请求数 + */ + CdnRequest?: number; + }[]; + }[]; +} +/** + * GetUcdnTraffic - 获取流量信息 + */ +export interface GetUcdnTrafficRequest { +} +/** + * GetUcdnTraffic - 获取流量信息 + */ +export interface GetUcdnTrafficResponse { + /** + * 用户不同区域的流量信息, 具体结构参见TrafficSet部分 + */ + TrafficSet?: { + /** + * 购买流量的区域, cn: 国内; abroad: 国外 + */ + Areacode?: string; + /** + * Areacode区域内总购买流量, 单位GB + */ + TrafficTotal?: number; + /** + * Areacode区域内总剩余流量, 单位GB + */ + TrafficLeft?: number; + /** + * Areacode区域内总使用流量, 单位GB + */ + TrafficUsed?: number; + }[]; +} +/** + * GetUcdnTrafficV2 - 获取流量信息 + */ +export interface GetUcdnTrafficV2Request { +} +/** + * GetUcdnTrafficV2 - 获取流量信息 + */ +export interface GetUcdnTrafficV2Response { + /** + * 用户不同区域的流量信息, 具体结构参见TrafficSet部分 + */ + TrafficSet?: { + /** + * 购买流量的区域, cn: 国内; abroad: 国外 + */ + Areacode?: string; + /** + * Areacode区域内总购买流量, 单位GB + */ + TrafficTotal?: number; + /** + * Areacode区域内总剩余流量, 单位GB + */ + TrafficLeft?: number; + /** + * Areacode区域内总使用流量, 单位GB + */ + TrafficUsed?: number; + }[]; +} +/** + * PrefetchNewUcdnDomainCache - 提交预取任务 + */ +export interface PrefetchNewUcdnDomainCacheRequest { + /** + * 预热URL列表,n从自然数0开始。UrlList.n字段必须以”http://域名/”开始。如刷新文件目录a下面img.png文件, 格式为http://abc.ucloud.cn/a/img.png。请正确提交需要刷新的域名 + */ + UrlList: string[]; +} +/** + * PrefetchNewUcdnDomainCache - 提交预取任务 + */ +export interface PrefetchNewUcdnDomainCacheResponse { + /** + * 本次提交url对应的任务id + */ + TaskId?: string; +} +/** + * RefreshNewUcdnDomainCache - 刷新缓存 + */ +export interface RefreshNewUcdnDomainCacheRequest { + /** + * 刷新类型,file代表文件刷新,dir 代表路径刷新 + */ + Type: string; + /** + * 刷新多个URL列表时,一次最多提交30个。必须以”http://域名/”开始。目录要以”/”结尾, 如刷新目录a下所有文件,格式为:http://abc.ucloud.cn/a/;如刷新文件目录a下面img.png文件, 格式为http://abc.ucloud.cn/a/img.png。请正确提交需要刷新的域名 + */ + UrlList: string[]; +} +/** + * RefreshNewUcdnDomainCache - 刷新缓存 + */ +export interface RefreshNewUcdnDomainCacheResponse { + /** + * 本次提交url对应的任务id + */ + TaskId?: string; +} +/** + * SwitchUcdnChargeType - 切换账号计费方式 + */ +export interface SwitchUcdnChargeTypeRequest { + /** + * 计费方式。traffic代表按流量包计费,bandwidth按带宽付费 + */ + ChargeType: string; +} +/** + * SwitchUcdnChargeType - 切换账号计费方式 + */ +export interface SwitchUcdnChargeTypeResponse { +} diff --git a/lib/services/ucdn/index.js b/lib/services/ucdn/index.js new file mode 100644 index 0000000..7882025 --- /dev/null +++ b/lib/services/ucdn/index.js @@ -0,0 +1,259 @@ +"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 **ucdn** service + */ +class UCDNClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * DescribeNewUcdnPrefetchCacheTask - 获取预取任务状态 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/describe_new_ucdn_prefetch_cache_task + */ + describeNewUcdnPrefetchCacheTask(request) { + const args = Object.assign({ Action: 'DescribeNewUcdnPrefetchCacheTask' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeNewUcdnRefreshCacheTask - 获取域名刷新任务状态 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/describe_new_ucdn_refresh_cache_task + */ + describeNewUcdnRefreshCacheTask(request) { + const args = Object.assign({ Action: 'DescribeNewUcdnRefreshCacheTask' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetNewUcdnDomainBandwidth - 获取域名带宽数据 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_new_ucdn_domain_bandwidth + */ + getNewUcdnDomainBandwidth(request) { + const args = Object.assign({ Action: 'GetNewUcdnDomainBandwidth' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetNewUcdnDomainHitRate - 获取域名命中率 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_new_ucdn_domain_hit_rate + */ + getNewUcdnDomainHitRate(request) { + const args = Object.assign({ Action: 'GetNewUcdnDomainHitRate' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetNewUcdnDomainHttpCode - 获取域名状态码监控 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_new_ucdn_domain_http_code + */ + getNewUcdnDomainHttpCode(request) { + const args = Object.assign({ Action: 'GetNewUcdnDomainHttpCode' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetNewUcdnDomainHttpCodeV2 - 获取域名详细状态码监控 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_new_ucdn_domain_http_code_v2 + */ + getNewUcdnDomainHttpCodeV2(request) { + const args = Object.assign({ Action: 'GetNewUcdnDomainHttpCodeV2' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnDomain95BandwidthV2 - 获取域名九五峰值带宽数据 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain95_bandwidth_v2 + */ + getUcdnDomain95BandwidthV2(request) { + const args = Object.assign({ Action: 'GetUcdnDomain95BandwidthV2' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnDomainBandwidthV2 - 获取域名带宽数据(新) + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_bandwidth_v2 + */ + getUcdnDomainBandwidthV2(request) { + const args = Object.assign({ Action: 'GetUcdnDomainBandwidthV2' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnDomainConfig - 批量获取加速域名配置 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_config + */ + getUcdnDomainConfig(request) { + const args = Object.assign({ Action: 'GetUcdnDomainConfig' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnDomainHitRate - 获取域名命中率 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_hit_rate + */ + getUcdnDomainHitRate(request) { + const args = Object.assign({ Action: 'GetUcdnDomainHitRate' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnDomainHttpCodeV2 - 获取域名状态码信息 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_http_code_v2 + */ + getUcdnDomainHttpCodeV2(request) { + const args = Object.assign({ Action: 'GetUcdnDomainHttpCodeV2' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnDomainInfoList - 获取域名基本信息 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_info_list + */ + getUcdnDomainInfoList(request) { + const args = Object.assign({ Action: 'GetUcdnDomainInfoList' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnDomainLog - 获取加速域名原始日志 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_log + */ + getUcdnDomainLog(request) { + const args = Object.assign({ Action: 'GetUcdnDomainLog' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnDomainOriginRequestNum - 获取域名回源请求数 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_origin_request_num + */ + getUcdnDomainOriginRequestNum(request) { + const args = Object.assign({ Action: 'GetUcdnDomainOriginRequestNum' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnDomainPrefetchEnable - 获取域名预取开启状态 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_prefetch_enable + */ + getUcdnDomainPrefetchEnable(request) { + const args = Object.assign({ Action: 'GetUcdnDomainPrefetchEnable' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnDomainRequestNumV2 - 获取域名请求数 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_request_num_v2 + */ + getUcdnDomainRequestNumV2(request) { + const args = Object.assign({ Action: 'GetUcdnDomainRequestNumV2' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnDomainRequestNumV3 - 获取域名请求数 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_request_num_v3 + */ + getUcdnDomainRequestNumV3(request) { + const args = Object.assign({ Action: 'GetUcdnDomainRequestNumV3' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnDomainTraffic - 获取加速域名流量使用信息 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_traffic + */ + getUcdnDomainTraffic(request) { + const args = Object.assign({ Action: 'GetUcdnDomainTraffic' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnPassBandwidth - 获取回源带宽数据(cdn回客户源站部分) + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_pass_bandwidth + */ + getUcdnPassBandwidth(request) { + const args = Object.assign({ Action: 'GetUcdnPassBandwidth' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnPassBandwidthV2 - 获取回源带宽数据(cdn回客户源站部分) + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_pass_bandwidth_v2 + */ + getUcdnPassBandwidthV2(request) { + const args = Object.assign({ Action: 'GetUcdnPassBandwidthV2' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnProIspBandwidthV2 - 按省份运营商获取域名带宽数据 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_pro_isp_bandwidth_v2 + */ + getUcdnProIspBandwidthV2(request) { + const args = Object.assign({ Action: 'GetUcdnProIspBandwidthV2' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnProIspRequestNumV2 - 按省份运营商获取域名请求数 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_pro_isp_request_num_v2 + */ + getUcdnProIspRequestNumV2(request) { + const args = Object.assign({ Action: 'GetUcdnProIspRequestNumV2' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnTraffic - 获取流量信息 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_traffic + */ + getUcdnTraffic(request) { + const args = Object.assign({ Action: 'GetUcdnTraffic' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUcdnTrafficV2 - 获取流量信息 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_traffic_v2 + */ + getUcdnTrafficV2(request) { + const args = Object.assign({ Action: 'GetUcdnTrafficV2' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * PrefetchNewUcdnDomainCache - 提交预取任务 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/prefetch_new_ucdn_domain_cache + */ + prefetchNewUcdnDomainCache(request) { + const args = Object.assign({ Action: 'PrefetchNewUcdnDomainCache' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * RefreshNewUcdnDomainCache - 刷新缓存 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/refresh_new_ucdn_domain_cache + */ + refreshNewUcdnDomainCache(request) { + const args = Object.assign({ Action: 'RefreshNewUcdnDomainCache' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * SwitchUcdnChargeType - 切换账号计费方式 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/switch_ucdn_charge_type + */ + switchUcdnChargeType(request) { + const args = Object.assign({ Action: 'SwitchUcdnChargeType' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = UCDNClient; diff --git a/lib/services/udb/index.d.ts b/lib/services/udb/index.d.ts new file mode 100644 index 0000000..1ea6967 --- /dev/null +++ b/lib/services/udb/index.d.ts @@ -0,0 +1,2811 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **udb** service + */ +export default class UDBClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * BackupUDBInstance - 备份UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/backup_udb_instance + */ + backupUDBInstance(request?: BackupUDBInstanceRequest): Promise; + /** + * BackupUDBInstanceBinlog - 备份UDB指定时间段的binlog列表 + * + * See also: https://docs.ucloud.cn/api/udb-api/backup_udb_instance_binlog + */ + backupUDBInstanceBinlog(request?: BackupUDBInstanceBinlogRequest): Promise; + /** + * BackupUDBInstanceErrorLog - 备份UDB指定时间段的errorlog + * + * See also: https://docs.ucloud.cn/api/udb-api/backup_udb_instance_error_log + */ + backupUDBInstanceErrorLog(request?: BackupUDBInstanceErrorLogRequest): Promise; + /** + * BackupUDBInstanceSlowLog - 备份UDB指定时间段的slowlog分析结果 + * + * See also: https://docs.ucloud.cn/api/udb-api/backup_udb_instance_slow_log + */ + backupUDBInstanceSlowLog(request?: BackupUDBInstanceSlowLogRequest): Promise; + /** + * ChangeUDBParamGroup - 修改配置文件 + * + * See also: https://docs.ucloud.cn/api/udb-api/change_udb_param_group + */ + changeUDBParamGroup(request?: ChangeUDBParamGroupRequest): Promise; + /** + * CheckRecoverUDBInstance - 核查db是否可以使用回档功能 + * + * See also: https://docs.ucloud.cn/api/udb-api/check_recover_udb_instance + */ + checkRecoverUDBInstance(request?: CheckRecoverUDBInstanceRequest): Promise; + /** + * CheckUDBInstanceToHAAllowance - 核查db是否可以升级为高可用 + * + * See also: https://docs.ucloud.cn/api/udb-api/check_udb_instance_to_ha_allowance + */ + checkUDBInstanceToHAAllowance(request?: CheckUDBInstanceToHAAllowanceRequest): Promise; + /** + * ClearUDBLog - 清除UDB实例的log + * + * See also: https://docs.ucloud.cn/api/udb-api/clear_udb_log + */ + clearUDBLog(request?: ClearUDBLogRequest): Promise; + /** + * CreateMongoDBReplicaSet - 一键创建DB副本集 + * + * See also: https://docs.ucloud.cn/api/udb-api/create_mongo_db_replica_set + */ + createMongoDBReplicaSet(request?: CreateMongoDBReplicaSetRequest): Promise; + /** + * CreateUDBInstance - 创建UDB实例(包括创建mysql master节点、mongodb primary/configsvr节点和从备份恢复实例) + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_instance + */ + createUDBInstance(request?: CreateUDBInstanceRequest): Promise; + /** + * CreateUDBInstanceByRecovery - 创建db,将新创建的db恢复到指定db某个指定时间点 + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_instance_by_recovery + */ + createUDBInstanceByRecovery(request?: CreateUDBInstanceByRecoveryRequest): Promise; + /** + * CreateUDBParamGroup - 从已有配置文件创建新配置文件 + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_param_group + */ + createUDBParamGroup(request?: CreateUDBParamGroupRequest): Promise; + /** + * CreateUDBReplicationInstance - 创建MongoDB的副本节点(包括仲裁) + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_replication_instance + */ + createUDBReplicationInstance(request?: CreateUDBReplicationInstanceRequest): Promise; + /** + * CreateUDBRouteInstance - 创建mongos实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_route_instance + */ + createUDBRouteInstance(request?: CreateUDBRouteInstanceRequest): Promise; + /** + * CreateUDBSlave - 创建UDB实例的slave + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_slave + */ + createUDBSlave(request?: CreateUDBSlaveRequest): Promise; + /** + * DeleteUDBInstance - 删除UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/delete_udb_instance + */ + deleteUDBInstance(request?: DeleteUDBInstanceRequest): Promise; + /** + * DeleteUDBLogPackage - 删除UDB日志包 + * + * See also: https://docs.ucloud.cn/api/udb-api/delete_udb_log_package + */ + deleteUDBLogPackage(request?: DeleteUDBLogPackageRequest): Promise; + /** + * DeleteUDBParamGroup - 删除配置参数组 + * + * See also: https://docs.ucloud.cn/api/udb-api/delete_udb_param_group + */ + deleteUDBParamGroup(request?: DeleteUDBParamGroupRequest): Promise; + /** + * DescribeUDBBackup - 列表UDB实例备份信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_backup + */ + describeUDBBackup(request?: DescribeUDBBackupRequest): Promise; + /** + * DescribeUDBBackupBlacklist - 获取UDB实例的备份黑名单 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_backup_blacklist + */ + describeUDBBackupBlacklist(request?: DescribeUDBBackupBlacklistRequest): Promise; + /** + * DescribeUDBBinlogBackupURL - 获取UDB的Binlog备份地址 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_binlog_backup_url + */ + describeUDBBinlogBackupURL(request?: DescribeUDBBinlogBackupURLRequest): Promise; + /** + * DescribeUDBInstance - 获取UDB实例信息,支持两类操作:(1)指定DBId用于获取该db的信息;(2)指定ClassType、Offset、Limit用于列表操作,查询某一个类型db。 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance + */ + describeUDBInstance(request?: DescribeUDBInstanceRequest): Promise; + /** + * DescribeUDBInstanceBackupState - 获取UDB实例备份状态 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_backup_state + */ + describeUDBInstanceBackupState(request?: DescribeUDBInstanceBackupStateRequest): Promise; + /** + * DescribeUDBInstanceBackupURL - 获取UDB备份下载地址 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_backup_url + */ + describeUDBInstanceBackupURL(request?: DescribeUDBInstanceBackupURLRequest): Promise; + /** + * DescribeUDBInstanceBinlog - 获取UDB指定时间段的binlog列表 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_binlog + */ + describeUDBInstanceBinlog(request?: DescribeUDBInstanceBinlogRequest): Promise; + /** + * DescribeUDBInstanceBinlogBackupState - 获取udb实例备份状态 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_binlog_backup_state + */ + describeUDBInstanceBinlogBackupState(request?: DescribeUDBInstanceBinlogBackupStateRequest): Promise; + /** + * DescribeUDBInstanceLog - 查询某一段时间内UDB的错误日志或慢查询日志 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_log + */ + describeUDBInstanceLog(request?: DescribeUDBInstanceLogRequest): Promise; + /** + * DescribeUDBInstancePrice - 获取UDB实例价格信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_price + */ + describeUDBInstancePrice(request?: DescribeUDBInstancePriceRequest): Promise; + /** + * DescribeUDBInstanceState - 获取UDB实例状态 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_state + */ + describeUDBInstanceState(request?: DescribeUDBInstanceStateRequest): Promise; + /** + * DescribeUDBInstanceUpgradePrice - 获取UDB实例升降级价格信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_upgrade_price + */ + describeUDBInstanceUpgradePrice(request?: DescribeUDBInstanceUpgradePriceRequest): Promise; + /** + * DescribeUDBLogBackupURL - 获取UDB的slowlog备份地址 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_log_backup_url + */ + describeUDBLogBackupURL(request?: DescribeUDBLogBackupURLRequest): Promise; + /** + * DescribeUDBLogPackage - 列表UDB实例binlog或slowlog或errorlog备份信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_log_package + */ + describeUDBLogPackage(request?: DescribeUDBLogPackageRequest): Promise; + /** + * DescribeUDBParamGroup - 获取参数组详细参数信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_param_group + */ + describeUDBParamGroup(request?: DescribeUDBParamGroupRequest): Promise; + /** + * DescribeUDBSplittingInfo - 描述读写分离功能的详细信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_splitting_info + */ + describeUDBSplittingInfo(request?: DescribeUDBSplittingInfoRequest): Promise; + /** + * DescribeUDBType - 获取UDB支持的类型信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_type + */ + describeUDBType(request?: DescribeUDBTypeRequest): Promise; + /** + * DisableUDBRWSplitting - 关闭DB的读写分离功能 + * + * See also: https://docs.ucloud.cn/api/udb-api/disable_udb_rw_splitting + */ + disableUDBRWSplitting(request?: DisableUDBRWSplittingRequest): Promise; + /** + * EditUDBBackupBlacklist - 编辑UDB实例的备份黑名单 + * + * See also: https://docs.ucloud.cn/api/udb-api/edit_udb_backup_blacklist + */ + editUDBBackupBlacklist(request?: EditUDBBackupBlacklistRequest): Promise; + /** + * EnableUDBRWSplitting - 开启DB的读写分离功能 + * + * See also: https://docs.ucloud.cn/api/udb-api/enable_udb_rw_splitting + */ + enableUDBRWSplitting(request?: EnableUDBRWSplittingRequest): Promise; + /** + * ExtractUDBParamGroup - 获取配置文件内容 + * + * See also: https://docs.ucloud.cn/api/udb-api/extract_udb_param_group + */ + extractUDBParamGroup(request?: ExtractUDBParamGroupRequest): Promise; + /** + * FetchUDBInstanceEarliestRecoverTime - 获取UDB最早可回档的时间点 + * + * See also: https://docs.ucloud.cn/api/udb-api/fetch_udb_instance_earliest_recover_time + */ + fetchUDBInstanceEarliestRecoverTime(request?: FetchUDBInstanceEarliestRecoverTimeRequest): Promise; + /** + * ModifyUDBInstanceName - 重命名UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/modify_udb_instance_name + */ + modifyUDBInstanceName(request?: ModifyUDBInstanceNameRequest): Promise; + /** + * ModifyUDBInstancePassword - 修改DB实例的管理员密码 + * + * See also: https://docs.ucloud.cn/api/udb-api/modify_udb_instance_password + */ + modifyUDBInstancePassword(request?: ModifyUDBInstancePasswordRequest): Promise; + /** + * PromoteUDBInstanceToHA - 普通db升级为高可用(只针对mysql5.5及以上版本) + * + * See also: https://docs.ucloud.cn/api/udb-api/promote_udb_instance_to_ha + */ + promoteUDBInstanceToHA(request?: PromoteUDBInstanceToHARequest): Promise; + /** + * PromoteUDBSlave - 从库提升为独立库 + * + * See also: https://docs.ucloud.cn/api/udb-api/promote_udb_slave + */ + promoteUDBSlave(request?: PromoteUDBSlaveRequest): Promise; + /** + * ResizeUDBInstance - 修改(升级和降级)UDB实例的配置,包括内存和磁盘的配置,对于内存升级无需关闭实例,其他场景需要事先关闭实例。两套参数可以配置升降机:1.配置UseSSD和SSDType 2.配置InstanceType,不需要配置InstanceMode。这两套第二套参数的优先级更高 + * + * See also: https://docs.ucloud.cn/api/udb-api/resize_udb_instance + */ + resizeUDBInstance(request?: ResizeUDBInstanceRequest): Promise; + /** + * RestartRWSplitting - 读写分离中间件重启,对应docker重启,但是ip不变 + * + * See also: https://docs.ucloud.cn/api/udb-api/restart_rw_splitting + */ + restartRWSplitting(request?: RestartRWSplittingRequest): Promise; + /** + * RestartUDBInstance - 重启UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/restart_udb_instance + */ + restartUDBInstance(request?: RestartUDBInstanceRequest): Promise; + /** + * SetUDBRWSplitting - 设置读写分离的模式 + * + * See also: https://docs.ucloud.cn/api/udb-api/set_udb_rw_splitting + */ + setUDBRWSplitting(request?: SetUDBRWSplittingRequest): Promise; + /** + * StartUDBInstance - 启动UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/start_udb_instance + */ + startUDBInstance(request?: StartUDBInstanceRequest): Promise; + /** + * StopUDBInstance - 关闭UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/stop_udb_instance + */ + stopUDBInstance(request?: StopUDBInstanceRequest): Promise; + /** + * SwitchUDBHAToSentinel - UDB高可用实例从HAProxy版本升级为Sentinel版本(不带HAProxy)升级耗时30-70秒 + * + * See also: https://docs.ucloud.cn/api/udb-api/switch_udb_ha_to_sentinel + */ + switchUDBHAToSentinel(request?: SwitchUDBHAToSentinelRequest): Promise; + /** + * SwitchUDBInstanceToHA - 普通UDB切换为高可用,原db状态为WaitForSwitch时,调用改api + * + * See also: https://docs.ucloud.cn/api/udb-api/switch_udb_instance_to_ha + */ + switchUDBInstanceToHA(request?: SwitchUDBInstanceToHARequest): Promise; + /** + * UpdateUDBInstanceBackupStrategy - 修改UDB自动备份策略 + * + * See also: https://docs.ucloud.cn/api/udb-api/update_udb_instance_backup_strategy + */ + updateUDBInstanceBackupStrategy(request?: UpdateUDBInstanceBackupStrategyRequest): Promise; + /** + * UpdateUDBInstanceSlaveBackupSwitch - 开启或者关闭UDB从库备份 + * + * See also: https://docs.ucloud.cn/api/udb-api/update_udb_instance_slave_backup_switch + */ + updateUDBInstanceSlaveBackupSwitch(request?: UpdateUDBInstanceSlaveBackupSwitchRequest): Promise; + /** + * UpdateUDBParamGroup - 更新UDB配置参数项 + * + * See also: https://docs.ucloud.cn/api/udb-api/update_udb_param_group + */ + updateUDBParamGroup(request?: UpdateUDBParamGroupRequest): Promise; + /** + * UploadUDBParamGroup - 导入UDB配置 + * + * See also: https://docs.ucloud.cn/api/udb-api/upload_udb_param_group + */ + uploadUDBParamGroup(request?: UploadUDBParamGroupRequest): Promise; +} +/** + * BackupUDBInstance - 备份UDB实例 + */ +export interface BackupUDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 备份名称 + */ + BackupName: string; + /** + * 是否使用黑名单备份,默认false + */ + UseBlacklist?: boolean; + /** + * 使用的备份方式。(快照备份即物理备份。注意只有SSD版本的mysql实例支持设置为snapshot) + */ + BackupMethod?: string; + /** + * 备份黑名单列表,以 ; 分隔。注意:只有逻辑备份下备份黑名单才生效,快照备份备份黑名单下无效 + */ + Blacklist?: string; + /** + * true表示逻辑备份时是使用 --force 参数,false表示不使用 --force 参数。物理备份此参数无效。 + */ + ForceBackup?: boolean; +} +/** + * BackupUDBInstance - 备份UDB实例 + */ +export interface BackupUDBInstanceResponse { +} +/** + * BackupUDBInstanceBinlog - 备份UDB指定时间段的binlog列表 + */ +export interface BackupUDBInstanceBinlogRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 需要备份文件,可通过DescribeUDBInstanceBinlog获得 如果要传入多个文件名,以空格键分割,用单引号包含. + */ + BackupFile: string; + /** + * DB备份文件名称 + */ + BackupName?: string; +} +/** + * BackupUDBInstanceBinlog - 备份UDB指定时间段的binlog列表 + */ +export interface BackupUDBInstanceBinlogResponse { +} +/** + * BackupUDBInstanceErrorLog - 备份UDB指定时间段的errorlog + */ +export interface BackupUDBInstanceErrorLogRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 备份名称 + */ + BackupName: string; +} +/** + * BackupUDBInstanceErrorLog - 备份UDB指定时间段的errorlog + */ +export interface BackupUDBInstanceErrorLogResponse { +} +/** + * BackupUDBInstanceSlowLog - 备份UDB指定时间段的slowlog分析结果 + */ +export interface BackupUDBInstanceSlowLogRequest { + /** + * DB实例Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 过滤条件:起始时间(时间戳) + */ + BeginTime: number; + /** + * 过滤条件:结束时间(时间戳) + */ + EndTime: number; + /** + * 备份文件名称 + */ + BackupName: string; +} +/** + * BackupUDBInstanceSlowLog - 备份UDB指定时间段的slowlog分析结果 + */ +export interface BackupUDBInstanceSlowLogResponse { +} +/** + * ChangeUDBParamGroup - 修改配置文件 + */ +export interface ChangeUDBParamGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id + */ + DBId: string; + /** + * 参数组Id + */ + GroupId: string; +} +/** + * ChangeUDBParamGroup - 修改配置文件 + */ +export interface ChangeUDBParamGroupResponse { +} +/** + * CheckRecoverUDBInstance - 核查db是否可以使用回档功能 + */ +export interface CheckRecoverUDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 源实例的Id + */ + SrcDBId: string; +} +/** + * CheckRecoverUDBInstance - 核查db是否可以使用回档功能 + */ +export interface CheckRecoverUDBInstanceResponse { + /** + * 核查成功返回值为可以回档到的最近时刻,核查失败不返回 + */ + LastestTime?: number; +} +/** + * CheckUDBInstanceToHAAllowance - 核查db是否可以升级为高可用 + */ +export interface CheckUDBInstanceToHAAllowanceRequest { + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; +} +/** + * CheckUDBInstanceToHAAllowance - 核查db是否可以升级为高可用 + */ +export interface CheckUDBInstanceToHAAllowanceResponse { + /** + * Yes ,No ,Yes即可以升级,No为不可以升级 + */ + Allowance?: string; +} +/** + * ClearUDBLog - 清除UDB实例的log + */ +export interface ClearUDBLogRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例的id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 日志类型,10-error(暂不支持)、20-slow(暂不支持 )、30-binlog + */ + LogType: number; + /** + * 删除时间点(至少前一天)之前log,采用时间戳(秒),默认当 前时间点前一天 + */ + BeforeTime?: number; +} +/** + * ClearUDBLog - 清除UDB实例的log + */ +export interface ClearUDBLogResponse { +} +/** + * CreateMongoDBReplicaSet - 一键创建DB副本集 + */ +export interface CreateMongoDBReplicaSetRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * PrimaryDB实例名称,至少6位 + */ + Name: string; + /** + * 管理员密码 + */ + AdminPassword: string; + /** + * DB类型id对应的字符串形式(例如:mongodb-2.6)注意:当前仅支持mongodb + */ + DBTypeId: string; + /** + * 磁盘空间(GB), 暂时支持20G - 3000G + */ + DiskSpace: number; + /** + * DB实例使用的配置参数组id + */ + ParamGroupId: number; + /** + * 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M + */ + MemoryLimit: number; + /** + * 端口号 + */ + Port: number; + /** + * Year, Month, Dynamic,Trial,默认: Month + */ + ChargeType?: string; + /** + * 购买时长(N个月),默认值1个月。如果为0,代表购买到月底。 + */ + Quantity?: number; + /** + * 管理员帐户名,默认root + */ + AdminUser?: string; + /** + * 备份策略,每周备份数量,默认7次 + */ + BackupCount?: number; + /** + * 备份策略,备份开始时间,单位小时计,默认1点 + */ + BackupTime?: number; + /** + * 备份策略,备份时间间隔,单位小时计,默认24小时 + */ + BackupDuration?: number; + /** + * 是否使用SSD,默认为true + */ + UseSSD?: boolean; + /** + * SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必选 + */ + SSDType?: string; + /** + * cpu核数 + */ + CPU?: number; + /** + * UDB数据库机型 + */ + InstanceType?: string; + /** + * 子网ID + */ + SubnetId?: string; + /** + * VPC的ID + */ + VPCId?: string; + /** + * 所属分片集群的ID + */ + ClusterId?: string; + /** + * CouponId.0 代表第一个代金券id,对于传入多个代金券id,后面为 CouponId.1, CouponId.2 以此类推 + */ + CouponId?: string[]; +} +/** + * CreateMongoDBReplicaSet - 一键创建DB副本集 + */ +export interface CreateMongoDBReplicaSetResponse { + /** + * 返回所有副本集成员的Id + */ + DBIds?: string[]; +} +/** + * CreateUDBInstance - 创建UDB实例(包括创建mysql master节点、mongodb primary/configsvr节点和从备份恢复实例) + */ +export interface CreateUDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 实例名称,至少6位 + */ + Name: string; + /** + * 管理员密码 + */ + AdminPassword: string; + /** + * DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6,14:postgresql-10.4 + */ + DBTypeId: string; + /** + * 端口号,mysql默认3306,mongodb默认27017,postgresql默认5432 + */ + Port: number; + /** + * 磁盘空间(GB), 暂时支持20G - 32T + */ + DiskSpace: number; + /** + * DB实例使用的配置参数组id + */ + ParamGroupId: number; + /** + * 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + */ + MemoryLimit: number; + /** + * Year, Month, Dynamic,Trial,默认: Month + */ + ChargeType?: string; + /** + * 购买时长,默认值1 + */ + Quantity?: number; + /** + * 管理员帐户名,默认root + */ + AdminUser?: string; + /** + * 备份策略,每周备份数量,默认7次 + */ + BackupCount?: number; + /** + * 备份策略,备份开始时间,单位小时计,默认1点 + */ + BackupTime?: number; + /** + * 备份策略,备份时间间隔,单位小时计,默认24小时 + */ + BackupDuration?: number; + /** + * 备份id,如果指定,则表明从备份恢复实例 + */ + BackupId?: number; + /** + * 是否使用SSD,默认为true。目前主要可用区、海外机房、新机房只提供SSD资源,非SSD资源不再提供。 + */ + UseSSD?: boolean; + /** + * SSD类型,可选值为"SATA"、“NVMe”,如果UseSSD为true ,则必选 + */ + SSDType?: string; + /** + * UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + */ + InstanceMode?: string; + /** + * 专区ID信息(如果这个参数存在这说明是在专区中创建DB) + */ + UDBCId?: string; + /** + * cpu核数 + */ + CPU?: number; + /** + * 跨可用区高可用备库所在可用区,参见 [可用区列表](../summary/regionlist.html) + */ + BackupZone?: string; + /** + * 子网ID + */ + SubnetId?: string; + /** + * VPC的ID + */ + VPCId?: string; + /** + * 是否开启异步高可用,默认不填,可置为true + */ + DisableSemisync?: boolean; + /** + * 当DB类型(DBTypeId)为mongodb时,需要指定mongo的角色,可选值为configsrv (配置节点),shardsrv (数据节点) + */ + ClusterRole?: string; + /** + * 高可用架构:1) haproxy(默认): 当前仅支持mysql。2) sentinel: 基于vip和哨兵节点的架构,当前支持mysql和pg。 + */ + HAArch?: string; + /** + * 实例所在的业务组名称 + */ + Tag?: string; + /** + * 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + */ + EnableIpV6?: boolean; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * CreateUDBInstance - 创建UDB实例(包括创建mysql master节点、mongodb primary/configsvr节点和从备份恢复实例) + */ +export interface CreateUDBInstanceResponse { + /** + * BD实例id + */ + DBId?: string; +} +/** + * CreateUDBInstanceByRecovery - 创建db,将新创建的db恢复到指定db某个指定时间点 + */ +export interface CreateUDBInstanceByRecoveryRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例名称,至少6位 + */ + Name: string; + /** + * 源实例的Id + */ + SrcDBId: string; + /** + * 恢复到某个时间点的时间戳(UTC时间格式,默认单位秒) + */ + RecoveryTime: number; + /** + * Year, Month, Dynamic,Trial,默认: Dynamic + */ + ChargeType?: string; + /** + * 购买时长,默认值1 + */ + Quantity?: number; + /** + * 指定是否是否使用SSD,默认使用主库的配置 + */ + UseSSD?: boolean; + /** + * 专区的Id + */ + UDBCId?: string; + /** + * 子网ID + */ + SubnetId?: string; + /** + * VPC的ID + */ + VPCId?: string; + /** + * 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + */ + EnableIpV6?: boolean; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * CreateUDBInstanceByRecovery - 创建db,将新创建的db恢复到指定db某个指定时间点 + */ +export interface CreateUDBInstanceByRecoveryResponse { + /** + * db实例id + */ + DBId?: string; +} +/** + * CreateUDBParamGroup - 从已有配置文件创建新配置文件 + */ +export interface CreateUDBParamGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 新配置参数组名称 + */ + GroupName: string; + /** + * 参数组描述 + */ + Description: string; + /** + * 源参数组id + */ + SrcGroupId: number; + /** + * DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6 + */ + DBTypeId: string; + /** + * 是否是地域级别的配置文件,默认是false + */ + RegionFlag?: boolean; +} +/** + * CreateUDBParamGroup - 从已有配置文件创建新配置文件 + */ +export interface CreateUDBParamGroupResponse { + /** + * 新配置参数组id + */ + GroupId?: number; +} +/** + * CreateUDBReplicationInstance - 创建MongoDB的副本节点(包括仲裁) + */ +export interface CreateUDBReplicationInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * primary节点的DBId,该值可以通过DescribeUDBInstance获取 + */ + SrcId: string; + /** + * 实例名称,至少6位 + */ + Name: string; + /** + * 端口号,默认27017,取值范围3306至65535。 + */ + Port?: number; + /** + * 是否是仲裁节点,默认false,仲裁节点按最小机型创建 + */ + IsArbiter?: boolean; + /** + * 是否使用SSD,默认 为 true + */ + UseSSD?: boolean; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * CreateUDBReplicationInstance - 创建MongoDB的副本节点(包括仲裁) + */ +export interface CreateUDBReplicationInstanceResponse { + /** + * 创建从节点的DBId + */ + DBId?: string; +} +/** + * CreateUDBRouteInstance - 创建mongos实例 + */ +export interface CreateUDBRouteInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB类型id,mongodb按版本细分有1:mongodb-2.4,2:mongodb-2.6,3:mongodb-3.0,4:mongodb-3.2 + */ + DBTypeId: string; + /** + * 实例名称,至少6位 + */ + Name: string; + /** + * 端口号,mongodb默认27017 + */ + Port: number; + /** + * DB实例使用的配置参数组id + */ + ParamGroupId: number; + /** + * 内存限制(MB),目前支持以下几档 600M/1500M/3000M /6000M/15000M/30000M + */ + MemoryLimit: number; + /** + * 磁盘空间(GB), 暂时支持20G - 500G + */ + DiskSpace: number; + /** + * 配置服务器的dbid,允许一个或者三个。 + */ + ConfigsvrId: string[]; + /** + * Year, Month, Dynamic,Trial,默认: Month + */ + ChargeType?: string; + /** + * 购买时长,默认值1 + */ + Quantity?: number; + /** + * 是否使用SSD,默认为ture + */ + UseSSD?: boolean; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * CreateUDBRouteInstance - 创建mongos实例 + */ +export interface CreateUDBRouteInstanceResponse { + /** + * db实例id + */ + DBId?: string; +} +/** + * CreateUDBSlave - 创建UDB实例的slave + */ +export interface CreateUDBSlaveRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * master实例的DBId,该值可以通过DescribeUDBInstance获取 + */ + SrcId: string; + /** + * 实例名称,至少6位 + */ + Name: string; + /** + * 端口号 + */ + Port?: number; + /** + * 是否使用SSD,默认为true + */ + UseSSD?: boolean; + /** + * SSD类型,可选值为"SATA"、"PCI-E"、“NVMe”,如果UseSSD为true ,则必选 + */ + SSDType?: string; + /** + * 是否锁主库,默认为true + */ + IsLock?: boolean; + /** + * UDB实例部署模式,可选值如下:Normal: 普通单点实例HA: 高可用部署实例 + */ + InstanceMode?: string; + /** + * 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + */ + MemoryLimit?: number; + /** + * 磁盘空间(GB), 暂时支持20G - 3000G(API支持,前端暂时只开放内存定制) + */ + DiskSpace?: number; + /** + * UDB实例类型:Normal、SATA_SSD、NVMe_SSD + */ + InstanceType?: string; + /** + * 子网ID(如果不传用默认子网) + */ + SubnetId?: string; + /** + * VPCID(如果不传用默认的VPC) + */ + VPCId?: string; + /** + * Year, Month, Dynamic,Trial,默认和主库保持一致 + */ + ChargeType?: string; + /** + * 购买时长,默认默认和主库保持一致 + */ + Quantity?: number; + /** + * DB实例使用的配置参数组id,默认和主库保持一致 + */ + ParamGroupId?: number; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * CreateUDBSlave - 创建UDB实例的slave + */ +export interface CreateUDBSlaveResponse { + /** + * 创建slave的DBId + */ + DBId?: string; +} +/** + * DeleteUDBInstance - 删除UDB实例 + */ +export interface DeleteUDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例的id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 专区ID + */ + UDBCId?: string; +} +/** + * DeleteUDBInstance - 删除UDB实例 + */ +export interface DeleteUDBInstanceResponse { +} +/** + * DeleteUDBLogPackage - 删除UDB日志包 + */ +export interface DeleteUDBLogPackageRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 日志包id,可通过DescribeUDBLogPackage获得 + */ + BackupId: number; + /** + * 跨可用区高可用备库所在可用区 + */ + BackupZone?: string; +} +/** + * DeleteUDBLogPackage - 删除UDB日志包 + */ +export interface DeleteUDBLogPackageResponse { +} +/** + * DeleteUDBParamGroup - 删除配置参数组 + */ +export interface DeleteUDBParamGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 参数组id,可通过DescribeUDBParamGroup获取 + */ + GroupId: number; + /** + * 是否属于地域级别 + */ + RegionFlag?: boolean; +} +/** + * DeleteUDBParamGroup - 删除配置参数组 + */ +export interface DeleteUDBParamGroupResponse { +} +/** + * DescribeUDBBackup - 列表UDB实例备份信息 + */ +export interface DescribeUDBBackupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 分页显示的起始偏移,列表操作则指定 + */ + Offset: number; + /** + * 分页显示的条目数,列表操作则指定 + */ + Limit: number; + /** + * DB实例Id,如果指定,则只获取该db的备份信息 该值可以通过DescribeUDBInstance获取 + */ + DBId?: string; + /** + * 备份类型,取值为0或1,0表示自动,1表示手动 + */ + BackupType?: number; + /** + * 过滤条件:起始时间(Unix时间戳) + */ + BeginTime?: number; + /** + * 过滤条件:结束时间(Unix时间戳) + */ + EndTime?: number; +} +/** + * DescribeUDBBackup - 列表UDB实例备份信息 + */ +export interface DescribeUDBBackupResponse { + /** + * 备份信息 参照UDBBackupSet + */ + DataSet?: { + /** + * 备份id + */ + BackupId?: number; + /** + * 备份名称 + */ + BackupName?: string; + /** + * 备份时间(Unix时间戳) + */ + BackupTime?: number; + /** + * 备份文件大小(字节) + */ + BackupSize?: number; + /** + * 备份类型,取值为0或1,0表示自动,1表示手动 + */ + BackupType?: number; + /** + * 备份状态 Backuping // 备份中 Success // 备份成功 Failed // 备份失败 Expired // 备份过期 + */ + State?: string; + /** + * dbid + */ + DBId?: string; + /** + * 对应的db名称 + */ + DBName?: string; + /** + * 备份所在可用区 + */ + Zone?: string; + /** + * 跨机房高可用备库所在可用区 + */ + BackupZone?: string; + /** + * 备份完成时间(Unix时间戳) + */ + BackupEndTime?: number; + }[]; + /** + * 满足条件备份总数,如果指定dbid,则是该db备份总数 + */ + TotalCount?: number; +} +/** + * DescribeUDBBackupBlacklist - 获取UDB实例的备份黑名单 + */ +export interface DescribeUDBBackupBlacklistRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; +} +/** + * DescribeUDBBackupBlacklist - 获取UDB实例的备份黑名单 + */ +export interface DescribeUDBBackupBlacklistResponse { + /** + * DB的黑名单列表, db.%为指定库 dbname.tablename为指定表 + */ + Blacklist?: string; +} +/** + * DescribeUDBBinlogBackupURL - 获取UDB的Binlog备份地址 + */ +export interface DescribeUDBBinlogBackupURLRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id + */ + DBId: string; + /** + * DB实例binlog备份ID,可以从DescribeUDBLogPackage结果当中获得 + */ + BackupId: number; +} +/** + * DescribeUDBBinlogBackupURL - 获取UDB的Binlog备份地址 + */ +export interface DescribeUDBBinlogBackupURLResponse { + /** + * DB实例备份文件的公网地址 + */ + BackupPath?: string; + /** + * DB实例备份文件的内网地址 + */ + InnerBackupPath?: string; +} +/** + * DescribeUDBInstance - 获取UDB实例信息,支持两类操作:(1)指定DBId用于获取该db的信息;(2)指定ClassType、Offset、Limit用于列表操作,查询某一个类型db。 + */ +export interface DescribeUDBInstanceRequest { + /** + * 可用区,不填时默认全部可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB种类,如果是列表操作,则需要指定,不区分大小写,其取值如下:mysql: SQL;mongo: NOSQL;postgresql: postgresql + */ + ClassType?: string; + /** + * 分页显示起始偏移位置,列表操作时必填 + */ + Offset?: number; + /** + * 分页显示数量,列表操作时必填 + */ + Limit?: number; + /** + * DB实例id,如果指定则获取单个db实例的描述,否则为列表操作。 指定DBId时无需填写ClassType、Offset、Limit + */ + DBId?: string; + /** + * 是否查看专区里面DB + */ + IsInUDBC?: boolean; + /** + * IsInUDBC为True,UDBCId为空,说明查看整个可用区的专区的db,如果UDBId不为空则只查看此专区下面的db + */ + UDBCId?: string; + /** + * 当只获取这个特定DBId的信息时,如果有该选项,那么把这个DBId实例的所有从库信息一起拉取并返回 + */ + IncludeSlaves?: boolean; +} +/** + * DescribeUDBInstance - 获取UDB实例信息,支持两类操作:(1)指定DBId用于获取该db的信息;(2)指定ClassType、Offset、Limit用于列表操作,查询某一个类型db。 + */ +export interface DescribeUDBInstanceResponse { + /** + * DB实例信息列表 UDBInstanceSet + */ + DataSet?: { + /** + * DB实例所在可用区 + */ + Zone?: string; + /** + * 当DB类型为mongodb时,返回该实例所在集群中的角色,包括:mongos、configsrv_sccc、configsrv_csrs、shardsrv_datanode、shardsrv_arbiter,其中congfigsrv分为sccc和csrs两种模式,shardsrv分为datanode和arbiter两种模式 + */ + ClusterRole?: string; + /** + * DB实例id + */ + DBId?: string; + /** + * 实例名称,至少6位 + */ + Name?: string; + /** + * DB类型id,mysql/mongodb按版本细分各有一个id 目前id的取值范围为[1,7],数值对应的版本如下: 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6, 7:percona-5.6 + */ + DBTypeId?: string; + /** + * DB实例使用的配置参数组id + */ + ParamGroupId?: number; + /** + * 管理员帐户名,默认root + */ + AdminUser?: string; + /** + * DB实例虚ip + */ + VirtualIP?: string; + /** + * DB实例虚ip的mac地址 + */ + VirtualIPMac?: string; + /** + * VPC的ID + */ + VPCId?: string; + /** + * 子网ID + */ + SubnetId?: string; + /** + * UDB数据库机型 + */ + InstanceType?: string; + /** + * UDB数据库机型ID + */ + InstanceTypeId?: number; + /** + * 获取资源其他信息 + */ + Tag?: string; + /** + * 端口号,mysql默认3306,mongodb默认27017 + */ + Port?: number; + /** + * 对mysql的slave而言是master的DBId,对master则为空, 对mongodb则是副本集id + */ + SrcDBId?: string; + /** + * 备份策略,不可修改,备份文件保留的数量,默认7次 + */ + BackupCount?: number; + /** + * 备份策略,不可修改,开始时间,单位小时计,默认3点 + */ + BackupBeginTime?: number; + /** + * 备份策略,一天内备份时间间隔,单位小时,默认24小时 + */ + BackupDuration?: number; + /** + * 备份策略,备份黑名单,mongodb则不适用 + */ + BackupBlacklist?: string; + /** + * DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + */ + State?: string; + /** + * DB实例创建时间,采用UTC计时时间戳 + */ + CreateTime?: number; + /** + * DB实例修改时间,采用UTC计时时间戳 + */ + ModifyTime?: number; + /** + * DB实例过期时间,采用UTC计时时间戳 + */ + ExpiredTime?: number; + /** + * Year, Month, Dynamic,Trial,默认: Dynamic + */ + ChargeType?: string; + /** + * 内存限制(MB),默认根据配置机型 + */ + MemoryLimit?: number; + /** + * 磁盘空间(GB), 默认根据配置机型 + */ + DiskSpace?: number; + /** + * 是否使用SSD + */ + UseSSD?: boolean; + /** + * SSD类型,SATA/PCI-E/NVMe + */ + SSDType?: string; + /** + * DB实例角色,mysql区分master/slave,mongodb多种角色 + */ + Role?: string; + /** + * DB实例磁盘已使用空间,单位GB + */ + DiskUsedSize?: number; + /** + * DB实例数据文件大小,单位GB + */ + DataFileSize?: number; + /** + * DB实例系统文件大小,单位GB + */ + SystemFileSize?: number; + /** + * DB实例日志文件大小,单位GB + */ + LogFileSize?: number; + /** + * 备份日期标记位。共7位,每一位为一周中一天的备份情况 0表示关闭当天备份,1表示打开当天备份。最右边的一位 为星期天的备份开关,其余从右到左依次为星期一到星期 六的备份配置开关,每周必须至少设置两天备份。 例如:1100000 表示打开星期六和星期五的自动备份功能 + */ + BackupDate?: string; + /** + * UDB实例模式类型, 可选值如下: “Normal”: 普通版UDB实例 “HA”: 高可用版UDB实例 + */ + InstanceMode?: string; + /** + * 如果在需要返回从库的场景下,返回该DB实例的所有从库DB实例信息列表。列表中每一个元素的内容同UDBSlaveInstanceSet 。如果这个DB实例没有从库的情况下,此时返回一个空的列表 + */ + DataSet?: { + /** + * 可用区 + */ + Zone?: string; + /** + * DB实例id + */ + DBId?: string; + /** + * 实例名称,至少6位 + */ + Name?: string; + /** + * DB类型id,mysql/mongodb按版本细分各有一个id 目前id的取值范围为[1,7],数值对应的版本如下: 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6, 7:percona-5.6 + */ + DBTypeId?: string; + /** + * DB实例使用的配置参数组id + */ + ParamGroupId?: number; + /** + * 管理员帐户名,默认root + */ + AdminUser?: string; + /** + * DB实例虚ip + */ + VirtualIP?: string; + /** + * DB实例虚ip的mac地址 + */ + VirtualIPMac?: string; + /** + * 端口号,mysql默认3306,mongodb默认27017 + */ + Port?: number; + /** + * 对mysql的slave而言是master的DBId,对master则为空, 对mongodb则是副本集id + */ + SrcDBId?: string; + /** + * 备份策略,不可修改,备份文件保留的数量,默认7次 + */ + BackupCount?: number; + /** + * 备份策略,不可修改,开始时间,单位小时计,默认3点 + */ + BackupBeginTime?: number; + /** + * 备份策略,一天内备份时间间隔,单位小时,默认24小时 + */ + BackupDuration?: number; + /** + * 备份策略,备份黑名单,mongodb则不适用 + */ + BackupBlacklist?: string; + /** + * DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + */ + State?: string; + /** + * DB实例创建时间,采用UTC计时时间戳 + */ + CreateTime?: number; + /** + * DB实例修改时间,采用UTC计时时间戳 + */ + ModifyTime?: number; + /** + * DB实例过期时间,采用UTC计时时间戳 + */ + ExpiredTime?: number; + /** + * Year, Month, Dynamic,Trial,默认: Dynamic + */ + ChargeType?: string; + /** + * 内存限制(MB),默认根据配置机型 + */ + MemoryLimit?: number; + /** + * 磁盘空间(GB), 默认根据配置机型 + */ + DiskSpace?: number; + /** + * 是否使用SSD + */ + UseSSD?: boolean; + /** + * SSD类型,SATA/PCI-E + */ + SSDType?: string; + /** + * DB实例角色,mysql区分master/slave,mongodb多种角色 + */ + Role?: string; + /** + * DB实例磁盘已使用空间,单位GB + */ + DiskUsedSize?: number; + /** + * DB实例数据文件大小,单位GB + */ + DataFileSize?: number; + /** + * DB实例系统文件大小,单位GB + */ + SystemFileSize?: number; + /** + * DB实例日志文件大小,单位GB + */ + LogFileSize?: number; + /** + * 备份日期标记位。共7位,每一位为一周中一天的备份情况 0表示关闭当天备份,1表示打开当天备份。最右边的一位 为星期天的备份开关,其余从右到左依次为星期一到星期 六的备份配置开关,每周必须至少设置两天备份。 例如:1100000 表示打开星期六和星期五的自动备份功能 + */ + BackupDate?: string; + /** + * UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例;"HA": 高可用版UDB实例 + */ + InstanceMode?: string; + /** + * 当DB类型为mongodb时,返回该实例所在集群中的角色,包括:mongos、configsrv_sccc、configsrv_csrs、shardsrv_datanode、shardsrv_arbiter,其中congfigsrv分为sccc和csrs两种模式,shardsrv分为datanode和arbiter两种模式 + */ + ClusterRole?: string; + /** + * 子网ID + */ + SubnetId?: string; + /** + * VPC的ID + */ + VPCId?: string; + /** + * UDB数据库机型 + */ + InstanceType?: string; + /** + * UDB数据库机型ID + */ + InstanceTypeId?: number; + /** + * 获取资源其他信息 + */ + Tag?: string; + /** + * 获取该实例的IPv6地址 + */ + IPv6Address?: string; + }[]; + /** + * 跨可用区高可用备库所在可用区 + */ + BackupZone?: string; + /** + * 该实例的ipv6地址 + */ + IPv6Address?: string; + /** + * 用户转存备份到自己的UFILE配置, 结构参考UFileDataSet + */ + UserUFileData?: { + /** + * Ufile的令牌tokenid + */ + TokenID?: string; + /** + * bucket名称 + */ + Bucket?: string; + }; + }[]; + /** + * 用户db组的数量,对于 mysql: 主从结对数量,没有slave,则只有master mongodb: 副本集数量 + */ + TotalCount?: number; +} +/** + * DescribeUDBInstanceBackupState - 获取UDB实例备份状态 + */ +export interface DescribeUDBInstanceBackupStateRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 备份记录ID + */ + BackupId: number; + /** + * 跨可用区高可用备库所在可用区,参见[可用区列表] + */ + BackupZone?: string; +} +/** + * DescribeUDBInstanceBackupState - 获取UDB实例备份状态 + */ +export interface DescribeUDBInstanceBackupStateResponse { + /** + * 备份状态 0 Backuping // 备份中 1 Success // 备份成功 2 Failed // 备份失败 3 Expired // 备份过期 + */ + State?: string; +} +/** + * DescribeUDBInstanceBackupURL - 获取UDB备份下载地址 + */ +export interface DescribeUDBInstanceBackupURLRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id,该值可通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * DB实例备份ID,该值可以通过DescribeUDBBackup获取 + */ + BackupId: number; +} +/** + * DescribeUDBInstanceBackupURL - 获取UDB备份下载地址 + */ +export interface DescribeUDBInstanceBackupURLResponse { + /** + * DB实例备份文件公网的地址 + */ + BackupPath?: string; + /** + * DB实例备份文件内网的地址 + */ + InnerBackupPath?: string; +} +/** + * DescribeUDBInstanceBinlog - 获取UDB指定时间段的binlog列表 + */ +export interface DescribeUDBInstanceBinlogRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id + */ + DBId: string; + /** + * 过滤条件:起始时间(时间戳) + */ + BeginTime: number; + /** + * 过滤条件:结束时间(时间戳) + */ + EndTime: number; +} +/** + * DescribeUDBInstanceBinlog - 获取UDB指定时间段的binlog列表 + */ +export interface DescribeUDBInstanceBinlogResponse { + /** + * 获取的Binlog信息列表 UDBInstanceBinlogSet + */ + DataSet?: { + /** + * Binlog文件名 + */ + Name?: string; + /** + * Binlog文件大小 + */ + Size?: number; + /** + * Binlog文件生成时间(时间戳) + */ + BeginTime?: number; + /** + * Binlog文件结束时间(时间戳) + */ + EndTime?: number; + }[]; +} +/** + * DescribeUDBInstanceBinlogBackupState - 获取udb实例备份状态 + */ +export interface DescribeUDBInstanceBinlogBackupStateRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 备份记录ID + */ + BackupId: number; + /** + * 跨可用区高可用备库所在可用区 + */ + BackupZone?: string; +} +/** + * DescribeUDBInstanceBinlogBackupState - 获取udb实例备份状态 + */ +export interface DescribeUDBInstanceBinlogBackupStateResponse { + /** + * 备份状态 0 Backuping // 备份中 1 Success // 备份成功 2 Failed // 备份失败 3 Expired // 备份过期 + */ + State?: string; +} +/** + * DescribeUDBInstanceLog - 查询某一段时间内UDB的错误日志或慢查询日志 + */ +export interface DescribeUDBInstanceLogRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例ID + */ + DBId: string; + /** + * 查询的日志开始的时间戳(Unix Timestamp)。对于实时查询,这个参数应该是上次轮询请求时的时间戳,后台会返回从该值到当前时间的日志内容。 + */ + BeginTime: number; + /** + * 查询日志的结束时间戳(Unix Timestamp),对于实时查询不传该值,与BeginTime的差值不超过24小时:(EndTime-BeginTime) < 24*60*60 + */ + EndTime: number; + /** + * 查询日志的类型 + */ + LogType: string; +} +/** + * DescribeUDBInstanceLog - 查询某一段时间内UDB的错误日志或慢查询日志 + */ +export interface DescribeUDBInstanceLogResponse { + /** + * 查询到的日志内容,一段纯文本 + */ + Log?: string; + /** + * 此次查询到的日志的下一个时间,用于下一次轮询时的BeginTime参数;如果日志查询结束则返回为空,前端结束查询 + */ + NextTime?: string; +} +/** + * DescribeUDBInstancePrice - 获取UDB实例价格信息 + */ +export interface DescribeUDBInstancePriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 内存限制(MB),单位为MB.目前支持:1000-96000 + */ + MemoryLimit: number; + /** + * 磁盘空间(GB),暂时支持20(GB) - 3000(GB), 输入不带单位 + */ + DiskSpace: number; + /** + * UDB实例的DB版本字符串 + */ + DBTypeId: string; + /** + * 购买DB实例数量,最大数量为10台, 默认为1台 + */ + Count?: number; + /** + * Year,按年付费; Month,按月付费 Dynamic,按需付费(需开启权限) Trial,试用(需开启权限)默认为月付 + */ + ChargeType?: string; + /** + * DB购买多少个"计费时间单位",默认值为1。比如:买2个月,Quantity就是2。如果计费单位是“按月”,并且Quantity为0,表示“购买到月底” + */ + Quantity?: number; + /** + * 是否使用SSD,只能填true或false,默认为false + */ + UseSSD?: string; + /** + * SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必填 + */ + SSDType?: string; + /** + * 实例的部署类型。可选值为:Normal: 普通单点实例,Slave: 从库实例,HA: 高可用部署实例,默认是Normal + */ + InstanceMode?: string; +} +/** + * DescribeUDBInstancePrice - 获取UDB实例价格信息 + */ +export interface DescribeUDBInstancePriceResponse { + /** + * 价格 参照UDBInstancePriceSet + */ + DataSet?: { + /** + * Year, Month, Dynamic,Trial + */ + ChargeType?: string; + /** + * 价格,单位为分 + */ + Price?: number; + }[]; +} +/** + * DescribeUDBInstanceState - 获取UDB实例状态 + */ +export interface DescribeUDBInstanceStateRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; +} +/** + * DescribeUDBInstanceState - 获取UDB实例状态 + */ +export interface DescribeUDBInstanceStateResponse { + /** + * DB状态标记 Init:初始化中;Fail:安装失败; Starting:启动中; Running : 运行 ;Shutdown:关闭中; Shutoff :已关闭; Delete:已删除; Upgrading:升级中; Promoting: 提升为独库进行中; Recovering: 恢复中; Recover fail:恢复失败。 + */ + State?: string; +} +/** + * DescribeUDBInstanceUpgradePrice - 获取UDB实例升降级价格信息 + */ +export interface DescribeUDBInstanceUpgradePriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的Id + */ + DBId: string; + /** + * 内存限制(MB) + */ + MemoryLimit: number; + /** + * 磁盘空间(GB), 暂时支持20G - 500G + */ + DiskSpace: number; + /** + * 是否使用SSD,默认为false + */ + UseSSD?: boolean; + /** + * SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必选 + */ + SSDType?: string; +} +/** + * DescribeUDBInstanceUpgradePrice - 获取UDB实例升降级价格信息 + */ +export interface DescribeUDBInstanceUpgradePriceResponse { + /** + * 价格,单位为分 + */ + Price?: number; +} +/** + * DescribeUDBLogBackupURL - 获取UDB的slowlog备份地址 + */ +export interface DescribeUDBLogBackupURLRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * DB实例Id + */ + DBId: string; + /** + * DB实例备份ID + */ + BackupId: number; +} +/** + * DescribeUDBLogBackupURL - 获取UDB的slowlog备份地址 + */ +export interface DescribeUDBLogBackupURLResponse { + /** + * 备份外网URL + */ + BackupPath?: string; + /** + * 备份用户网URL + */ + UsernetPath?: string; +} +/** + * DescribeUDBLogPackage - 列表UDB实例binlog或slowlog或errorlog备份信息 + */ +export interface DescribeUDBLogPackageRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 分页显示的起始偏移,列表操作则指定 + */ + Offset: number; + /** + * 分页显示的条目数,列表操作则指定 + */ + Limit: number; + /** + * 需要列出的备份文件类型,每种文件的值如下 2 : BINLOG\_BACKUP 3 : SLOW\_QUERY\_BACKUP 4 : ERRORLOG\_BACKUP + */ + Type?: number; + /** + * Types作为Type的补充,支持多值传入,可以获取多个类型的日志记录,如:Types.0=2&Types.1=3 + */ + Types?: number[]; + /** + * DB实例Id,如果指定,则只获取该db的备份信息 + */ + DBId?: string; + /** + * 过滤条件:起始时间(时间戳) + */ + BeginTime?: number; + /** + * 过滤条件:结束时间(时间戳) + */ + EndTime?: number; +} +/** + * DescribeUDBLogPackage - 列表UDB实例binlog或slowlog或errorlog备份信息 + */ +export interface DescribeUDBLogPackageResponse { + /** + * 备份信息 参见LogPackageDataSet + */ + DataSet?: { + /** + * 备份id + */ + BackupId?: number; + /** + * 备份名称 + */ + BackupName?: string; + /** + * 备份时间 + */ + BackupTime?: number; + /** + * 备份文件大小 + */ + BackupSize?: number; + /** + * 备份类型,包括2-binlog备份,3-slowlog备份 + */ + BackupType?: number; + /** + * 备份状态 Backuping // 备份中 Success // 备份成功 Failed // 备份失败 Expired // 备份过期 + */ + State?: string; + /** + * dbid + */ + DBId?: string; + /** + * 对应的db名称 + */ + DBName?: string; + /** + * 所在可用区 + */ + Zone?: string; + /** + * 跨可用区高可用备库所在可用区 + */ + BackupZone?: string; + }[]; + /** + * 备份总数,如果指定dbid,则是该db备份总数 + */ + TotalCount?: number; +} +/** + * DescribeUDBParamGroup - 获取参数组详细参数信息 + */ +export interface DescribeUDBParamGroupRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 分页显示的起始偏移,列表操作则指定 + */ + Offset?: number; + /** + * 分页显示的条目数,列表操作则指定 + */ + Limit?: number; + /** + * 参数组id,如果指定则获取描述,否则是列表操作,需要 指定Offset/Limit + */ + GroupId?: number; + /** + * 是否选取专区中配置 + */ + IsInUDBC?: boolean; + /** + * 当请求没有填写Zone时,如果指定为true,表示只拉取跨可用区的相关配置文件,否则,拉取所有机房的配置文件(包括每个单可用区和跨可用区) + */ + RegionFlag?: boolean; + /** + * 如果未指定GroupId,则可选是否选取特定DB类型的配置(sql, nosql, postgresql, sqlserver) + */ + ClassType?: string; +} +/** + * DescribeUDBParamGroup - 获取参数组详细参数信息 + */ +export interface DescribeUDBParamGroupResponse { + /** + * 参数组列表 参照UDBParamGroupSet + */ + DataSet?: { + /** + * 参数组id + */ + GroupId?: number; + /** + * 参数组名称 + */ + GroupName?: string; + /** + * DB类型id,mysql/mongodb按版本细分各有一个id 目前id的取值范围为[1,7],数值对应的版本如下 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6 7:percona-5.6 + */ + DBTypeId?: string; + /** + * 参数组描述 + */ + Description?: string; + /** + * 参数组是否可修改 + */ + Modifiable?: boolean; + /** + * 参数的键值对表 UDBParamMemberSet + */ + ParamMember?: { + /** + * 参数名称 + */ + Key?: string; + /** + * 参数值 + */ + Value?: string; + /** + * 参数值应用类型,取值范围为{0,10,20,30},各值 代表意义为 0-unknown、10-int、20-string、 30-bool + */ + ValueType?: number; + /** + * 允许的值(根据参数类型,用分隔符表示) + */ + AllowedVal?: string; + /** + * 参数值应用类型,取值范围为{0,10,20},各值代表 意义为0-unknown、10-static、20-dynamic + */ + ApplyType?: number; + /** + * 是否可更改,默认为false + */ + Modifiable?: boolean; + /** + * 允许值的格式类型,取值范围为{0,10,20},意义分 别为PVFT_UNKOWN=0,PVFT_RANGE=10, PVFT_ENUM=20 + */ + FormatType?: number; + }[]; + }[]; + /** + * 参数组总数,列表操作时才会有该参数 + */ + TotalCount?: number; +} +/** + * DescribeUDBSplittingInfo - 描述读写分离功能的详细信息 + */ +export interface DescribeUDBSplittingInfoRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * DB实例ID + */ + MasterDBId: string; +} +/** + * DescribeUDBSplittingInfo - 描述读写分离功能的详细信息 + */ +export interface DescribeUDBSplittingInfoResponse { + /** + * 可用区 + */ + Zone?: string; + /** + * DB实例ID + */ + MasterDBId?: string; + /** + * 读写分离IP + */ + RWIP?: string; + /** + * 时间阈值 + */ + DelayThreshold?: number; + /** + * 端口号 + */ + Port?: number; + /** + * 读写分离策略 + */ + ReadModel?: string; + /** + * 数据库版本 + */ + DBTypeId?: string; + /** + * 读写分离状态 + */ + RWState?: string; + /** + * 读写分离从库信息 + */ + DataSet?: { + /** + * DB实例ID + */ + DBId?: string; + /** + * 主库/从库 + */ + Role?: string; + /** + * DBIP + */ + VirtualIP?: string; + /** + * 读写分离比重 + */ + ReadWeight?: number; + /** + * DB状态 + */ + State?: string; + }[]; +} +/** + * DescribeUDBType - 获取UDB支持的类型信息 + */ +export interface DescribeUDBTypeRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 跨可用区高可用DB的备库所在区域,仅当该可用区支持跨可用区高可用时填入。参见 [可用区列表](../summary/regionlist.html) + */ + BackupZone?: string; + /** + * DB实例类型,如mysql,sqlserver,mongo,postgresql + */ + DBClusterType?: string; + /** + * 返回支持某种实例类型的DB类型。如果没传,则表示任何实例类型均可。normal:单点,ha:高可用,sharded_cluster:分片集群 + */ + InstanceMode?: string; + /** + * 返回支持某种磁盘类型的DB类型,如Normal、SSD、NVMe_SSD。如果没传,则表示任何磁盘类型均可。 + */ + DiskType?: string; + /** + * 返回从备份创建实例时,该版本号所支持的备份创建版本。如果没传,则表示不是从备份创建。 + */ + CompatibleWithDBType?: string; +} +/** + * DescribeUDBType - 获取UDB支持的类型信息 + */ +export interface DescribeUDBTypeResponse { + /** + * DB类型列表 参数见 UDBTypeSet + */ + DataSet?: { + /** + * DB类型id,mysql/mongodb按版本细分各有一个id, 目前id的取值范围为[1,7],数值对应的版本如下: 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6, 7:percona-5.6 + */ + DBTypeId?: string; + }[]; +} +/** + * DisableUDBRWSplitting - 关闭DB的读写分离功能 + */ +export interface DisableUDBRWSplittingRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * DB实例ID(master) + */ + MasterDBId: string; +} +/** + * DisableUDBRWSplitting - 关闭DB的读写分离功能 + */ +export interface DisableUDBRWSplittingResponse { +} +/** + * EditUDBBackupBlacklist - 编辑UDB实例的备份黑名单 + */ +export interface EditUDBBackupBlacklistRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 黑名单,规范示例,指定库mysql.%;test.%; 指定表city.address; + */ + Blacklist: string; +} +/** + * EditUDBBackupBlacklist - 编辑UDB实例的备份黑名单 + */ +export interface EditUDBBackupBlacklistResponse { +} +/** + * EnableUDBRWSplitting - 开启DB的读写分离功能 + */ +export interface EnableUDBRWSplittingRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * DB实例ID(主库) + */ + MasterDBId: string; + /** + * 备份的可用区。用于创建跨可用区读写分离的一个节点,跨机房的读写分离必须有这个参数 + */ + BackupZone?: string; +} +/** + * EnableUDBRWSplitting - 开启DB的读写分离功能 + */ +export interface EnableUDBRWSplittingResponse { + /** + * DB实例ID(主库) + */ + MasterDBId?: string; + /** + * 读写分离访问IP + */ + RWIp?: string; +} +/** + * ExtractUDBParamGroup - 获取配置文件内容 + */ +export interface ExtractUDBParamGroupRequest { + /** + * 可用区。如果RegionFlag=false,必须传,反之,可不传。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 配置id + */ + GroupId: number; + /** + * 是否跨可用区,RegionFlag为true时表示跨可用区配置文件。如果RegionFlag=true,Zone可以不传,否则Zone必须传。 + */ + RegionFlag?: boolean; +} +/** + * ExtractUDBParamGroup - 获取配置文件内容 + */ +export interface ExtractUDBParamGroupResponse { + /** + * 配置文件内容 + */ + Content: string; +} +/** + * FetchUDBInstanceEarliestRecoverTime - 获取UDB最早可回档的时间点 + */ +export interface FetchUDBInstanceEarliestRecoverTimeRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id + */ + DBId: string; +} +/** + * FetchUDBInstanceEarliestRecoverTime - 获取UDB最早可回档的时间点 + */ +export interface FetchUDBInstanceEarliestRecoverTimeResponse { + /** + * 获取最早可回档时间点 + */ + EarliestTime?: number; +} +/** + * ModifyUDBInstanceName - 重命名UDB实例 + */ +export interface ModifyUDBInstanceNameRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 实例的新名字, 长度要求为6~63位 + */ + Name: string; +} +/** + * ModifyUDBInstanceName - 重命名UDB实例 + */ +export interface ModifyUDBInstanceNameResponse { +} +/** + * ModifyUDBInstancePassword - 修改DB实例的管理员密码 + */ +export interface ModifyUDBInstancePasswordRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的ID,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 实例的新密码 + */ + Password: string; + /** + * sqlserver帐号,仅在sqlserver的情况下填该参数 + */ + AccountName?: string; +} +/** + * ModifyUDBInstancePassword - 修改DB实例的管理员密码 + */ +export interface ModifyUDBInstancePasswordResponse { +} +/** + * PromoteUDBInstanceToHA - 普通db升级为高可用(只针对mysql5.5及以上版本) + */ +export interface PromoteUDBInstanceToHARequest { + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; +} +/** + * PromoteUDBInstanceToHA - 普通db升级为高可用(只针对mysql5.5及以上版本) + */ +export interface PromoteUDBInstanceToHAResponse { +} +/** + * PromoteUDBSlave - 从库提升为独立库 + */ +export interface PromoteUDBSlaveRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 是否强制(如果从库落后可能会禁止提升),默认false 如果落后情况下,强制提升丢失数据 + */ + IsForce?: boolean; +} +/** + * PromoteUDBSlave - 从库提升为独立库 + */ +export interface PromoteUDBSlaveResponse { +} +/** + * ResizeUDBInstance - 修改(升级和降级)UDB实例的配置,包括内存和磁盘的配置,对于内存升级无需关闭实例,其他场景需要事先关闭实例。两套参数可以配置升降机:1.配置UseSSD和SSDType 2.配置InstanceType,不需要配置InstanceMode。这两套第二套参数的优先级更高 + */ +export interface ResizeUDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的Id + */ + DBId: string; + /** + * 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/ 12000M/16000M/ 24000M/32000M/ 48000M/64000M/96000M/128000M/192000M/256000M/320000M。 + */ + MemoryLimit: number; + /** + * 磁盘空间(GB), 暂时支持20G-32T + */ + DiskSpace: number; + /** + * 是否使用SSD,默认为true + */ + UseSSD?: boolean; + /** + * SSD类型,可选值为"SATA"、"PCI-E"、“NVMe”,如果UseSSD为true ,则必选 + */ + SSDType?: string; + /** + * 专区的ID,如果有值表示专区中的DB配置升降级 + */ + UDBCId?: string; + /** + * UDB数据库机型: "Normal": "标准机型" , "SATA_SSD": "SSD机型" , "PCIE_SSD": "SSD高性能机型" , "Normal_Volume": "标准大容量机型", "SATA_SSD_Volume": "SSD大容量机型" , "PCIE_SSD_Volume": "SSD高性能大容量机型",“NVMe_SSD”:“快杰机型” + */ + InstanceType?: string; + /** + * UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + */ + InstanceMode?: string; + /** + * DB关闭状态下升降级,升降级后是否启动DB,默认为false + */ + StartAfterUpgrade?: boolean; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * ResizeUDBInstance - 修改(升级和降级)UDB实例的配置,包括内存和磁盘的配置,对于内存升级无需关闭实例,其他场景需要事先关闭实例。两套参数可以配置升降机:1.配置UseSSD和SSDType 2.配置InstanceType,不需要配置InstanceMode。这两套第二套参数的优先级更高 + */ +export interface ResizeUDBInstanceResponse { +} +/** + * RestartRWSplitting - 读写分离中间件重启,对应docker重启,但是ip不变 + */ +export interface RestartRWSplittingRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 待关闭读写分离中间键ProxyId + */ + MasterDBId: string; +} +/** + * RestartRWSplitting - 读写分离中间件重启,对应docker重启,但是ip不变 + */ +export interface RestartRWSplittingResponse { +} +/** + * RestartUDBInstance - 重启UDB实例 + */ +export interface RestartUDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; +} +/** + * RestartUDBInstance - 重启UDB实例 + */ +export interface RestartUDBInstanceResponse { +} +/** + * SetUDBRWSplitting - 设置读写分离的模式 + */ +export interface SetUDBRWSplittingRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * DB实例ID(master) + */ + MasterDBId: string; + /** + * 读写分离策略 + */ + ReadModel: string; + /** + * DBIds.0 代表UDB主节点, DBIds.1 到DBIds.n 代表1到N个从节点 + */ + DBIds: string[]; + /** + * udb主从节点的只读比例。ReadPercents.0代表主节点的只读比例,ReadPercents.1代表从节点1的读写比例, 以此类推 + */ + ReadPercents?: string[]; + /** + * 时间阙值 + */ + DelayThreshold?: number; +} +/** + * SetUDBRWSplitting - 设置读写分离的模式 + */ +export interface SetUDBRWSplittingResponse { +} +/** + * StartUDBInstance - 启动UDB实例 + */ +export interface StartUDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; +} +/** + * StartUDBInstance - 启动UDB实例 + */ +export interface StartUDBInstanceResponse { +} +/** + * StopUDBInstance - 关闭UDB实例 + */ +export interface StopUDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 是否使用强制手段关闭DB,默认是false + */ + ForceToKill?: boolean; +} +/** + * StopUDBInstance - 关闭UDB实例 + */ +export interface StopUDBInstanceResponse { +} +/** + * SwitchUDBHAToSentinel - UDB高可用实例从HAProxy版本升级为Sentinel版本(不带HAProxy)升级耗时30-70秒 + */ +export interface SwitchUDBHAToSentinelRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDB的实例ID + */ + DBId: string; +} +/** + * SwitchUDBHAToSentinel - UDB高可用实例从HAProxy版本升级为Sentinel版本(不带HAProxy)升级耗时30-70秒 + */ +export interface SwitchUDBHAToSentinelResponse { +} +/** + * SwitchUDBInstanceToHA - 普通UDB切换为高可用,原db状态为WaitForSwitch时,调用改api + */ +export interface SwitchUDBInstanceToHARequest { + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; +} +/** + * SwitchUDBInstanceToHA - 普通UDB切换为高可用,原db状态为WaitForSwitch时,调用改api + */ +export interface SwitchUDBInstanceToHAResponse { + /** + * 切换后高可用db实例的Id + */ + DBId?: string; +} +/** + * UpdateUDBInstanceBackupStrategy - 修改UDB自动备份策略 + */ +export interface UpdateUDBInstanceBackupStrategyRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 主节点的Id + */ + DBId: string; + /** + * 备份的整点时间,范围[0,23] + */ + BackupTime?: number; + /** + * 备份时期标记位。共7位,每一位为一周中一天的备份情况,0表示关闭当天备份,1表示打开当天备份。最右边的一位为星期天的备份开关,其余从右到左依次为星期一到星期六的备份配置开关,每周必须至少设置两天备份。例如:1100000表示打开星期六和星期五的备份功能 + */ + BackupDate?: string; + /** + * 当导出某些数据遇到问题后,是否强制导出其他剩余数据默认是false需要同时设置BackupDate字段 + */ + ForceDump?: boolean; + /** + * 选择默认的备份方式,可选 snapshot 表示使用快照/物理备份,不填或者其它任何值为默认的逻辑备份。需要同时设置BackupDate字段。(注意现在只有SSD 版本的 MySQL实例支持物理备份) + */ + BackupMethod?: string; +} +/** + * UpdateUDBInstanceBackupStrategy - 修改UDB自动备份策略 + */ +export interface UpdateUDBInstanceBackupStrategyResponse { +} +/** + * UpdateUDBInstanceSlaveBackupSwitch - 开启或者关闭UDB从库备份 + */ +export interface UpdateUDBInstanceSlaveBackupSwitchRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 主库的Id + */ + MasterDBId: string; + /** + * 从库的备份开关,范围[0,1],0表示从库备份功能关闭,1 表示从库备份开关打开。 + */ + BackupSwitch: number; + /** + * 从库的Id,如果从库备份开关设定为打开,则必须赋值。 + */ + SlaveDBId?: string; +} +/** + * UpdateUDBInstanceSlaveBackupSwitch - 开启或者关闭UDB从库备份 + */ +export interface UpdateUDBInstanceSlaveBackupSwitchResponse { +} +/** + * UpdateUDBParamGroup - 更新UDB配置参数项 + */ +export interface UpdateUDBParamGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 配置参数组id,使用DescribeUDBParamGroup获得 + */ + GroupId: number; + /** + * 参数名称(与Value配合使用) + */ + Key?: string; + /** + * 参数值(与Key配合使用) + */ + Value?: string; + /** + * 配置文件的名字,不传时认为不修改名字,传了则不能为空 + */ + Name?: string; + /** + * 配置文件的描述,不传时认为不修改 + */ + Description?: string; + /** + * 该配置文件是否是地域级别配置文件,默认是false + */ + RegionFlag?: boolean; +} +/** + * UpdateUDBParamGroup - 更新UDB配置参数项 + */ +export interface UpdateUDBParamGroupResponse { +} +/** + * UploadUDBParamGroup - 导入UDB配置 + */ +export interface UploadUDBParamGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * DB类型id,DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6 + */ + DBTypeId: string; + /** + * 配置参数组名称 + */ + GroupName: string; + /** + * 参数组描述 + */ + Description: string; + /** + * 配置内容,导入的配置内容采用base64编码 + */ + Content: string; + /** + * 该配置文件是否是地域级别配置文件,默认是false + */ + RegionFlag?: boolean; +} +/** + * UploadUDBParamGroup - 导入UDB配置 + */ +export interface UploadUDBParamGroupResponse { + /** + * 配置参数组id + */ + GroupId?: number; +} diff --git a/lib/services/udb/index.js b/lib/services/udb/index.js new file mode 100644 index 0000000..e4f8de5 --- /dev/null +++ b/lib/services/udb/index.js @@ -0,0 +1,520 @@ +"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 **udb** service + */ +class UDBClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * BackupUDBInstance - 备份UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/backup_udb_instance + */ + backupUDBInstance(request) { + const args = Object.assign({ Action: 'BackupUDBInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * BackupUDBInstanceBinlog - 备份UDB指定时间段的binlog列表 + * + * See also: https://docs.ucloud.cn/api/udb-api/backup_udb_instance_binlog + */ + backupUDBInstanceBinlog(request) { + const args = Object.assign({ Action: 'BackupUDBInstanceBinlog' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * BackupUDBInstanceErrorLog - 备份UDB指定时间段的errorlog + * + * See also: https://docs.ucloud.cn/api/udb-api/backup_udb_instance_error_log + */ + backupUDBInstanceErrorLog(request) { + const args = Object.assign({ Action: 'BackupUDBInstanceErrorLog' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * BackupUDBInstanceSlowLog - 备份UDB指定时间段的slowlog分析结果 + * + * See also: https://docs.ucloud.cn/api/udb-api/backup_udb_instance_slow_log + */ + backupUDBInstanceSlowLog(request) { + const args = Object.assign({ Action: 'BackupUDBInstanceSlowLog' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ChangeUDBParamGroup - 修改配置文件 + * + * See also: https://docs.ucloud.cn/api/udb-api/change_udb_param_group + */ + changeUDBParamGroup(request) { + const args = Object.assign({ Action: 'ChangeUDBParamGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CheckRecoverUDBInstance - 核查db是否可以使用回档功能 + * + * See also: https://docs.ucloud.cn/api/udb-api/check_recover_udb_instance + */ + checkRecoverUDBInstance(request) { + const args = Object.assign({ Action: 'CheckRecoverUDBInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CheckUDBInstanceToHAAllowance - 核查db是否可以升级为高可用 + * + * See also: https://docs.ucloud.cn/api/udb-api/check_udb_instance_to_ha_allowance + */ + checkUDBInstanceToHAAllowance(request) { + const args = Object.assign({ Action: 'CheckUDBInstanceToHAAllowance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ClearUDBLog - 清除UDB实例的log + * + * See also: https://docs.ucloud.cn/api/udb-api/clear_udb_log + */ + clearUDBLog(request) { + const args = Object.assign({ Action: 'ClearUDBLog' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateMongoDBReplicaSet - 一键创建DB副本集 + * + * See also: https://docs.ucloud.cn/api/udb-api/create_mongo_db_replica_set + */ + createMongoDBReplicaSet(request) { + const args = Object.assign({ Action: 'CreateMongoDBReplicaSet' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUDBInstance - 创建UDB实例(包括创建mysql master节点、mongodb primary/configsvr节点和从备份恢复实例) + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_instance + */ + createUDBInstance(request) { + const args = Object.assign({ Action: 'CreateUDBInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUDBInstanceByRecovery - 创建db,将新创建的db恢复到指定db某个指定时间点 + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_instance_by_recovery + */ + createUDBInstanceByRecovery(request) { + const args = Object.assign({ Action: 'CreateUDBInstanceByRecovery' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUDBParamGroup - 从已有配置文件创建新配置文件 + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_param_group + */ + createUDBParamGroup(request) { + const args = Object.assign({ Action: 'CreateUDBParamGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUDBReplicationInstance - 创建MongoDB的副本节点(包括仲裁) + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_replication_instance + */ + createUDBReplicationInstance(request) { + const args = Object.assign({ Action: 'CreateUDBReplicationInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUDBRouteInstance - 创建mongos实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_route_instance + */ + createUDBRouteInstance(request) { + const args = Object.assign({ Action: 'CreateUDBRouteInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUDBSlave - 创建UDB实例的slave + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_slave + */ + createUDBSlave(request) { + const args = Object.assign({ Action: 'CreateUDBSlave' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUDBInstance - 删除UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/delete_udb_instance + */ + deleteUDBInstance(request) { + const args = Object.assign({ Action: 'DeleteUDBInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUDBLogPackage - 删除UDB日志包 + * + * See also: https://docs.ucloud.cn/api/udb-api/delete_udb_log_package + */ + deleteUDBLogPackage(request) { + const args = Object.assign({ Action: 'DeleteUDBLogPackage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUDBParamGroup - 删除配置参数组 + * + * See also: https://docs.ucloud.cn/api/udb-api/delete_udb_param_group + */ + deleteUDBParamGroup(request) { + const args = Object.assign({ Action: 'DeleteUDBParamGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDBBackup - 列表UDB实例备份信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_backup + */ + describeUDBBackup(request) { + const args = Object.assign({ Action: 'DescribeUDBBackup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDBBackupBlacklist - 获取UDB实例的备份黑名单 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_backup_blacklist + */ + describeUDBBackupBlacklist(request) { + const args = Object.assign({ Action: 'DescribeUDBBackupBlacklist' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDBBinlogBackupURL - 获取UDB的Binlog备份地址 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_binlog_backup_url + */ + describeUDBBinlogBackupURL(request) { + const args = Object.assign({ Action: 'DescribeUDBBinlogBackupURL' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDBInstance - 获取UDB实例信息,支持两类操作:(1)指定DBId用于获取该db的信息;(2)指定ClassType、Offset、Limit用于列表操作,查询某一个类型db。 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance + */ + describeUDBInstance(request) { + const args = Object.assign({ Action: 'DescribeUDBInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDBInstanceBackupState - 获取UDB实例备份状态 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_backup_state + */ + describeUDBInstanceBackupState(request) { + const args = Object.assign({ Action: 'DescribeUDBInstanceBackupState' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDBInstanceBackupURL - 获取UDB备份下载地址 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_backup_url + */ + describeUDBInstanceBackupURL(request) { + const args = Object.assign({ Action: 'DescribeUDBInstanceBackupURL' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDBInstanceBinlog - 获取UDB指定时间段的binlog列表 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_binlog + */ + describeUDBInstanceBinlog(request) { + const args = Object.assign({ Action: 'DescribeUDBInstanceBinlog' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDBInstanceBinlogBackupState - 获取udb实例备份状态 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_binlog_backup_state + */ + describeUDBInstanceBinlogBackupState(request) { + const args = Object.assign({ Action: 'DescribeUDBInstanceBinlogBackupState' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDBInstanceLog - 查询某一段时间内UDB的错误日志或慢查询日志 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_log + */ + describeUDBInstanceLog(request) { + const args = Object.assign({ Action: 'DescribeUDBInstanceLog' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDBInstancePrice - 获取UDB实例价格信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_price + */ + describeUDBInstancePrice(request) { + const args = Object.assign({ Action: 'DescribeUDBInstancePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDBInstanceState - 获取UDB实例状态 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_state + */ + describeUDBInstanceState(request) { + const args = Object.assign({ Action: 'DescribeUDBInstanceState' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDBInstanceUpgradePrice - 获取UDB实例升降级价格信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_upgrade_price + */ + describeUDBInstanceUpgradePrice(request) { + const args = Object.assign({ Action: 'DescribeUDBInstanceUpgradePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDBLogBackupURL - 获取UDB的slowlog备份地址 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_log_backup_url + */ + describeUDBLogBackupURL(request) { + const args = Object.assign({ Action: 'DescribeUDBLogBackupURL' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDBLogPackage - 列表UDB实例binlog或slowlog或errorlog备份信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_log_package + */ + describeUDBLogPackage(request) { + const args = Object.assign({ Action: 'DescribeUDBLogPackage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDBParamGroup - 获取参数组详细参数信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_param_group + */ + describeUDBParamGroup(request) { + const args = Object.assign({ Action: 'DescribeUDBParamGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDBSplittingInfo - 描述读写分离功能的详细信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_splitting_info + */ + describeUDBSplittingInfo(request) { + const args = Object.assign({ Action: 'DescribeUDBSplittingInfo' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDBType - 获取UDB支持的类型信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_type + */ + describeUDBType(request) { + const args = Object.assign({ Action: 'DescribeUDBType' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DisableUDBRWSplitting - 关闭DB的读写分离功能 + * + * See also: https://docs.ucloud.cn/api/udb-api/disable_udb_rw_splitting + */ + disableUDBRWSplitting(request) { + const args = Object.assign({ Action: 'DisableUDBRWSplitting' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * EditUDBBackupBlacklist - 编辑UDB实例的备份黑名单 + * + * See also: https://docs.ucloud.cn/api/udb-api/edit_udb_backup_blacklist + */ + editUDBBackupBlacklist(request) { + const args = Object.assign({ Action: 'EditUDBBackupBlacklist' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * EnableUDBRWSplitting - 开启DB的读写分离功能 + * + * See also: https://docs.ucloud.cn/api/udb-api/enable_udb_rw_splitting + */ + enableUDBRWSplitting(request) { + const args = Object.assign({ Action: 'EnableUDBRWSplitting' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ExtractUDBParamGroup - 获取配置文件内容 + * + * See also: https://docs.ucloud.cn/api/udb-api/extract_udb_param_group + */ + extractUDBParamGroup(request) { + const args = Object.assign({ Action: 'ExtractUDBParamGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * FetchUDBInstanceEarliestRecoverTime - 获取UDB最早可回档的时间点 + * + * See also: https://docs.ucloud.cn/api/udb-api/fetch_udb_instance_earliest_recover_time + */ + fetchUDBInstanceEarliestRecoverTime(request) { + const args = Object.assign({ Action: 'FetchUDBInstanceEarliestRecoverTime' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyUDBInstanceName - 重命名UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/modify_udb_instance_name + */ + modifyUDBInstanceName(request) { + const args = Object.assign({ Action: 'ModifyUDBInstanceName' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyUDBInstancePassword - 修改DB实例的管理员密码 + * + * See also: https://docs.ucloud.cn/api/udb-api/modify_udb_instance_password + */ + modifyUDBInstancePassword(request) { + const args = Object.assign({ Action: 'ModifyUDBInstancePassword' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * PromoteUDBInstanceToHA - 普通db升级为高可用(只针对mysql5.5及以上版本) + * + * See also: https://docs.ucloud.cn/api/udb-api/promote_udb_instance_to_ha + */ + promoteUDBInstanceToHA(request) { + const args = Object.assign({ Action: 'PromoteUDBInstanceToHA' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * PromoteUDBSlave - 从库提升为独立库 + * + * See also: https://docs.ucloud.cn/api/udb-api/promote_udb_slave + */ + promoteUDBSlave(request) { + const args = Object.assign({ Action: 'PromoteUDBSlave' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ResizeUDBInstance - 修改(升级和降级)UDB实例的配置,包括内存和磁盘的配置,对于内存升级无需关闭实例,其他场景需要事先关闭实例。两套参数可以配置升降机:1.配置UseSSD和SSDType 2.配置InstanceType,不需要配置InstanceMode。这两套第二套参数的优先级更高 + * + * See also: https://docs.ucloud.cn/api/udb-api/resize_udb_instance + */ + resizeUDBInstance(request) { + const args = Object.assign({ Action: 'ResizeUDBInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * RestartRWSplitting - 读写分离中间件重启,对应docker重启,但是ip不变 + * + * See also: https://docs.ucloud.cn/api/udb-api/restart_rw_splitting + */ + restartRWSplitting(request) { + const args = Object.assign({ Action: 'RestartRWSplitting' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * RestartUDBInstance - 重启UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/restart_udb_instance + */ + restartUDBInstance(request) { + const args = Object.assign({ Action: 'RestartUDBInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * SetUDBRWSplitting - 设置读写分离的模式 + * + * See also: https://docs.ucloud.cn/api/udb-api/set_udb_rw_splitting + */ + setUDBRWSplitting(request) { + const args = Object.assign({ Action: 'SetUDBRWSplitting' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * StartUDBInstance - 启动UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/start_udb_instance + */ + startUDBInstance(request) { + const args = Object.assign({ Action: 'StartUDBInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * StopUDBInstance - 关闭UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/stop_udb_instance + */ + stopUDBInstance(request) { + const args = Object.assign({ Action: 'StopUDBInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * SwitchUDBHAToSentinel - UDB高可用实例从HAProxy版本升级为Sentinel版本(不带HAProxy)升级耗时30-70秒 + * + * See also: https://docs.ucloud.cn/api/udb-api/switch_udb_ha_to_sentinel + */ + switchUDBHAToSentinel(request) { + const args = Object.assign({ Action: 'SwitchUDBHAToSentinel' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * SwitchUDBInstanceToHA - 普通UDB切换为高可用,原db状态为WaitForSwitch时,调用改api + * + * See also: https://docs.ucloud.cn/api/udb-api/switch_udb_instance_to_ha + */ + switchUDBInstanceToHA(request) { + const args = Object.assign({ Action: 'SwitchUDBInstanceToHA' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateUDBInstanceBackupStrategy - 修改UDB自动备份策略 + * + * See also: https://docs.ucloud.cn/api/udb-api/update_udb_instance_backup_strategy + */ + updateUDBInstanceBackupStrategy(request) { + const args = Object.assign({ Action: 'UpdateUDBInstanceBackupStrategy' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateUDBInstanceSlaveBackupSwitch - 开启或者关闭UDB从库备份 + * + * See also: https://docs.ucloud.cn/api/udb-api/update_udb_instance_slave_backup_switch + */ + updateUDBInstanceSlaveBackupSwitch(request) { + const args = Object.assign({ Action: 'UpdateUDBInstanceSlaveBackupSwitch' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateUDBParamGroup - 更新UDB配置参数项 + * + * See also: https://docs.ucloud.cn/api/udb-api/update_udb_param_group + */ + updateUDBParamGroup(request) { + const args = Object.assign({ Action: 'UpdateUDBParamGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UploadUDBParamGroup - 导入UDB配置 + * + * See also: https://docs.ucloud.cn/api/udb-api/upload_udb_param_group + */ + uploadUDBParamGroup(request) { + const args = Object.assign({ Action: 'UploadUDBParamGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = UDBClient; diff --git a/lib/services/uddb/index.d.ts b/lib/services/uddb/index.d.ts new file mode 100644 index 0000000..9c28f94 --- /dev/null +++ b/lib/services/uddb/index.d.ts @@ -0,0 +1,770 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **uddb** service + */ +export default class UDDBClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * ChangeUDDBInstanceName - 修改分布式数据库中间件名称 + * + * See also: https://docs.ucloud.cn/api/uddb-api/change_uddb_instance_name + */ + changeUDDBInstanceName(request?: ChangeUDDBInstanceNameRequest): Promise; + /** + * ChangeUDDBSlaveCount - 改变分布式数据库数据节点的只读实例个数 + 每一个UDDB的数据节点负责处理所有的写入请求。与此同时,每一个数据节点可以配置若干个该节点的只读实例。当主节点的数据写入完毕后,只读实例把这次的写入操作进行更新,从而和数据节点保持一致。 + 只读实例可以使得数据由多份复制,在数据节点和只读实例之间,可以做请求的读写分离, 也就是说, 主节点写入数据之后, 数据的读操作可以由数据只读实例进行分担, 这样减少主节点的压力, 增加性能 + 当改变了数据节点的只读实例个数之后,对于现有的和以后的每一个数据节点都采用这个配置。如果UDDB实例有现有的数据节点, 那么它会根据新配置的参数,自动创建或删除数据节点的只读实例 + 如下状态的UDDB实例可以进行这个操作: + Running: 系统正常运行中 + 当请求返回成功之后,UDDB实例的状态变成"ChangingSlaveCount"; 如果返回失败, UDDB实例状态保持不变 当UDDB更改数据分区的只读实例个数成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果更改过程中出现异常, 状态变成"Abnormal"(异常运行中)或者"Error"(运行错误) + * + * See also: https://docs.ucloud.cn/api/uddb-api/change_uddb_slave_count + */ + changeUDDBSlaveCount(request?: ChangeUDDBSlaveCountRequest): Promise; + /** + * CreateUDDBInstance - 创建创建分布式数据库UDDB实例, 简称UDDB实例。 + * + * See also: https://docs.ucloud.cn/api/uddb-api/create_uddb_instance + */ + createUDDBInstance(request?: CreateUDDBInstanceRequest): Promise; + /** + * DeleteUDDBInstance - 删除UDDB实例。 + 如下状态的UDDB实例可以进行这个操作: + InitFail: 初始化失败 + Shutoff: 已关闭 + 当请求返回成功之后,UDDB实例就已经被删除, 列表上看不到对应的UDDB实例 + * + * See also: https://docs.ucloud.cn/api/uddb-api/delete_uddb_instance + */ + deleteUDDBInstance(request?: DeleteUDDBInstanceRequest): Promise; + /** + * DescribeUDDBInstance - 获取分布式数据库UDDB的详细信息 + * + * See also: https://docs.ucloud.cn/api/uddb-api/describe_uddb_instance + */ + describeUDDBInstance(request?: DescribeUDDBInstanceRequest): Promise; + /** + * DescribeUDDBInstancePrice - 获取分布式数据库UDDB价格 + * + * See also: https://docs.ucloud.cn/api/uddb-api/describe_uddb_instance_price + */ + describeUDDBInstancePrice(request?: DescribeUDDBInstancePriceRequest): Promise; + /** + * DescribeUDDBInstanceUpgradePrice - 升级UDDB时,获取升级后的价格 + * + * See also: https://docs.ucloud.cn/api/uddb-api/describe_uddb_instance_upgrade_price + */ + describeUDDBInstanceUpgradePrice(request?: DescribeUDDBInstanceUpgradePriceRequest): Promise; + /** + * RestartUDDBInstance - 重启UDDB实例,开始提供服务。 + + 如下状态的UDDB实例可以进行这个操作: + + Running: 正常运行中 + Abnormal: 异常运行中 + 当请求返回成功之后,UDDB实例的状态变成"Starting"(启动中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在重启过程中, 当UDDB实例启动成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果启动过程中出现异常, 状态变成"Abnormal"(异常运行中), 或者"Shutoff"(已关闭 + * + * See also: https://docs.ucloud.cn/api/uddb-api/restart_uddb_instance + */ + restartUDDBInstance(request?: RestartUDDBInstanceRequest): Promise; + /** + * StartUDDBInstance - 启动UDDB实例,开始提供服务。 + + 如下状态的UDDB实例可以进行这个操作: + + Shutoff: 已关闭 + 当请求返回成功之后,UDDB实例的状态变成"Starting"(启动中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在启动过程中, 当UDDB实例启动成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果启动过程中出现异常, 状态变成"Abnormal"(异常运行中), 或者"Shutoff"(已关闭) + * + * See also: https://docs.ucloud.cn/api/uddb-api/start_uddb_instance + */ + startUDDBInstance(request?: StartUDDBInstanceRequest): Promise; + /** + * StopUDDBInstance - 关闭UDDB实例,停止提供服务。 + + 如下状态的UDDB实例可以进行这个操作: + + Running: 正常运行中 + Abnormal: 异常运行中 + 当请求返回成功之后,UDDB实例的状态变成"Shutdown"(关闭中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在关闭过程中, 当UDDB实例关闭成功之后, UDDB实例的状态变成"Shutoff"(已关闭); 如果关闭过程中出现异常, 根据UDDB实例的情况, 状态变成"Abnormal"(异常运行中), 或者"Running"(正常运行中) + * + * See also: https://docs.ucloud.cn/api/uddb-api/stop_uddb_instance + */ + stopUDDBInstance(request?: StopUDDBInstanceRequest): Promise; + /** + * UpgradeUDDBDataNode - 升降级分布式数据库数据节点的配置, 提高/降低数据节点的数据容量和内存 + + 所有数据节点以及其所挂载的只读实例的配置都受到影响 + + 升降级数据节点的配置之后之后, 会按照数据节点新的磁盘和内存大小重新计费 + + 如下状态的数据节点实例可以进行这个操作: + + Shutoff: 已关闭 + 当请求返回成功之后,UDDB实例的状态变成"UpgradingDataNode",相关数据节点的状态变成"Upgrading"; 如果返回失败, UDDB实例状态保持不变 当UDDB实例升级结束之后, UDDB实例的状态变成"Shutoff" + * + * See also: https://docs.ucloud.cn/api/uddb-api/upgrade_uddb_data_node + */ + upgradeUDDBDataNode(request?: UpgradeUDDBDataNodeRequest): Promise; + /** + * UpgradeUDDBInstance - 升降级分布式数据库中间件的配置, 提高/降低请求处理的并发性 + + 修改请求处理节点个数之后, 按照所有请求处理节点的总内存容量和CPU核数重新计费 + + 如下状态的UDDB实例可以进行这个操作: + + Running: 系统正常运行中 + 当请求返回成功之后,UDDB实例的状态变成"UpgradingUDDB"; 如果返回失败, UDDB实例状态保持不变 当UDDB实例升级成功之后, UDDB实例的状态变成"Running"; 如果更改过程中出现异常, 状态变成"Abnormal", 或者"Error" + * + * See also: https://docs.ucloud.cn/api/uddb-api/upgrade_uddb_instance + */ + upgradeUDDBInstance(request?: UpgradeUDDBInstanceRequest): Promise; +} +/** + * ChangeUDDBInstanceName - 修改分布式数据库中间件名称 + */ +export interface ChangeUDDBInstanceNameRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB实例Id + */ + UDDBId: string; + /** + * 名称 + */ + NewName: string; +} +/** + * ChangeUDDBInstanceName - 修改分布式数据库中间件名称 + */ +export interface ChangeUDDBInstanceNameResponse { +} +/** + * ChangeUDDBSlaveCount - 改变分布式数据库数据节点的只读实例个数 +每一个UDDB的数据节点负责处理所有的写入请求。与此同时,每一个数据节点可以配置若干个该节点的只读实例。当主节点的数据写入完毕后,只读实例把这次的写入操作进行更新,从而和数据节点保持一致。 +只读实例可以使得数据由多份复制,在数据节点和只读实例之间,可以做请求的读写分离, 也就是说, 主节点写入数据之后, 数据的读操作可以由数据只读实例进行分担, 这样减少主节点的压力, 增加性能 +当改变了数据节点的只读实例个数之后,对于现有的和以后的每一个数据节点都采用这个配置。如果UDDB实例有现有的数据节点, 那么它会根据新配置的参数,自动创建或删除数据节点的只读实例 +如下状态的UDDB实例可以进行这个操作: +Running: 系统正常运行中 +当请求返回成功之后,UDDB实例的状态变成"ChangingSlaveCount"; 如果返回失败, UDDB实例状态保持不变 当UDDB更改数据分区的只读实例个数成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果更改过程中出现异常, 状态变成"Abnormal"(异常运行中)或者"Error"(运行错误) + */ +export interface ChangeUDDBSlaveCountRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB资源id + */ + UDDBId: string; + /** + * 每个数据节点的只读实例个数, 取值必须>=0 + */ + SlaveCount: string; +} +/** + * ChangeUDDBSlaveCount - 改变分布式数据库数据节点的只读实例个数 +每一个UDDB的数据节点负责处理所有的写入请求。与此同时,每一个数据节点可以配置若干个该节点的只读实例。当主节点的数据写入完毕后,只读实例把这次的写入操作进行更新,从而和数据节点保持一致。 +只读实例可以使得数据由多份复制,在数据节点和只读实例之间,可以做请求的读写分离, 也就是说, 主节点写入数据之后, 数据的读操作可以由数据只读实例进行分担, 这样减少主节点的压力, 增加性能 +当改变了数据节点的只读实例个数之后,对于现有的和以后的每一个数据节点都采用这个配置。如果UDDB实例有现有的数据节点, 那么它会根据新配置的参数,自动创建或删除数据节点的只读实例 +如下状态的UDDB实例可以进行这个操作: +Running: 系统正常运行中 +当请求返回成功之后,UDDB实例的状态变成"ChangingSlaveCount"; 如果返回失败, UDDB实例状态保持不变 当UDDB更改数据分区的只读实例个数成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果更改过程中出现异常, 状态变成"Abnormal"(异常运行中)或者"Error"(运行错误) + */ +export interface ChangeUDDBSlaveCountResponse { +} +/** + * CreateUDDBInstance - 创建创建分布式数据库UDDB实例, 简称UDDB实例。 + */ +export interface CreateUDDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB的数据库版本,支持版本如下:mysql-5.6 mysql-5.7. 如果不填,则默认为mysql-5.6 + */ + DBTypeId: string; + /** + * 实例名称,至少6位 + */ + Name: string; + /** + * 管理员密码, 密码需要使用base64加密 + */ + AdminPassword: string; + /** + * UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5W FellFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w; EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + */ + RouterVersion: string; + /** + * 其他版本:该参数可不填;专享版:物理机台数 + */ + RouterNodeNum: number; + /** + * 初始的数据节点个数 取值必须>0. + */ + DataNodeCount: number; + /** + * 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值. + */ + DataNodeMemory: number; + /** + * 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + */ + DataNodeDiskSpace: number; + /** + * 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + */ + InstanceMode?: string; + /** + * 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + */ + InstanceType?: string; + /** + * 付费类型,可选值如下:Year: 按年付费 Month: 按月付费 Dynamic: 按需付费(单位: 小时) Trial: 免费试用 默认值为: Dynamic + */ + ChargeType?: string; + /** + * 购买时长,默认值1 + */ + Quantity?: number; + /** + * 管理员帐户名,默认root + */ + AdminUser?: string; + /** + * 端口号,mysql默认端口为3306 + */ + Port?: number; + /** + * 每个数据节点的只读实例个数, 取值必须>=0. 默认取值为0. + */ + DataNodeSlaveCount?: number; + /** + * VPC的ID + */ + VPCId?: string; + /** + * 子网ID + */ + SubnetId?: string; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * CreateUDDBInstance - 创建创建分布式数据库UDDB实例, 简称UDDB实例。 + */ +export interface CreateUDDBInstanceResponse { + /** + * UDDB实例ID + */ + UDDBId?: string; +} +/** + * DeleteUDDBInstance - 删除UDDB实例。 +如下状态的UDDB实例可以进行这个操作: +InitFail: 初始化失败 +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例就已经被删除, 列表上看不到对应的UDDB实例 + */ +export interface DeleteUDDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB实例ID + */ + UDDBId: string; +} +/** + * DeleteUDDBInstance - 删除UDDB实例。 +如下状态的UDDB实例可以进行这个操作: +InitFail: 初始化失败 +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例就已经被删除, 列表上看不到对应的UDDB实例 + */ +export interface DeleteUDDBInstanceResponse { +} +/** + * DescribeUDDBInstance - 获取分布式数据库UDDB的详细信息 + */ +export interface DescribeUDDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB实例ID + */ + UDDBId: string; +} +/** + * DescribeUDDBInstance - 获取分布式数据库UDDB的详细信息 + */ +export interface DescribeUDDBInstanceResponse { + /** + * UDDB实例信息列表, 参见DataSetUDDB项定义 + */ + DataSet?: { + /** + * UDDB实例对应的可用区 + */ + Zone?: string; + /** + * UDDB实例ID + */ + UDDBId?: string; + /** + * UDDB实例名称 + */ + Name?: string; + /** + * UDDB的数据库版本 + */ + DBTypeId?: string; + /** + * 管理员帐户名,默认root + */ + AdminUser?: string; + /** + * UDDB实例访问的虚IP + */ + VirtualIP?: string; + /** + * UDDB实例访问的端口号 + */ + Port?: number; + /** + * UDDB状态, 状态列表如下: Init: 初始化中 InitFail: 初始化失败 Starting: 启动中 Running: 系统正常运行中 Abnormal: 系统运行中, 有异常, 还能提供服务 Error: 系统运行中, 但不能正常提供服务 Shutdown: 关闭中 Shutoff: 已关闭 Deleted: 已删除 UpgradingUDDB: 升降级UDDB配置中 UpgradingDataNode: 升降级UDDB节点配置中 ChangingSlaveCount: 改变只读实例数量中 ScalingOutUDDB: 水平扩展中 + */ + State?: string; + /** + * UDDB实例创建时间,采用UTC计时时间戳 + */ + CreateTime?: number; + /** + * UDDB实例过期时间,采用UTC计时时间戳 + */ + ExpiredTime?: number; + /** + * 付费类型,可选值如下: Year: 按年付费 Month: 按月付费 Dynamic: 按需付费(单位: 小时) Trial: 免费试用 + */ + ChargeType?: string; + /** + * UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5W FellFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w; EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + */ + RouterVersion?: string; + /** + * 各版本下的节点个数。体验版: 固定为2节点; 畅享版:固定为4节点(后续可通过管理API调整);专享版:物理机台数 + */ + RouterNodeNum?: number; + /** + * 参考QPS。 免费版: 15000; 畅享版: 30000 - 100000 (根据节点数而定); 专享版: 节点数 * 10w qps + */ + RefQps?: number; + /** + * 数据节点个数 + */ + DataNodeCount?: number; + /** + * 数据节点的内存配置, 单位:MB + */ + DataNodeMemory?: number; + /** + * 数据节点的磁盘大小配置. 单位: GB + */ + DataNodeDiskSpace?: number; + /** + * 每个数据节点的只读实例个数. + */ + DataNodeSlaveCount?: number; + /** + * UDDB实例的数据节点的信息列表 + */ + DataNodeList?: { + /** + * 数据节点ID + */ + Id?: string; + /** + * 数据节点的内存配置, 单位:MB + */ + Memory?: number; + /** + * 数据节点的磁盘大小配置. 单位: GB + */ + DiskSpace?: number; + /** + * 数据节点的只读实例个数. + */ + SlaveCount?: number; + /** + * 数据分片状态, 状态列表如下: Init: 初始化中 Fail: 安装失败 Starting: 启动中 Running: 系统正常运行中 Shutdown: 关闭中 Shutoff: 已关闭 Deleted: 已删除 Upgrading: 系统升级中 + */ + State?: string; + /** + * 只读实例信息列表 + */ + SlaveInfos?: { + /** + * 只读实例ID + */ + Id?: string; + /** + * 对应数据节点的ID + */ + DataNodeId?: string; + /** + * 只读实例状态, 状态列表如下: Init: 初始化中 Fail: 安装失败 Starting: 启动中 Running: 系统正常运行中 Shutdown: 关闭中 Shutoff: 已关闭 Deleted: 已删除 Upgrading: 系统升级中 + */ + State?: string; + }[]; + /** + * 最近一次数据迁移任务id + */ + LastTransTaskId?: string; + /** + * 节点的创建时间 + */ + CreateTime?: string; + }[]; + /** + * 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + */ + InstanceMode?: string; + /** + * 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + */ + InstanceType?: string; + }[]; +} +/** + * DescribeUDDBInstancePrice - 获取分布式数据库UDDB价格 + */ +export interface DescribeUDDBInstancePriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5WFeelFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w;EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + */ + RouterVersion: string; + /** + * 其他版本:该参数可不填;专享版:物理机节点个数。一台物理机有2个节点 + */ + RouterNodeNum: number; + /** + * 初始的数据节点个数 取值必须>0. + */ + DataNodeCount: number; + /** + * 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值. + */ + DataNodeMemory: string; + /** + * 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + */ + DataNodeDiskSpace: number; + /** + * 付费类型,可选值如下: Year: 按年付费 Month: 按月付费 Dynamic: 按需付费(单位: 小时) Trial: 免费试用 默认值为: Dynamic + */ + ChargeType?: string; + /** + * 购买时长,默认值1 + */ + Quantity?: number; + /** + * 每个数据节点的只读实例个数, 取值必须>=0. 默认取值为0. + */ + DataNodeSlaveCount?: number; + /** + * 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + */ + InstanceMode?: string; + /** + * 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + */ + InstanceType?: string; +} +/** + * DescribeUDDBInstancePrice - 获取分布式数据库UDDB价格 + */ +export interface DescribeUDDBInstancePriceResponse { + /** + * 价格明细, 参考PriceDetailInfo对象定义 + */ + PriceInfo?: { + /** + * 中间件路由节点费用 + */ + MiddlewarePrice?: number; + /** + * 存储节点费用 + */ + DataNodePrice?: number; + /** + * 只读实例费用 + */ + DataNodeSlavePrice?: number; + }; +} +/** + * DescribeUDDBInstanceUpgradePrice - 升级UDDB时,获取升级后的价格 + */ +export interface DescribeUDDBInstanceUpgradePriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB实例ID + */ + UDDBId: string; + /** + * UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5WFeelFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w;EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + */ + RouterVersion: string; + /** + * 其他版本:该参数可不填;专享版:物理机节点的个数。一台物理机有2个节点 + */ + RouterNodeNum: number; + /** + * 新的数据节点个数 取值必须>0. + */ + DataNodeCount?: number; + /** + * 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值. + */ + DataNodeMemory?: number; + /** + * 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + */ + DataNodeDiskSpace?: number; + /** + * 每个数据节点的只读实例个数, 取值必须>=0. + */ + DataNodeSlaveCount?: number; + /** + * 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + */ + InstanceMode?: string; + /** + * 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + */ + InstanceType?: string; +} +/** + * DescribeUDDBInstanceUpgradePrice - 升级UDDB时,获取升级后的价格 + */ +export interface DescribeUDDBInstanceUpgradePriceResponse { + /** + * 价格明细, 参考PriceInfo对象定义 + */ + PriceInfo?: { + /** + * 中间件路由节点费用 + */ + MiddlewarePrice?: number; + /** + * 存储节点费用 + */ + DataNodePrice?: number; + /** + * 只读实例费用 + */ + DataNodeSlavePrice?: number; + }; +} +/** + * RestartUDDBInstance - 重启UDDB实例,开始提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Running: 正常运行中 +Abnormal: 异常运行中 +当请求返回成功之后,UDDB实例的状态变成"Starting"(启动中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在重启过程中, 当UDDB实例启动成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果启动过程中出现异常, 状态变成"Abnormal"(异常运行中), 或者"Shutoff"(已关闭 + */ +export interface RestartUDDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB实例ID + */ + UDDBId: string; +} +/** + * RestartUDDBInstance - 重启UDDB实例,开始提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Running: 正常运行中 +Abnormal: 异常运行中 +当请求返回成功之后,UDDB实例的状态变成"Starting"(启动中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在重启过程中, 当UDDB实例启动成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果启动过程中出现异常, 状态变成"Abnormal"(异常运行中), 或者"Shutoff"(已关闭 + */ +export interface RestartUDDBInstanceResponse { +} +/** + * StartUDDBInstance - 启动UDDB实例,开始提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例的状态变成"Starting"(启动中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在启动过程中, 当UDDB实例启动成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果启动过程中出现异常, 状态变成"Abnormal"(异常运行中), 或者"Shutoff"(已关闭) + */ +export interface StartUDDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB实例ID + */ + UDDBId: string; +} +/** + * StartUDDBInstance - 启动UDDB实例,开始提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例的状态变成"Starting"(启动中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在启动过程中, 当UDDB实例启动成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果启动过程中出现异常, 状态变成"Abnormal"(异常运行中), 或者"Shutoff"(已关闭) + */ +export interface StartUDDBInstanceResponse { +} +/** + * StopUDDBInstance - 关闭UDDB实例,停止提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Running: 正常运行中 +Abnormal: 异常运行中 +当请求返回成功之后,UDDB实例的状态变成"Shutdown"(关闭中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在关闭过程中, 当UDDB实例关闭成功之后, UDDB实例的状态变成"Shutoff"(已关闭); 如果关闭过程中出现异常, 根据UDDB实例的情况, 状态变成"Abnormal"(异常运行中), 或者"Running"(正常运行中) + */ +export interface StopUDDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB实例ID + */ + UDDBId: string; +} +/** + * StopUDDBInstance - 关闭UDDB实例,停止提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Running: 正常运行中 +Abnormal: 异常运行中 +当请求返回成功之后,UDDB实例的状态变成"Shutdown"(关闭中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在关闭过程中, 当UDDB实例关闭成功之后, UDDB实例的状态变成"Shutoff"(已关闭); 如果关闭过程中出现异常, 根据UDDB实例的情况, 状态变成"Abnormal"(异常运行中), 或者"Running"(正常运行中) + */ +export interface StopUDDBInstanceResponse { +} +/** + * UpgradeUDDBDataNode - 升降级分布式数据库数据节点的配置, 提高/降低数据节点的数据容量和内存 + +所有数据节点以及其所挂载的只读实例的配置都受到影响 + +升降级数据节点的配置之后之后, 会按照数据节点新的磁盘和内存大小重新计费 + +如下状态的数据节点实例可以进行这个操作: + +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例的状态变成"UpgradingDataNode",相关数据节点的状态变成"Upgrading"; 如果返回失败, UDDB实例状态保持不变 当UDDB实例升级结束之后, UDDB实例的状态变成"Shutoff" + */ +export interface UpgradeUDDBDataNodeRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * UDDB实例ID + */ + UDDBId: string; + /** + * 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值 + */ + DataNodeMemory: number; + /** + * 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + */ + DataNodeDiskSpace: number; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * UpgradeUDDBDataNode - 升降级分布式数据库数据节点的配置, 提高/降低数据节点的数据容量和内存 + +所有数据节点以及其所挂载的只读实例的配置都受到影响 + +升降级数据节点的配置之后之后, 会按照数据节点新的磁盘和内存大小重新计费 + +如下状态的数据节点实例可以进行这个操作: + +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例的状态变成"UpgradingDataNode",相关数据节点的状态变成"Upgrading"; 如果返回失败, UDDB实例状态保持不变 当UDDB实例升级结束之后, UDDB实例的状态变成"Shutoff" + */ +export interface UpgradeUDDBDataNodeResponse { +} +/** + * UpgradeUDDBInstance - 升降级分布式数据库中间件的配置, 提高/降低请求处理的并发性 + +修改请求处理节点个数之后, 按照所有请求处理节点的总内存容量和CPU核数重新计费 + +如下状态的UDDB实例可以进行这个操作: + +Running: 系统正常运行中 +当请求返回成功之后,UDDB实例的状态变成"UpgradingUDDB"; 如果返回失败, UDDB实例状态保持不变 当UDDB实例升级成功之后, UDDB实例的状态变成"Running"; 如果更改过程中出现异常, 状态变成"Abnormal", 或者"Error" + */ +export interface UpgradeUDDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * UDDB实例ID + */ + UDDBId: string; + /** + * UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5W FellFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w; EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + */ + RouterVersion: string; + /** + * 其他版本:该参数可不填;专享版:物理机台数 + */ + RouterNodeNum: number; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * UpgradeUDDBInstance - 升降级分布式数据库中间件的配置, 提高/降低请求处理的并发性 + +修改请求处理节点个数之后, 按照所有请求处理节点的总内存容量和CPU核数重新计费 + +如下状态的UDDB实例可以进行这个操作: + +Running: 系统正常运行中 +当请求返回成功之后,UDDB实例的状态变成"UpgradingUDDB"; 如果返回失败, UDDB实例状态保持不变 当UDDB实例升级成功之后, UDDB实例的状态变成"Running"; 如果更改过程中出现异常, 状态变成"Abnormal", 或者"Error" + */ +export interface UpgradeUDDBInstanceResponse { +} diff --git a/lib/services/uddb/index.js b/lib/services/uddb/index.js new file mode 100644 index 0000000..d9dca57 --- /dev/null +++ b/lib/services/uddb/index.js @@ -0,0 +1,167 @@ +"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 **uddb** service + */ +class UDDBClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * ChangeUDDBInstanceName - 修改分布式数据库中间件名称 + * + * See also: https://docs.ucloud.cn/api/uddb-api/change_uddb_instance_name + */ + changeUDDBInstanceName(request) { + const args = Object.assign({ Action: 'ChangeUDDBInstanceName' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ChangeUDDBSlaveCount - 改变分布式数据库数据节点的只读实例个数 + 每一个UDDB的数据节点负责处理所有的写入请求。与此同时,每一个数据节点可以配置若干个该节点的只读实例。当主节点的数据写入完毕后,只读实例把这次的写入操作进行更新,从而和数据节点保持一致。 + 只读实例可以使得数据由多份复制,在数据节点和只读实例之间,可以做请求的读写分离, 也就是说, 主节点写入数据之后, 数据的读操作可以由数据只读实例进行分担, 这样减少主节点的压力, 增加性能 + 当改变了数据节点的只读实例个数之后,对于现有的和以后的每一个数据节点都采用这个配置。如果UDDB实例有现有的数据节点, 那么它会根据新配置的参数,自动创建或删除数据节点的只读实例 + 如下状态的UDDB实例可以进行这个操作: + Running: 系统正常运行中 + 当请求返回成功之后,UDDB实例的状态变成"ChangingSlaveCount"; 如果返回失败, UDDB实例状态保持不变 当UDDB更改数据分区的只读实例个数成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果更改过程中出现异常, 状态变成"Abnormal"(异常运行中)或者"Error"(运行错误) + * + * See also: https://docs.ucloud.cn/api/uddb-api/change_uddb_slave_count + */ + changeUDDBSlaveCount(request) { + const args = Object.assign({ Action: 'ChangeUDDBSlaveCount' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUDDBInstance - 创建创建分布式数据库UDDB实例, 简称UDDB实例。 + * + * See also: https://docs.ucloud.cn/api/uddb-api/create_uddb_instance + */ + createUDDBInstance(request) { + const args = Object.assign({ Action: 'CreateUDDBInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUDDBInstance - 删除UDDB实例。 + 如下状态的UDDB实例可以进行这个操作: + InitFail: 初始化失败 + Shutoff: 已关闭 + 当请求返回成功之后,UDDB实例就已经被删除, 列表上看不到对应的UDDB实例 + * + * See also: https://docs.ucloud.cn/api/uddb-api/delete_uddb_instance + */ + deleteUDDBInstance(request) { + const args = Object.assign({ Action: 'DeleteUDDBInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDDBInstance - 获取分布式数据库UDDB的详细信息 + * + * See also: https://docs.ucloud.cn/api/uddb-api/describe_uddb_instance + */ + describeUDDBInstance(request) { + const args = Object.assign({ Action: 'DescribeUDDBInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDDBInstancePrice - 获取分布式数据库UDDB价格 + * + * See also: https://docs.ucloud.cn/api/uddb-api/describe_uddb_instance_price + */ + describeUDDBInstancePrice(request) { + const args = Object.assign({ Action: 'DescribeUDDBInstancePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDDBInstanceUpgradePrice - 升级UDDB时,获取升级后的价格 + * + * See also: https://docs.ucloud.cn/api/uddb-api/describe_uddb_instance_upgrade_price + */ + describeUDDBInstanceUpgradePrice(request) { + const args = Object.assign({ Action: 'DescribeUDDBInstanceUpgradePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * RestartUDDBInstance - 重启UDDB实例,开始提供服务。 + + 如下状态的UDDB实例可以进行这个操作: + + Running: 正常运行中 + Abnormal: 异常运行中 + 当请求返回成功之后,UDDB实例的状态变成"Starting"(启动中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在重启过程中, 当UDDB实例启动成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果启动过程中出现异常, 状态变成"Abnormal"(异常运行中), 或者"Shutoff"(已关闭 + * + * See also: https://docs.ucloud.cn/api/uddb-api/restart_uddb_instance + */ + restartUDDBInstance(request) { + const args = Object.assign({ Action: 'RestartUDDBInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * StartUDDBInstance - 启动UDDB实例,开始提供服务。 + + 如下状态的UDDB实例可以进行这个操作: + + Shutoff: 已关闭 + 当请求返回成功之后,UDDB实例的状态变成"Starting"(启动中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在启动过程中, 当UDDB实例启动成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果启动过程中出现异常, 状态变成"Abnormal"(异常运行中), 或者"Shutoff"(已关闭) + * + * See also: https://docs.ucloud.cn/api/uddb-api/start_uddb_instance + */ + startUDDBInstance(request) { + const args = Object.assign({ Action: 'StartUDDBInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * StopUDDBInstance - 关闭UDDB实例,停止提供服务。 + + 如下状态的UDDB实例可以进行这个操作: + + Running: 正常运行中 + Abnormal: 异常运行中 + 当请求返回成功之后,UDDB实例的状态变成"Shutdown"(关闭中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在关闭过程中, 当UDDB实例关闭成功之后, UDDB实例的状态变成"Shutoff"(已关闭); 如果关闭过程中出现异常, 根据UDDB实例的情况, 状态变成"Abnormal"(异常运行中), 或者"Running"(正常运行中) + * + * See also: https://docs.ucloud.cn/api/uddb-api/stop_uddb_instance + */ + stopUDDBInstance(request) { + const args = Object.assign({ Action: 'StopUDDBInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpgradeUDDBDataNode - 升降级分布式数据库数据节点的配置, 提高/降低数据节点的数据容量和内存 + + 所有数据节点以及其所挂载的只读实例的配置都受到影响 + + 升降级数据节点的配置之后之后, 会按照数据节点新的磁盘和内存大小重新计费 + + 如下状态的数据节点实例可以进行这个操作: + + Shutoff: 已关闭 + 当请求返回成功之后,UDDB实例的状态变成"UpgradingDataNode",相关数据节点的状态变成"Upgrading"; 如果返回失败, UDDB实例状态保持不变 当UDDB实例升级结束之后, UDDB实例的状态变成"Shutoff" + * + * See also: https://docs.ucloud.cn/api/uddb-api/upgrade_uddb_data_node + */ + upgradeUDDBDataNode(request) { + const args = Object.assign({ Action: 'UpgradeUDDBDataNode' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpgradeUDDBInstance - 升降级分布式数据库中间件的配置, 提高/降低请求处理的并发性 + + 修改请求处理节点个数之后, 按照所有请求处理节点的总内存容量和CPU核数重新计费 + + 如下状态的UDDB实例可以进行这个操作: + + Running: 系统正常运行中 + 当请求返回成功之后,UDDB实例的状态变成"UpgradingUDDB"; 如果返回失败, UDDB实例状态保持不变 当UDDB实例升级成功之后, UDDB实例的状态变成"Running"; 如果更改过程中出现异常, 状态变成"Abnormal", 或者"Error" + * + * See also: https://docs.ucloud.cn/api/uddb-api/upgrade_uddb_instance + */ + upgradeUDDBInstance(request) { + const args = Object.assign({ Action: 'UpgradeUDDBInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = UDDBClient; diff --git a/lib/services/udisk/index.d.ts b/lib/services/udisk/index.d.ts new file mode 100644 index 0000000..7548924 --- /dev/null +++ b/lib/services/udisk/index.d.ts @@ -0,0 +1,1252 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **udisk** service + */ +export default class UDiskClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * AttachUDisk - 将一个可用的UDisk挂载到某台主机上,当UDisk挂载成功后,还需要在主机内部进行文件系统操作 + * + * See also: https://docs.ucloud.cn/api/udisk-api/attach_udisk + */ + attachUDisk(request?: AttachUDiskRequest): Promise; + /** + * CloneUDisk - 从UDisk创建UDisk克隆 + * + * See also: https://docs.ucloud.cn/api/udisk-api/clone_udisk + */ + cloneUDisk(request?: CloneUDiskRequest): Promise; + /** + * CloneUDiskSnapshot - 从快照创建UDisk克隆 + * + * See also: https://docs.ucloud.cn/api/udisk-api/clone_udisk_snapshot + */ + cloneUDiskSnapshot(request?: CloneUDiskSnapshotRequest): Promise; + /** + * CloneUDiskUDataArk - 从数据方舟的备份创建UDisk + * + * See also: https://docs.ucloud.cn/api/udisk-api/clone_udisk_udataark + */ + cloneUDiskUDataArk(request?: CloneUDiskUDataArkRequest): Promise; + /** + * CreateAttachUDisk - 创建并挂载UDisk磁盘 + * + * See also: https://docs.ucloud.cn/api/udisk-api/create_attach_udisk + */ + createAttachUDisk(request?: CreateAttachUDiskRequest): Promise; + /** + * CreateUDisk - 创建UDisk磁盘 + * + * See also: https://docs.ucloud.cn/api/udisk-api/create_udisk + */ + createUDisk(request?: CreateUDiskRequest): Promise; + /** + * CreateUDiskSnapshot - 创建snapshot快照 + * + * See also: https://docs.ucloud.cn/api/udisk-api/create_udisk_snapshot + */ + createUDiskSnapshot(request?: CreateUDiskSnapshotRequest): Promise; + /** + * DeleteUDisk - 删除UDisk + * + * See also: https://docs.ucloud.cn/api/udisk-api/delete_udisk + */ + deleteUDisk(request?: DeleteUDiskRequest): Promise; + /** + * DeleteUDiskSnapshot - 删除Snapshot + * + * See also: https://docs.ucloud.cn/api/udisk-api/delete_udisk_snapshot + */ + deleteUDiskSnapshot(request?: DeleteUDiskSnapshotRequest): Promise; + /** + * DescribeRecycleUDisk - 拉取回收站中云硬盘列表 + * + * See also: https://docs.ucloud.cn/api/udisk-api/describe_recycle_udisk + */ + describeRecycleUDisk(request?: DescribeRecycleUDiskRequest): Promise; + /** + * DescribeUDisk - 获取UDisk实例 + * + * See also: https://docs.ucloud.cn/api/udisk-api/describe_udisk + */ + describeUDisk(request?: DescribeUDiskRequest): Promise; + /** + * DescribeUDiskPrice - 获取UDisk实例价格信息 + * + * See also: https://docs.ucloud.cn/api/udisk-api/describe_udisk_price + */ + describeUDiskPrice(request?: DescribeUDiskPriceRequest): Promise; + /** + * DescribeUDiskSnapshot - 获取UDisk快照 + * + * See also: https://docs.ucloud.cn/api/udisk-api/describe_udisk_snapshot + */ + describeUDiskSnapshot(request?: DescribeUDiskSnapshotRequest): Promise; + /** + * DescribeUDiskUpgradePrice - 获取UDisk升级价格信息 + * + * See also: https://docs.ucloud.cn/api/udisk-api/describe_udisk_upgrade_price + */ + describeUDiskUpgradePrice(request?: DescribeUDiskUpgradePriceRequest): Promise; + /** + * DetachUDisk - 卸载某个已经挂载在指定UHost实例上的UDisk + * + * See also: https://docs.ucloud.cn/api/udisk-api/detach_udisk + */ + detachUDisk(request?: DetachUDiskRequest): Promise; + /** + * RecoverUDisk - 从回收站中恢复云硬盘 + * + * See also: https://docs.ucloud.cn/api/udisk-api/recover_udisk + */ + recoverUDisk(request?: RecoverUDiskRequest): Promise; + /** + * RenameUDisk - 重命名UDisk + * + * See also: https://docs.ucloud.cn/api/udisk-api/rename_udisk + */ + renameUDisk(request?: RenameUDiskRequest): Promise; + /** + * ResizeUDisk - 调整UDisk容量 + * + * See also: https://docs.ucloud.cn/api/udisk-api/resize_udisk + */ + resizeUDisk(request?: ResizeUDiskRequest): Promise; + /** + * RestoreUDisk - 从备份恢复数据至UDisk + * + * See also: https://docs.ucloud.cn/api/udisk-api/restore_udisk + */ + restoreUDisk(request?: RestoreUDiskRequest): Promise; + /** + * SetUDiskUDataArkMode - 设置UDisk数据方舟的状态 + * + * See also: https://docs.ucloud.cn/api/udisk-api/set_udisk_udataark_mode + */ + setUDiskUDataArkMode(request?: SetUDiskUDataArkModeRequest): Promise; +} +/** + * AttachUDisk - 将一个可用的UDisk挂载到某台主机上,当UDisk挂载成功后,还需要在主机内部进行文件系统操作 + */ +export interface AttachUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 需要挂载的UDisk实例ID. + */ + UDiskId: string; + /** + * UHost实例ID。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】 + */ + UHostId?: string; + /** + * 是否允许多点挂载(Yes: 允许多点挂载, No: 不允许多点挂载, 不填默认Yes ) + */ + MultiAttach?: string; + /** + * Host实例ID + */ + HostId?: string; +} +/** + * AttachUDisk - 将一个可用的UDisk挂载到某台主机上,当UDisk挂载成功后,还需要在主机内部进行文件系统操作 + */ +export interface AttachUDiskResponse { + /** + * 挂载的UHost实例ID。【即将废弃,建议使用HostId】 + */ + UHostId?: string; + /** + * 挂载的UDisk实例ID + */ + UDiskId?: string; + /** + * 挂载的设备名称 + */ + DeviceName?: string; + /** + * 挂载的Host实例ID + */ + HostId?: string; +} +/** + * CloneUDisk - 从UDisk创建UDisk克隆 + */ +export interface CloneUDiskRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 实例名称 + */ + Name: string; + /** + * 克隆父Disk的Id + */ + SourceId: string; + /** + * 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + */ + UDataArkMode?: string; + /** + * 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + */ + SnapshotService?: string; + /** + * 购买时长 默认: 1 + */ + Quantity?: number; + /** + * Disk注释 + */ + Comment?: string; + /** + * Year , Month, Dynamic,Postpay,Trial 默认: Month + */ + ChargeType?: string; + /** + * 业务组 默认:Default + */ + Tag?: string; + /** + * RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。 + */ + RdmaClusterId?: string; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * CloneUDisk - 从UDisk创建UDisk克隆 + */ +export interface CloneUDiskResponse { + /** + * 创建UDisk Id + */ + UDiskId?: string[]; +} +/** + * CloneUDiskSnapshot - 从快照创建UDisk克隆 + */ +export interface CloneUDiskSnapshotRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 实例名称 + */ + Name: string; + /** + * 克隆父Snapshot的Id + */ + SourceId: string; + /** + * 购买UDisk大小,单位:GB,范围[1~8000]。(UDisk大小设定对本地盘快照有效,对云盘快照无效) + */ + Size?: number; + /** + * Disk注释 + */ + Comment?: string; + /** + * Year , Month, Dynamic,Postpay 默认: Dynamic + */ + ChargeType?: string; + /** + * 购买时长 默认: 1 + */ + Quantity?: number; + /** + * 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + */ + UDataArkMode?: string; + /** + * 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + */ + SnapshotService?: string; + /** + * 业务组 默认:Default + */ + Tag?: string; + /** + * RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。 + */ + RdmaClusterId?: string; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * CloneUDiskSnapshot - 从快照创建UDisk克隆 + */ +export interface CloneUDiskSnapshotResponse { + /** + * 创建UDisk Id + */ + UDiskId?: string[]; +} +/** + * CloneUDiskUDataArk - 从数据方舟的备份创建UDisk + */ +export interface CloneUDiskUDataArkRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 实例名称 + */ + Name: string; + /** + * 需要克隆的源盘id + */ + UDiskId: string; + /** + * 指定从方舟克隆的备份时间点 + */ + SnapshotTime: number; + /** + * Disk注释 + */ + Comment?: string; + /** + * Year , Month, Dynamic,Postpay 默认: Dynamic + */ + ChargeType?: string; + /** + * 购买时长 默认: 1 + */ + Quantity?: number; + /** + * 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + */ + UDataArkMode?: string; + /** + * 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + */ + SnapshotService?: string; + /** + * 购买UDisk大小,单位:GB,范围[1~8000]。(UDisk大小设定对本地盘备份有效,对云盘备份无效) + */ + Size?: number; + /** + * 业务组 默认:Default + */ + Tag?: string; + /** + * RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。 + */ + RdmaClusterId?: string; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * CloneUDiskUDataArk - 从数据方舟的备份创建UDisk + */ +export interface CloneUDiskUDataArkResponse { + /** + * 创建UDisk Id + */ + UDiskId: string[]; +} +/** + * CreateAttachUDisk - 创建并挂载UDisk磁盘 + */ +export interface CreateAttachUDiskRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000];高效数据盘:范围[1~32000]。 + */ + Size: number; + /** + * 实例名称 + */ + Name: string; + /** + * UHost实例ID。当创建云盘类型为RSSDDataDisk时,根据传入的UHostId,创建与虚机在同一PodId下的云盘。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】 + */ + UHostId?: string; + /** + * Year , Month, Dynamic, Postpay, Trial 。 Size小于等于2000时,默认为Dynamic;Size大于2000时,默认为Month。 + */ + ChargeType?: string; + /** + * 购买时长 默认: 1 + */ + Quantity?: number; + /** + * 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + */ + UDataArkMode?: string; + /** + * 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + */ + SnapshotService?: string; + /** + * 业务组 默认:Default + */ + Tag?: string; + /** + * UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),默认值(DataDisk) + */ + DiskType?: string; + /** + * 是否加密。Yes:加密,No:不加密,默认值(No) + */ + UKmsMode?: string; + /** + * 加密需要的cmk id,UKmsMode为Yes时,必填 + */ + CmkId?: string; + /** + * 是否允许多点挂载(Yes: 允许多点挂载, No: 不允许多点挂载, 不填默认Yes ) + */ + MultiAttach?: string; + /** + * Host实例ID。当创建云盘类型为RSSDDataDisk时,根据传入的HostId,创建与虚机在同一PodId下的云盘。 + */ + HostId?: string; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * CreateAttachUDisk - 创建并挂载UDisk磁盘 + */ +export interface CreateAttachUDiskResponse { + /** + * 挂载的UDisk实例ID + */ + UDiskId?: string; + /** + * 挂载的UHost实例ID。【即将废弃,建议使用HostId】 + */ + UHostId?: string; + /** + * 挂载的Host实例ID + */ + HostId?: string; + /** + * 挂载设备名称 + */ + DeviceName?: string; +} +/** + * CreateUDisk - 创建UDisk磁盘 + */ +export interface CreateUDiskRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000];高效数据盘:范围[1~32000]。 + */ + Size: number; + /** + * 实例名称 + */ + Name: string; + /** + * Year , Month, Dynamic, Postpay, Trial 。默认为Dynamic。 + */ + ChargeType?: string; + /** + * 购买时长 默认: 1 + */ + Quantity?: number; + /** + * 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + */ + UDataArkMode?: string; + /** + * 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + */ + SnapshotService?: string; + /** + * 业务组 默认:Default + */ + Tag?: string; + /** + * UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),默认值(DataDisk) + */ + DiskType?: string; + /** + * 是否加密。Yes:加密,No:不加密,默认值(No) + */ + UKmsMode?: string; + /** + * 加密需要的cmk id,UKmsMode为Yes时,必填 + */ + CmkId?: string; + /** + * RDMA集群id。DiskType为RSSDDataDisk可填,指定云盘创建到对应的RDMA集群。 + */ + RdmaClusterId?: string; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * CreateUDisk - 创建UDisk磁盘 + */ +export interface CreateUDiskResponse { + /** + * UDisk实例Id + */ + UDiskId?: string[]; +} +/** + * CreateUDiskSnapshot - 创建snapshot快照 + */ +export interface CreateUDiskSnapshotRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 快照的UDisk的Id + */ + UDiskId: string; + /** + * 快照名称 + */ + Name: string; + /** + * 购买时长 默认: 1 (已废弃) + */ + Quantity?: number; + /** + * Year , Month, Dynamic 默认: Dynamic (已废弃) + */ + ChargeType?: string; + /** + * 快照描述 + */ + Comment?: string; +} +/** + * CreateUDiskSnapshot - 创建snapshot快照 + */ +export interface CreateUDiskSnapshotResponse { + /** + * 快照Id + */ + SnapshotId: string[]; +} +/** + * DeleteUDisk - 删除UDisk + */ +export interface DeleteUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 要删除的UDisk的Id + */ + UDiskId: string; +} +/** + * DeleteUDisk - 删除UDisk + */ +export interface DeleteUDiskResponse { +} +/** + * DeleteUDiskSnapshot - 删除Snapshot + */ +export interface DeleteUDiskSnapshotRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 快照Id(填写后不能填写UDisk Id) + */ + SnapshotId?: string; + /** + * UDisk Id,删除该盘所创建出来的所有快照(填写后不能填写SnapshotId) + */ + UDiskId?: string; +} +/** + * DeleteUDiskSnapshot - 删除Snapshot + */ +export interface DeleteUDiskSnapshotResponse { +} +/** + * DescribeRecycleUDisk - 拉取回收站中云硬盘列表 + */ +export interface DescribeRecycleUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 返回数据长度, 默认为20 + */ + Limit?: number; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; +} +/** + * DescribeRecycleUDisk - 拉取回收站中云硬盘列表 + */ +export interface DescribeRecycleUDiskResponse { + /** + * 磁盘数量 + */ + TotalCount: number; + /** + * 回收站磁盘列表 + */ + DataSet?: { + /** + * 磁盘id + */ + UDiskId: string; + /** + * 创建时间 + */ + CreateTime: number; + /** + * 过期时间 + */ + ExpiredTime: number; + /** + * 销毁倒计时 + */ + CountdownTime: number; + /** + * 磁盘名称 + */ + Name: string; + /** + * 磁盘容量 + */ + Size: number; + /** + * 业务组 + */ + Tag?: string; + /** + * 可用区 + */ + Zone: string; + }[]; +} +/** + * DescribeUDisk - 获取UDisk实例 + */ +export interface DescribeUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * UDisk Id(留空返回全部) + */ + UDiskId?: string; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 返回数据长度, 默认为20 + */ + Limit?: number; + /** + * ProtocolVersion字段为1时,需结合IsBoot确定具体磁盘类型:普通数据盘:DiskType:"CLOUD_NORMAL",IsBoot:"False";普通系统盘:DiskType:"CLOUD_NORMAL",IsBoot:"True";SSD数据盘:DiskType:"CLOUD_SSD",IsBoot:"False";SSD系统盘:DiskType:"CLOUD_SSD",IsBoot:"True";RSSD数据盘:DiskType:"CLOUD_RSSD",IsBoot:"False";为空拉取所有。ProtocolVersion字段为0或没有该字段时,可设为以下几个值:普通数据盘:DataDisk;普通系统盘:SystemDisk;SSD数据盘:SSDDataDisk;SSD系统盘:SSDSystemDisk;RSSD数据盘:RSSDDataDisk;为空拉取所有。 + */ + DiskType?: string; + /** + * 请求协议版本,建议升级为1,为1时DiskType与UHost磁盘类型定义一致;默认为0 + */ + ProtocolVersion?: number; + /** + * ProtocolVersion字段为1且DiskType不为空时,必须设置,设置规则请参照DiskType;ProtocolVersion字段为1且DiskType为空时,该字段无效。ProtocolVersion字段为0或没有该字段时,该字段无效。 + */ + IsBoot?: string; + /** + * 是否忽略计费信息。Yes:忽略,No:不忽略,默认值(No)。(如不关心账单信息,建议选填“Yes”,可降低请求延时) + */ + IgnoreUBillInfo?: string; + /** + * 根据传入的UHostIdForAttachment,筛选出虚机在同一PodId下的云盘【本字段即将废弃,建议使用HostIdForAttachment】 + */ + UHostIdForAttachment?: string; + /** + * 根据传入的HostIdForAttachment,筛选出虚机在同一PodId下的云盘 + */ + HostIdForAttachment?: string; + /** + * 宿主产品类型,可筛选挂载在该类型宿主上的云盘。可选值:uhost, uphost。为空拉取所有。(当HostIdForAttachment字段不为空时,该字段可以不填,若HostIdForAttachment与该字段宿主类型冲突,则以HostIdForAttachment字段为准。) + */ + HostProduct?: string; +} +/** + * DescribeUDisk - 获取UDisk实例 + */ +export interface DescribeUDiskResponse { + /** + * JSON 格式的UDisk数据列表, 每项参数可见下面 UDiskDataSet + */ + DataSet?: { + /** + * 可用区 + */ + Zone?: string; + /** + * UDisk实例Id + */ + UDiskId?: string; + /** + * 实例名称 + */ + Name?: string; + /** + * 容量单位GB + */ + Size?: number; + /** + * 状态:Available(可用),Attaching(挂载中), InUse(已挂载), Detaching(卸载中), Initializating(分配中), Failed(创建失败),Cloning(克隆中),Restoring(恢复中),RestoreFailed(恢复失败), + */ + Status?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 过期时间 + */ + ExpiredTime?: number; + /** + * 挂载的UHost的Id。【即将废弃,建议使用HostId】 + */ + UHostId?: string; + /** + * 挂载的UHost的Name。【即将废弃,建议使用HostName】 + */ + UHostName?: string; + /** + * 挂载的UHost的IP。【即将废弃,建议使用HostIP】 + */ + UHostIP?: string; + /** + * 挂载的Host的Id + */ + HostId?: string; + /** + * 挂载的Host的Name + */ + HostName?: string; + /** + * 挂载的Host的IP + */ + HostIP?: string; + /** + * 挂载的设备名称 + */ + DeviceName?: string; + /** + * Year,Month,Dynamic,Trial,Postpay + */ + ChargeType?: string; + /** + * 业务组名称 + */ + Tag?: string; + /** + * 资源是否过期,过期:"Yes", 未过期:"No" + */ + IsExpire?: string; + /** + * 是否支持数据方舟,支持:"2.0", 不支持:"1.0" + */ + Version?: string; + /** + * 是否开启数据方舟,开启:"Yes", 不支持:"No" + */ + UDataArkMode?: string; + /** + * 该盘快照个数 + */ + SnapshotCount?: number; + /** + * 该盘快照上限 + */ + SnapshotLimit?: number; + /** + * 请求中的ProtocolVersion字段为1时,需结合IsBoot确定具体磁盘类型:普通数据盘:DiskType:"CLOUD_NORMAL",IsBoot:"False"; 普通系统盘:DiskType:"CLOUD_NORMAL",IsBoot:"True";SSD数据盘:DiskType:"CLOUD_SSD",IsBoot:"False";SSD系统盘:DiskType:"CLOUD_SSD",IsBoot:"True";RSSD数据盘:DiskType:"CLOUD_RSSD",IsBoot:"False"。请求中的ProtocolVersion字段为0或没有该字段时,云硬盘类型参照如下:普通数据盘:DataDisk;普通系统盘:SystemDisk;SSD数据盘:SSDDataDisk;SSD系统盘:SSDSystemDisk;RSSD数据盘:RSSDDataDisk。 + */ + DiskType?: string; + /** + * 是否支持克隆,1支持 ,0不支持 + */ + CloneEnable?: number; + /** + * 是否支持快照,1支持 ,0不支持 + */ + SnapEnable?: number; + /** + * 是否支持开启方舟,1支持 ,0不支持 + */ + ArkSwitchEnable?: number; + /** + * 是否是加密盘,是:"Yes", 否:"No" + */ + UKmsMode?: string; + /** + * 该盘的cmk id + */ + CmkId?: string; + /** + * 该盘的密文密钥 + */ + DataKey?: string; + /** + * 该盘cmk的状态, Enabled(正常),Disabled(失效),Deleted(删除),NoCmkId(非加密盘) + */ + CmkIdStatus?: string; + /** + * cmk id 别名 + */ + CmkIdAlias?: string; + /** + * 是否是系统盘,是:"True", 否:"False" + */ + IsBoot?: string; + /** + * 该盘的备份方式。快照服务:"SnapshotService";数据方舟:"UDataArk";无备份方式:"" + */ + BackupMode?: string; + /** + * RDMA集群id,仅RSSD返回该值;其他类型云盘返回""。当云盘的此值与快杰云主机的RdmaClusterId相同时,RSSD可以挂载到这台云主机。 + */ + RdmaClusterId?: string; + }[]; + /** + * 根据过滤条件得到的总数 + */ + TotalCount?: number; +} +/** + * DescribeUDiskPrice - 获取UDisk实例价格信息 + */ +export interface DescribeUDiskPriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];普通系统盘:范围[1~8000];SSD系统盘:范围[1~4000];RSSD数据盘:范围[1~32000];RSSD系统盘:范围[1~4000];高效数据盘:范围[1~32000];高效系统盘:范围[1~500]。 + */ + Size: number; + /** + * Year , Month, Dynamic,Postpay,Trial 默认: Month + */ + ChargeType?: string; + /** + * 购买UDisk的时长,默认值为1 + */ + Quantity?: number; + /** + * 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + */ + UDataArkMode?: string; + /** + * 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + */ + SnapshotService?: string; + /** + * UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),SystemDisk(普通系统盘),SSDSystemDisk(SSD系统盘),RSSDSystemDisk(RSSD系统盘),EfficiencySystemDisk(高效系统盘),默认值(DataDisk) + */ + DiskType?: string; + /** + * 是否将快照服务(数据方舟),云硬盘放入一张订单, 是:"Yes",否:"No",默认是"No" + */ + IsTotalPrice?: string; + /** + * 云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + MachineType?: string; +} +/** + * DescribeUDiskPrice - 获取UDisk实例价格信息 + */ +export interface DescribeUDiskPriceResponse { + /** + * 价格参数列表,具体说明见 UDiskPriceDataSet + */ + DataSet?: { + /** + * Year, Month, Dynamic,Trial + */ + ChargeType?: string; + /** + * 实际价格 (单位: 分) + */ + Price?: number; + /** + * "UDataArk","SnapshotService","UDisk","Total" + */ + ChargeName?: string; + /** + * 用户折后价(对应计费CustomPrice) + */ + OriginalPrice?: number; + /** + * 原价(对应计费OriginalPrice) + */ + ListPrice?: number; + }[]; +} +/** + * DescribeUDiskSnapshot - 获取UDisk快照 + */ +export interface DescribeUDiskSnapshotRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 返回数据长度, 默认为20 + */ + Limit?: number; + /** + * UDiskId,返回该盘所做快照.(必须同时传Zone) + */ + UDiskId?: string; + /** + * 快照id,SnapshotId , UDiskId 同时传SnapshotId优先 + */ + SnapshotId?: string; +} +/** + * DescribeUDiskSnapshot - 获取UDisk快照 + */ +export interface DescribeUDiskSnapshotResponse { + /** + * JSON 格式的Snapshot列表, 详细参见 UDiskSnapshotSet + */ + DataSet?: { + /** + * 可用区 + */ + Zone: string; + /** + * 快照Id + */ + SnapshotId: string; + /** + * 快照名称 + */ + Name: string; + /** + * 快照的源UDisk的Id + */ + UDiskId: string; + /** + * 快照的源UDisk的Name + */ + UDiskName: string; + /** + * 创建时间 + */ + CreateTime: number; + /** + * 容量单位GB + */ + Size: number; + /** + * 快照状态,Normal:正常,Failed:失败,Creating:制作中 + */ + Status: string; + /** + * 磁盘类型,0:数据盘,1:系统盘 + */ + DiskType: number; + /** + * 过期时间 + */ + ExpiredTime?: number; + /** + * 快照描述 + */ + Comment?: string; + /** + * 对应磁盘是否处于可用状态 + */ + IsUDiskAvailable?: boolean; + /** + * 快照版本 + */ + Version?: string; + /** + * 对应磁盘制作快照时所挂载的主机 + */ + UHostId?: string; + /** + * 是否是加密盘快照,是:"Yes", 否:"No" + */ + UKmsMode?: string; + /** + * 该快照的cmk id + */ + CmkId?: string; + /** + * 该快照的密文密钥 + */ + DataKey?: string; + /** + * 该快照cmk的状态, Enabled(正常),Disabled(失效),Deleted(删除),NoCmkId(非加密盘) + */ + CmkIdStatus?: string; + /** + * cmk id 别名 + */ + CmkIdAlias?: string; + }[]; + /** + * 根据过滤条件得到的总数 + */ + TotalCount?: number; +} +/** + * DescribeUDiskUpgradePrice - 获取UDisk升级价格信息 + */ +export interface DescribeUDiskUpgradePriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];普通系统盘:范围[1~8000];SSD系统盘:范围[1~4000];RSSD数据盘:范围[1~32000];RSSD系统盘:范围[1~4000];高效数据盘:范围[1~32000];高效系统盘:范围[1~500]。 + */ + Size: number; + /** + * 升级目标UDisk ID + */ + SourceId: string; + /** + * 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + */ + UDataArkMode?: string; + /** + * 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + */ + SnapshotService?: string; + /** + * 【已废弃】UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),SystemDisk(普通系统盘),SSDSystemDisk(SSD系统盘),RSSDSystemDisk(RSSD系统盘),EfficiencySystemDisk(高效系统盘),默认值(DataDisk) + */ + DiskType?: string; + /** + * 【已废弃】云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + MachineType?: string; +} +/** + * DescribeUDiskUpgradePrice - 获取UDisk升级价格信息 + */ +export interface DescribeUDiskUpgradePriceResponse { + /** + * 价格 + */ + Price?: number; + /** + * 用户折后价 (对应计费CustomPrice) + */ + OriginalPrice?: number; +} +/** + * DetachUDisk - 卸载某个已经挂载在指定UHost实例上的UDisk + */ +export interface DetachUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 需要卸载的UDisk实例ID + */ + UDiskId: string; + /** + * UHost实例ID。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】 + */ + UHostId?: string; + /** + * Host实例ID + */ + HostId?: string; +} +/** + * DetachUDisk - 卸载某个已经挂载在指定UHost实例上的UDisk + */ +export interface DetachUDiskResponse { + /** + * 卸载的UHost实例ID。【即将废弃,建议使用HostId】 + */ + UHostId?: string; + /** + * 卸载的UDisk实例ID + */ + UDiskId?: string; + /** + * 卸载的Host实例ID + */ + HostId?: string; +} +/** + * RecoverUDisk - 从回收站中恢复云硬盘 + */ +export interface RecoverUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 云硬盘资源ID + */ + UDiskId: string; + /** + * Year , Month, Dynamic 默认: Dynamic + */ + ChargeType?: string; + /** + * 购买时长 默认: 1 + */ + Quantity?: number; +} +/** + * RecoverUDisk - 从回收站中恢复云硬盘 + */ +export interface RecoverUDiskResponse { +} +/** + * RenameUDisk - 重命名UDisk + */ +export interface RenameUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 重命名的UDisk的Id + */ + UDiskId: string; + /** + * 重命名UDisk的name + */ + UDiskName: string; +} +/** + * RenameUDisk - 重命名UDisk + */ +export interface RenameUDiskResponse { +} +/** + * ResizeUDisk - 调整UDisk容量 + */ +export interface ResizeUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDisk Id + */ + UDiskId: string; + /** + * 调整后大小, 单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000]。 + */ + Size: number; + /** + * 云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + MachineType?: string; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * ResizeUDisk - 调整UDisk容量 + */ +export interface ResizeUDiskResponse { +} +/** + * RestoreUDisk - 从备份恢复数据至UDisk + */ +export interface RestoreUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 需要恢复的盘ID + */ + UDiskId: string; + /** + * 从指定的快照恢复 + */ + SnapshotId?: string; + /** + * 指定从方舟恢复的备份时间点 + */ + SnapshotTime?: number; +} +/** + * RestoreUDisk - 从备份恢复数据至UDisk + */ +export interface RestoreUDiskResponse { +} +/** + * SetUDiskUDataArkMode - 设置UDisk数据方舟的状态 + */ +export interface SetUDiskUDataArkModeRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 需要设置数据方舟的UDisk的Id + */ + UDiskId: string; + /** + * 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + */ + UDataArkMode?: string; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * SetUDiskUDataArkMode - 设置UDisk数据方舟的状态 + */ +export interface SetUDiskUDataArkModeResponse { +} diff --git a/lib/services/udisk/index.js b/lib/services/udisk/index.js new file mode 100644 index 0000000..2dc7996 --- /dev/null +++ b/lib/services/udisk/index.js @@ -0,0 +1,196 @@ +"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 **udisk** service + */ +class UDiskClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * AttachUDisk - 将一个可用的UDisk挂载到某台主机上,当UDisk挂载成功后,还需要在主机内部进行文件系统操作 + * + * See also: https://docs.ucloud.cn/api/udisk-api/attach_udisk + */ + attachUDisk(request) { + const args = Object.assign({ Action: 'AttachUDisk' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CloneUDisk - 从UDisk创建UDisk克隆 + * + * See also: https://docs.ucloud.cn/api/udisk-api/clone_udisk + */ + cloneUDisk(request) { + const args = Object.assign({ Action: 'CloneUDisk' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CloneUDiskSnapshot - 从快照创建UDisk克隆 + * + * See also: https://docs.ucloud.cn/api/udisk-api/clone_udisk_snapshot + */ + cloneUDiskSnapshot(request) { + const args = Object.assign({ Action: 'CloneUDiskSnapshot' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CloneUDiskUDataArk - 从数据方舟的备份创建UDisk + * + * See also: https://docs.ucloud.cn/api/udisk-api/clone_udisk_udataark + */ + cloneUDiskUDataArk(request) { + const args = Object.assign({ Action: 'CloneUDiskUDataArk' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateAttachUDisk - 创建并挂载UDisk磁盘 + * + * See also: https://docs.ucloud.cn/api/udisk-api/create_attach_udisk + */ + createAttachUDisk(request) { + const args = Object.assign({ Action: 'CreateAttachUDisk' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUDisk - 创建UDisk磁盘 + * + * See also: https://docs.ucloud.cn/api/udisk-api/create_udisk + */ + createUDisk(request) { + const args = Object.assign({ Action: 'CreateUDisk' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUDiskSnapshot - 创建snapshot快照 + * + * See also: https://docs.ucloud.cn/api/udisk-api/create_udisk_snapshot + */ + createUDiskSnapshot(request) { + const args = Object.assign({ Action: 'CreateUDiskSnapshot' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUDisk - 删除UDisk + * + * See also: https://docs.ucloud.cn/api/udisk-api/delete_udisk + */ + deleteUDisk(request) { + const args = Object.assign({ Action: 'DeleteUDisk' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUDiskSnapshot - 删除Snapshot + * + * See also: https://docs.ucloud.cn/api/udisk-api/delete_udisk_snapshot + */ + deleteUDiskSnapshot(request) { + const args = Object.assign({ Action: 'DeleteUDiskSnapshot' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeRecycleUDisk - 拉取回收站中云硬盘列表 + * + * See also: https://docs.ucloud.cn/api/udisk-api/describe_recycle_udisk + */ + describeRecycleUDisk(request) { + const args = Object.assign({ Action: 'DescribeRecycleUDisk' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDisk - 获取UDisk实例 + * + * See also: https://docs.ucloud.cn/api/udisk-api/describe_udisk + */ + describeUDisk(request) { + const args = Object.assign({ Action: 'DescribeUDisk' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDiskPrice - 获取UDisk实例价格信息 + * + * See also: https://docs.ucloud.cn/api/udisk-api/describe_udisk_price + */ + describeUDiskPrice(request) { + const args = Object.assign({ Action: 'DescribeUDiskPrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDiskSnapshot - 获取UDisk快照 + * + * See also: https://docs.ucloud.cn/api/udisk-api/describe_udisk_snapshot + */ + describeUDiskSnapshot(request) { + const args = Object.assign({ Action: 'DescribeUDiskSnapshot' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDiskUpgradePrice - 获取UDisk升级价格信息 + * + * See also: https://docs.ucloud.cn/api/udisk-api/describe_udisk_upgrade_price + */ + describeUDiskUpgradePrice(request) { + const args = Object.assign({ Action: 'DescribeUDiskUpgradePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DetachUDisk - 卸载某个已经挂载在指定UHost实例上的UDisk + * + * See also: https://docs.ucloud.cn/api/udisk-api/detach_udisk + */ + detachUDisk(request) { + const args = Object.assign({ Action: 'DetachUDisk' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * RecoverUDisk - 从回收站中恢复云硬盘 + * + * See also: https://docs.ucloud.cn/api/udisk-api/recover_udisk + */ + recoverUDisk(request) { + const args = Object.assign({ Action: 'RecoverUDisk' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * RenameUDisk - 重命名UDisk + * + * See also: https://docs.ucloud.cn/api/udisk-api/rename_udisk + */ + renameUDisk(request) { + const args = Object.assign({ Action: 'RenameUDisk' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ResizeUDisk - 调整UDisk容量 + * + * See also: https://docs.ucloud.cn/api/udisk-api/resize_udisk + */ + resizeUDisk(request) { + const args = Object.assign({ Action: 'ResizeUDisk' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * RestoreUDisk - 从备份恢复数据至UDisk + * + * See also: https://docs.ucloud.cn/api/udisk-api/restore_udisk + */ + restoreUDisk(request) { + const args = Object.assign({ Action: 'RestoreUDisk' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * SetUDiskUDataArkMode - 设置UDisk数据方舟的状态 + * + * See also: https://docs.ucloud.cn/api/udisk-api/set_udisk_udataark_mode + */ + setUDiskUDataArkMode(request) { + const args = Object.assign({ Action: 'SetUDiskUDataArkMode' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = UDiskClient; diff --git a/lib/services/udpn/index.d.ts b/lib/services/udpn/index.d.ts new file mode 100644 index 0000000..142dc14 --- /dev/null +++ b/lib/services/udpn/index.d.ts @@ -0,0 +1,286 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **udpn** service + */ +export default class UDPNClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * AllocateUDPN - 分配一条 UDPN 专线 + * + * See also: https://docs.ucloud.cn/api/udpn-api/allocate_udpn + */ + allocateUDPN(request?: AllocateUDPNRequest): Promise; + /** + * DescribeUDPN - 描述 UDPN + * + * See also: https://docs.ucloud.cn/api/udpn-api/describe_udpn + */ + describeUDPN(request?: DescribeUDPNRequest): Promise; + /** + * GetUDPNLineList - 获取当前支持的专线线路列表 + * + * See also: https://docs.ucloud.cn/api/udpn-api/get_udpn_line_list + */ + getUDPNLineList(request?: GetUDPNLineListRequest): Promise; + /** + * GetUDPNPrice - 获取 UDPN 价格 + * + * See also: https://docs.ucloud.cn/api/udpn-api/get_udpn_price + */ + getUDPNPrice(request?: GetUDPNPriceRequest): Promise; + /** + * GetUDPNUpgradePrice - 获取专线升级价格 + * + * See also: https://docs.ucloud.cn/api/udpn-api/get_udpn_upgrade_price + */ + getUDPNUpgradePrice(request?: GetUDPNUpgradePriceRequest): Promise; + /** + * ModifyUDPNBandwidth - 修改带宽值 + * + * See also: https://docs.ucloud.cn/api/udpn-api/modify_udpn_bandwidth + */ + modifyUDPNBandwidth(request?: ModifyUDPNBandwidthRequest): Promise; + /** + * ReleaseUDPN - 释放 UDPN + * + * See also: https://docs.ucloud.cn/api/udpn-api/release_udpn + */ + releaseUDPN(request?: ReleaseUDPNRequest): Promise; +} +/** + * AllocateUDPN - 分配一条 UDPN 专线 + */ +export interface AllocateUDPNRequest { + /** + * 专线可用区1,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-ca, 华盛顿:us-ws, 东京:jpn-tky + */ + Peer1: string; + /** + * 专线可用区2,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-ca, 华盛顿:us-ws, 东京:jpn-tky + */ + Peer2: string; + /** + * 带宽 + */ + Bandwidth: number; + /** + * 计费类型,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费 + */ + ChargeType?: string; + /** + * 计费时长,默认 1 + */ + Quantity?: number; + /** + * 计费模式. 枚举值:"Traffic", 流量计费模式; 否则 带宽计费模式; + */ + PayMode?: string; + /** + * 代金劵 + */ + CouponId?: string; +} +/** + * AllocateUDPN - 分配一条 UDPN 专线 + */ +export interface AllocateUDPNResponse { + /** + * 资源名称 + */ + UDPNId: string; +} +/** + * DescribeUDPN - 描述 UDPN + */ +export interface DescribeUDPNRequest { + /** + * 申请到的 UDPN 资源 ID。若为空,则查询该用户在机房所有的专线信息。非默认项目资源,需填写ProjectId + */ + UDPNId?: string; + /** + * 列表起始位置偏移量,默认为 0 + */ + Offset?: number; + /** + * 返回数据长度,默认为 20 + */ + Limit?: number; +} +/** + * DescribeUDPN - 描述 UDPN + */ +export interface DescribeUDPNResponse { + /** + * 查询到的总数量 + */ + TotalCount: number; + /** + * UDPN详情 + */ + DataSet?: { + /** + * UDPN 资源短 ID + */ + UDPNId: string; + /** + * 可用区域 1 + */ + Peer1: string; + /** + * 可用区域 2 + */ + Peer2: string; + /** + * 计费类型 + */ + ChargeType: string; + /** + * 带宽 + */ + Bandwidth: number; + /** + * unix 时间戳 创建时间 + */ + CreateTime: number; + /** + * unix 时间戳 到期时间 + */ + ExpireTime: number; + }[]; +} +/** + * GetUDPNLineList - 获取当前支持的专线线路列表 + */ +export interface GetUDPNLineListRequest { +} +/** + * GetUDPNLineList - 获取当前支持的专线线路列表 + */ +export interface GetUDPNLineListResponse { + /** + * DataSet中的元素个数 + */ + TotalCount: number; + /** + * 当前支持的专线线路详细信息,详见UDPNLineSet + */ + DataSet: { + /** + * 支持UDPN的地域之一,北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 华盛顿:us-ws, 洛杉矶:us-la, 东京:jpn-tky + */ + LocalRegion: string; + /** + * 支持UDPN的地域之一,北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 华盛顿:us-ws, 洛杉矶:us-la, 东京:jpn-tky + */ + RemoteRegion: string; + /** + * 线路带宽上限,单位 M + */ + BandwidthUpperLimit: number; + }[]; +} +/** + * GetUDPNPrice - 获取 UDPN 价格 + */ +export interface GetUDPNPriceRequest { + /** + * 专线可用区1,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-la, 华盛顿:us-ws, 东京:jpn-tky + */ + Peer1: string; + /** + * 专线可用区2,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-la, 华盛顿:us-ws, 东京:jpn-tky + */ + Peer2: string; + /** + * 带宽信息 + */ + Bandwidth: number; + /** + * 计费类型 + */ + ChargeType?: string; + /** + * 购买时长 + */ + Quantity?: number; + /** + * PayMode,枚举值,Bandwidth:带宽;Traffic:流量 默认不填写:带宽 + */ + PayMode?: string; +} +/** + * GetUDPNPrice - 获取 UDPN 价格 + */ +export interface GetUDPNPriceResponse { + /** + * 资源有效期 unix 时间戳 + */ + PurchaseValue: number; + /** + * 专线价格 + */ + Price: number; +} +/** + * GetUDPNUpgradePrice - 获取专线升级价格 + */ +export interface GetUDPNUpgradePriceRequest { + /** + * 专线带宽资源 Id + */ + UDPNId: string; + /** + * 带宽 + */ + Bandwidth: number; +} +/** + * GetUDPNUpgradePrice - 获取专线升级价格 + */ +export interface GetUDPNUpgradePriceResponse { + /** + * 升级后的价格 + */ + Price: number; +} +/** + * ModifyUDPNBandwidth - 修改带宽值 + */ +export interface ModifyUDPNBandwidthRequest { + /** + * UDPN Id + */ + UDPNId: string; + /** + * 调整后专线带宽, 单位为Mbps,取值范围为大于等于2且小于等于1000([2-1000])的整数 + */ + Bandwidth: number; + /** + * 代金劵 ID + */ + CouponId?: string; +} +/** + * ModifyUDPNBandwidth - 修改带宽值 + */ +export interface ModifyUDPNBandwidthResponse { +} +/** + * ReleaseUDPN - 释放 UDPN + */ +export interface ReleaseUDPNRequest { + /** + * UDPN 资源 Id + */ + UDPNId: string; +} +/** + * ReleaseUDPN - 释放 UDPN + */ +export interface ReleaseUDPNResponse { +} diff --git a/lib/services/udpn/index.js b/lib/services/udpn/index.js new file mode 100644 index 0000000..0651458 --- /dev/null +++ b/lib/services/udpn/index.js @@ -0,0 +1,79 @@ +"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 **udpn** service + */ +class UDPNClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * AllocateUDPN - 分配一条 UDPN 专线 + * + * See also: https://docs.ucloud.cn/api/udpn-api/allocate_udpn + */ + allocateUDPN(request) { + const args = Object.assign({ Action: 'AllocateUDPN' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDPN - 描述 UDPN + * + * See also: https://docs.ucloud.cn/api/udpn-api/describe_udpn + */ + describeUDPN(request) { + const args = Object.assign({ Action: 'DescribeUDPN' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUDPNLineList - 获取当前支持的专线线路列表 + * + * See also: https://docs.ucloud.cn/api/udpn-api/get_udpn_line_list + */ + getUDPNLineList(request) { + const args = Object.assign({ Action: 'GetUDPNLineList' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUDPNPrice - 获取 UDPN 价格 + * + * See also: https://docs.ucloud.cn/api/udpn-api/get_udpn_price + */ + getUDPNPrice(request) { + const args = Object.assign({ Action: 'GetUDPNPrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUDPNUpgradePrice - 获取专线升级价格 + * + * See also: https://docs.ucloud.cn/api/udpn-api/get_udpn_upgrade_price + */ + getUDPNUpgradePrice(request) { + const args = Object.assign({ Action: 'GetUDPNUpgradePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyUDPNBandwidth - 修改带宽值 + * + * See also: https://docs.ucloud.cn/api/udpn-api/modify_udpn_bandwidth + */ + modifyUDPNBandwidth(request) { + const args = Object.assign({ Action: 'ModifyUDPNBandwidth' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ReleaseUDPN - 释放 UDPN + * + * See also: https://docs.ucloud.cn/api/udpn-api/release_udpn + */ + releaseUDPN(request) { + const args = Object.assign({ Action: 'ReleaseUDPN' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = UDPNClient; diff --git a/lib/services/uec/index.d.ts b/lib/services/uec/index.d.ts new file mode 100644 index 0000000..4bd3f10 --- /dev/null +++ b/lib/services/uec/index.d.ts @@ -0,0 +1,2423 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **uec** service + */ +export default class UECClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * BindUEcFirewall - 绑定防火墙,应用防火墙规则 + * + * See also: https://docs.ucloud.cn/api/uec-api/bind_u_ec_firewall + */ + bindUEcFirewall(request?: BindUEcFirewallRequest): Promise; + /** + * CreateUEcFirewall - 创建外网防火墙 + * + * See also: https://docs.ucloud.cn/api/uec-api/create_u_ec_firewall + */ + createUEcFirewall(request?: CreateUEcFirewallRequest): Promise; + /** + * CreateUEcHolder - 创建容器组 + * + * See also: https://docs.ucloud.cn/api/uec-api/create_u_ec_holder + */ + createUEcHolder(request?: CreateUEcHolderRequest): Promise; + /** + * CreateUEcSubnet - 创建子网 + * + * See also: https://docs.ucloud.cn/api/uec-api/create_u_ec_subnet + */ + createUEcSubnet(request?: CreateUEcSubnetRequest): Promise; + /** + * CreateUEcVHost - 创建虚拟机v2.0 + * + * See also: https://docs.ucloud.cn/api/uec-api/create_u_ec_v_host + */ + createUEcVHost(request?: CreateUEcVHostRequest): Promise; + /** + * DeleteUEcCustomImage - 删除UEDN客户自定义镜像 + * + * See also: https://docs.ucloud.cn/api/uec-api/delete_u_ec_custom_image + */ + deleteUEcCustomImage(request?: DeleteUEcCustomImageRequest): Promise; + /** + * DeleteUEcHolder - 删除容器组 + * + * See also: https://docs.ucloud.cn/api/uec-api/delete_u_ec_holder + */ + deleteUEcHolder(request?: DeleteUEcHolderRequest): Promise; + /** + * DeleteUEcSubnet - 删除子网 + * + * See also: https://docs.ucloud.cn/api/uec-api/delete_u_ec_subnet + */ + deleteUEcSubnet(request?: DeleteUEcSubnetRequest): Promise; + /** + * DeleteUEcVHost - 删除vhost虚拟机 v2.0 + * + * See also: https://docs.ucloud.cn/api/uec-api/delete_u_ec_v_host + */ + deleteUEcVHost(request?: DeleteUEcVHostRequest): Promise; + /** + * DescribeUEcFirewall - 获取防火墙信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_firewall + */ + describeUEcFirewall(request?: DescribeUEcFirewallRequest): Promise; + /** + * DescribeUEcFirewallResource - 防火墙绑定的资源列表 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_firewall_resource + */ + describeUEcFirewallResource(request?: DescribeUEcFirewallResourceRequest): Promise; + /** + * DescribeUEcHolder - 获得容器组信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_holder + */ + describeUEcHolder(request?: DescribeUEcHolderRequest): Promise; + /** + * DescribeUEcHolderIDC - 获取容器组机房信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_holder_idc + */ + describeUEcHolderIDC(request?: DescribeUEcHolderIDCRequest): Promise; + /** + * DescribeUEcIDC - 获取IDC机房列表 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_idc + */ + describeUEcIDC(request?: DescribeUEcIDCRequest): Promise; + /** + * DescribeUEcSubnet - 获取子网列表 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_subnet + */ + describeUEcSubnet(request?: DescribeUEcSubnetRequest): Promise; + /** + * DescribeUEcVHost - 获取虚拟机列表 2.0 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_v_host + */ + describeUEcVHost(request?: DescribeUEcVHostRequest): Promise; + /** + * DescribeUEcVHostISP - 获取虚拟机运营商信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_v_host_isp + */ + describeUEcVHostISP(request?: DescribeUEcVHostISPRequest): Promise; + /** + * GetUEcHolderLog - 获取单个容器日志 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_holder_log + */ + getUEcHolderLog(request?: GetUEcHolderLogRequest): Promise; + /** + * GetUEcHolderMetrics - 获取容器(CPU利用率,带宽,内存)数据 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_holder_metrics + */ + getUEcHolderMetrics(request?: GetUEcHolderMetricsRequest): Promise; + /** + * GetUEcIDCCutInfo - 获取机房割接信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_idc_cut_info + */ + getUEcIDCCutInfo(request?: GetUEcIDCCutInfoRequest): Promise; + /** + * GetUEcIDCVHostData - 获取机房虚拟机监控数据 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_idcv_host_data + */ + getUEcIDCVHostData(request?: GetUEcIDCVHostDataRequest): Promise; + /** + * GetUEcImage - uec2.0 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_image + */ + getUEcImage(request?: GetUEcImageRequest): Promise; + /** + * GetUEcPodPrice - 获得容器组价格 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_pod_price + */ + getUEcPodPrice(request?: GetUEcPodPriceRequest): Promise; + /** + * GetUEcUpgradePrice - 获取虚拟机调整差价 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_upgrade_price + */ + getUEcUpgradePrice(request?: GetUEcUpgradePriceRequest): Promise; + /** + * GetUEcVHostData - 获取虚拟机监控数据 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_v_host_data + */ + getUEcVHostData(request?: GetUEcVHostDataRequest): Promise; + /** + * GetUEcVHostPrice - 获取虚拟机价格 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_v_host_price + */ + getUEcVHostPrice(request?: GetUEcVHostPriceRequest): Promise; + /** + * ImportUEcCustomImage - 导入自定义镜像 + * + * See also: https://docs.ucloud.cn/api/uec-api/import_u_ec_custom_image + */ + importUEcCustomImage(request?: ImportUEcCustomImageRequest): Promise; + /** + * LoginUEcDocker - 登录容器 + * + * See also: https://docs.ucloud.cn/api/uec-api/login_u_ec_docker + */ + loginUEcDocker(request?: LoginUEcDockerRequest): Promise; + /** + * ModifyUEcBandwidth - 修改节点带宽限制 + * + * See also: https://docs.ucloud.cn/api/uec-api/modify_u_ec_bandwidth + */ + modifyUEcBandwidth(request?: ModifyUEcBandwidthRequest): Promise; + /** + * ModifyUEcHolderName - 修改容器组名称 + * + * See also: https://docs.ucloud.cn/api/uec-api/modify_u_ec_holder_name + */ + modifyUEcHolderName(request?: ModifyUEcHolderNameRequest): Promise; + /** + * ModifyUEcImageName - 修改镜像名称 + * + * See also: https://docs.ucloud.cn/api/uec-api/modify_u_ec_image_name + */ + modifyUEcImageName(request?: ModifyUEcImageNameRequest): Promise; + /** + * PoweroffUEcVHost - 虚拟机断电 + * + * See also: https://docs.ucloud.cn/api/uec-api/poweroff_u_ec_v_host + */ + poweroffUEcVHost(request?: PoweroffUEcVHostRequest): Promise; + /** + * ReinstallUEcVHost - 虚拟机重装系统 + * + * See also: https://docs.ucloud.cn/api/uec-api/reinstall_u_ec_v_host + */ + reinstallUEcVHost(request?: ReinstallUEcVHostRequest): Promise; + /** + * RestartUEcHolder - 重启容器组 + * + * See also: https://docs.ucloud.cn/api/uec-api/restart_u_ec_holder + */ + restartUEcHolder(request?: RestartUEcHolderRequest): Promise; + /** + * RestartUEcVHost - 重启虚拟机v2.0 + * + * See also: https://docs.ucloud.cn/api/uec-api/restart_u_ec_v_host + */ + restartUEcVHost(request?: RestartUEcVHostRequest): Promise; + /** + * StartUEcVHost - 启动UEC虚拟机 + * + * See also: https://docs.ucloud.cn/api/uec-api/start_u_ec_v_host + */ + startUEcVHost(request?: StartUEcVHostRequest): Promise; + /** + * StopUEcVHost - 停止UEC虚拟机 + * + * See also: https://docs.ucloud.cn/api/uec-api/stop_u_ec_v_host + */ + stopUEcVHost(request?: StopUEcVHostRequest): Promise; + /** + * UnBindUEcFirewall - 解绑防火墙 + * + * See also: https://docs.ucloud.cn/api/uec-api/un_bind_u_ec_firewall + */ + unBindUEcFirewall(request?: UnBindUEcFirewallRequest): Promise; + /** + * UpdateUEcFirewall - 更新防火墙信息,新增和删除规则 + * + * See also: https://docs.ucloud.cn/api/uec-api/update_u_ec_firewall + */ + updateUEcFirewall(request?: UpdateUEcFirewallRequest): Promise; + /** + * UpdateUEcFirewallAttribute - 更新防火墙名称及描述 + * + * See also: https://docs.ucloud.cn/api/uec-api/update_u_ec_firewall_attribute + */ + updateUEcFirewallAttribute(request?: UpdateUEcFirewallAttributeRequest): Promise; + /** + * UpdateUEcSubnet - 更新子网信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/update_u_ec_subnet + */ + updateUEcSubnet(request?: UpdateUEcSubnetRequest): Promise; +} +/** + * BindUEcFirewall - 绑定防火墙,应用防火墙规则 + */ +export interface BindUEcFirewallRequest { + /** + * 防火墙Id + */ + FirewallId: string; + /** + * 虚拟机资源Id或容器组资源id + */ + ResourceId: string; +} +/** + * BindUEcFirewall - 绑定防火墙,应用防火墙规则 + */ +export interface BindUEcFirewallResponse { +} +/** + * CreateUEcFirewall - 创建外网防火墙 + */ +export interface CreateUEcFirewallRequest { + /** + * 防火墙名称 + */ + Name: string; + /** + * + */ + Rule?: { + /** + * 协议,可选值:TCP,UDP,ICMP + */ + ProtocolType: string; + /** + * 端口,范围用"-"符号分隔,如:1-65535 + */ + Port: string; + /** + * 源ip + */ + SrcIp: string; + /** + * ACCEPT(接受)和DROP(拒绝) + */ + Action: string; + /** + * 优先级:HIGH(高),MEDIUM(中),LOW(低) + */ + Priority: string; + /** + * 备注 + */ + Remark?: string; + }[]; + /** + * 描述 + */ + Remark?: string; +} +/** + * CreateUEcFirewall - 创建外网防火墙 + */ +export interface CreateUEcFirewallResponse { + /** + * 防火墙Id + */ + FirewallId: string; +} +/** + * CreateUEcHolder - 创建容器组 + */ +export interface CreateUEcHolderRequest { + /** + * 机房id + */ + IdcId: string; + /** + * 容器组Cpu总核数 + */ + CpuCore: number; + /** + * 容器组总内存,单位MB + */ + MemSize: number; + /** + * 子网ID + */ + SubnetId: string; + /** + * 容器组名称(默认default) + */ + Name?: string; + /** + * 机型(normal-标准型,hf-高性能型,默认normal) + */ + ProductType?: string; + /** + * 重启策略(0总是,1失败是,2永不,默认0) + */ + RestartStrategy?: number; + /** + * 绑定外网ip(yes-绑定,no-不绑定,默认no) + */ + ElasticIp?: string; + /** + * 外网绑定的带宽(单位M,默认0,只有当ElasticIp为yes时,默认1) + */ + Bandwidth?: number; + /** + * 防火墙ID + */ + FirewallId?: string; + /** + * 付费方式(2按月、3按年。默认2,默认月付) + */ + ChargeType?: number; + /** + * 月数或者年数(默认值:1,当为按月计费时,0表示计费到月底,默认值为0) + */ + ChargeQuantity?: number; + /** + * + */ + Pack?: { + /** + * 容器名称 + */ + Name?: string; + /** + * 容器Cpu核数 + */ + CpuCore?: number; + /** + * 容器内存,单位MB + */ + MemSize?: number; + /** + * 容器镜像名称 + */ + ImageName?: string; + /** + * 容器工作目录 + */ + WorkDir?: string; + /** + * 开启容器的命令 + */ + Cmd?: string; + /** + * 容器参数(多个用;隔开) + */ + Args?: string; + /** + * 容器环境变量(多个用;隔开,如:key1:value1;key2:value2) + */ + Environment?: string; + /** + * 容器配置字典(多个用;隔开,如:/data1:resId1;/data2:resId2) + */ + ConfigDict?: string; + }[]; + /** + * + */ + Image?: { + /** + * 镜像用户名和密码(如镜像名:密码) + */ + Message?: string; + /** + * 镜像仓库地址 + */ + StoreAddress?: string; + }[]; + /** + * + */ + Storage?: { + /** + * 存储卷挂载路径 + */ + Path?: string; + /** + * 存储卷资源id + */ + ResourceId?: string; + }[]; +} +/** + * CreateUEcHolder - 创建容器组 + */ +export interface CreateUEcHolderResponse { + /** + * 容器组资源id + */ + ResourceId?: string; +} +/** + * CreateUEcSubnet - 创建子网 + */ +export interface CreateUEcSubnetRequest { + /** + * 机房ID + */ + IdcId: string; + /** + * 子网cidr + */ + CIDR: string; + /** + * 子网名称 + */ + SubnetName?: string; + /** + * 备注 + */ + Comment?: string; +} +/** + * CreateUEcSubnet - 创建子网 + */ +export interface CreateUEcSubnetResponse { + /** + * 子网ID + */ + SubnetId: string; +} +/** + * CreateUEcVHost - 创建虚拟机v2.0 + */ +export interface CreateUEcVHostRequest { + /** + * 机房id + */ + IdcId: string; + /** + * cpu核心数 + */ + CpuCore: number; + /** + * 内存大小,单位GB + */ + MemSize: number; + /** + * 数据盘大小,单位GB + */ + DiskSize: number; + /** + * 镜像ID + */ + ImageId: string; + /** + * 节点带宽限制,单位Mbs + */ + NetLimit: number; + /** + * 节点名称 + */ + NodeName?: string; + /** + * 系统盘大小,单位GB, 默认20GB + */ + SysDiskSize?: number; + /** + * 账户名,默认root + */ + AccountName?: string; + /** + * 密码 + */ + PassWord?: string; + /** + * 创建节点数量,默认1 + */ + NodeCount?: number; + /** + * 付费方式,1按时,2按月,3按年,默认2 + */ + ChargeType?: number; + /** + * 月数或者年数,0计费到月底, 默认0 + */ + ChargeQuantity?: number; + /** + * 子网ID + */ + SubnetId?: string; + /** + * 产品类型:normal(标准型),hf(高频型) + */ + ProductType?: string; + /** + * 外网防护墙规则组,默认 + */ + FirewallId?: string; + /** + * 运营商(1-电信,2-联通,4移动) + */ + Isp?: number[]; + /** + * (已废弃)是否需要外网ip(yes-是,no-否) + */ + IsNeedOuterIp?: string; +} +/** + * CreateUEcVHost - 创建虚拟机v2.0 + */ +export interface CreateUEcVHostResponse { + /** + * 节点id(详情参考NodeList) + */ + NodeList: { + /** + * 虚拟机资源id + */ + NodeId?: string; + }[]; +} +/** + * DeleteUEcCustomImage - 删除UEDN客户自定义镜像 + */ +export interface DeleteUEcCustomImageRequest { + /** + * 镜像ID + */ + ImageId: string; + /** + * 机房ID,带机房ID表示只删除指定机房镜像 + */ + IdcId?: string; +} +/** + * DeleteUEcCustomImage - 删除UEDN客户自定义镜像 + */ +export interface DeleteUEcCustomImageResponse { + /** + * 镜像ID + */ + ImageId: number; +} +/** + * DeleteUEcHolder - 删除容器组 + */ +export interface DeleteUEcHolderRequest { + /** + * 容器组资源id,n为0,1,2... + */ + HolderId: string[]; +} +/** + * DeleteUEcHolder - 删除容器组 + */ +export interface DeleteUEcHolderResponse { +} +/** + * DeleteUEcSubnet - 删除子网 + */ +export interface DeleteUEcSubnetRequest { + /** + * 子网ID + */ + SubnetId: string; +} +/** + * DeleteUEcSubnet - 删除子网 + */ +export interface DeleteUEcSubnetResponse { +} +/** + * DeleteUEcVHost - 删除vhost虚拟机 v2.0 + */ +export interface DeleteUEcVHostRequest { + /** + * 节点id + */ + NodeId: string[]; +} +/** + * DeleteUEcVHost - 删除vhost虚拟机 v2.0 + */ +export interface DeleteUEcVHostResponse { +} +/** + * DescribeUEcFirewall - 获取防火墙信息 + */ +export interface DescribeUEcFirewallRequest { + /** + * 防火墙ID,默认为返回所有防火墙 + */ + FirewallId?: string; + /** + * 绑定防火墙组的虚拟机资源ID + */ + ResourceId?: string; + /** + * 返回数据长度,默认为20 + */ + Limit?: number; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; +} +/** + * DescribeUEcFirewall - 获取防火墙信息 + */ +export interface DescribeUEcFirewallResponse { + /** + * 防火墙组详细信息,参见 FirewallInfo + */ + FirewallSet?: { + /** + * 防火墙Id + */ + FirewallId: string; + /** + * 防火墙名称 + */ + Name: string; + /** + * 创建时间 + */ + CreateTime: number; + /** + * 防火墙规则组,详情参见RuleInfo + */ + Rule: { + /** + * 协议,可选值:TCP,UDP,ICMP + */ + ProtocolType: string; + /** + * 端口,范围用"-"符号分隔,如:1-65535 + */ + Port: string; + /** + * 源ip + */ + SrcIp: string; + /** + * ACCEPT(接受)和DROP(拒绝) + */ + Action: string; + /** + * 优先级:HIGH(高),MEDIUM(中),LOW(低) + */ + Priority: string; + /** + * 备注 + */ + Remark: string; + }[]; + /** + * 防火墙绑定资源数量 + */ + ResourceCount: number; + /** + * 防火墙组类型,枚举值为: "user defined", 用户自定义防火墙; "recommend web", 默认Web防火墙; "recommend non web", 默认非Web防火墙 + */ + Type: string; + /** + * 描述 + */ + Remark?: string; + }[]; + /** + * 满足条件的节点总数 + */ + TotalCount?: number; +} +/** + * DescribeUEcFirewallResource - 防火墙绑定的资源列表 + */ +export interface DescribeUEcFirewallResourceRequest { + /** + * 防火墙Id + */ + FirewallId: string; +} +/** + * DescribeUEcFirewallResource - 防火墙绑定的资源列表 + */ +export interface DescribeUEcFirewallResourceResponse { + /** + * 资源列表,详情参见ResourceInfo + */ + ResourceSet: { + /** + * 资源Id + */ + ResourceId: string; + /** + * 节点公网Ip列表 + */ + PublicIpList: string[]; + /** + * 节点名称 + */ + Name: string; + /** + * 节点状态,1部署中,2待启动,3启动中,4运行中,5正在停止,6已停止,7正在更新,8正在重启,9正在删除, 10已经删除,11异常 + */ + State: number; + /** + * 节点备注 + */ + Remark?: string; + }[]; + /** + * 资源总数 + */ + TotalCount: number; +} +/** + * DescribeUEcHolder - 获得容器组信息 + */ +export interface DescribeUEcHolderRequest { + /** + * 容器组资源id + */ + HolderId?: string[]; + /** + * 返回数据长度,默认为20,非负整数 + */ + Limit?: number; + /** + * 列表起始位置偏移量,默认为0。非负整数 + */ + Offset?: number; +} +/** + * DescribeUEcHolder - 获得容器组信息 + */ +export interface DescribeUEcHolderResponse { + /** + * 容器组列表(详情参考HolderList) + */ + HolderList: { + /** + * 容器组资源id + */ + ResourceId?: string; + /** + * 容器组名称 + */ + HolderName?: string; + /** + * 容器组子网id + */ + SubnetId?: string; + /** + * 容器组内网ip + */ + InnerIp?: string; + /** + * 容器组外网ip集合(详情参考IpList) + */ + IpList?: { + /** + * 外网ip + */ + Ip?: string; + /** + * 运营商 + */ + Isp?: string; + }[]; + /** + * 容器组运行状态0:初始化;1:拉取镜像;2:启动中;3:运行中;4:错误;5:正在重启;6:正在删除;7:已经删除;8:容器运行错误;9:启动失败;99:异常 + */ + State?: number; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 过期时间 + */ + ExpireTime?: number; + /** + * 线路类型(运营商类型: 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通) + */ + Type?: number; + /** + * 机房id + */ + IdcId?: string; + /** + * 机房名称 + */ + OcName?: string; + /** + * 省份名称 + */ + Province?: string; + /** + * 城市名称 + */ + City?: string; + /** + * 0:总是;1:失败是;2:永不 + */ + RestartStrategy?: number; + /** + * 容器数量 + */ + DockerCount?: number; + /** + * 容器信息(详情参考DockerInfo) + */ + DockerInfo?: { + /** + * CPU核数(/核)精度0.1核 + */ + CpuCores?: number; + /** + * 内存大小(Gi) + */ + MemSize?: number; + /** + * 容器名称 + */ + Name?: string; + /** + * 容器状态,0:初始化;1:拉取镜像;2:拉取镜像失败;3:启动中;4:运行中;5:正在停止;6:已停止;7:已删除;8:镜像拉取成功;9:启动失败;99:异常 + */ + State?: number; + /** + * 镜像名称 + */ + ImageName?: string; + /** + * 工作目录 + */ + WorkDir?: string; + /** + * 命令 + */ + Command?: string; + /** + * 参数 + */ + Args?: string; + /** + * 环境变量(详情参考EnvList) + */ + EnvList?: { + /** + * 环境变量key值 + */ + Key?: string; + /** + * 环境变量Value值 + */ + Value?: string; + }[]; + /** + * 容器配置字典(详情参考CfgDictList) + */ + CfgDictList?: { + /** + * 名称 + */ + Name?: string; + /** + * 挂载路径 + */ + MountPath?: string; + /** + * 资源id + */ + ResourceId?: string; + }[]; + }[]; + /** + * 机器类型(normal通用型,hf高性能型) + */ + ProductType?: string; + /** + * 外网绑定的带宽 + */ + NetLimit?: number; + /** + * 外网防火墙id + */ + FirewallId?: string; + /** + * 存储卷信息(详情参考StorVolumeInfo) + */ + StorVolumeInfo?: { + /** + * 名称 + */ + Name?: string; + /** + * 资源id + */ + ResourceId?: string; + /** + * 挂载点 + */ + MountPoint?: string; + /** + * 容量(单位GB) + */ + DiskSize?: number; + }[]; + /** + * 存储卷数量 + */ + StorVolumeCount?: number; + /** + * 容器组镜像密钥列表(详情参考ImageList) + */ + ImageList?: { + /** + * 仓库地址 + */ + StoreAddr?: string; + /** + * 用户名称 + */ + UserName?: string; + /** + * 镜像密钥 + */ + ImageKey?: string; + }[]; + }[]; + /** + * 满足条件的容器组总数 + */ + TotalCount: number; +} +/** + * DescribeUEcHolderIDC - 获取容器组机房信息 + */ +export interface DescribeUEcHolderIDCRequest { + /** + * 容器组Cpu核数 + */ + Cpu: number; + /** + * 容器组内存大小(单位MB) + */ + Memory: number; + /** + * Idc机房id。默认全部机房 + */ + IdcId?: string[]; + /** + * 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + */ + Type?: number; + /** + * 产品类型,normal标准型,hf高性能型 + */ + ProductType?: string; +} +/** + * DescribeUEcHolderIDC - 获取容器组机房信息 + */ +export interface DescribeUEcHolderIDCResponse { + /** + * 机房列表,具体参考下面IdcInfo + */ + IdcList: { + /** + * 机房ID + */ + IdcId?: string; + /** + * 机房名称 + */ + Name?: string; + /** + * 运营商 + */ + Isp?: string; + /** + * 省份 + */ + Province?: string; + /** + * 城市 + */ + City?: string; + /** + * 运营商类型:0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + */ + Type?: number; + /** + * 机房可创建节点最大数量 + */ + MaxNodeCnt?: number; + }[]; +} +/** + * DescribeUEcIDC - 获取IDC机房列表 + */ +export interface DescribeUEcIDCRequest { + /** + * 节点cpu核数 + */ + Cpu: number; + /** + * 节点内存大小, 单位GB + */ + Memory: number; + /** + * Idc机房id。默认全部机房 + */ + IdcId?: string[]; + /** + * 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + */ + Type?: number; + /** + * 产品类型:normal(通用型),hf(高主频型) + */ + ProductType?: string; +} +/** + * DescribeUEcIDC - 获取IDC机房列表 + */ +export interface DescribeUEcIDCResponse { + /** + * 获取的机房信息,具体参考下面IdcInfo + */ + IdcList?: { + /** + * 机房ID + */ + IdcId?: string; + /** + * 机房名称 + */ + Name?: string; + /** + * 运营商 + */ + Isp?: string; + /** + * 省份 + */ + Province?: string; + /** + * 城市 + */ + City?: string; + /** + * 运营商类型:0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + */ + Type?: number; + /** + * 机房可创建节点最大数量 + */ + MaxNodeCnt?: number; + }[]; +} +/** + * DescribeUEcSubnet - 获取子网列表 + */ +export interface DescribeUEcSubnetRequest { + /** + * 机房ID + */ + IdcId?: string; + /** + * 子网ID + */ + SubnetId?: string; +} +/** + * DescribeUEcSubnet - 获取子网列表 + */ +export interface DescribeUEcSubnetResponse { + /** + * 子网信息列表 + */ + SubnetList?: { + /** + * 子网ID + */ + SubnetId: string; + /** + * 子网名称 + */ + SubnetName: string; + /** + * 机房ID + */ + IdcId: string; + /** + * 子网cidr + */ + CIDR: string; + /** + * 创建时间 + */ + CreateTime: number; + /** + * 备注 + */ + Comment: string; + /** + * 总ip数 + */ + TotalIpCnt: number; + /** + * 可用ip数 + */ + AvailableIPCnt: number; + }[]; +} +/** + * DescribeUEcVHost - 获取虚拟机列表 2.0 + */ +export interface DescribeUEcVHostRequest { + /** + * Idc机房id。默认全部机房 + */ + IdcId?: string[]; + /** + * 节点id,创建节点时生成的id。默认全部节点 + */ + NodeId?: string[]; + /** + * 数据偏移量,默认0,非负整数 + */ + Offset?: number; + /** + * 返回数据长度, 默认20,非负整数 + */ + Limit?: number; +} +/** + * DescribeUEcVHost - 获取虚拟机列表 2.0 + */ +export interface DescribeUEcVHostResponse { + /** + * 满足条件的节点总数 + */ + TotalCount?: number; + /** + * 节点列表 + */ + NodeList?: { + /** + * 节点名称 + */ + NodeName?: string; + /** + * 节点ID + */ + NodeId?: string; + /** + * Cpu核数 + */ + CoreNum?: number; + /** + * 节点内存大小,单位GB + */ + MemSize?: number; + /** + * 系统盘大小, 单位GB + */ + SysDiskSize?: number; + /** + * 数据盘大小, 单位GB + */ + DiskSize?: number; + /** + * 节点状态,1部署中,2待启动,3启动中,4运行中,5正在停止,6已停止,7正在更新,8正在重启,9正在删除, 10已经删除,11异常 + */ + State?: number; + /** + * 节点带宽限制, 单位Mbs + */ + NetLimit?: number; + /** + * 机房ID + */ + IdcId?: string; + /** + * 机房名称 + */ + OcName?: string; + /** + * 省份 + */ + Province?: string; + /** + * 城市 + */ + City?: string; + /** + * 运营商类型: 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + */ + Type?: number; + /** + * 付费类型:1按时, 2按月,3按年 + */ + ChargeType?: number; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 过期时间 + */ + ExpiredTime?: number; + /** + * 镜像名称 + */ + ImageName?: string; + /** + * 外网ip集合(详情参考NodeIpList) + */ + NodeIpList?: { + /** + * 外网ip + */ + Ip?: string; + /** + * 运营商 + */ + Isp?: string; + /** + * 运营商名称 + */ + IspName?: string; + }[]; + /** + * 防火墙Id + */ + FirewallId?: string; + /** + * 机器类型 + */ + ProductType?: string; + }[]; +} +/** + * DescribeUEcVHostISP - 获取虚拟机运营商信息 + */ +export interface DescribeUEcVHostISPRequest { + /** + * 运营商名称 + */ + IspName?: string; + /** + * 省份 + */ + Province?: string; + /** + * 城市 + */ + City?: string; +} +/** + * DescribeUEcVHostISP - 获取虚拟机运营商信息 + */ +export interface DescribeUEcVHostISPResponse { + /** + * 节点运营商列表 + */ + NodeIspList: { + /** + * 省份 + */ + Province?: string; + /** + * 城市 + */ + City?: string; + /** + * 线路类型 + */ + LineType?: string; + /** + * 机房运营商名称 + */ + IspName?: string; + /** + * 机房名称 + */ + IdcName?: string; + }[]; +} +/** + * GetUEcHolderLog - 获取单个容器日志 + */ +export interface GetUEcHolderLogRequest { + /** + * 容器名称 + */ + PackName: string; + /** + * 容器组资源id + */ + ResourceId: string; +} +/** + * GetUEcHolderLog - 获取单个容器日志 + */ +export interface GetUEcHolderLogResponse { + /** + * 返回的日志数据 + */ + Data?: string; +} +/** + * GetUEcHolderMetrics - 获取容器(CPU利用率,带宽,内存)数据 + */ +export interface GetUEcHolderMetricsRequest { + /** + * 容器名称 + */ + PackName: string; + /** + * n为0 CPU利用率, 1内存使用率, 2网卡出带宽, 3网卡入带宽, 4网卡出包数, 5网卡入包数 + */ + Type: string[]; + /** + * 容器组资源id + */ + ResourceId: string; + /** + * 开始时间 + */ + StartTime?: number; + /** + * 结束时间 + */ + EndTime?: number; +} +/** + * GetUEcHolderMetrics - 获取容器(CPU利用率,带宽,内存)数据 + */ +export interface GetUEcHolderMetricsResponse { + /** + * 获得的监控数据(详情参考MetricisDataSet) + */ + DataSets: { + /** + * cpu利用率(详情参考MonitorInfo) + */ + CPUUtilization?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 内存使用率(详情参考MonitorInfo) + */ + MemUtilization?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡出包数(详情参考MonitorInfo) + */ + NetPacketOut?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡入包数(详情参考MonitorInfo) + */ + NetPacketIn?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡出带宽(详情参考MonitorInfo) + */ + NICOut?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡入带宽(详情参考MonitorInfo) + */ + NICIn?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + }; +} +/** + * GetUEcIDCCutInfo - 获取机房割接信息 + */ +export interface GetUEcIDCCutInfoRequest { +} +/** + * GetUEcIDCCutInfo - 获取机房割接信息 + */ +export interface GetUEcIDCCutInfoResponse { + /** + * 机房割接信息 + */ + IDCCutInfo: { + /** + * 机房名称 + */ + IDCName?: string; + /** + * 省份 + */ + Province?: string; + /** + * 城市 + */ + City?: string; + /** + * 割接开始时间 + */ + StartTime?: number; + /** + * 割接结束时间 + */ + EndTime?: number; + /** + * 割接类型(中断、抖动、断电) + */ + CutType?: string; + /** + * 受影响的资源信息列表 + */ + ResourceSet?: { + /** + * 节点id + */ + NodeId?: string; + /** + * 机器外网ip集合 + */ + OuterIps?: string[]; + }[]; + }[]; + /** + * 满足条件的机房总数 + */ + TotalCount?: number; +} +/** + * GetUEcIDCVHostData - 获取机房虚拟机监控数据 + */ +export interface GetUEcIDCVHostDataRequest { + /** + * 节点资源id;n为0,1,2... + */ + NodeId: string[]; + /** + * 监控数据类型;n为0,1,2,3,4...,9 + */ + Type: string[]; + /** + * 开始时间戳 + */ + BeginTime?: number; + /** + * 结束时间戳 + */ + EndTime?: number; +} +/** + * GetUEcIDCVHostData - 获取机房虚拟机监控数据 + */ +export interface GetUEcIDCVHostDataResponse { + /** + * 监控数据集合 + */ + DataSets: { + /** + * cpu使用率 + */ + CPUUtilization?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 内存使用率 + */ + MemUtilization?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡出带宽 + */ + NICOut?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡入带宽 + */ + NICIn?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡出包量 + */ + NetPacketOut?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡入包量 + */ + NetPacketIn?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 磁盘读取量 + */ + IORead?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 磁盘写入量 + */ + IOWrite?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 磁盘读取次数 + */ + DiskReadOps?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 磁盘写入次数 + */ + DiskWriteOps?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + }; +} +/** + * GetUEcImage - uec2.0 + */ +export interface GetUEcImageRequest { + /** + * 镜像类型:1标准镜像,2行业镜像,3自定义镜像 + */ + ImageType?: string; + /** + * 数据偏移量,默认0,非负整数 + */ + Offset?: number; + /** + * 返回数据长度, 默认20,非负整数 + */ + Limit?: number; +} +/** + * GetUEcImage - uec2.0 + */ +export interface GetUEcImageResponse { + /** + * 获取的镜像信息,具体参考下面ImageInfo + */ + ImageList?: { + /** + * 镜像ID + */ + ImageId?: string; + /** + * 镜像名称 + */ + ImageName?: string; + /** + * 镜像类型:1标准镜像,2行业镜像,3自定义镜像 + */ + ImageType?: number; + /** + * 系统类型:unix, windows + */ + OcType?: string; + /** + * 镜像描述 + */ + ImageDesc?: string; + /** + * 镜像状态:镜像状态 1可用,2不可用 + */ + State?: number; + /** + * 镜像大小,单位GB + */ + ImageSize?: number; + /** + * 镜像创建时间戳 + */ + CreateTime?: number; + /** + * 部署详情列表 + */ + DeployInfoList?: { + /** + * 机房ID + */ + IdcId?: string; + /** + * 镜像状态 1-可用, 2-不可用, 3-获取中, 4-转换中, 5-部署中 + */ + State?: number; + }[]; + }[]; + /** + * 镜像总数 + */ + TotalCount?: number; +} +/** + * GetUEcPodPrice - 获得容器组价格 + */ +export interface GetUEcPodPriceRequest { + /** + * 机房id + */ + IdcId: string; + /** + * 容器组总Cpu核心数 + */ + CpuCore?: number; + /** + * 容器组总内存大小(单位M) + */ + MemSize?: number; + /** + * 支付类型(2按月,3按年,默认2) + */ + ChargeType?: number; + /** + * 月数或年数(默认值:1,当支付类型为按月时,默认值为0) + */ + ChargeQuantity?: number; + /** + * 产品类型(normal:标准型,hf:高性能型,默认:normal) + */ + ProductType?: string; + /** + * 是否绑定外网IP(yes:是,no:否,默认:no) + */ + ElasticIp?: string; + /** + * 绑定的带宽,默认0,当绑定外网IP时默认1(单位M) + */ + Bandwidth?: number; +} +/** + * GetUEcPodPrice - 获得容器组价格 + */ +export interface GetUEcPodPriceResponse { + /** + * 容器组价格 + */ + HolderPrice: number; + /** + * IP和带宽价格 + */ + IpPrice: number; +} +/** + * GetUEcUpgradePrice - 获取虚拟机调整差价 + */ +export interface GetUEcUpgradePriceRequest { + /** + * 虚拟机资源ID + */ + NodeId: string; + /** + * cpu核心数 + */ + CpuCore?: number; + /** + * 内存大小,单位GB + */ + MemSize?: number; + /** + * 系统盘大小,单位GB + */ + SysDiskSize?: number; + /** + * 数据盘大小,单位GB + */ + DiskSize?: number; + /** + * 节点带宽限制,单位Mbs + */ + NetLimit?: number; +} +/** + * GetUEcUpgradePrice - 获取虚拟机调整差价 + */ +export interface GetUEcUpgradePriceResponse { + /** + * 规格调整差价 + */ + Price?: number; +} +/** + * GetUEcVHostData - 获取虚拟机监控数据 + */ +export interface GetUEcVHostDataRequest { + /** + * 节点id + */ + NodeId: string; + /** + * 0CPU使用率, 1内存使用率, 2 网卡出流量, 3网卡入流量, 4网卡出包量, 5网卡入包量, 6磁盘读流量, 7磁盘写流量, 8磁盘读次数, 9磁盘写次数 + */ + Type: number[]; + /** + * 查询起始时间 + */ + BeginTime?: number; + /** + * 查询结束时间 + */ + EndTime?: number; +} +/** + * GetUEcVHostData - 获取虚拟机监控数据 + */ +export interface GetUEcVHostDataResponse { + /** + * 带宽数据实例集合 + */ + DataSets?: { + /** + * cpu使用率 + */ + CPUUtilization?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 内存使用率 + */ + MemUtilization?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡出带宽 + */ + NICOut?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡入带宽 + */ + NICIn?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡出包量 + */ + NetPacketOut?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡入包量 + */ + NetPacketIn?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 磁盘读取量 + */ + IORead?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 磁盘写入量 + */ + IOWrite?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 磁盘读取次数 + */ + DiskReadOps?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 磁盘写入次数 + */ + DiskWriteOps?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + }; +} +/** + * GetUEcVHostPrice - 获取虚拟机价格 + */ +export interface GetUEcVHostPriceRequest { + /** + * 机房Id + */ + IdcId: string; + /** + * 节点数量,默认1 + */ + NodeCount?: number; + /** + * CPU核数 + */ + CpuCore?: number; + /** + * 内存大小,单位GB + */ + MemSize?: number; + /** + * 系统盘大小,单位GB + */ + SysDiskSize?: number; + /** + * 数据盘大小,单位GB + */ + DiskSize?: number; + /** + * 网络带宽限速,单位Mbs + */ + NetLimit?: number; + /** + * 付费方式,1按时,2按月,3按年,默认2 + */ + ChargeType?: number; + /** + * 月数或者年数,0计费到月底, 默认0 + */ + ChargeQuantity?: number; + /** + * 产品类型:normal(标准型),hf(高频型),默认normal + */ + ProductType?: string; + /** + * 外网IP的数量,默认1 + */ + IpCount?: number; +} +/** + * GetUEcVHostPrice - 获取虚拟机价格 + */ +export interface GetUEcVHostPriceResponse { + /** + * 节点价格 + */ + NodePrice?: number; + /** + * Ip和带宽价格 + */ + IpPrice?: number; +} +/** + * ImportUEcCustomImage - 导入自定义镜像 + */ +export interface ImportUEcCustomImageRequest { + /** + * 镜像需要导入机房,默认分发到所有机房 + */ + IdcId?: string[]; + /** + * 镜像Id,不传参表示新导入镜像,传参表示已有镜像分发到指定机房 + */ + ImageId?: string; + /** + * 镜像名称,不带镜像ID时必填 + */ + ImageName?: string; + /** + * UFile镜像文件下载地址,不带镜像ID时必填 + */ + UFileUrl?: string; + /** + * 操作系统平台,linux、windows(当前版本暂不支持windows),不带镜像ID时必填 + */ + OsType?: string; + /** + * 镜像格式,可选RAW、qcow2, 不带镜像ID时必填 + */ + Format?: string; + /** + * 镜像描述 + */ + ImageDesc?: string; +} +/** + * ImportUEcCustomImage - 导入自定义镜像 + */ +export interface ImportUEcCustomImageResponse { + /** + * 镜像Id + */ + ImageId: string; +} +/** + * LoginUEcDocker - 登录容器 + */ +export interface LoginUEcDockerRequest { + /** + * 容器组资源id + */ + ResourceId: string; + /** + * 容器名称 + */ + Name: string; +} +/** + * LoginUEcDocker - 登录容器 + */ +export interface LoginUEcDockerResponse { + /** + * 返回的token + */ + SessionId: string; + /** + * 登录地址 + */ + Link?: string; + /** + * 登录端口 + */ + LinkPort?: number; +} +/** + * ModifyUEcBandwidth - 修改节点带宽限制 + */ +export interface ModifyUEcBandwidthRequest { + /** + * 节点Id + */ + NodeId: string; + /** + * 节点带宽限制,单位Mbs + */ + NetLimit: string; +} +/** + * ModifyUEcBandwidth - 修改节点带宽限制 + */ +export interface ModifyUEcBandwidthResponse { +} +/** + * ModifyUEcHolderName - 修改容器组名称 + */ +export interface ModifyUEcHolderNameRequest { + /** + * 容器组资源id + */ + ResourceId: string; + /** + * 容器组名称 + */ + Name: string; +} +/** + * ModifyUEcHolderName - 修改容器组名称 + */ +export interface ModifyUEcHolderNameResponse { +} +/** + * ModifyUEcImageName - 修改镜像名称 + */ +export interface ModifyUEcImageNameRequest { + /** + * 镜像ID + */ + ImageId: string; + /** + * 镜像名称 + */ + ImageName: string; + /** + * 镜像描述 + */ + ImageDesc?: string; +} +/** + * ModifyUEcImageName - 修改镜像名称 + */ +export interface ModifyUEcImageNameResponse { +} +/** + * PoweroffUEcVHost - 虚拟机断电 + */ +export interface PoweroffUEcVHostRequest { + /** + * 虚拟机资源ID + */ + NodeId: string[]; +} +/** + * PoweroffUEcVHost - 虚拟机断电 + */ +export interface PoweroffUEcVHostResponse { +} +/** + * ReinstallUEcVHost - 虚拟机重装系统 + */ +export interface ReinstallUEcVHostRequest { + /** + * 虚拟机资源ID + */ + NodeId: string; + /** + * 镜像ID + */ + ImageId: string; + /** + * 是否保留数据盘数据, 0-不保留,1-保留,默认为1 + */ + KeepData?: number; + /** + * 节点密码 + */ + Password?: string; + /** + * 系统盘大小,单位GB + */ + SysDiskSize?: number; +} +/** + * ReinstallUEcVHost - 虚拟机重装系统 + */ +export interface ReinstallUEcVHostResponse { +} +/** + * RestartUEcHolder - 重启容器组 + */ +export interface RestartUEcHolderRequest { + /** + * 容器组资源id,n为0,1,2... + */ + ResourceId: string[]; +} +/** + * RestartUEcHolder - 重启容器组 + */ +export interface RestartUEcHolderResponse { +} +/** + * RestartUEcVHost - 重启虚拟机v2.0 + */ +export interface RestartUEcVHostRequest { + /** + * 节点id + */ + NodeId: string[]; +} +/** + * RestartUEcVHost - 重启虚拟机v2.0 + */ +export interface RestartUEcVHostResponse { +} +/** + * StartUEcVHost - 启动UEC虚拟机 + */ +export interface StartUEcVHostRequest { + /** + * 虚拟机资源ID + */ + NodeId: string[]; +} +/** + * StartUEcVHost - 启动UEC虚拟机 + */ +export interface StartUEcVHostResponse { +} +/** + * StopUEcVHost - 停止UEC虚拟机 + */ +export interface StopUEcVHostRequest { + /** + * 虚拟机资源ID + */ + NodeId: string[]; +} +/** + * StopUEcVHost - 停止UEC虚拟机 + */ +export interface StopUEcVHostResponse { +} +/** + * UnBindUEcFirewall - 解绑防火墙 + */ +export interface UnBindUEcFirewallRequest { + /** + * 防火墙Id + */ + FirewallId: string; + /** + * 节点Id或容器组资源id + */ + ResourceId: string; +} +/** + * UnBindUEcFirewall - 解绑防火墙 + */ +export interface UnBindUEcFirewallResponse { +} +/** + * UpdateUEcFirewall - 更新防火墙信息,新增和删除规则 + */ +export interface UpdateUEcFirewallRequest { + /** + * 防火墙Id + */ + FirewallId: string; + /** + * + */ + Rule?: { + /** + * 协议,可选值:TCP,UDP,ICMP + */ + ProtocolType: string; + /** + * 端口,范围用"-"符号分隔,如:1-65535 + */ + Port: string; + /** + * 源ip + */ + SrcIp: string; + /** + * ACCEPT(接受)和DROP(拒绝) + */ + Action: string; + /** + * 优先级:HIGH(高),MEDIUM(中),LOW(低) + */ + Priority: string; + /** + * 备注 + */ + Remark: string; + }[]; +} +/** + * UpdateUEcFirewall - 更新防火墙信息,新增和删除规则 + */ +export interface UpdateUEcFirewallResponse { +} +/** + * UpdateUEcFirewallAttribute - 更新防火墙名称及描述 + */ +export interface UpdateUEcFirewallAttributeRequest { + /** + * 防火墙Id + */ + FirewallId: string; + /** + * 防火墙名称 + */ + Name?: string; + /** + * 描述 + */ + Remark?: string; +} +/** + * UpdateUEcFirewallAttribute - 更新防火墙名称及描述 + */ +export interface UpdateUEcFirewallAttributeResponse { +} +/** + * UpdateUEcSubnet - 更新子网信息 + */ +export interface UpdateUEcSubnetRequest { + /** + * 子网ID + */ + SubnetId: string; + /** + * 子网名称 + */ + SubnetName?: string; + /** + * 备注 + */ + Comment?: string; +} +/** + * UpdateUEcSubnet - 更新子网信息 + */ +export interface UpdateUEcSubnetResponse { +} diff --git a/lib/services/uec/index.js b/lib/services/uec/index.js new file mode 100644 index 0000000..8001a52 --- /dev/null +++ b/lib/services/uec/index.js @@ -0,0 +1,385 @@ +"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 **uec** service + */ +class UECClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * BindUEcFirewall - 绑定防火墙,应用防火墙规则 + * + * See also: https://docs.ucloud.cn/api/uec-api/bind_u_ec_firewall + */ + bindUEcFirewall(request) { + const args = Object.assign({ Action: 'BindUEcFirewall' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUEcFirewall - 创建外网防火墙 + * + * See also: https://docs.ucloud.cn/api/uec-api/create_u_ec_firewall + */ + createUEcFirewall(request) { + const args = Object.assign({ Action: 'CreateUEcFirewall' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUEcHolder - 创建容器组 + * + * See also: https://docs.ucloud.cn/api/uec-api/create_u_ec_holder + */ + createUEcHolder(request) { + const args = Object.assign({ Action: 'CreateUEcHolder' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUEcSubnet - 创建子网 + * + * See also: https://docs.ucloud.cn/api/uec-api/create_u_ec_subnet + */ + createUEcSubnet(request) { + const args = Object.assign({ Action: 'CreateUEcSubnet' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUEcVHost - 创建虚拟机v2.0 + * + * See also: https://docs.ucloud.cn/api/uec-api/create_u_ec_v_host + */ + createUEcVHost(request) { + const args = Object.assign({ Action: 'CreateUEcVHost' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUEcCustomImage - 删除UEDN客户自定义镜像 + * + * See also: https://docs.ucloud.cn/api/uec-api/delete_u_ec_custom_image + */ + deleteUEcCustomImage(request) { + const args = Object.assign({ Action: 'DeleteUEcCustomImage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUEcHolder - 删除容器组 + * + * See also: https://docs.ucloud.cn/api/uec-api/delete_u_ec_holder + */ + deleteUEcHolder(request) { + const args = Object.assign({ Action: 'DeleteUEcHolder' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUEcSubnet - 删除子网 + * + * See also: https://docs.ucloud.cn/api/uec-api/delete_u_ec_subnet + */ + deleteUEcSubnet(request) { + const args = Object.assign({ Action: 'DeleteUEcSubnet' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUEcVHost - 删除vhost虚拟机 v2.0 + * + * See also: https://docs.ucloud.cn/api/uec-api/delete_u_ec_v_host + */ + deleteUEcVHost(request) { + const args = Object.assign({ Action: 'DeleteUEcVHost' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUEcFirewall - 获取防火墙信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_firewall + */ + describeUEcFirewall(request) { + const args = Object.assign({ Action: 'DescribeUEcFirewall' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUEcFirewallResource - 防火墙绑定的资源列表 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_firewall_resource + */ + describeUEcFirewallResource(request) { + const args = Object.assign({ Action: 'DescribeUEcFirewallResource' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUEcHolder - 获得容器组信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_holder + */ + describeUEcHolder(request) { + const args = Object.assign({ Action: 'DescribeUEcHolder' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUEcHolderIDC - 获取容器组机房信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_holder_idc + */ + describeUEcHolderIDC(request) { + const args = Object.assign({ Action: 'DescribeUEcHolderIDC' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUEcIDC - 获取IDC机房列表 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_idc + */ + describeUEcIDC(request) { + const args = Object.assign({ Action: 'DescribeUEcIDC' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUEcSubnet - 获取子网列表 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_subnet + */ + describeUEcSubnet(request) { + const args = Object.assign({ Action: 'DescribeUEcSubnet' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUEcVHost - 获取虚拟机列表 2.0 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_v_host + */ + describeUEcVHost(request) { + const args = Object.assign({ Action: 'DescribeUEcVHost' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUEcVHostISP - 获取虚拟机运营商信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_v_host_isp + */ + describeUEcVHostISP(request) { + const args = Object.assign({ Action: 'DescribeUEcVHostISP' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUEcHolderLog - 获取单个容器日志 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_holder_log + */ + getUEcHolderLog(request) { + const args = Object.assign({ Action: 'GetUEcHolderLog' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUEcHolderMetrics - 获取容器(CPU利用率,带宽,内存)数据 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_holder_metrics + */ + getUEcHolderMetrics(request) { + const args = Object.assign({ Action: 'GetUEcHolderMetrics' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUEcIDCCutInfo - 获取机房割接信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_idc_cut_info + */ + getUEcIDCCutInfo(request) { + const args = Object.assign({ Action: 'GetUEcIDCCutInfo' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUEcIDCVHostData - 获取机房虚拟机监控数据 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_idcv_host_data + */ + getUEcIDCVHostData(request) { + const args = Object.assign({ Action: 'GetUEcIDCVHostData' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUEcImage - uec2.0 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_image + */ + getUEcImage(request) { + const args = Object.assign({ Action: 'GetUEcImage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUEcPodPrice - 获得容器组价格 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_pod_price + */ + getUEcPodPrice(request) { + const args = Object.assign({ Action: 'GetUEcPodPrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUEcUpgradePrice - 获取虚拟机调整差价 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_upgrade_price + */ + getUEcUpgradePrice(request) { + const args = Object.assign({ Action: 'GetUEcUpgradePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUEcVHostData - 获取虚拟机监控数据 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_v_host_data + */ + getUEcVHostData(request) { + const args = Object.assign({ Action: 'GetUEcVHostData' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUEcVHostPrice - 获取虚拟机价格 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_v_host_price + */ + getUEcVHostPrice(request) { + const args = Object.assign({ Action: 'GetUEcVHostPrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ImportUEcCustomImage - 导入自定义镜像 + * + * See also: https://docs.ucloud.cn/api/uec-api/import_u_ec_custom_image + */ + importUEcCustomImage(request) { + const args = Object.assign({ Action: 'ImportUEcCustomImage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * LoginUEcDocker - 登录容器 + * + * See also: https://docs.ucloud.cn/api/uec-api/login_u_ec_docker + */ + loginUEcDocker(request) { + const args = Object.assign({ Action: 'LoginUEcDocker' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyUEcBandwidth - 修改节点带宽限制 + * + * See also: https://docs.ucloud.cn/api/uec-api/modify_u_ec_bandwidth + */ + modifyUEcBandwidth(request) { + const args = Object.assign({ Action: 'ModifyUEcBandwidth' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyUEcHolderName - 修改容器组名称 + * + * See also: https://docs.ucloud.cn/api/uec-api/modify_u_ec_holder_name + */ + modifyUEcHolderName(request) { + const args = Object.assign({ Action: 'ModifyUEcHolderName' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyUEcImageName - 修改镜像名称 + * + * See also: https://docs.ucloud.cn/api/uec-api/modify_u_ec_image_name + */ + modifyUEcImageName(request) { + const args = Object.assign({ Action: 'ModifyUEcImageName' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * PoweroffUEcVHost - 虚拟机断电 + * + * See also: https://docs.ucloud.cn/api/uec-api/poweroff_u_ec_v_host + */ + poweroffUEcVHost(request) { + const args = Object.assign({ Action: 'PoweroffUEcVHost' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ReinstallUEcVHost - 虚拟机重装系统 + * + * See also: https://docs.ucloud.cn/api/uec-api/reinstall_u_ec_v_host + */ + reinstallUEcVHost(request) { + const args = Object.assign({ Action: 'ReinstallUEcVHost' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * RestartUEcHolder - 重启容器组 + * + * See also: https://docs.ucloud.cn/api/uec-api/restart_u_ec_holder + */ + restartUEcHolder(request) { + const args = Object.assign({ Action: 'RestartUEcHolder' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * RestartUEcVHost - 重启虚拟机v2.0 + * + * See also: https://docs.ucloud.cn/api/uec-api/restart_u_ec_v_host + */ + restartUEcVHost(request) { + const args = Object.assign({ Action: 'RestartUEcVHost' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * StartUEcVHost - 启动UEC虚拟机 + * + * See also: https://docs.ucloud.cn/api/uec-api/start_u_ec_v_host + */ + startUEcVHost(request) { + const args = Object.assign({ Action: 'StartUEcVHost' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * StopUEcVHost - 停止UEC虚拟机 + * + * See also: https://docs.ucloud.cn/api/uec-api/stop_u_ec_v_host + */ + stopUEcVHost(request) { + const args = Object.assign({ Action: 'StopUEcVHost' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UnBindUEcFirewall - 解绑防火墙 + * + * See also: https://docs.ucloud.cn/api/uec-api/un_bind_u_ec_firewall + */ + unBindUEcFirewall(request) { + const args = Object.assign({ Action: 'UnBindUEcFirewall' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateUEcFirewall - 更新防火墙信息,新增和删除规则 + * + * See also: https://docs.ucloud.cn/api/uec-api/update_u_ec_firewall + */ + updateUEcFirewall(request) { + const args = Object.assign({ Action: 'UpdateUEcFirewall' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateUEcFirewallAttribute - 更新防火墙名称及描述 + * + * See also: https://docs.ucloud.cn/api/uec-api/update_u_ec_firewall_attribute + */ + updateUEcFirewallAttribute(request) { + const args = Object.assign({ Action: 'UpdateUEcFirewallAttribute' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateUEcSubnet - 更新子网信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/update_u_ec_subnet + */ + updateUEcSubnet(request) { + const args = Object.assign({ Action: 'UpdateUEcSubnet' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = UECClient; diff --git a/lib/services/ufile/index.d.ts b/lib/services/ufile/index.d.ts new file mode 100644 index 0000000..9e1a74e --- /dev/null +++ b/lib/services/ufile/index.d.ts @@ -0,0 +1,572 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **ufile** service + */ +export default class UFileClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * CreateBucket - 创建Bucket + * + * See also: https://docs.ucloud.cn/api/ufile-api/create_bucket + */ + createBucket(request?: CreateBucketRequest): Promise; + /** + * CreateUFileToken - 创建US3令牌 + * + * See also: https://docs.ucloud.cn/api/ufile-api/create_ufile_token + */ + createUFileToken(request?: CreateUFileTokenRequest): Promise; + /** + * DeleteBucket - 删除Bucket + * + * See also: https://docs.ucloud.cn/api/ufile-api/delete_bucket + */ + deleteBucket(request?: DeleteBucketRequest): Promise; + /** + * DeleteUFileToken - 删除令牌 + * + * See also: https://docs.ucloud.cn/api/ufile-api/delete_ufile_token + */ + deleteUFileToken(request?: DeleteUFileTokenRequest): Promise; + /** + * DescribeBucket - 获取Bucket的描述信息 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_bucket + */ + describeBucket(request?: DescribeBucketRequest): Promise; + /** + * DescribeUFileToken - 获取令牌信息 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_token + */ + describeUFileToken(request?: DescribeUFileTokenRequest): Promise; + /** + * GetUFileQuota - 查看配额状态 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_quota + */ + getUFileQuota(request?: GetUFileQuotaRequest): Promise; + /** + * GetUFileQuotaInfo - 获取配额信息 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_quota_info + */ + getUFileQuotaInfo(request?: GetUFileQuotaInfoRequest): Promise; + /** + * GetUFileQuotaPrice - 根据US3的购买配额,查询需要支付的价格。 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_quota_price + */ + getUFileQuotaPrice(request?: GetUFileQuotaPriceRequest): Promise; + /** + * GetUFileReport - 查看配额使用报表 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_report + */ + getUFileReport(request?: GetUFileReportRequest): Promise; + /** + * SetUFileReferer - 设置对象存储防盗链 + * + * See also: https://docs.ucloud.cn/api/ufile-api/set_ufile_referer + */ + setUFileReferer(request?: SetUFileRefererRequest): Promise; + /** + * UpdateBucket - 更改Bucket的属性 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_bucket + */ + updateBucket(request?: UpdateBucketRequest): Promise; + /** + * UpdateUFileToken - 更新令牌的操作权限,可操作key的前缀,可操作bucket和令牌超时时间点 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_ufile_token + */ + updateUFileToken(request?: UpdateUFileTokenRequest): Promise; +} +/** + * CreateBucket - 创建Bucket + */ +export interface CreateBucketRequest { + /** + * 待创建Bucket的名称,具有全局唯一性 + */ + BucketName: string; + /** + * Bucket访问类型,public或private; 默认为private + */ + Type?: string; +} +/** + * CreateBucket - 创建Bucket + */ +export interface CreateBucketResponse { + /** + * 已创建Bucket的名称 + */ + BucketName?: string; + /** + * 已创建Bucket的ID + */ + BucketId?: string; +} +/** + * CreateUFileToken - 创建US3令牌 + */ +export interface CreateUFileTokenRequest { + /** + * 令牌名称 + */ + TokenName: string; + /** + * 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ]。默认TOKEN_ALLOW_NONE + */ + AllowedOps?: string[]; + /** + * 令牌允许操作的key前缀,默认*表示全部 + */ + AllowedPrefixes?: string[]; + /** + * 令牌允许操作的bucket,默认*表示全部 + */ + AllowedBuckets?: string[]; + /** + * Unix 时间戳,精确到秒,为令牌过期时间点。默认过期时间为一天(即当前Unix时间戳+86400);注意:过期时间不能超过 4102416000 + */ + ExpireTime?: number; +} +/** + * CreateUFileToken - 创建US3令牌 + */ +export interface CreateUFileTokenResponse { + /** + * 创建令牌的token_id + */ + TokenId?: string; +} +/** + * DeleteBucket - 删除Bucket + */ +export interface DeleteBucketRequest { + /** + * 待删除Bucket的名称 + */ + BucketName: string; +} +/** + * DeleteBucket - 删除Bucket + */ +export interface DeleteBucketResponse { + /** + * Bucket的名称 + */ + BucketName?: string; + /** + * Bucket的ID + */ + BucketId?: string; +} +/** + * DeleteUFileToken - 删除令牌 + */ +export interface DeleteUFileTokenRequest { + /** + * 令牌ID + */ + TokenId: string; +} +/** + * DeleteUFileToken - 删除令牌 + */ +export interface DeleteUFileTokenResponse { +} +/** + * DescribeBucket - 获取Bucket的描述信息 + */ +export interface DescribeBucketRequest { + /** + * 待获取Bucket的名称,若不提供,则获取所有Bucket + */ + BucketName?: string; + /** + * 获取所有Bucket列表的偏移数目,默认为0 + */ + Offset?: number; + /** + * 获取所有Bucket列表的限制数目,默认为20 + */ + Limit?: number; +} +/** + * DescribeBucket - 获取Bucket的描述信息 + */ +export interface DescribeBucketResponse { + /** + * Bucket的描述信息 参数见 UFileBucketSet + */ + DataSet?: { + /** + * Bucket所属地域 + */ + Region?: string; + /** + * Bucket名称 + */ + BucketName?: string; + /** + * Bucket的ID + */ + BucketId?: string; + /** + * Bucket的域名集合 参数见 UFileDomainSet + */ + Domain?: { + /** + * 源站域名 + */ + Src?: string[]; + /** + * UCDN加速域名 + */ + Cdn?: string[]; + /** + * 用户自定义源站域名 + */ + CustomSrc?: string[]; + /** + * 用户自定义CDN加速域名 + */ + CustomCdn?: string[]; + }; + /** + * 与Bucket关联的CND加速域名的ID列表 + */ + CdnDomainId?: string[]; + /** + * Bucket访问类型 + */ + Type?: string; + /** + * Bucket的创建时间 + */ + CreateTime?: number; + /** + * Bucket的修改时间 + */ + ModifyTime?: number; + /** + * Bucket所属业务, general或vod或udb general: 普通业务; vod: 视频云业务; udb: 云数据库业务 + */ + Biz?: string; + /** + * 所属业务组 + */ + Tag?: string; + /** + * 是否存在自定义域名。0不存在,1存在,2错误 + */ + HasUserDomain?: number; + }[]; +} +/** + * DescribeUFileToken - 获取令牌信息 + */ +export interface DescribeUFileTokenRequest { + /** + * 令牌ID,只返回指定ID信息,否则拉取所有令牌 + */ + TokenId?: string; + /** + * 令牌名称,只返回指定令牌名称信息,否则拉取所有令牌 + */ + TokenName?: string; + /** + * 0表示显示部分token信息;不传递和其他情况表示显示全部token信息 + */ + Display?: number; +} +/** + * DescribeUFileToken - 获取令牌信息 + */ +export interface DescribeUFileTokenResponse { + /** + * 令牌描述信息 + */ + DataSet: { + /** + * 令牌ID + */ + TokenId: string; + /** + * 令牌名称 + */ + TokenName: string; + /** + * 令牌公钥 + */ + PublicKey: string; + /** + * 令牌私钥 + */ + PrivateKey: string; + /** + * 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ] + */ + AllowedOps: string[]; + /** + * 令牌允许操作的key前缀 + */ + AllowedPrefixes: string[]; + /** + * 令牌允许操作的bucket + */ + AllowedBuckets: string[]; + /** + * 令牌的超时时间点 + */ + ExpireTime: number; + /** + * 创建时间 + */ + CreateTime: number; + /** + * 修改时间 + */ + ModifyTime: number; + /** + * 所属地区 + */ + Region: string; + }[]; +} +/** + * GetUFileQuota - 查看配额状态 + */ +export interface GetUFileQuotaRequest { + /** + * 配额类型,取值为storage-volume, download-traffic或request-count + */ + QuotaType: string; +} +/** + * GetUFileQuota - 查看配额状态 + */ +export interface GetUFileQuotaResponse { + /** + * 剩余的配额数值 + */ + LeftQuota?: number; +} +/** + * GetUFileQuotaInfo - 获取配额信息 + */ +export interface GetUFileQuotaInfoRequest { + /** + * 配额类型,取值为storage-volume, download-traffic或request-count + */ + QuotaType: string[]; +} +/** + * GetUFileQuotaInfo - 获取配额信息 + */ +export interface GetUFileQuotaInfoResponse { + /** + * 配额信息数据集 + */ + DataSet?: { + /** + * 可用地域 + */ + Region?: string; + /** + * 是否欠费:1表示欠费;0表示未欠费 + */ + Owe?: number; + /** + * 剩余存储容量 + */ + Storage?: { + /** + * 配额剩余量 + */ + Left?: number; + }; + /** + * 剩余下载流量 + */ + DownloadFlow?: { + /** + * 配额剩余量 + */ + Left?: number; + }; + /** + * 剩余请求次数 + */ + RequestCnt?: { + /** + * 配额剩余量 + */ + Left?: number; + }; + }[]; +} +/** + * GetUFileQuotaPrice - 根据US3的购买配额,查询需要支付的价格。 + */ +export interface GetUFileQuotaPriceRequest { + /** + * 存储容量,单位: GB*天,范围: [0, 30 000 000],步长:100GB*天 + */ + StorageVolume?: number; + /** + * 下载流量,单位: GB,范围: [0, 60 000],步长:1GB + */ + DownloadTraffic?: number; + /** + * 请求次数,单位:万次,范围:[0, 1 000 000],步长:1万次 + */ + RequestCount?: number; +} +/** + * GetUFileQuotaPrice - 根据US3的购买配额,查询需要支付的价格。 + */ +export interface GetUFileQuotaPriceResponse { + /** + * 待支付价格,单位:分 + */ + Price?: number; +} +/** + * GetUFileReport - 查看配额使用报表 + */ +export interface GetUFileReportRequest { + /** + * 查询开始时间 + */ + StartTime: number; + /** + * 查询结束时间 + */ + EndTime: number; +} +/** + * GetUFileReport - 查看配额使用报表 + */ +export interface GetUFileReportResponse { + /** + * 报表内容 参数见 UFileReportSet + */ + DataSet?: { + /** + * 配额消费时间,unix时间戳,精确到日期 + */ + Time?: number; + /** + * 配额消费当日使用的存储容量,单位:GB*天 + */ + StorageVolume?: number; + /** + * 配额消费当日使用的下载流量,单位:GB + */ + DownloadTraffic?: number; + /** + * 配额消费当日使用的请求次数,单位:万次 + */ + RequestCount?: number; + }[]; +} +/** + * SetUFileReferer - 设置对象存储防盗链 + */ +export interface SetUFileRefererRequest { + /** + * 存储空间名称 + */ + BucketName: string; + /** + * 开启关闭referer防盗链;关闭防盗链会清空防盗链参数设置,开启防盗链必须指定 RefererType、Referers;开启:on, 关闭:off; + */ + RefererStatus: string; + /** + * RefererType为白名单时,RefererAllowNull为false代表不允许空referer访问,为true代表允许空referer访问;此参数默认为 true; + */ + RefererAllowNull?: boolean; + /** + * 防盗链Referer类型,支持两种类型,黑名单和白名单; 1黑名单,2白名单;RefererStatus为"on"时此参数必填; + */ + RefererType?: number; + /** + * 防盗链Referer规则,支持正则表达式(不支持符号';') + */ + Referers?: string[]; +} +/** + * SetUFileReferer - 设置对象存储防盗链 + */ +export interface SetUFileRefererResponse { +} +/** + * UpdateBucket - 更改Bucket的属性 + */ +export interface UpdateBucketRequest { + /** + * 待修改Bucket的名称 + */ + BucketName: string; + /** + * Bucket访问类型;public或private + */ + Type: string; +} +/** + * UpdateBucket - 更改Bucket的属性 + */ +export interface UpdateBucketResponse { + /** + * Bucket的名称 + */ + BucketName?: string; + /** + * Bucket的ID + */ + BucketId?: string; +} +/** + * UpdateUFileToken - 更新令牌的操作权限,可操作key的前缀,可操作bucket和令牌超时时间点 + */ +export interface UpdateUFileTokenRequest { + /** + * 令牌ID + */ + TokenId: string; + /** + * 令牌名称 + */ + TokenName?: string; + /** + * 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ] + */ + AllowedOps?: string[]; + /** + * 令牌允许操作的key前缀 + */ + AllowedPrefixes?: string[]; + /** + * 令牌允许操作的bucket + */ + AllowedBuckets?: string[]; + /** + * 令牌的超时时间点(时间戳);注意:过期时间不能超过 4102416000 + */ + ExpireTime?: number; +} +/** + * UpdateUFileToken - 更新令牌的操作权限,可操作key的前缀,可操作bucket和令牌超时时间点 + */ +export interface UpdateUFileTokenResponse { +} diff --git a/lib/services/ufile/index.js b/lib/services/ufile/index.js new file mode 100644 index 0000000..fbce6e0 --- /dev/null +++ b/lib/services/ufile/index.js @@ -0,0 +1,133 @@ +"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 **ufile** service + */ +class UFileClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * CreateBucket - 创建Bucket + * + * See also: https://docs.ucloud.cn/api/ufile-api/create_bucket + */ + createBucket(request) { + const args = Object.assign({ Action: 'CreateBucket' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUFileToken - 创建US3令牌 + * + * See also: https://docs.ucloud.cn/api/ufile-api/create_ufile_token + */ + createUFileToken(request) { + const args = Object.assign({ Action: 'CreateUFileToken' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteBucket - 删除Bucket + * + * See also: https://docs.ucloud.cn/api/ufile-api/delete_bucket + */ + deleteBucket(request) { + const args = Object.assign({ Action: 'DeleteBucket' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUFileToken - 删除令牌 + * + * See also: https://docs.ucloud.cn/api/ufile-api/delete_ufile_token + */ + deleteUFileToken(request) { + const args = Object.assign({ Action: 'DeleteUFileToken' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeBucket - 获取Bucket的描述信息 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_bucket + */ + describeBucket(request) { + const args = Object.assign({ Action: 'DescribeBucket' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUFileToken - 获取令牌信息 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_token + */ + describeUFileToken(request) { + const args = Object.assign({ Action: 'DescribeUFileToken' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUFileQuota - 查看配额状态 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_quota + */ + getUFileQuota(request) { + const args = Object.assign({ Action: 'GetUFileQuota' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUFileQuotaInfo - 获取配额信息 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_quota_info + */ + getUFileQuotaInfo(request) { + const args = Object.assign({ Action: 'GetUFileQuotaInfo' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUFileQuotaPrice - 根据US3的购买配额,查询需要支付的价格。 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_quota_price + */ + getUFileQuotaPrice(request) { + const args = Object.assign({ Action: 'GetUFileQuotaPrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUFileReport - 查看配额使用报表 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_report + */ + getUFileReport(request) { + const args = Object.assign({ Action: 'GetUFileReport' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * SetUFileReferer - 设置对象存储防盗链 + * + * See also: https://docs.ucloud.cn/api/ufile-api/set_ufile_referer + */ + setUFileReferer(request) { + const args = Object.assign({ Action: 'SetUFileReferer' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateBucket - 更改Bucket的属性 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_bucket + */ + updateBucket(request) { + const args = Object.assign({ Action: 'UpdateBucket' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateUFileToken - 更新令牌的操作权限,可操作key的前缀,可操作bucket和令牌超时时间点 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_ufile_token + */ + updateUFileToken(request) { + const args = Object.assign({ Action: 'UpdateUFileToken' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = UFileClient; diff --git a/lib/services/ufs/index.d.ts b/lib/services/ufs/index.d.ts new file mode 100644 index 0000000..f5416f0 --- /dev/null +++ b/lib/services/ufs/index.d.ts @@ -0,0 +1,209 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **ufs** service + */ +export default class UFSClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * CreateUFSVolume - 创建文件系统 + * + * See also: https://docs.ucloud.cn/api/ufs-api/create_ufs_volume + */ + createUFSVolume(request?: CreateUFSVolumeRequest): Promise; + /** + * DescribeUFSVolume2 - 获取文件系统列表 + * + * See also: https://docs.ucloud.cn/api/ufs-api/describe_ufs_volume2 + */ + describeUFSVolume2(request?: DescribeUFSVolume2Request): Promise; + /** + * ExtendUFSVolume - 文件系统扩容 + * + * See also: https://docs.ucloud.cn/api/ufs-api/extend_ufs_volume + */ + extendUFSVolume(request?: ExtendUFSVolumeRequest): Promise; + /** + * RemoveUFSVolume - 删除UFS文件系统 + * + * See also: https://docs.ucloud.cn/api/ufs-api/remove_ufs_volume + */ + removeUFSVolume(request?: RemoveUFSVolumeRequest): Promise; +} +/** + * CreateUFSVolume - 创建文件系统 + */ +export interface CreateUFSVolumeRequest { + /** + * 文件系统大小,单位为GB,最大不超过20T,香港容量型必须为100的整数倍,Size最小为500GB,北京,上海,广州的容量型必须为1024的整数倍,Size最小为1024GB。性能型文件系统Size最小为100GB + */ + Size: number; + /** + * 文件系统存储类型,枚举值,Basic表示容量型,Advanced表示性能型 + */ + StorageType: string; + /** + * 文件系统协议,枚举值,NFSv3表示NFS V3协议,NFSv4表示NFS V4协议 + */ + ProtocolType: string; + /** + * 文件系统名称 + */ + VolumeName?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 文件系统所属业务组 + */ + Tag?: string; + /** + * 计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限); Trial,试用(需开启权限) 默认为Dynamic + */ + ChargeType?: string; + /** + * 购买时长 默认: 1 + */ + Quantity?: number; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * CreateUFSVolume - 创建文件系统 + */ +export interface CreateUFSVolumeResponse { + /** + * 文件系统名称 + */ + VolumeName: string; + /** + * 文件系统ID + */ + VolumeId: string; + /** + * 文件系统挂载点状态 + */ + VolumeStatus: string; +} +/** + * DescribeUFSVolume2 - 获取文件系统列表 + */ +export interface DescribeUFSVolume2Request { + /** + * 文件系统ID + */ + VolumeId?: string; + /** + * 文件列表起始 + */ + Offset?: number; + /** + * 文件列表长度 + */ + Limit?: number; +} +/** + * DescribeUFSVolume2 - 获取文件系统列表 + */ +export interface DescribeUFSVolume2Response { + /** + * 文件系统总数 + */ + TotalCount: number; + /** + * 文件系统详细信息列表 + */ + DataSet: { + /** + * 文件系统名称 + */ + VolumeName: string; + /** + * 文件系统ID + */ + VolumeId: string; + /** + * 当前文件系统已创建的挂载点数目 + */ + TotalMountPointNum: number; + /** + * 文件系统允许创建的最大挂载点数目 + */ + MaxMountPointNum: number; + /** + * 文件系统存储类型,枚举值,Basic表示容量型,Advanced表示性能型 + */ + StorageType: string; + /** + * 文件系统协议,枚举值,NFSv3表示NFS V3协议,NFSv4表示NFS V4协议 + */ + ProtocolType: string; + /** + * 文件系统备注信息 + */ + Remark?: string; + /** + * 文件系统所属业务组 + */ + Tag?: string; + /** + * 文件系统创建时间(unix时间戳) + */ + CreateTime?: number; + /** + * 文件系统过期时间(unix时间戳) + */ + ExpiredTime?: number; + /** + * 文件系统大小,单位GB + */ + Size?: number; + /** + * 文件系统当前使用容量,单位GB + */ + UsedSize?: number; + /** + * 是否过期 + */ + IsExpired?: string; + }[]; +} +/** + * ExtendUFSVolume - 文件系统扩容 + */ +export interface ExtendUFSVolumeRequest { + /** + * 文件系统ID + */ + VolumeId: string; + /** + * 文件系统大小,单位为GB,最大不超过20T,香港容量型必须为100的整数倍,Size最小为500GB,北京,上海,广州的容量型必须为1024的整数倍,Size最小为1024GB。性能型文件系统Size最小为100GB + */ + Size: number; +} +/** + * ExtendUFSVolume - 文件系统扩容 + */ +export interface ExtendUFSVolumeResponse { +} +/** + * RemoveUFSVolume - 删除UFS文件系统 + */ +export interface RemoveUFSVolumeRequest { + /** + * 文件系统ID + */ + VolumeId: string; +} +/** + * RemoveUFSVolume - 删除UFS文件系统 + */ +export interface RemoveUFSVolumeResponse { +} diff --git a/lib/services/ufs/index.js b/lib/services/ufs/index.js new file mode 100644 index 0000000..cd657cf --- /dev/null +++ b/lib/services/ufs/index.js @@ -0,0 +1,52 @@ +"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 **ufs** service + */ +class UFSClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * CreateUFSVolume - 创建文件系统 + * + * See also: https://docs.ucloud.cn/api/ufs-api/create_ufs_volume + */ + createUFSVolume(request) { + const args = Object.assign({ Action: 'CreateUFSVolume' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUFSVolume2 - 获取文件系统列表 + * + * See also: https://docs.ucloud.cn/api/ufs-api/describe_ufs_volume2 + */ + describeUFSVolume2(request) { + const args = Object.assign({ Action: 'DescribeUFSVolume2' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ExtendUFSVolume - 文件系统扩容 + * + * See also: https://docs.ucloud.cn/api/ufs-api/extend_ufs_volume + */ + extendUFSVolume(request) { + const args = Object.assign({ Action: 'ExtendUFSVolume' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * RemoveUFSVolume - 删除UFS文件系统 + * + * See also: https://docs.ucloud.cn/api/ufs-api/remove_ufs_volume + */ + removeUFSVolume(request) { + const args = Object.assign({ Action: 'RemoveUFSVolume' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = UFSClient; diff --git a/lib/services/uhost/index.d.ts b/lib/services/uhost/index.d.ts new file mode 100644 index 0000000..21023c9 --- /dev/null +++ b/lib/services/uhost/index.d.ts @@ -0,0 +1,2005 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **uhost** service + */ +export default class UHostClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * CopyCustomImage - 复制自制镜像 + * + * See also: https://docs.ucloud.cn/api/uhost-api/copy_custom_image + */ + copyCustomImage(request?: CopyCustomImageRequest): Promise; + /** + * CreateCustomImage - 从指定UHost实例,生成自定义镜像。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/create_custom_image + */ + createCustomImage(request?: CreateCustomImageRequest): Promise; + /** + * CreateIsolationGroup - 创建硬件隔离组,组内机器严格隔离在不同宿主机上。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/create_isolation_group + */ + createIsolationGroup(request?: CreateIsolationGroupRequest): Promise; + /** + * CreateUHostInstance - 创建UHost实例。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/create_uhost_instance + */ + createUHostInstance(request?: CreateUHostInstanceRequest): Promise; + /** + * CreateUHostKeyPair - 创建主机密钥对信息 + * + * See also: https://docs.ucloud.cn/api/uhost-api/create_uhost_key_pair + */ + createUHostKeyPair(request?: CreateUHostKeyPairRequest): Promise; + /** + * DeleteIsolationGroup - 删除硬件隔离组。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/delete_isolation_group + */ + deleteIsolationGroup(request?: DeleteIsolationGroupRequest): Promise; + /** + * DeleteUHostKeyPairs - 删除一对或者多对密钥对。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/delete_uhost_key_pairs + */ + deleteUHostKeyPairs(request?: DeleteUHostKeyPairsRequest): Promise; + /** + * DescribeImage - 获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/describe_image + */ + describeImage(request?: DescribeImageRequest): Promise; + /** + * DescribeIsolationGroup - 查询硬件隔离组列表。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/describe_isolation_group + */ + describeIsolationGroup(request?: DescribeIsolationGroupRequest): Promise; + /** + * DescribeUHostInstance - 获取主机或主机列表信息,并可根据数据中心,主机ID等参数进行过滤。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/describe_uhost_instance + */ + describeUHostInstance(request?: DescribeUHostInstanceRequest): Promise; + /** + * DescribeUHostKeyPairs - 查询一个或多个密钥对。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/describe_uhost_key_pairs + */ + describeUHostKeyPairs(request?: DescribeUHostKeyPairsRequest): Promise; + /** + * DescribeUHostTags - 获取指定数据中心的业务组列表。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/describe_uhost_tags + */ + describeUHostTags(request?: DescribeUHostTagsRequest): Promise; + /** + * GetAttachedDiskUpgradePrice - 获取挂载磁盘的升级价格 + * + * See also: https://docs.ucloud.cn/api/uhost-api/get_attached_disk_upgrade_price + */ + getAttachedDiskUpgradePrice(request?: GetAttachedDiskUpgradePriceRequest): Promise; + /** + * GetUHostInstancePrice - 根据UHost实例配置,获取UHost实例的价格。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/get_uhost_instance_price + */ + getUHostInstancePrice(request?: GetUHostInstancePriceRequest): Promise; + /** + * GetUHostInstanceVncInfo - 获取指定UHost实例的管理VNC配置详细信息。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/get_uhost_instance_vnc_info + */ + getUHostInstanceVncInfo(request?: GetUHostInstanceVncInfoRequest): Promise; + /** + * GetUHostUpgradePrice - 获取UHost实例升级配置的价格。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/get_uhost_upgrade_price + */ + getUHostUpgradePrice(request?: GetUHostUpgradePriceRequest): Promise; + /** + * ImportCustomImage - 把UFile的镜像文件导入到UHost,生成自定义镜像 + * + * See also: https://docs.ucloud.cn/api/uhost-api/import_custom_image + */ + importCustomImage(request?: ImportCustomImageRequest): Promise; + /** + * ImportUHostKeyPairs - 导入密钥对后,仅保管公钥部分,需自行妥善保存密钥对的私钥部分。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/import_uhost_key_pairs + */ + importUHostKeyPairs(request?: ImportUHostKeyPairsRequest): Promise; + /** + * LeaveIsolationGroup - 移除硬件隔离组中的主机 + * + * See also: https://docs.ucloud.cn/api/uhost-api/leave_isolation_group + */ + leaveIsolationGroup(request?: LeaveIsolationGroupRequest): Promise; + /** + * ModifyUHostIP - 修改云主机内网 IP 地址 + * + * See also: https://docs.ucloud.cn/api/uhost-api/modify_uhost_ip + */ + modifyUHostIP(request?: ModifyUHostIPRequest): Promise; + /** + * ModifyUHostInstanceName - 修改指定UHost实例名称,需要给出数据中心,UHostId,及新的实例名称。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/modify_uhost_instance_name + */ + modifyUHostInstanceName(request?: ModifyUHostInstanceNameRequest): Promise; + /** + * ModifyUHostInstanceRemark - 修改指定UHost实例备注信息。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/modify_uhost_instance_remark + */ + modifyUHostInstanceRemark(request?: ModifyUHostInstanceRemarkRequest): Promise; + /** + * ModifyUHostInstanceTag - 修改指定UHost实例业务组标识。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/modify_uhost_instance_tag + */ + modifyUHostInstanceTag(request?: ModifyUHostInstanceTagRequest): Promise; + /** + * PoweroffUHostInstance - 直接关闭UHost实例电源,无需等待实例正常关闭。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/poweroff_uhost_instance + */ + poweroffUHostInstance(request?: PoweroffUHostInstanceRequest): Promise; + /** + * RebootUHostInstance - 重新启动UHost实例,需要指定数据中心及UHostID两个参数的值。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/reboot_uhost_instance + */ + rebootUHostInstance(request?: RebootUHostInstanceRequest): Promise; + /** + * ReinstallUHostInstance - 重新安装指定UHost实例的操作系统 + * + * See also: https://docs.ucloud.cn/api/uhost-api/reinstall_uhost_instance + */ + reinstallUHostInstance(request?: ReinstallUHostInstanceRequest): Promise; + /** + * ResetUHostInstancePassword - 重置UHost实例的管理员密码。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/reset_uhost_instance_password + */ + resetUHostInstancePassword(request?: ResetUHostInstancePasswordRequest): Promise; + /** + * ResizeAttachedDisk - 修改挂载的磁盘大小,包含系统盘和数据盘 + * + * See also: https://docs.ucloud.cn/api/uhost-api/resize_attached_disk + */ + resizeAttachedDisk(request?: ResizeAttachedDiskRequest): Promise; + /** + * ResizeUHostInstance - 修改指定UHost实例的资源配置,如CPU核心数,内存容量大小,网络增强等。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/resize_uhost_instance + */ + resizeUHostInstance(request?: ResizeUHostInstanceRequest): Promise; + /** + * StartUHostInstance - 启动处于关闭状态的UHost实例,需要指定数据中心及UHostID两个参数的值。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/start_uhost_instance + */ + startUHostInstance(request?: StartUHostInstanceRequest): Promise; + /** + * StopUHostInstance - 指停止处于运行状态的UHost实例,需指定数据中心及UhostID。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/stop_uhost_instance + */ + stopUHostInstance(request?: StopUHostInstanceRequest): Promise; + /** + * TerminateCustomImage - 删除用户自定义镜像 + * + * See also: https://docs.ucloud.cn/api/uhost-api/terminate_custom_image + */ + terminateCustomImage(request?: TerminateCustomImageRequest): Promise; + /** + * TerminateUHostInstance - 删除指定数据中心的UHost实例。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/terminate_uhost_instance + */ + terminateUHostInstance(request?: TerminateUHostInstanceRequest): Promise; + /** + * UpgradeToArkUHostInstance - 普通升级为方舟机型 + * + * See also: https://docs.ucloud.cn/api/uhost-api/upgrade_to_ark_uhost_instance + */ + upgradeToArkUHostInstance(request?: UpgradeToArkUHostInstanceRequest): Promise; +} +/** + * CopyCustomImage - 复制自制镜像 + */ +export interface CopyCustomImageRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 源镜像Id, 参见 DescribeImage + */ + SourceImageId: string; + /** + * 目标项目Id, 参见 GetProjectList + */ + TargetProjectId: string; + /** + * 目标地域,不跨地域不用填 + */ + TargetRegion?: string; + /** + * 目标镜像名称 + */ + TargetImageName?: string; + /** + * 目标镜像描述 + */ + TargetImageDescription?: string; +} +/** + * CopyCustomImage - 复制自制镜像 + */ +export interface CopyCustomImageResponse { + /** + * 目标镜像Id + */ + TargetImageId?: string; +} +/** + * CreateCustomImage - 从指定UHost实例,生成自定义镜像。 + */ +export interface CreateCustomImageRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * 镜像名称 + */ + ImageName: string; + /** + * 镜像描述 + */ + ImageDescription?: string; +} +/** + * CreateCustomImage - 从指定UHost实例,生成自定义镜像。 + */ +export interface CreateCustomImageResponse { + /** + * 镜像Id + */ + ImageId?: string; +} +/** + * CreateIsolationGroup - 创建硬件隔离组,组内机器严格隔离在不同宿主机上。 + */ +export interface CreateIsolationGroupRequest { + /** + * 硬件隔离组名称。请遵照[[api:uhost-api:specification|字段规范]]设定隔离组名称。 + */ + GroupName: string; + /** + * 备注。请遵照[[api:uhost-api:specification|字段规范]]设定隔离组备注。 + */ + Remark?: string; +} +/** + * CreateIsolationGroup - 创建硬件隔离组,组内机器严格隔离在不同宿主机上。 + */ +export interface CreateIsolationGroupResponse { + /** + * 硬件隔离组id + */ + GroupId: string; +} +/** + * CreateUHostInstance - 创建UHost实例。 + */ +export interface CreateUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 镜像ID。 请通过 [DescribeImage](describe_image.html)获取 + */ + ImageId: string; + /** + * + */ + Disks?: { + /** + * 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + */ + IsBoot: string; + /** + * 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + */ + Type: string; + /** + * 磁盘大小,单位GB,必须是10GB的整数倍。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + */ + Size: number; + /** + * 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT(SNAPSHOT模式目前仅在上海C支持),快照 \\当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]],默认值:NONE + */ + BackupType?: string; + /** + * 【功能仅部分可用区开放,详询技术支持】磁盘是否加密。加密:true, 不加密: false加密必须传入对应的的KmsKeyId,默认值false + */ + Encrypted?: boolean; + /** + * 【功能仅部分可用区开放,详询技术支持】kms key id。选择加密盘时必填。 + */ + KmsKeyId?: string; + /** + * 云盘代金券id。不适用于系统盘/本地盘。请通过DescribeCoupon接口查询,或登录用户中心查看 + */ + CouponId?: string; + /** + * 磁盘id,只有云盘系统盘可以有此参数,且该系统盘id必须已经存在 + */ + Id?: string; + }[]; + /** + * 主机登陆模式。密码(默认选项): Password,密钥:KeyPair。 + */ + LoginMode: string; + /** + * UHost密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64UGFzc3dvcmQx。 + */ + Password?: string; + /** + * UHost实例名称。默认:UHost。请遵照[[api:uhost-api:specification|字段规范]]设定实例名称。 + */ + Name?: string; + /** + * 业务组。默认:Default(Default即为未分组)。请遵照[[api:uhost-api:specification|字段规范]]设定业务组。 + */ + Tag?: string; + /** + * 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\Preemptive计费为抢占式实例 \\ 默认为月付 + */ + ChargeType?: string; + /** + * 购买时长。默认:值 1。按小时购买(Dynamic/Postpay)时无需此参数。 月付时,此参数传0,代表购买至月末。 + */ + Quantity?: number; + /** + * 【建议后续不再使用】云主机机型(V1.0),在本字段和字段MachineType中,仅需要其中1个字段即可。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + UHostType?: string; + /** + * 虚拟CPU核数。可选参数:1-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。 + */ + CPU?: number; + /** + * 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192 + */ + Memory?: number; + /** + * GPU类型,枚举值["K80", "P40", "V100", "T4", "T4S","2080Ti","2080Ti-4C","1080Ti"],MachineType为G时必填 + */ + GpuType?: string; + /** + * GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + */ + GPU?: number; + /** + * + */ + VirtualGpu?: { + /** + * 虚拟 GPU 类型,枚举值["vGPU_T4","vGPU_P40","vGPU_V100"] + */ + GpuType?: string; + /** + * 虚拟 GPU 核数,默认 1。注:当前暂时只支持1颗。 + */ + GPU?: number; + }; + /** + * 网络增强特性。枚举值:Normal(默认),不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0(仅支持部分可用区,请参考控制台) + */ + NetCapability?: string; + /** + * 热升级特性。True为开启,False为未开启,默认False。 + */ + HotplugFeature?: boolean; + /** + * VPC ID。默认为当前地域的默认VPC。 + */ + VPCId?: string; + /** + * 子网 ID。默认为当前地域的默认子网。 + */ + SubnetId?: string; + /** + * 【数组】创建云主机时指定内网IP。若不传值,则随机分配当前子网下的IP。调用方式举例:PrivateIp.0=x.x.x.x。当前只支持一个内网IP。 + */ + PrivateIp?: string[]; + /** + * 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + */ + SecurityGroupId?: string; + /** + * 硬件隔离组id。可通过DescribeIsolationGroup获取。 + */ + IsolationGroup?: string; + /** + * 告警模板id,如果传了告警模板id,且告警模板id正确,则绑定告警模板。绑定告警模板失败只会在后台有日志,不会影响创建主机流程,也不会在前端报错。 + */ + AlarmTemplateId?: number; + /** + * 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + MachineType?: string; + /** + * 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto"。 + */ + MinimalCpuPlatform?: string; + /** + * 本次最大创建主机数量,取值范围是[1,100],默认值为1。 + */ + MaxCount?: number; + /** + * + */ + NetworkInterface?: { + /** + * + */ + EIP?: { + /** + * 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式必须指定0M带宽, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] + */ + Bandwidth?: number; + /** + * 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + */ + PayMode?: string; + /** + * 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + */ + ShareBandwidthId?: string; + /** + * + */ + GlobalSSH?: { + /** + * 填写支持SSH访问IP的地区名称,如“洛杉矶”,“新加坡”,“香港”,“东京”,“华盛顿”,“法兰克福”。Area和AreaCode两者必填其中之一。 + */ + Area?: string; + /** + * SSH端口,1-65535且不能使用80,443端口 + */ + Port?: number; + /** + * GlobalSSH的地区编码,格式为区域航空港国际通用代码。Area和AreaCode两者必填其中之一。 + */ + AreaCode?: string; + }; + /** + * 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + */ + OperatorName?: string; + /** + * 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + */ + CouponId?: string; + }; + /** + * + */ + IPv6?: { + /** + * 第N块网卡中IPv6对应的共享带宽id,默认不带外网 + */ + ShareBandwidthId?: string; + /** + * 第N个网卡对应的IPv6地址,默认不分配IPv6,“Auto”自动分配,不为空的其他字符串为实际要分配的IPv6地址 + */ + Address?: string; + }; + /** + * 申请并绑定一个教育网EIP。True为申请并绑定,False为不会申请绑定,默认False。当前只支持具有HPC特性的机型。 + */ + CreateCernetIp?: boolean; + }[]; + /** + * 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码 + */ + UserData?: string; + /** + * 数据盘是否需要自动分区挂载。当镜像支持“Cloud-init”Feature时可填写此字段。取值 >“On” 自动挂载(默认值)> “Off” 不自动挂载。 + */ + AutoDataDiskInit?: string; + /** + * + */ + Volumes?: { + /** + * 存储文件卷类型,当前仅支持[CLOUD_FSX]。 + */ + Type?: string; + /** + * 存储文件卷,当前只用于数据卷,且限于 Windows,默认为 fase。 + */ + IsBoot?: string; + /** + * 存储文件卷大小,单位GB,必须是10GB的整数倍,至少 100GB。 + */ + Size?: number; + /** + * 已有存储文件卷ID,设置了,对应的 Size 可以为 0 GB。 + */ + VolumeId?: string; + /** + * 存储文件卷代金券id。不适用于系统盘/本地盘。请通过DescribeCoupon接口查询,或登录用户中心查看 + */ + CouponId?: string; + }[]; + /** + * KeypairId 密钥对ID,LoginMode为KeyPair时此项必须 + */ + KeyPairId?: string; + /** + * 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 + */ + CouponId?: string; +} +/** + * CreateUHostInstance - 创建UHost实例。 + */ +export interface CreateUHostInstanceResponse { + /** + * UHost实例Id集合 + */ + UHostIds?: string[]; + /** + * 【批量创建不会返回】IP信息 + */ + IPs?: string[]; +} +/** + * CreateUHostKeyPair - 创建主机密钥对信息 + */ +export interface CreateUHostKeyPairRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 密钥对名称。 由字母,数字,符号组成,长度为1-63位。 + */ + KeyPairName: string; +} +/** + * CreateUHostKeyPair - 创建主机密钥对信息 + */ +export interface CreateUHostKeyPairResponse { + /** + * 密钥信息 + */ + KeyPair: { + /** + * 项目ID。 + */ + ProjectId?: string; + /** + * 密钥对ID。 + */ + KeyPairId?: string; + /** + * 密钥对名称。 长度为1~63个英文或中文字符。 + */ + KeyPairName?: string; + /** + * 密钥对指纹。md5(ProjectId|KeyPairId|PublicKey) + */ + KeyPairFingerPrint?: string; + /** + * 密钥对的私钥内容。只有创建接口才会返回。 + */ + PrivateKeyBody?: string; + /** + * 密钥对的创建时间,格式为Unix Timestamp。 + */ + CreateTime?: number; + }; +} +/** + * DeleteIsolationGroup - 删除硬件隔离组。 + */ +export interface DeleteIsolationGroupRequest { + /** + * 硬件隔离组id + */ + GroupId: string; +} +/** + * DeleteIsolationGroup - 删除硬件隔离组。 + */ +export interface DeleteIsolationGroupResponse { + /** + * 硬件隔离组id + */ + GroupId: string; +} +/** + * DeleteUHostKeyPairs - 删除一对或者多对密钥对。 + */ +export interface DeleteUHostKeyPairsRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 密钥对ID,最多支持 100 对。 + */ + KeyPairIds: string[]; +} +/** + * DeleteUHostKeyPairs - 删除一对或者多对密钥对。 + */ +export interface DeleteUHostKeyPairsResponse { +} +/** + * DescribeImage - 获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。 + */ +export interface DescribeImageRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 镜像类型。标准镜像:Base,镜像市场:Business, 自定义镜像:Custom,默认返回所有类型 + */ + ImageType?: string; + /** + * 操作系统类型:Linux, Windows 默认返回所有类型 + */ + OsType?: string; + /** + * 镜像Id + */ + ImageId?: string; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; + /** + * 返回数据长度,默认为20 + */ + Limit?: number; + /** + * 是否返回价格:1返回,0不返回;默认不返回 + */ + PriceSet?: number; +} +/** + * DescribeImage - 获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。 + */ +export interface DescribeImageResponse { + /** + * 满足条件的镜像总数 + */ + TotalCount?: number; + /** + * 镜像列表详见 UHostImageSet + */ + ImageSet?: { + /** + * 可用区,参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 镜像ID + */ + ImageId?: string; + /** + * 镜像名称 + */ + ImageName?: string; + /** + * 操作系统类型:Linux,Windows + */ + OsType?: string; + /** + * 操作系统名称 + */ + OsName?: string; + /** + * 镜像类型 标准镜像:Base, 行业镜像:Business,自定义镜像:Custom + */ + ImageType?: string; + /** + * 特殊状态标识, 目前包含NetEnhnced(网络增强1.0), NetEnhanced_Ultra](网络增强2.0), HotPlug(热升级), CloudInit, IPv6 + */ + Features?: string[]; + /** + * 行业镜像类型(仅行业镜像将返回这个值) + */ + FuncType?: string; + /** + * 集成软件名称(仅行业镜像将返回这个值) + */ + IntegratedSoftware?: string; + /** + * 供应商(仅行业镜像将返回这个值) + */ + Vendor?: string; + /** + * 介绍链接(仅行业镜像将返回这个值) + */ + Links?: string; + /** + * 镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable + */ + State?: string; + /** + * 镜像描述 + */ + ImageDescription?: string; + /** + * 创建时间,格式为Unix时间戳 + */ + CreateTime?: number; + /** + * 镜像大小 + */ + ImageSize?: number; + /** + * 默认值为空'''。当CentOS 7.3/7.4/7.5等镜像会标记为“Broadwell” + */ + MinimalCPU?: string; + }[]; +} +/** + * DescribeIsolationGroup - 查询硬件隔离组列表。 + */ +export interface DescribeIsolationGroupRequest { + /** + * 待查的硬件隔离组id + */ + GroupId?: string; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; + /** + * 返回数据长度,默认为20,最大100 + */ + Limit?: number; +} +/** + * DescribeIsolationGroup - 查询硬件隔离组列表。 + */ +export interface DescribeIsolationGroupResponse { + /** + * 硬件隔离组集合。参见数据结构IsolationGroup。 + */ + IsolationGroupSet?: { + /** + * 硬件隔离组名称 + */ + GroupName?: string; + /** + * 硬件隔离组id + */ + GroupId?: string; + /** + * 每个可用区中的机器数量。参见数据结构SpreadInfo。 + */ + SpreadInfoSet?: { + /** + * 可用区信息 + */ + Zone?: string; + /** + * 当前地域所有可用区中硬件隔离组中云主机的数量,不超过7。 + */ + UHostCount?: number; + }[]; + /** + * 备注 + */ + Remark?: string; + }[]; + /** + * 硬件隔离组总数 + */ + TotalCount?: number; +} +/** + * DescribeUHostInstance - 获取主机或主机列表信息,并可根据数据中心,主机ID等参数进行过滤。 + */ +export interface DescribeUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 【数组】UHost主机的资源ID,例如UHostIds.0代表希望获取信息 的主机1,UHostIds.1代表主机2。 如果不传入,则返回当前Region 所有符合条件的UHost实例。 + */ + UHostIds?: string[]; + /** + * 要查询的业务组名称 + */ + Tag?: string; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; + /** + * 返回数据长度,默认为20,最大100 + */ + Limit?: number; + /** + * 硬件隔离组id。通过硬件隔离组筛选主机。 + */ + IsolationGroup?: string; + /** + * vpc id。通过VPC筛选主机。北京一地域无效。 + */ + VPCId?: string; + /** + * 子网id。通过子网筛选主机。北京一地域无效。 + */ + SubnetId?: string; + /** + * 要挂载的云盘id,过滤返回能被UDiskId挂载的云主机。目前主要针对rssd云盘使用 + */ + UDiskIdForAttachment?: string; +} +/** + * DescribeUHostInstance - 获取主机或主机列表信息,并可根据数据中心,主机ID等参数进行过滤。 + */ +export interface DescribeUHostInstanceResponse { + /** + * UHostInstance总数 + */ + TotalCount: number; + /** + * 云主机实例列表,每项参数可见下面 UHostInstanceSet + */ + UHostSet: { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * true:有ipv6特性;false,没有ipv6特性 + */ + IPv6Feature?: boolean; + /** + * UHost实例ID + */ + UHostId?: string; + /** + * 【建议不再使用】云主机机型(旧)。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + UHostType?: string; + /** + * 云主机机型(新)。参考[[api:uhost-api:uhost_type#主机概念20版本|云主机机型说明]]。 + */ + MachineType?: string; + /** + * 云主机CPU平台。参考[[api:uhost-api:uhost_type#主机概念20版本|云主机机型说明]]。 + */ + CpuPlatform?: string; + /** + * 【建议不再使用】主机磁盘类型。 枚举值为:\\ > LocalDisk,本地磁盘; \\ > UDisk 云盘。\\只要有一块磁盘为本地盘,即返回LocalDisk。 + */ + StorageType?: string; + /** + * 【建议不再使用】主机的系统盘ID。 + */ + ImageId?: string; + /** + * 基础镜像ID(指当前自定义镜像的来源镜像) + */ + BasicImageId?: string; + /** + * 基础镜像名称(指当前自定义镜像的来源镜像) + */ + BasicImageName?: string; + /** + * 业务组名称 + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; + /** + * UHost实例名称 + */ + Name?: string; + /** + * 实例状态,枚举值:\\ >初始化: Initializing; \\ >启动中: Starting; \\> 运行中: Running; \\> 关机中: Stopping; \\ >关机: Stopped \\ >安装失败: Install Fail; \\ >重启中: Rebooting; \\ > 未知(空字符串,获取状态超时或出错):"" + */ + State?: string; + /** + * 创建时间,格式为Unix时间戳 + */ + CreateTime?: number; + /** + * 计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限);Preemptive 为抢占式实例; + */ + ChargeType?: string; + /** + * 到期时间,格式为Unix时间戳 + */ + ExpireTime?: number; + /** + * 虚拟CPU核数,单位: 个 + */ + CPU?: number; + /** + * 内存大小,单位: MB + */ + Memory?: number; + /** + * 是否自动续费,自动续费:“Yes”,不自动续费:“No” + */ + AutoRenew?: string; + /** + * 磁盘信息见 UHostDiskSet + */ + DiskSet?: { + /** + * 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + */ + DiskType: string; + /** + * 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + */ + IsBoot: string; + /** + * "true": 加密盘 "false":非加密盘 + */ + Encrypted?: string; + /** + * 【建议不再使用】磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk + */ + Type?: string; + /** + * 磁盘ID + */ + DiskId?: string; + /** + * UDisk名字(仅当磁盘是UDisk时返回) + */ + Name?: string; + /** + * 磁盘盘符 + */ + Drive?: string; + /** + * 磁盘大小,单位: GB + */ + Size?: number; + /** + * 备份方案。若开通了数据方舟,则为DATAARK + */ + BackupType?: string; + }[]; + /** + * 详细信息见 UHostIPSet + */ + IPSet?: { + /** + * IPv4/IPv6; + */ + IPMode: string; + /** + * 内网 Private 类型下,表示是否为默认网卡。true: 是默认网卡;其他值:不是。 + */ + Default?: string; + /** + * 内网 Private 类型下,当前网卡的Mac。 + */ + Mac?: string; + /** + * 当前EIP的权重。权重最大的为当前的出口IP。 + */ + Weight?: number; + /** + * 国际: Internation,BGP: Bgp,内网: Private + */ + Type?: string; + /** + * 外网IP资源ID 。(内网IP无对应的资源ID) + */ + IPId?: string; + /** + * IP地址 + */ + IP?: string; + /** + * IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) + */ + Bandwidth?: number; + /** + * IP地址对应的VPC ID。(北京一不支持,字段返回为空) + */ + VPCId?: string; + /** + * IP地址对应的子网 ID。(北京一不支持,字段返回为空) + */ + SubnetId?: string; + /** + * 弹性网卡为默认网卡时,返回对应的 ID 值 + */ + NetworkInterfaceId?: string; + }[]; + /** + * 网络增强。Normal: 无;Super: 网络增强1.0; Ultra: 网络增强2.0 + */ + NetCapability?: string; + /** + * 【建议不再使用】网络状态。 连接:Connected, 断开:NotConnected + */ + NetworkState?: string; + /** + * 【建议不再使用】数据方舟模式。枚举值:\\ > Yes: 开启方舟; \\ > no,未开启方舟 + */ + TimemachineFeature?: string; + /** + * true: 开启热升级; false,未开启热升级 + */ + HotplugFeature?: boolean; + /** + * 【建议不再使用】仅北京A的云主机会返回此字段。基础网络模式:Default;子网模式:Private + */ + SubnetType?: string; + /** + * 创建主机的最初来源镜像的操作系统名称(若直接通过基础镜像创建,此处返回和BasicImageName一致) + */ + OsName?: string; + /** + * 操作系统类别。返回"Linux"或者"Windows" + */ + OsType?: string; + /** + * 【建议不再使用】主机系列:N2,表示系列2;N1,表示系列1 + */ + HostType?: string; + /** + * 主机的生命周期类型。目前仅支持Normal:普通; + */ + LifeCycle?: string; + /** + * GPU个数 + */ + GPU?: number; + /** + * 系统盘状态 Normal表示初始化完成;Initializing表示在初始化。仍在初始化的系统盘无法制作镜像。 + */ + BootDiskState?: string; + /** + * 总的数据盘存储空间。 + */ + TotalDiskSpace?: number; + /** + * 隔离组id,不在隔离组则返回"" + */ + IsolationGroup?: string; + /** + * true,支持cloutinit方式初始化;false,不支持 + */ + CloudInitFeature?: boolean; + /** + * RDMA集群id,仅快杰云主机返回该值;其他类型云主机返回""。当云主机的此值与RSSD云盘的RdmaClusterId相同时,RSSD可以挂载到这台云主机。 + */ + RdmaClusterId?: string; + /** + * 仅抢占式实例返回,LowSpeed为低速模式,PowerOff为关机模式 + */ + RestrictMode?: string; + /** + * true: 开启 hpc 系列功能;false: 未开启 + */ + HpcFeature?: boolean; + /** + * 密钥信息见 UHostKeyPair + */ + KeyPair?: { + /** + * 密钥对ID + */ + KeyPairId?: string; + /** + * 主机密钥对状态,Normal 正常,Deleted 删除 + */ + KeyPairState?: string; + }; + }[]; +} +/** + * DescribeUHostKeyPairs - 查询一个或多个密钥对。 + */ +export interface DescribeUHostKeyPairsRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 密钥对名称。 + */ + KeyPairName?: string; + /** + * 密钥对的指纹。 + */ + KeyPairFingerPrint?: string; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; + /** + * 返回数据长度,默认为20,最大100 + */ + Limit?: number; +} +/** + * DescribeUHostKeyPairs - 查询一个或多个密钥对。 + */ +export interface DescribeUHostKeyPairsResponse { + /** + * 密钥对信息集合 + */ + KeyPairs: { + /** + * 项目ID。 + */ + ProjectId?: string; + /** + * 密钥对ID。 + */ + KeyPairId?: string; + /** + * 密钥对名称。 长度为1~63个英文或中文字符。 + */ + KeyPairName?: string; + /** + * 密钥对指纹。md5(ProjectId|KeyPairId|PublicKey) + */ + KeyPairFingerPrint?: string; + /** + * 密钥对的私钥内容。只有创建接口才会返回。 + */ + PrivateKeyBody?: string; + /** + * 密钥对的创建时间,格式为Unix Timestamp。 + */ + CreateTime?: number; + }[]; + /** + * 密钥对总数 + */ + TotalCount: number; +} +/** + * DescribeUHostTags - 获取指定数据中心的业务组列表。 + */ +export interface DescribeUHostTagsRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; +} +/** + * DescribeUHostTags - 获取指定数据中心的业务组列表。 + */ +export interface DescribeUHostTagsResponse { + /** + * 已有主机的业务组总数 + */ + TotalCount?: number; + /** + * 业务组集合见 UHostTagSet + */ + TagSet?: { + /** + * 业务组名称 + */ + Tag?: string; + /** + * 该业务组中包含的主机个数 + */ + TotalCount?: number; + /** + * 可用区 + */ + Zone?: string; + }[]; +} +/** + * GetAttachedDiskUpgradePrice - 获取挂载磁盘的升级价格 + */ +export interface GetAttachedDiskUpgradePriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 磁盘大小,单位GB,步长为10。取值范围需大于当前磁盘大小,最大值请参考[[api:uhost-api:disk_type|磁盘类型]]。 + */ + DiskSpace: number; + /** + * 磁盘ID。参见 [DescribeUHostInstance](describe_uhost_instance.html)返回值中的DiskSet。 + */ + DiskId: string; + /** + * UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。 + */ + UHostId: string; + /** + * 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\> SNAPSHOT(SNAPSHOT模式目前仅在上海C支持),快照 \\ 当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]]。默认值为当前的备份模式。 + */ + BackupMode?: string; +} +/** + * GetAttachedDiskUpgradePrice - 获取挂载磁盘的升级价格 + */ +export interface GetAttachedDiskUpgradePriceResponse { + /** + * 升级差价。精度为小数点后2位。 + */ + Price?: number; +} +/** + * GetUHostInstancePrice - 根据UHost实例配置,获取UHost实例的价格。 + */ +export interface GetUHostInstancePriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * CPU核数。可选参数:1-64。可选范围参照控制台。默认值: 4 + */ + CPU: number; + /** + * 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参照好控制台)。默认值:8192 + */ + Memory: number; + /** + * 购买台数,范围[1,5] + */ + Count: number; + /** + * + */ + Disks?: { + /** + * 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + */ + IsBoot: string; + /** + * 磁盘大小,单位GB。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + */ + Size: number; + /** + * 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + */ + Type: string; + /** + * 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT,快照\\ 当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]] + */ + BackupType?: string; + }[]; + /** + * 镜像Id,可通过 [DescribeImage](describe_image.html) 获取镜像ID, 如果镜像ID不传,系统盘大小必传 + */ + ImageId?: string; + /** + * GPU卡核心数。仅GPU机型支持此字段。 + */ + GPU?: number; + /** + * 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时付费 // >Preemptive 抢占式实例 \\ 如果不传某个枚举值,默认返回年付、月付、时付的价格组合集。 + */ + ChargeType?: string; + /** + * 网络增强。枚举值:Normal,不开启; Super,开启网络增强1.0。 默认值为Normal。 + */ + NetCapability?: string; + /** + * 【待废弃】云主机机型(V1版本概念)。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + UHostType?: string; + /** + * 云主机机型(V2版本概念)。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + MachineType?: string; + /** + * GPU类型,枚举值["K80", "P40", "V100", "T4","T4S","2080Ti","2080Ti-4C","1080Ti"] + */ + GpuType?: string; + /** + * 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + */ + Quantity?: number; + /** + * 取值"Intel" "Amd",默认值“Intel” + */ + CpuPlatform?: string; + /** + * + */ + Volumes?: { + /** + * 存储文件卷类型,当前仅支持[CLOUD_FSX]。请参考[[api:uhost-api:volume_type|卷类型]]。 + */ + Type?: string; + /** + * 存储文件卷大小,单位GB,必须是10GB的整数倍,至少 100GB。 + */ + Size?: number; + /** + * 存储文件卷,当前只用于数据卷,且限于 Windows,默认为 fase。 + */ + IsBoot?: string; + }[]; + /** + * + */ + VirtualGpu?: { + /** + * 虚拟 GPU 类型,枚举值["vGPU_T4","vGPU_P40","vGPU_V100"] + */ + GpuType?: string; + /** + * 虚拟 GPU 核数,默认 1。注:当前暂时只支持1颗。 + */ + GPU?: number; + }; +} +/** + * GetUHostInstancePrice - 根据UHost实例配置,获取UHost实例的价格。 + */ +export interface GetUHostInstancePriceResponse { + /** + * 价格列表 UHostPriceSet + */ + PriceSet?: { + /** + * 计费类型。Year,Month,Dynamic + */ + ChargeType: string; + /** + * 价格,单位: 元,保留小数点后两位有效数字 + */ + Price: number; + /** + * 限时优惠的折前原价(即列表价乘以商务折扣后的单价)。 + */ + OriginalPrice: number; + /** + * 产品列表价。 + */ + ListPrice?: number; + }[]; +} +/** + * GetUHostInstanceVncInfo - 获取指定UHost实例的管理VNC配置详细信息。 + */ +export interface GetUHostInstanceVncInfoRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](./describe_uhost_instance.html) + */ + UHostId: string; +} +/** + * GetUHostInstanceVncInfo - 获取指定UHost实例的管理VNC配置详细信息。 + */ +export interface GetUHostInstanceVncInfoResponse { + /** + * UHost实例ID + */ + UHostId?: string; + /** + * Vnc登录IP + */ + VncIP?: string; + /** + * Vnc登录端口 + */ + VncPort?: number; + /** + * Vnc 登录密码 + */ + VncPassword?: string; +} +/** + * GetUHostUpgradePrice - 获取UHost实例升级配置的价格。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ +export interface GetUHostUpgradePriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。 + */ + UHostId: string; + /** + * 虚拟CPU核数。可选参数:1-64(可选范围参考控制台)。默认值为当前实例的CPU核数。 + */ + CPU?: number; + /** + * 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值为当前实例的内存大小。 + */ + Memory?: number; + /** + * 网卡升降级(1,表示升级,2表示降级,0表示不变) + */ + NetCapValue?: number; +} +/** + * GetUHostUpgradePrice - 获取UHost实例升级配置的价格。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ +export interface GetUHostUpgradePriceResponse { + /** + * 规格调整差价。精确到小数点后2位。 + */ + Price?: number; + /** + * 限时优惠的折前原价 + */ + OriginalPrice?: number; +} +/** + * ImportCustomImage - 把UFile的镜像文件导入到UHost,生成自定义镜像 + */ +export interface ImportCustomImageRequest { + /** + * 镜像名称 + */ + ImageName: string; + /** + * UFile私有空间地址 + */ + UFileUrl: string; + /** + * 操作系统平台,比如CentOS、Ubuntu、Windows、RedHat等,请参考控制台的镜像版本;若导入控制台上没有的操作系统,参数为Other + */ + OsType: string; + /** + * 操作系统详细版本,请参考控制台的镜像版本;OsType为Other时,输入参数为Other + */ + OsName: string; + /** + * 镜像格式,可选RAW、VHD、VMDK、qcow2 + */ + Format: string; + /** + * 是否授权。必须填true + */ + Auth: boolean; + /** + * 镜像描述 + */ + ImageDescription?: string; +} +/** + * ImportCustomImage - 把UFile的镜像文件导入到UHost,生成自定义镜像 + */ +export interface ImportCustomImageResponse { + /** + * 镜像Id + */ + ImageId?: string; +} +/** + * ImportUHostKeyPairs - 导入密钥对后,仅保管公钥部分,需自行妥善保存密钥对的私钥部分。 + */ +export interface ImportUHostKeyPairsRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 密钥对名称。由字母,数字,符号组成,长度为1-63位。 + */ + KeyPairName: string; + /** + * 密钥对的公钥内容。 + */ + PublicKeyBody: string; +} +/** + * ImportUHostKeyPairs - 导入密钥对后,仅保管公钥部分,需自行妥善保存密钥对的私钥部分。 + */ +export interface ImportUHostKeyPairsResponse { + /** + * 密钥对名称 + */ + KeyPairName: string; + /** + * 密钥对标识 + */ + KeyPairId?: string; + /** + * 密钥对指纹。根据RFC4716定义的公钥指纹格式,采用MD5信息摘要算法。算法处理的具体信息格式:`ProjectIdKeyPairId|PublicKeyBody`。 + */ + KeyPairFingerPrint?: string; +} +/** + * LeaveIsolationGroup - 移除硬件隔离组中的主机 + */ +export interface LeaveIsolationGroupRequest { + /** + * 可用区信息 + */ + Zone?: string; + /** + * 硬件隔离组id + */ + GroupId: string; + /** + * 主机id + */ + UHostId: string; +} +/** + * LeaveIsolationGroup - 移除硬件隔离组中的主机 + */ +export interface LeaveIsolationGroupResponse { + /** + * 主机id + */ + UHostId: string; +} +/** + * ModifyUHostIP - 修改云主机内网 IP 地址 + */ +export interface ModifyUHostIPRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 需要修改为的 IP 地址。新的IP地址和旧IP地址必须属于统一子网,且和主机内部的配置文件一致。 + */ + PresentIpAddress: string; + /** + * 指定云主机 ID。 + */ + UHostId: string; + /** + * 所需修改的原 IP 地址 ,当云主机只有一个IP地址时,此参数不必填写。 + */ + PreviousIpAddress?: string; +} +/** + * ModifyUHostIP - 修改云主机内网 IP 地址 + */ +export interface ModifyUHostIPResponse { + /** + * 目标云主机 ID + */ + UHostId?: string; +} +/** + * ModifyUHostInstanceName - 修改指定UHost实例名称,需要给出数据中心,UHostId,及新的实例名称。 + */ +export interface ModifyUHostInstanceNameRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * UHost实例名称 + */ + Name?: string; +} +/** + * ModifyUHostInstanceName - 修改指定UHost实例名称,需要给出数据中心,UHostId,及新的实例名称。 + */ +export interface ModifyUHostInstanceNameResponse { + /** + * UHost实例ID + */ + UHostId?: string; +} +/** + * ModifyUHostInstanceRemark - 修改指定UHost实例备注信息。 + */ +export interface ModifyUHostInstanceRemarkRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * 备注 + */ + Remark?: string; +} +/** + * ModifyUHostInstanceRemark - 修改指定UHost实例备注信息。 + */ +export interface ModifyUHostInstanceRemarkResponse { + /** + * UHost实例ID + */ + UHostId?: string; +} +/** + * ModifyUHostInstanceTag - 修改指定UHost实例业务组标识。 + */ +export interface ModifyUHostInstanceTagRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * 业务组名称 + */ + Tag?: string; +} +/** + * ModifyUHostInstanceTag - 修改指定UHost实例业务组标识。 + */ +export interface ModifyUHostInstanceTagResponse { + /** + * UHost实例ID + */ + UHostId?: string; +} +/** + * PoweroffUHostInstance - 直接关闭UHost实例电源,无需等待实例正常关闭。 + */ +export interface PoweroffUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](./describe_uhost_instance.html) + */ + UHostId: string; +} +/** + * PoweroffUHostInstance - 直接关闭UHost实例电源,无需等待实例正常关闭。 + */ +export interface PoweroffUHostInstanceResponse { + /** + * UHost的实例ID + */ + UHostId?: string; +} +/** + * RebootUHostInstance - 重新启动UHost实例,需要指定数据中心及UHostID两个参数的值。 + */ +export interface RebootUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * 加密盘密码 + */ + DiskPassword?: string; +} +/** + * RebootUHostInstance - 重新启动UHost实例,需要指定数据中心及UHostID两个参数的值。 + */ +export interface RebootUHostInstanceResponse { + /** + * UHost实例ID + */ + UHostId?: string; +} +/** + * ReinstallUHostInstance - 重新安装指定UHost实例的操作系统 + */ +export interface ReinstallUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例资源ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * 如果重装UHost实例时LoginMode为Password,则必须填写,如果LoginMode为KeyPair,不需要填写 (密码格式使用BASE64编码;举例如下:# echo -n Password1 | base64UGFzc3dvcmQx。) + */ + Password?: string; + /** + * 镜像Id,默认使用原镜像 参见 [DescribeImage](describe_image.html) + */ + ImageId?: string; + /** + * 是否保留数据盘,保留:Yes,不报留:No, 默认:Yes;如果是从Windows重装为Linux或反之,则无法保留数据盘(该参数目前仅对本地数据盘起作用) + */ + ReserveDisk?: string; + /** + * 系统盘大小。 单位:GB, 范围[20,100], 步长:10 + */ + BootDiskSpace?: number; + /** + * cloudinit初始化使用。注意:1、总数据量大小不超多16K 2、使用base64编码 + */ + UserData?: string; + /** + * 数据盘是否需要自动分区挂载。当镜像支持Cloud-init Feature时可填写此字段。取值“On”(默认值), “Off” + */ + AutoDataDiskInit?: string; + /** + * 主机登陆模式。密码(默认选项): Password,密钥 KeyPair。 + */ + LoginMode?: string; + /** + * KeypairId 密钥对ID,LoginMode为KeyPair时此项必须。 + */ + KeyPairId?: string; +} +/** + * ReinstallUHostInstance - 重新安装指定UHost实例的操作系统 + */ +export interface ReinstallUHostInstanceResponse { + /** + * UHost实例资源ID + */ + UHostId?: string; +} +/** + * ResetUHostInstancePassword - 重置UHost实例的管理员密码。 + */ +export interface ResetUHostInstancePasswordRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID + */ + UHostId: string; + /** + * UHost新密码(密码格式使用BASE64编码) + */ + Password: string; +} +/** + * ResetUHostInstancePassword - 重置UHost实例的管理员密码。 + */ +export interface ResetUHostInstancePasswordResponse { + /** + * UHost实例ID + */ + UHostId?: string; +} +/** + * ResizeAttachedDisk - 修改挂载的磁盘大小,包含系统盘和数据盘 + */ +export interface ResizeAttachedDiskRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。 + */ + UHostId: string; + /** + * 磁盘大小,单位GB,步长为10。取值范围需大于当前磁盘大小,最大值请参考[[api:uhost-api:disk_type|磁盘类型]]。 + */ + DiskSpace: number; + /** + * 磁盘ID。参见 [DescribeUHostInstance](describe_uhost_instance.html)返回值中的DiskSet。 + */ + DiskId: string; + /** + * 用于测试磁盘是否支持在线扩容。DryRun=true,不会执行实际操作,只会返回操作的预期结果。DryRun = false ,正常执行扩容操作。 + */ + DryRun?: boolean; +} +/** + * ResizeAttachedDisk - 修改挂载的磁盘大小,包含系统盘和数据盘 + */ +export interface ResizeAttachedDiskResponse { + /** + * 改配成功的磁盘id + */ + DiskId?: string; + /** + * 扩容后的状态。NeedRestart = true,必须关闭后启动实例才能使用扩容的磁盘空间。NeedRestart = false,磁盘扩容后无需重启操作。 + */ + NeedRestart?: boolean; +} +/** + * ResizeUHostInstance - 修改指定UHost实例的资源配置,如CPU核心数,内存容量大小,网络增强等。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ +export interface ResizeUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * 虚拟CPU核数。可选参数:1-240(可选范围与UHostType相关)。默认值为当前实例的CPU核数 + */ + CPU?: number; + /** + * 内存大小。单位:MB。范围 :[1024, 1966080],取值为1024的倍数(可选范围与UHostType相关)。默认值为当前实例的内存大小。 + */ + Memory?: number; + /** + * 网卡升降级(1,表示升级,2表示降级,0表示不变) + */ + NetCapValue?: number; +} +/** + * ResizeUHostInstance - 修改指定UHost实例的资源配置,如CPU核心数,内存容量大小,网络增强等。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ +export interface ResizeUHostInstanceResponse { + /** + * UHost实例ID + */ + UHostId?: string; +} +/** + * StartUHostInstance - 启动处于关闭状态的UHost实例,需要指定数据中心及UHostID两个参数的值。 + */ +export interface StartUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * 加密盘密码 + */ + DiskPassword?: string; +} +/** + * StartUHostInstance - 启动处于关闭状态的UHost实例,需要指定数据中心及UHostID两个参数的值。 + */ +export interface StartUHostInstanceResponse { + /** + * UHost实例ID + */ + UHostId?: string; +} +/** + * StopUHostInstance - 指停止处于运行状态的UHost实例,需指定数据中心及UhostID。 + */ +export interface StopUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; +} +/** + * StopUHostInstance - 指停止处于运行状态的UHost实例,需指定数据中心及UhostID。 + */ +export interface StopUHostInstanceResponse { + /** + * UHost实例ID + */ + UHostId?: string; +} +/** + * TerminateCustomImage - 删除用户自定义镜像 + */ +export interface TerminateCustomImageRequest { + /** + * 自制镜像ID 参见 [DescribeImage](describe_image.html) + */ + ImageId: string; +} +/** + * TerminateCustomImage - 删除用户自定义镜像 + */ +export interface TerminateCustomImageResponse { + /** + * 自制镜像Id + */ + ImageId?: string; +} +/** + * TerminateUHostInstance - 删除指定数据中心的UHost实例。 + */ +export interface TerminateUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost资源Id 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * 删除主机时是否释放绑定的EIP。默认为false。 + */ + ReleaseEIP?: boolean; + /** + * 删除主机时是否同时删除挂载的数据盘。默认为false。 + */ + ReleaseUDisk?: boolean; +} +/** + * TerminateUHostInstance - 删除指定数据中心的UHost实例。 + */ +export interface TerminateUHostInstanceResponse { + /** + * 用于判断主机删除时是否进入回收站。放入回收站:"Yes", 彻底删除:“No”。 + */ + InRecycle: string; + /** + * UHost 实例 Id + */ + UHostId?: string; +} +/** + * UpgradeToArkUHostInstance - 普通升级为方舟机型 + */ +export interface UpgradeToArkUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * UHost主机的资源ID,例如UHostIds.0代表希望升级的主机1,UHostIds.1代表主机2。 + */ + UHostIds: string[]; + /** + * 代金券ID 请参考DescribeCoupon接口 + */ + CouponId?: string; +} +/** + * UpgradeToArkUHostInstance - 普通升级为方舟机型 + */ +export interface UpgradeToArkUHostInstanceResponse { + /** + * UHost主机的资源ID数组 + */ + UHostSet?: string[]; +} diff --git a/lib/services/uhost/index.js b/lib/services/uhost/index.js new file mode 100644 index 0000000..225c66c --- /dev/null +++ b/lib/services/uhost/index.js @@ -0,0 +1,322 @@ +"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 **uhost** service + */ +class UHostClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * CopyCustomImage - 复制自制镜像 + * + * See also: https://docs.ucloud.cn/api/uhost-api/copy_custom_image + */ + copyCustomImage(request) { + const args = Object.assign({ Action: 'CopyCustomImage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateCustomImage - 从指定UHost实例,生成自定义镜像。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/create_custom_image + */ + createCustomImage(request) { + const args = Object.assign({ Action: 'CreateCustomImage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateIsolationGroup - 创建硬件隔离组,组内机器严格隔离在不同宿主机上。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/create_isolation_group + */ + createIsolationGroup(request) { + const args = Object.assign({ Action: 'CreateIsolationGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUHostInstance - 创建UHost实例。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/create_uhost_instance + */ + createUHostInstance(request) { + const args = Object.assign({ Action: 'CreateUHostInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUHostKeyPair - 创建主机密钥对信息 + * + * See also: https://docs.ucloud.cn/api/uhost-api/create_uhost_key_pair + */ + createUHostKeyPair(request) { + const args = Object.assign({ Action: 'CreateUHostKeyPair' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteIsolationGroup - 删除硬件隔离组。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/delete_isolation_group + */ + deleteIsolationGroup(request) { + const args = Object.assign({ Action: 'DeleteIsolationGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUHostKeyPairs - 删除一对或者多对密钥对。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/delete_uhost_key_pairs + */ + deleteUHostKeyPairs(request) { + const args = Object.assign({ Action: 'DeleteUHostKeyPairs' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeImage - 获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/describe_image + */ + describeImage(request) { + const args = Object.assign({ Action: 'DescribeImage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeIsolationGroup - 查询硬件隔离组列表。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/describe_isolation_group + */ + describeIsolationGroup(request) { + const args = Object.assign({ Action: 'DescribeIsolationGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUHostInstance - 获取主机或主机列表信息,并可根据数据中心,主机ID等参数进行过滤。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/describe_uhost_instance + */ + describeUHostInstance(request) { + const args = Object.assign({ Action: 'DescribeUHostInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUHostKeyPairs - 查询一个或多个密钥对。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/describe_uhost_key_pairs + */ + describeUHostKeyPairs(request) { + const args = Object.assign({ Action: 'DescribeUHostKeyPairs' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUHostTags - 获取指定数据中心的业务组列表。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/describe_uhost_tags + */ + describeUHostTags(request) { + const args = Object.assign({ Action: 'DescribeUHostTags' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetAttachedDiskUpgradePrice - 获取挂载磁盘的升级价格 + * + * See also: https://docs.ucloud.cn/api/uhost-api/get_attached_disk_upgrade_price + */ + getAttachedDiskUpgradePrice(request) { + const args = Object.assign({ Action: 'GetAttachedDiskUpgradePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUHostInstancePrice - 根据UHost实例配置,获取UHost实例的价格。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/get_uhost_instance_price + */ + getUHostInstancePrice(request) { + const args = Object.assign({ Action: 'GetUHostInstancePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUHostInstanceVncInfo - 获取指定UHost实例的管理VNC配置详细信息。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/get_uhost_instance_vnc_info + */ + getUHostInstanceVncInfo(request) { + const args = Object.assign({ Action: 'GetUHostInstanceVncInfo' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUHostUpgradePrice - 获取UHost实例升级配置的价格。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/get_uhost_upgrade_price + */ + getUHostUpgradePrice(request) { + const args = Object.assign({ Action: 'GetUHostUpgradePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ImportCustomImage - 把UFile的镜像文件导入到UHost,生成自定义镜像 + * + * See also: https://docs.ucloud.cn/api/uhost-api/import_custom_image + */ + importCustomImage(request) { + const args = Object.assign({ Action: 'ImportCustomImage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ImportUHostKeyPairs - 导入密钥对后,仅保管公钥部分,需自行妥善保存密钥对的私钥部分。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/import_uhost_key_pairs + */ + importUHostKeyPairs(request) { + const args = Object.assign({ Action: 'ImportUHostKeyPairs' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * LeaveIsolationGroup - 移除硬件隔离组中的主机 + * + * See also: https://docs.ucloud.cn/api/uhost-api/leave_isolation_group + */ + leaveIsolationGroup(request) { + const args = Object.assign({ Action: 'LeaveIsolationGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyUHostIP - 修改云主机内网 IP 地址 + * + * See also: https://docs.ucloud.cn/api/uhost-api/modify_uhost_ip + */ + modifyUHostIP(request) { + const args = Object.assign({ Action: 'ModifyUHostIP' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyUHostInstanceName - 修改指定UHost实例名称,需要给出数据中心,UHostId,及新的实例名称。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/modify_uhost_instance_name + */ + modifyUHostInstanceName(request) { + const args = Object.assign({ Action: 'ModifyUHostInstanceName' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyUHostInstanceRemark - 修改指定UHost实例备注信息。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/modify_uhost_instance_remark + */ + modifyUHostInstanceRemark(request) { + const args = Object.assign({ Action: 'ModifyUHostInstanceRemark' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyUHostInstanceTag - 修改指定UHost实例业务组标识。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/modify_uhost_instance_tag + */ + modifyUHostInstanceTag(request) { + const args = Object.assign({ Action: 'ModifyUHostInstanceTag' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * PoweroffUHostInstance - 直接关闭UHost实例电源,无需等待实例正常关闭。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/poweroff_uhost_instance + */ + poweroffUHostInstance(request) { + const args = Object.assign({ Action: 'PoweroffUHostInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * RebootUHostInstance - 重新启动UHost实例,需要指定数据中心及UHostID两个参数的值。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/reboot_uhost_instance + */ + rebootUHostInstance(request) { + const args = Object.assign({ Action: 'RebootUHostInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ReinstallUHostInstance - 重新安装指定UHost实例的操作系统 + * + * See also: https://docs.ucloud.cn/api/uhost-api/reinstall_uhost_instance + */ + reinstallUHostInstance(request) { + const args = Object.assign({ Action: 'ReinstallUHostInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ResetUHostInstancePassword - 重置UHost实例的管理员密码。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/reset_uhost_instance_password + */ + resetUHostInstancePassword(request) { + const args = Object.assign({ Action: 'ResetUHostInstancePassword' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ResizeAttachedDisk - 修改挂载的磁盘大小,包含系统盘和数据盘 + * + * See also: https://docs.ucloud.cn/api/uhost-api/resize_attached_disk + */ + resizeAttachedDisk(request) { + const args = Object.assign({ Action: 'ResizeAttachedDisk' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ResizeUHostInstance - 修改指定UHost实例的资源配置,如CPU核心数,内存容量大小,网络增强等。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/resize_uhost_instance + */ + resizeUHostInstance(request) { + const args = Object.assign({ Action: 'ResizeUHostInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * StartUHostInstance - 启动处于关闭状态的UHost实例,需要指定数据中心及UHostID两个参数的值。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/start_uhost_instance + */ + startUHostInstance(request) { + const args = Object.assign({ Action: 'StartUHostInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * StopUHostInstance - 指停止处于运行状态的UHost实例,需指定数据中心及UhostID。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/stop_uhost_instance + */ + stopUHostInstance(request) { + const args = Object.assign({ Action: 'StopUHostInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * TerminateCustomImage - 删除用户自定义镜像 + * + * See also: https://docs.ucloud.cn/api/uhost-api/terminate_custom_image + */ + terminateCustomImage(request) { + const args = Object.assign({ Action: 'TerminateCustomImage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * TerminateUHostInstance - 删除指定数据中心的UHost实例。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/terminate_uhost_instance + */ + terminateUHostInstance(request) { + const args = Object.assign({ Action: 'TerminateUHostInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpgradeToArkUHostInstance - 普通升级为方舟机型 + * + * See also: https://docs.ucloud.cn/api/uhost-api/upgrade_to_ark_uhost_instance + */ + upgradeToArkUHostInstance(request) { + const args = Object.assign({ Action: 'UpgradeToArkUHostInstance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = UHostClient; diff --git a/lib/services/uk8s/index.d.ts b/lib/services/uk8s/index.d.ts new file mode 100644 index 0000000..6be35d4 --- /dev/null +++ b/lib/services/uk8s/index.d.ts @@ -0,0 +1,789 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **uk8s** service + */ +export default class UK8SClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * AddUK8SExistingUHost - 将预先创建好的云主机加入到UK8S集群,需要注意的是,该云主机依然会执行重装系统的操作。 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/add_uk8s_existing_uhost + */ + addUK8SExistingUHost(request?: AddUK8SExistingUHostRequest): Promise; + /** + * AddUK8SPHostNode - 为UK8S集群添加一台或多台物理云主机类型的节点。 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/add_uk8s_phost_node + */ + addUK8SPHostNode(request?: AddUK8SPHostNodeRequest): Promise; + /** + * AddUK8SUHostNode - 为UK8S集群添加一台Node节点,机型类型为云主机 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/add_uk8s_uhost_node + */ + addUK8SUHostNode(request?: AddUK8SUHostNodeRequest): Promise; + /** + * CreateUK8SClusterV2 - 创建UK8S集群 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/create_uk8s_cluster_v2 + */ + createUK8SClusterV2(request?: CreateUK8SClusterV2Request): Promise; + /** + * DelUK8SCluster - 删除UK8S集群 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/del_uk8s_cluster + */ + delUK8SCluster(request?: DelUK8SClusterRequest): Promise; + /** + * DelUK8SClusterNodeV2 - 删除集群中的Node节点,删除前务必先将其中的Pod驱逐。 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/del_uk8s_cluster_node_v2 + */ + delUK8SClusterNodeV2(request?: DelUK8SClusterNodeV2Request): Promise; + /** + * DescribeUK8SImage - 获取UK8S支持的Node节点操作系统,可基于该操作系统制定自定义镜像 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/describe_uk8s_image + */ + describeUK8SImage(request?: DescribeUK8SImageRequest): Promise; + /** + * ListUK8SClusterNodeV2 - 获取UK8S集群节点信息 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/list_uk8s_cluster_node_v2 + */ + listUK8SClusterNodeV2(request?: ListUK8SClusterNodeV2Request): Promise; + /** + * ListUK8SClusterV2 - 获取UK8S集群列表信息 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/list_uk8s_cluster_v2 + */ + listUK8SClusterV2(request?: ListUK8SClusterV2Request): Promise; +} +/** + * AddUK8SExistingUHost - 将预先创建好的云主机加入到UK8S集群,需要注意的是,该云主机依然会执行重装系统的操作。 + */ +export interface AddUK8SExistingUHostRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 + */ + Password: string; + /** + * UK8S集群ID。 可从UK8S控制台获取。 + */ + ClusterId: string; + /** + * 云主机Id,为了保证节点正常运行,该主机配置不得低于2C4G。 + */ + UHostId: string; + /** + * 默认110,生产环境建议小于等于110。 + */ + MaxPods?: number; + /** + * Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + */ + Labels?: string; + /** + * 该云主机所属子网Id。 + */ + SubnetId?: string; + /** + * 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。 + */ + ImageId?: string; + /** + * 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用 + */ + DisableSchedule?: boolean; + /** + * 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + */ + UserData?: string; + /** + * 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + */ + InitScript?: string; +} +/** + * AddUK8SExistingUHost - 将预先创建好的云主机加入到UK8S集群,需要注意的是,该云主机依然会执行重装系统的操作。 + */ +export interface AddUK8SExistingUHostResponse { +} +/** + * AddUK8SPHostNode - 为UK8S集群添加一台或多台物理云主机类型的节点。 + */ +export interface AddUK8SPHostNodeRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UK8S集群ID。 可从UK8S控制台获取。 + */ + ClusterId: string; + /** + * 最大创建Node节点数量,取值范围是[1,10]。 + */ + Count: number; + /** + * Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 + */ + Password: string; + /** + * 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ 默认为月付 + */ + ChargeType: string; + /** + * 购买时长。默认: 1。月付时,此参数传0,代表了购买至月末。 + */ + Quantity?: number; + /** + * Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + */ + Labels?: string; + /** + * 默认110,生产环境建议小于等于110。 + */ + MaxPods?: number; + /** + * 物理机类型,默认为:db-2(基础型-SAS-V3) + */ + Type?: string; + /** + * Raid配置,默认Raid10 支持:Raid0、Raid1、Raid5、Raid10,NoRaid + */ + Raid?: string; + /** + * 网络环境,可选千兆:1G ,万兆:10G, 默认1G。 + */ + NIC?: string; + /** + * 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + */ + SubnetId?: string; + /** + * 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。 + */ + ImageId?: string; + /** + * 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用 + */ + DisableSchedule?: boolean; + /** + * 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行。 + */ + InitScript?: string; +} +/** + * AddUK8SPHostNode - 为UK8S集群添加一台或多台物理云主机类型的节点。 + */ +export interface AddUK8SPHostNodeResponse { +} +/** + * AddUK8SUHostNode - 为UK8S集群添加一台Node节点,机型类型为云主机 + */ +export interface AddUK8SUHostNodeRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UK8S集群ID。 可从UK8S控制台获取。 + */ + ClusterId: string; + /** + * 虚拟CPU核数。可选参数:2-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。 + */ + CPU: number; + /** + * 最大创建Node节点数量,取值范围是[1,10]。 + */ + Count: number; + /** + * Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 + */ + Password: string; + /** + * 内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192 + */ + Mem: number; + /** + * 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ 默认为月付 + */ + ChargeType: string; + /** + * 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + */ + BootDiskType?: string; + /** + * 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + */ + DataDiskType?: string; + /** + * 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] + */ + DataDiskSize?: string; + /** + * 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + */ + Quantity?: number; + /** + * 云主机机型。枚举值["N", "C", "G", "O", "OS"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + MachineType?: string; + /** + * 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" + */ + MinmalCpuPlatform?: string; + /** + * GPU类型,枚举值["K80", "P40", "V100",],MachineType为G时必填 + */ + GpuType?: string; + /** + * GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + */ + GPU?: number; + /** + * Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + */ + Labels?: string; + /** + * 默认110,生产环境建议小于等于110。 + */ + MaxPods?: number; + /** + * 硬件隔离组id。可通过DescribeIsolationGroup获取。 + */ + IsolationGroup?: string; + /** + * 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。 + */ + ImageId?: string; + /** + * 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + */ + SubnetId?: string; + /** + * 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用 + */ + DisableSchedule?: boolean; + /** + * 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + */ + UserData?: string; + /** + * 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + */ + InitScript?: string; +} +/** + * AddUK8SUHostNode - 为UK8S集群添加一台Node节点,机型类型为云主机 + */ +export interface AddUK8SUHostNodeResponse { + /** + * Node实例Id集合 + */ + NodeIds?: string[]; +} +/** + * CreateUK8SClusterV2 - 创建UK8S集群 + */ +export interface CreateUK8SClusterV2Request { + /** + * 集群Node及Pod所属VPC + */ + VPCId: string; + /** + * 集群Node及Pod所属子网 + */ + SubnetId: string; + /** + * Service 网段,用于分配ClusterIP,如172.17.0.0/16。该网段不能与集群所属VPC网段重叠。 + */ + ServiceCIDR: string; + /** + * 集群名称 + */ + ClusterName: string; + /** + * 集群节点密码,包括Master和Node。密码需包含最少一个大写字母,请使用base64进行编码,举例如下:# echo -n Password1 | base64 + */ + Password: string; + /** + * + */ + Master?: { + /** + * Master节点所属可用区,需要设置 Master.0.Zone、 Master.1.Zone、Master.2.Zone 三个 Master 节点的可用区。 三个节点可部署在不同可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + }[]; + /** + * Master节点的云主机机型(V2.0),如["N", "C", "O", "OS"],具体请参照云主机机型。 + */ + MasterMachineType: string; + /** + * Master节点的虚拟CPU核数。可选参数:2-64(具体机型与CPU的对应关系参照控制台)。 + */ + MasterCPU: number; + /** + * Master节点的内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。 + */ + MasterMem: number; + /** + * + */ + Nodes?: { + /** + * 一组Nodes节点所属可用区,可创建多组Nodes节点,如一组是CPU Nodes节点,另一组是GPU Nodes节点。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 一组Nodes节点云主机机型,如["N", "C", "O", "OS"],具体请参照云主机机型。 + */ + MachineType: string; + /** + * 一组Node节点的虚拟CPU核数。单位:核,范围:[2, 64],可选范围参考控制台。 + */ + CPU: number; + /** + * 一组Node节点的内存大小。单位:MB,范围 :[4096, 262144],取值为1024的倍数,可选范围参考控制台。 + */ + Mem: number; + /** + * 一组Node节点的数量,范围:[1,10]。 + */ + Count: number; + /** + * 一组Node节点的隔离组Id,归属于同一隔离组的虚拟机节点将落在不同的物理机上,单个隔离组最多只能容纳8个节点。参见DescribeIsolationGroup。 + */ + IsolationGroup?: string; + /** + * Node节点上可运行最大节点数,默认为110。 + */ + MaxPods?: number; + /** + * Node节点标签,形式为key=value,多组Labels用”,“隔开,最多支持五组。 + */ + Labels?: string; + /** + * 一组Node节点的系统盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + */ + BootDiskType?: string; + /** + * 一组Node节点的数据盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + */ + DataDiskType?: string; + /** + * Node节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + */ + MinmalCpuPlatform?: string; + /** + * 一组Node节点的GPU类型,枚举值["K80", "P40", "V100"],最新值参考Console。 + */ + GpuType?: string; + /** + * 一组Node节点的GPU卡核心数,仅GPU机型支持此字段。 + */ + GPU?: number; + /** + * 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] + */ + DataDiskSize?: number; + }[]; + /** + * Master节点系统盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + */ + MasterBootDiskType?: string; + /** + * Master节点数据盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + */ + MasterDataDiskType?: string; + /** + * Master节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + */ + MasterMinmalCpuPlatform?: string; + /** + * Master节点的数据盘大小,单位GB,默认为0。范围 :[20, 1000] + */ + MasterDataDiskSize?: number; + /** + * 集群所有节点的付费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限),默认按月。 + */ + ChargeType?: string; + /** + * k8s集群的版本,版本信息请参考UK8S集群创建页,不指定的话默认为当前支持的最高版本。 + */ + K8sVersion?: string; + /** + * 购买时长。默认为1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + */ + Quantity?: number; + /** + * 是否允许外网访问apiserver,开启:Yes 不开启:No。默认为No。 + */ + ExternalApiServer?: string; + /** + * 【无效,已删除】当前将自动为Master节点创建隔离组,确保Master节点归属于不同物理机。 + */ + MasterIsolationGroup?: string; + /** + * + */ + KubeProxy?: { + /** + * 集群kube-proxy模式。支持iptables和ipvs,默认为iptables。 + */ + Mode?: string; + }; + /** + * Master节点和Node节点的镜像 ID,不填则随机选择可用的基础镜像。支持用户自定义镜像。 + */ + ImageId?: string; + /** + * 用户自定义数据。注意:1、总数据量大小不超多16K;2、使用base64编码。 + */ + UserData?: string; + /** + * 用户自定义脚本,与UserData不同,自定义脚本将在集群安装完毕后执行。注意:1、总数据量大小不超多16K;2、使用base64编码。 + */ + InitScript?: string; +} +/** + * CreateUK8SClusterV2 - 创建UK8S集群 + */ +export interface CreateUK8SClusterV2Response { + /** + * 集群ID + */ + ClusterId: string; +} +/** + * DelUK8SCluster - 删除UK8S集群 + */ +export interface DelUK8SClusterRequest { + /** + * 集群id + */ + ClusterId: string; + /** + * 是否删除节点挂载的数据盘。枚举值[true:删除,false: 不删除],默认不删除 + */ + ReleaseUDisk?: boolean; +} +/** + * DelUK8SCluster - 删除UK8S集群 + */ +export interface DelUK8SClusterResponse { +} +/** + * DelUK8SClusterNodeV2 - 删除集群中的Node节点,删除前务必先将其中的Pod驱逐。 + */ +export interface DelUK8SClusterNodeV2Request { + /** + * UK8S集群ID。 可从UK8S控制台获取。 + */ + ClusterId: string; + /** + * Node在UK8S处的唯一标示,如uk8s-reewqe5-sdasadsda。**非云主机或物理云主机资源Id** + */ + NodeId: string; + /** + * 删除节点时是否释放数据盘。 枚举值[true:释放,false: 不释放],默认为true。 + */ + ReleaseDataUDisk?: boolean; +} +/** + * DelUK8SClusterNodeV2 - 删除集群中的Node节点,删除前务必先将其中的Pod驱逐。 + */ +export interface DelUK8SClusterNodeV2Response { +} +/** + * DescribeUK8SImage - 获取UK8S支持的Node节点操作系统,可基于该操作系统制定自定义镜像 + */ +export interface DescribeUK8SImageRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; +} +/** + * DescribeUK8SImage - 获取UK8S支持的Node节点操作系统,可基于该操作系统制定自定义镜像 + */ +export interface DescribeUK8SImageResponse { + /** + * 虚拟机可用镜像集合, 详见ImageInfo 数组 + */ + ImageSet?: { + /** + * 可用区 Id + */ + ZoneId: number; + /** + * 镜像 Id + */ + ImageId: string; + /** + * 镜像名称 + */ + ImageName: string; + /** + * 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。 + */ + NotSupportGPU: boolean; + }[]; + /** + * 物理机可用镜像集合, 详见ImageInfo 数组 + */ + PHostImageSet?: { + /** + * 可用区 Id + */ + ZoneId: number; + /** + * 镜像 Id + */ + ImageId: string; + /** + * 镜像名称 + */ + ImageName: string; + /** + * 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。 + */ + NotSupportGPU: boolean; + }[]; +} +/** + * ListUK8SClusterNodeV2 - 获取UK8S集群节点信息 + */ +export interface ListUK8SClusterNodeV2Request { + /** + * UK8S集群ID + */ + ClusterId: string; +} +/** + * ListUK8SClusterNodeV2 - 获取UK8S集群节点信息 + */ +export interface ListUK8SClusterNodeV2Response { + /** + * 节点详细信息,见NodeInfoV2。 + */ + NodeSet: { + /** + * Node所在可用区 + */ + Zone: string; + /** + * NodeId,Node在UK8S处的唯一标示,如uk8s-reewqe5-sdasadsda + */ + NodeId: string; + /** + * node角色,枚举值为master、node + */ + NodeRole: string; + /** + * Node的状态 + */ + NodeStatus: string; + /** + * Node节点的资源类型,枚举值为UHost或UPHost。 + */ + InstanceType: string; + /** + * 资源名称,初始值等于NodeId,用户可在UHost或UPHost处修改。 + */ + InstanceName: string; + /** + * 资源ID,如uhost-xxxx,或uphost-xxxxx。 + */ + InstanceId: string; + /** + * 机型类别,分别对应Uhost的MachineType或PHost的PHostType。 + */ + MachineType: string; + /** + * Node节点的操作系统类别,如Linux或Windows。 + */ + OsType: string; + /** + * Node节点的镜像名称。 + */ + OsName: string; + /** + * Node节点CPU核数,单位: 个。 + */ + CPU: number; + /** + * 内存大小,单位: MB。 + */ + Memory: number; + /** + * 节点IP信息,详细信息见 UHostIPSet。 + */ + IPSet: { + /** + * 国际: Internation,BGP: Bgp,内网: Private + */ + Type?: string; + /** + * IP资源ID (内网IP无对应的资源ID) + */ + IPId?: string; + /** + * IP地址 + */ + IP?: string; + /** + * IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) + */ + Bandwidth?: number; + /** + * 是否默认的弹性网卡的信息。true: 是默认弹性网卡;其他值:不是。 + */ + Default?: string; + /** + * IP地址对应的VPC ID + */ + VPCId?: string; + /** + * IP地址对应的子网 ID + */ + SubnetId?: string; + /** + * Mac地址 + */ + Mac?: string; + }[]; + /** + * 节点创建时间 + */ + CreateTime: number; + /** + * 节点计费到期时间 + */ + ExpireTime: number; + /** + * 节点所属伸缩组ID,非伸缩组创建出来的节点,伸缩组ID为Default。 + */ + AsgId: string; + /** + * 是否允许Pod调度到该节点,枚举值为true或false。 + */ + Unschedulable: boolean; + /** + * kubeproxy信息,详细信息见KubeProxy。 + */ + KubeProxy: { + /** + * KubeProxy模式,枚举值为[ipvs,iptables] + */ + Mode?: string; + }; + /** + * 加节点时判断是否没有资源,如果返回NORESOURCE则代表没有资源了 + */ + NodeLogInfo: string; + /** + * 节点的GPU颗数。 + */ + GPU?: number; + }[]; + /** + * 满足条件的节点数量,包括Master。 + */ + TotalCount: number; +} +/** + * ListUK8SClusterV2 - 获取UK8S集群列表信息 + */ +export interface ListUK8SClusterV2Request { + /** + * 列表起始位置偏移量,默认为0。 + */ + Offset?: number; + /** + * 返回数据长度,默认为20。 + */ + Limit?: number; + /** + * UK8S集群ID + */ + ClusterId?: string; +} +/** + * ListUK8SClusterV2 - 获取UK8S集群列表信息 + */ +export interface ListUK8SClusterV2Response { + /** + * 满足条件的集群数量 + */ + ClusterCount: number; + /** + * 集群信息,具体参考ClusterSet + */ + ClusterSet?: { + /** + * 资源名字 + */ + ClusterName: string; + /** + * 集群ID + */ + ClusterId: string; + /** + * 所属VPC + */ + VPCId: string; + /** + * 所属子网 + */ + SubnetId: string; + /** + * Pod网段 + */ + PodCIDR: string; + /** + * 服务网段 + */ + ServiceCIDR: string; + /** + * Master 节点数量 + */ + MasterCount: number; + /** + * 集群apiserver地址 + */ + ApiServer: string; + /** + * 集群版本 + */ + K8sVersion: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * Node节点数量 + */ + NodeCount?: number; + /** + * 集群外部apiserver地址 + */ + ExternalApiServer?: string; + /** + * 状态 + */ + Status?: string; + }[]; +} diff --git a/lib/services/uk8s/index.js b/lib/services/uk8s/index.js new file mode 100644 index 0000000..aa91420 --- /dev/null +++ b/lib/services/uk8s/index.js @@ -0,0 +1,97 @@ +"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 **uk8s** service + */ +class UK8SClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * AddUK8SExistingUHost - 将预先创建好的云主机加入到UK8S集群,需要注意的是,该云主机依然会执行重装系统的操作。 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/add_uk8s_existing_uhost + */ + addUK8SExistingUHost(request) { + const args = Object.assign({ Action: 'AddUK8SExistingUHost' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * AddUK8SPHostNode - 为UK8S集群添加一台或多台物理云主机类型的节点。 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/add_uk8s_phost_node + */ + addUK8SPHostNode(request) { + const args = Object.assign({ Action: 'AddUK8SPHostNode' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * AddUK8SUHostNode - 为UK8S集群添加一台Node节点,机型类型为云主机 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/add_uk8s_uhost_node + */ + addUK8SUHostNode(request) { + const args = Object.assign({ Action: 'AddUK8SUHostNode' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUK8SClusterV2 - 创建UK8S集群 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/create_uk8s_cluster_v2 + */ + createUK8SClusterV2(request) { + const args = Object.assign({ Action: 'CreateUK8SClusterV2' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DelUK8SCluster - 删除UK8S集群 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/del_uk8s_cluster + */ + delUK8SCluster(request) { + const args = Object.assign({ Action: 'DelUK8SCluster' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DelUK8SClusterNodeV2 - 删除集群中的Node节点,删除前务必先将其中的Pod驱逐。 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/del_uk8s_cluster_node_v2 + */ + delUK8SClusterNodeV2(request) { + const args = Object.assign({ Action: 'DelUK8SClusterNodeV2' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUK8SImage - 获取UK8S支持的Node节点操作系统,可基于该操作系统制定自定义镜像 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/describe_uk8s_image + */ + describeUK8SImage(request) { + const args = Object.assign({ Action: 'DescribeUK8SImage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ListUK8SClusterNodeV2 - 获取UK8S集群节点信息 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/list_uk8s_cluster_node_v2 + */ + listUK8SClusterNodeV2(request) { + const args = Object.assign({ Action: 'ListUK8SClusterNodeV2' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ListUK8SClusterV2 - 获取UK8S集群列表信息 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/list_uk8s_cluster_v2 + */ + listUK8SClusterV2(request) { + const args = Object.assign({ Action: 'ListUK8SClusterV2' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = UK8SClient; diff --git a/lib/services/ulb/index.d.ts b/lib/services/ulb/index.d.ts new file mode 100644 index 0000000..8d78143 --- /dev/null +++ b/lib/services/ulb/index.d.ts @@ -0,0 +1,1598 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **ulb** service + */ +export default class ULBClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * AllocateBackend - 添加ULB后端资源实例 + * + * See also: https://docs.ucloud.cn/api/ulb-api/allocate_backend + */ + allocateBackend(request?: AllocateBackendRequest): Promise; + /** + * BindSSL - 将SSL证书绑定到VServer + * + * See also: https://docs.ucloud.cn/api/ulb-api/bind_ssl + */ + bindSSL(request?: BindSSLRequest): Promise; + /** + * CreatePolicy - 创建VServer内容转发策略 + * + * See also: https://docs.ucloud.cn/api/ulb-api/create_policy + */ + createPolicy(request?: CreatePolicyRequest): Promise; + /** + * CreateSSL - 创建SSL证书,可以把整个 Pem 证书内容传过来,或者把证书、私钥、CA证书分别传过来 + * + * See also: https://docs.ucloud.cn/api/ulb-api/create_ssl + */ + createSSL(request?: CreateSSLRequest): Promise; + /** + * CreateULB - 创建负载均衡实例,可以选择内网或者外网 + * + * See also: https://docs.ucloud.cn/api/ulb-api/create_ulb + */ + createULB(request?: CreateULBRequest): Promise; + /** + * CreateVServer - 创建VServer实例,定义监听的协议和端口以及负载均衡算法 + * + * See also: https://docs.ucloud.cn/api/ulb-api/create_vserver + */ + createVServer(request?: CreateVServerRequest): Promise; + /** + * DeletePolicy - 删除内容转发策略 + * + * See also: https://docs.ucloud.cn/api/ulb-api/delete_policy + */ + deletePolicy(request?: DeletePolicyRequest): Promise; + /** + * DeleteSSL - 删除SSL证书 + * + * See also: https://docs.ucloud.cn/api/ulb-api/delete_ssl + */ + deleteSSL(request?: DeleteSSLRequest): Promise; + /** + * DeleteULB - 删除负载均衡实例 + * + * See also: https://docs.ucloud.cn/api/ulb-api/delete_ulb + */ + deleteULB(request?: DeleteULBRequest): Promise; + /** + * DeleteVServer - 删除VServer实例 + * + * See also: https://docs.ucloud.cn/api/ulb-api/delete_vserver + */ + deleteVServer(request?: DeleteVServerRequest): Promise; + /** + * DescribeSSL - 获取SSL证书信息 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_ssl + */ + describeSSL(request?: DescribeSSLRequest): Promise; + /** + * DescribeULB - 获取ULB详细信息 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_ulb + */ + describeULB(request?: DescribeULBRequest): Promise; + /** + * DescribeULBSimple - 获取ULB信息 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_ulb_simple + */ + describeULBSimple(request?: DescribeULBSimpleRequest): Promise; + /** + * DescribeVServer - 获取ULB下的VServer的详细信息 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_vserver + */ + describeVServer(request?: DescribeVServerRequest): Promise; + /** + * ReleaseBackend - 从VServer释放后端资源实例 + * + * See also: https://docs.ucloud.cn/api/ulb-api/release_backend + */ + releaseBackend(request?: ReleaseBackendRequest): Promise; + /** + * UnbindSSL - 从VServer解绑SSL证书 + * + * See also: https://docs.ucloud.cn/api/ulb-api/unbind_ssl + */ + unbindSSL(request?: UnbindSSLRequest): Promise; + /** + * UpdateBackendAttribute - 更新ULB后端资源实例(服务节点)属性 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_backend_attribute + */ + updateBackendAttribute(request?: UpdateBackendAttributeRequest): Promise; + /** + * UpdatePolicy - 更新内容转发规则,包括转发规则后的服务节点 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_policy + */ + updatePolicy(request?: UpdatePolicyRequest): Promise; + /** + * UpdateULBAttribute - 更新ULB名字业务组备注等属性字段 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_ulb_attribute + */ + updateULBAttribute(request?: UpdateULBAttributeRequest): Promise; + /** + * UpdateVServerAttribute - 更新VServer实例属性 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_vserver_attribute + */ + updateVServerAttribute(request?: UpdateVServerAttributeRequest): Promise; +} +/** + * AllocateBackend - 添加ULB后端资源实例 + */ +export interface AllocateBackendRequest { + /** + * 负载均衡实例的ID + */ + ULBId: string; + /** + * VServer实例的ID + */ + VServerId: string; + /** + * 所添加的后端资源的类型,枚举值:UHost -> 云主机;UNI -> 虚拟网卡;UPM -> 物理云主机; UDHost -> 私有专区主机;UDocker -> 容器;UHybrid->混合云主机;CUBE->Cube;默认值为UHost。报文转发模式不支持UDocker、UHybrid、CUBE + */ + ResourceType: string; + /** + * 所添加的后端资源的资源ID + */ + ResourceId: string; + /** + * 所添加的后端服务器的资源实例IP,当ResourceType 为 UHybrid 时有效,且必填 + */ + ResourceIP?: string; + /** + * 所添加的后端服务器所在的vpc,当ResourceType 为 UHybrid 时有效,且必填 + */ + VPCId?: string; + /** + * 所添加的后端服务器所在的子网,当ResourceType 为 UHybrid 时有效,且必填 + */ + SubnetId?: string; + /** + * 所添加的后端资源服务端口,取值范围[1-65535],默认80 + */ + Port?: number; + /** + * 所添加的后端RS权重(在加权轮询算法下有效),取值范围[0-100],默认为1 + */ + Weight?: number; + /** + * 后端实例状态开关,枚举值: 1:启用; 0:禁用 默认为启用 + */ + Enabled?: number; + /** + * rs是否为backup,默认为00:普通rs1:backup的rs + */ + IsBackup?: number; +} +/** + * AllocateBackend - 添加ULB后端资源实例 + */ +export interface AllocateBackendResponse { + /** + * 所添加的后端资源在ULB中的对象ID,(为ULB系统中使用,与资源自身ID无关),可用于 UpdateBackendAttribute/UpdateBackendAttributeBatch/ReleaseBackend + */ + BackendId?: string; +} +/** + * BindSSL - 将SSL证书绑定到VServer + */ +export interface BindSSLRequest { + /** + * 所绑定ULB实例ID + */ + ULBId: string; + /** + * 所绑定VServer实例ID + */ + VServerId: string; + /** + * SSL证书的Id + */ + SSLId: string; +} +/** + * BindSSL - 将SSL证书绑定到VServer + */ +export interface BindSSLResponse { +} +/** + * CreatePolicy - 创建VServer内容转发策略 + */ +export interface CreatePolicyRequest { + /** + * 需要添加内容转发策略的负载均衡实例ID + */ + ULBId: string; + /** + * 需要添加内容转发策略的VServer实例ID + */ + VServerId: string; + /** + * 内容转发策略应用的后端资源实例的ID,来源于 AllocateBackend 返回的 BackendId + */ + BackendId: string[]; + /** + * 内容转发匹配字段 + */ + Match: string; + /** + * 内容转发匹配字段的类型 + */ + Type?: string; + /** + * 策略优先级,1-9999 + */ + PolicyPriority?: number; +} +/** + * CreatePolicy - 创建VServer内容转发策略 + */ +export interface CreatePolicyResponse { + /** + * 内容转发策略ID + */ + PolicyId?: string; +} +/** + * CreateSSL - 创建SSL证书,可以把整个 Pem 证书内容传过来,或者把证书、私钥、CA证书分别传过来 + */ +export interface CreateSSLRequest { + /** + * SSL证书的名字,默认值为空 + */ + SSLName: string; + /** + * 所添加的SSL证书类型,目前只支持Pem格式 + */ + SSLType?: string; + /** + * SSL证书的完整内容,包括用户证书、加密证书的私钥、CA证书 + */ + SSLContent?: string; + /** + * 用户的证书 + */ + UserCert?: string; + /** + * 加密证书的私钥 + */ + PrivateKey?: string; + /** + * CA证书 + */ + CaCert?: string; +} +/** + * CreateSSL - 创建SSL证书,可以把整个 Pem 证书内容传过来,或者把证书、私钥、CA证书分别传过来 + */ +export interface CreateSSLResponse { + /** + * SSL证书的Id + */ + SSLId?: string; +} +/** + * CreateULB - 创建负载均衡实例,可以选择内网或者外网 + */ +export interface CreateULBRequest { + /** + * 负载均衡的名字,默认值为“ULB” + */ + ULBName?: string; + /** + * 业务组 + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 创建的ULB是否为外网模式,默认即为外网模式 + */ + OuterMode?: string; + /** + * 创建的ULB是否为内网模式 + */ + InnerMode?: string; + /** + * 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按时付费 + */ + ChargeType?: string; + /** + * ULB所在的VPC的ID, 如果不传则使用默认的VPC + */ + VPCId?: string; + /** + * 内网ULB 所属的子网ID,如果不传则使用默认的子网 + */ + SubnetId?: string; + /** + * ULB 所属的业务组ID,如果不传则使用默认的业务组 + */ + BusinessId?: string; + /** + * 防火墙ID,如果不传,则默认不绑定防火墙 + */ + FirewallId?: string; + /** + * ULB 监听器类型,枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发。默认为RequestProxy + */ + ListenType?: string; +} +/** + * CreateULB - 创建负载均衡实例,可以选择内网或者外网 + */ +export interface CreateULBResponse { + /** + * 负载均衡实例的Id + */ + ULBId?: string; + /** + * IPv6地址Id + */ + IPv6AddressId?: string; +} +/** + * CreateVServer - 创建VServer实例,定义监听的协议和端口以及负载均衡算法 + */ +export interface CreateVServerRequest { + /** + * 负载均衡实例ID + */ + ULBId: string; + /** + * VServer实例名称,默认为"VServer" + */ + VServerName?: string; + /** + * 监听器类型,枚举值,RequestProxy ,请求代理;PacketsTransmit ,报文转发。默认为RequestProxy + */ + ListenType?: string; + /** + * VServer实例的协议,请求代理模式下有 HTTP、HTTPS、TCP,报文转发下有 TCP,UDP。默认为“HTTP" + */ + Protocol?: string; + /** + * VServer后端端口,取值范围[1-65535];默认值为80 + */ + FrontendPort?: number; + /** + * VServer负载均衡模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口); WeightRoundrobin -> 加权轮询; Leastconn -> 最小连接数;Backup ->主备模式。ConsistentHash,SourcePort,ConsistentHashPort 只在报文转发中使用;Leastconn只在请求代理中使用;Roundrobin、Source和WeightRoundrobin,Backup在请求代理和报文转发中使用。默认为:"Roundrobin" + */ + Method?: string; + /** + * VServer会话保持方式,默认关闭会话保持。枚举值:None -> 关闭;ServerInsert -> 自动生成KEY;UserDefined -> 用户自定义KEY。 + */ + PersistenceType?: string; + /** + * 根据PersistenceType确认; None和ServerInsert: 此字段无意义; UserDefined:此字段传入自定义会话保持String + */ + PersistenceInfo?: string; + /** + * ListenType为RequestProxy时表示空闲连接的回收时间,单位:秒,取值范围:时(0,86400],默认值为60;ListenType为PacketsTransmit时表示连接保持的时间,单位:秒,取值范围:[60,900],0 表示禁用连接保持 + */ + ClientTimeout?: number; + /** + * 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测;Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path;报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize,默认值为Ping + */ + MonitorType?: string; + /** + * 根据MonitorType确认; 当MonitorType为Path时,此字段有意义,代表HTTP检查域名 + */ + Domain?: string; + /** + * 根据MonitorType确认; 当MonitorType为Path时,此字段有意义,代表HTTP检查路径 + */ + Path?: string; + /** + * 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + */ + RequestMsg?: string; + /** + * 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + */ + ResponseMsg?: string; +} +/** + * CreateVServer - 创建VServer实例,定义监听的协议和端口以及负载均衡算法 + */ +export interface CreateVServerResponse { + /** + * VServer实例的Id + */ + VServerId?: string; +} +/** + * DeletePolicy - 删除内容转发策略 + */ +export interface DeletePolicyRequest { + /** + * 内容转发策略ID + */ + PolicyId: string; + /** + * VServer 资源ID + */ + VServerId?: string; +} +/** + * DeletePolicy - 删除内容转发策略 + */ +export interface DeletePolicyResponse { +} +/** + * DeleteSSL - 删除SSL证书 + */ +export interface DeleteSSLRequest { + /** + * SSL证书的ID + */ + SSLId: string; +} +/** + * DeleteSSL - 删除SSL证书 + */ +export interface DeleteSSLResponse { +} +/** + * DeleteULB - 删除负载均衡实例 + */ +export interface DeleteULBRequest { + /** + * 负载均衡实例的ID + */ + ULBId: string; + /** + * 删除ulb时是否释放绑定的EIP,false标识只解绑EIP,true表示会释放绑定的EIP,默认是false。Anycast IP 此参数无效 + */ + ReleaseEip?: boolean; +} +/** + * DeleteULB - 删除负载均衡实例 + */ +export interface DeleteULBResponse { +} +/** + * DeleteVServer - 删除VServer实例 + */ +export interface DeleteVServerRequest { + /** + * 负载均衡实例的ID + */ + ULBId: string; + /** + * VServer实例的ID + */ + VServerId: string; +} +/** + * DeleteVServer - 删除VServer实例 + */ +export interface DeleteVServerResponse { +} +/** + * DescribeSSL - 获取SSL证书信息 + */ +export interface DescribeSSLRequest { + /** + * SSL证书的Id + */ + SSLId?: string; + /** + * 数据分页值,默认为20 + */ + Limit?: number; + /** + * 数据偏移量,默认值为0 + */ + Offset?: number; +} +/** + * DescribeSSL - 获取SSL证书信息 + */ +export interface DescribeSSLResponse { + /** + * 满足条件的SSL证书总数 + */ + TotalCount?: number; + /** + * SSL证书详细信息,具体结构见 ULBSSLSet + */ + DataSet?: { + /** + * SSL证书的Id + */ + SSLId?: string; + /** + * SSL证书的名字 + */ + SSLName?: string; + /** + * SSL证书类型,暂时只有 Pem 一种类型 + */ + SSLType?: string; + /** + * SSL证书的内容 + */ + SSLContent?: string; + /** + * SSL证书的创建时间 + */ + CreateTime?: number; + /** + * SSL证书的HASH值 + */ + HashValue?: string; + /** + * SSL证书绑定到的对象 + */ + BindedTargetSet?: { + /** + * SSL证书绑定到的VServer的资源ID + */ + VServerId?: string; + /** + * 对应的VServer的名字 + */ + VServerName?: string; + /** + * VServer 所属的ULB实例的资源ID + */ + ULBId?: string; + /** + * ULB实例的名称 + */ + ULBName?: string; + }[]; + }[]; +} +/** + * DescribeULB - 获取ULB详细信息 + */ +export interface DescribeULBRequest { + /** + * 数据偏移量,默认为0 + */ + Offset?: number; + /** + * 数据分页值,默认为20 + */ + Limit?: number; + /** + * 负载均衡实例的Id。 若指定则返回指定的负载均衡实例的信息; 若不指定则返回当前数据中心中所有的负载均衡实例的信息 + */ + ULBId?: string; + /** + * ULB所属的VPC + */ + VPCId?: string; + /** + * ULB所属的子网ID + */ + SubnetId?: string; + /** + * ULB所属的业务组ID + */ + BusinessId?: string; +} +/** + * DescribeULB - 获取ULB详细信息 + */ +export interface DescribeULBResponse { + /** + * 满足条件的ULB总数 + */ + TotalCount?: number; + /** + * ULB列表,每项参数详见 ULBSet + */ + DataSet?: { + /** + * 负载均衡的资源ID + */ + ULBId?: string; + /** + * 负载均衡的资源名称 + */ + Name?: string; + /** + * 负载均衡的业务组名称 + */ + Tag?: string; + /** + * 负载均衡的备注 + */ + Remark?: string; + /** + * 带宽类型,枚举值为: 0,非共享带宽; 1,共享带宽 + */ + BandwidthType?: number; + /** + * 带宽 + */ + Bandwidth?: number; + /** + * ULB的创建时间,格式为Unix Timestamp + */ + CreateTime?: number; + /** + * ULB的详细信息列表,具体结构见下方 ULBIPSet + */ + IPSet?: { + /** + * 弹性IP的运营商信息,枚举值为: Bgp:BGP IP International:国际IP + */ + OperatorName?: string; + /** + * 弹性IP地址 + */ + EIP?: string; + /** + * 弹性IP的ID + */ + EIPId?: string; + /** + * 弹性IP的带宽类型,枚举值:1 表示是共享带宽,0 普通带宽类型(暂未对外开放) + */ + BandwidthType?: number; + /** + * 弹性IP的带宽值(暂未对外开放) + */ + Bandwidth?: number; + }[]; + /** + * 负载均衡实例中存在的VServer实例列表,具体结构见下方 ULBVServerSet + */ + VServerSet?: { + /** + * 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测, Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path; 报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize + */ + MonitorType: string; + /** + * 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查域名 + */ + Domain?: string; + /** + * 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查路径 + */ + Path?: string; + /** + * 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + */ + RequestMsg?: string; + /** + * 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + */ + ResponseMsg?: string; + /** + * VServer实例的Id + */ + VServerId?: string; + /** + * VServer实例的名字 + */ + VServerName?: string; + /** + * VServer实例的协议。 枚举值为:HTTP,TCP,UDP,HTTPS。 + */ + Protocol?: string; + /** + * VServer服务端口 + */ + FrontendPort?: number; + /** + * VServer负载均衡的模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口)。 + */ + Method?: string; + /** + * VServer会话保持方式。枚举值为: None -> 关闭会话保持; ServerInsert -> 自动生成; UserDefined -> 用户自定义。 + */ + PersistenceType?: string; + /** + * 根据PersistenceType确定: None或ServerInsert,此字段为空; UserDefined,此字段展示用户自定义会话string。 + */ + PersistenceInfo?: string; + /** + * 空闲连接的回收时间,单位:秒。 + */ + ClientTimeout?: number; + /** + * VServer的运行状态。枚举值: 0 -> rs全部运行正常;1 -> rs全部运行异常;2 -> rs部分运行异常。 + */ + Status?: number; + /** + * VServer绑定的SSL证书信息,具体结构见下方 ULBSSLSet。 + */ + SSLSet?: { + /** + * SSL证书的Id + */ + SSLId?: string; + /** + * SSL证书的名字 + */ + SSLName?: string; + /** + * SSL证书类型,暂时只有 Pem 一种类型 + */ + SSLType?: string; + /** + * SSL证书的内容 + */ + SSLContent?: string; + /** + * SSL证书的创建时间 + */ + CreateTime?: number; + /** + * SSL证书的HASH值 + */ + HashValue?: string; + /** + * SSL证书绑定到的对象 + */ + BindedTargetSet?: { + /** + * SSL证书绑定到的VServer的资源ID + */ + VServerId?: string; + /** + * 对应的VServer的名字 + */ + VServerName?: string; + /** + * VServer 所属的ULB实例的资源ID + */ + ULBId?: string; + /** + * ULB实例的名称 + */ + ULBName?: string; + }[]; + }[]; + /** + * 后端资源信息列表,具体结构见下方 ULBBackendSet + */ + BackendSet?: { + /** + * 后端资源实例的Id + */ + BackendId?: string; + /** + * 资源实例的类型 + */ + ResourceType?: string; + /** + * 资源实例的资源Id + */ + ResourceId?: string; + /** + * 资源实例的资源名称 + */ + ResourceName?: string; + /** + * 资源绑定的虚拟网卡实例的类型 + */ + SubResourceType?: string; + /** + * 资源绑定的虚拟网卡实例的资源Id + */ + SubResourceId?: string; + /** + * 资源绑定的虚拟网卡实例的资源名称 + */ + SubResourceName?: string; + /** + * 后端提供服务的内网IP + */ + PrivateIP?: string; + /** + * 后端提供服务的端口 + */ + Port?: number; + /** + * 后端提供服务的实例启用与否,枚举值:0 禁用 1 启用 + */ + Enabled?: number; + /** + * 后端提供服务的实例运行状态,枚举值:0健康检查健康状态 1 健康检查异常 + */ + Status?: number; + /** + * 后端提供服务的资源所在的子网的ID + */ + SubnetId?: string; + /** + * 是否为backup,只有当vserver的Backup属性为1时才会有此字段,说明:0:主rs1:备rs + */ + IsBackup?: number; + }[]; + /** + * 监听器类型,枚举值为: RequestProxy -> 请求代理;PacketsTransmit -> 报文转发 + */ + ListenType?: string; + /** + * 内容转发信息列表,具体结构见下方 ULBPolicySet + */ + PolicySet?: { + /** + * 内容转发Id,默认内容转发类型下为空。 + */ + PolicyId?: string; + /** + * 内容类型,枚举值:Custom -> 客户自定义;Default -> 默认内容转发 + */ + PolicyType?: string; + /** + * 内容转发匹配字段的类型,枚举值:Domain -> 域名;Path -> 路径; 默认内容转发类型下为空 + */ + Type?: string; + /** + * 内容转发匹配字段;默认内容转发类型下为空。 + */ + Match?: string; + /** + * 内容转发优先级,范围[1,9999],数字越大优先级越高。默认内容转发规则下为0。 + */ + PolicyPriority?: number; + /** + * 所属VServerId + */ + VServerId?: string; + /** + * 默认内容转发类型下返回当前rs总数 + */ + TotalCount?: number; + /** + * 内容转发下rs的详细信息,参考PolicyBackendSet + */ + BackendSet?: { + /** + * 所添加的后端资源在ULB中的对象ID,(为ULB系统中使用,与资源自身ID无关 + */ + BackendId?: string; + /** + * 所添加的后端资源的类型,枚举值:UHost -> 云主机;UPM -> 物理云主机; UDHost -> 私有专区主机;UDocker -> 容器;UHybrid->混合云主机;CUBE->Cube;UNI -> 虚拟网卡 + */ + ResourceType?: string; + /** + * 后端资源的实例名称 + */ + ResourceName?: string; + /** + * 如果资源绑定了弹性网卡,则展示弹性网卡的资源ID + */ + SubResourceId?: string; + /** + * 如果资源绑定了弹性网卡,则展示弹性网卡的资源名称 + */ + SubResourceName?: string; + /** + * "UNI"或者为空 + */ + SubResourceType?: string; + /** + * 后端资源的对象ID + */ + ObjectId?: string; + /** + * 所添加的后端资源服务端口 + */ + Port?: number; + /** + * 后端资源的内网IP + */ + PrivateIP?: string; + }[]; + }[]; + }[]; + /** + * ULB 的类型 + */ + ULBType?: string; + /** + * ULB ip类型,枚举值:IPv6 / IPv4 (内部测试,暂未对外开放) + */ + IPVersion?: string; + /** + * ULB 监听器类型,枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发;Comprehensive,兼容型;Pending,未定型 + */ + ListenType?: string; + /** + * ULB所在的VPC的ID + */ + VPCId?: string; + /** + * ULB 为 InnerMode 时,ULB 所属的子网ID,默认为空 + */ + SubnetId?: string; + /** + * ULB 所属的业务组ID + */ + BusinessId?: string; + /** + * ULB的内网IP,当ULBType为OuterMode时,该值为空 + */ + PrivateIP?: string; + /** + * 防火墙信息,具体结构见下方 FirewallSet + */ + FirewallSet?: { + /** + * 防火墙名称 + */ + FirewallName?: string; + /** + * 防火墙ID + */ + FirewallId?: string; + }[]; + /** + * ULB是否开启日志功能。0,关闭;1,开启 + */ + EnableLog?: number; + /** + * 日志功能相关信息,仅当EnableLog为true时会返回,具体结构见下方 LoggerSet + */ + LogSet?: { + /** + * ulb日志上传的bucket + */ + BucketName?: string; + /** + * 上传到bucket使用的token的tokenid + */ + TokenID?: string; + /** + * bucket的token名称 + */ + TokenName?: string; + }; + }[]; +} +/** + * DescribeULBSimple - 获取ULB信息 + */ +export interface DescribeULBSimpleRequest { + /** + * 数据偏移量,默认为0 + */ + Offset?: number; + /** + * 数据分页值,默认为10000 + */ + Limit?: number; + /** + * 负载均衡实例的Id。 若指定则返回指定的负载均衡实例的信息; 若不指定则返回当前数据中心中所有的负载均衡实例的信息 + */ + ULBId?: string; + /** + * ULB所属的VPC + */ + VPCId?: string; + /** + * ULB所属的子网ID + */ + SubnetId?: string; + /** + * ULB所属的业务组ID + */ + BusinessId?: string; +} +/** + * DescribeULBSimple - 获取ULB信息 + */ +export interface DescribeULBSimpleResponse { + /** + * 满足条件的ULB总数 + */ + TotalCount: number; + /** + * ULB列表,每项参数详见 ULBSimpleSet + */ + DataSet: { + /** + * ULB 监听器类型,枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发;Comprehensive,兼容型;Pending,未定型 + */ + ListenType: string; + /** + * ULB提供服务的IP类型。枚举值,“IPv4”,"IPv6"。默认为“IPv4” + */ + IPVersion: string; + /** + * 负载均衡的资源ID + */ + ULBId?: string; + /** + * 负载均衡的资源名称 + */ + Name?: string; + /** + * 负载均衡的业务组名称 + */ + Tag?: string; + /** + * 负载均衡的备注 + */ + Remark?: string; + /** + * ULB的创建时间,格式为Unix Timestamp + */ + CreateTime?: number; + /** + * ULB所在的VPC的ID + */ + VPCId?: string; + /** + * ULB 为 InnerMode 时,ULB 所属的子网ID + */ + SubnetId?: string; + /** + * ULB 所属的业务组ID + */ + BusinessId?: string; + /** + * ULB的内网IP,当ULBType为OuterMode时,该值为空 + */ + PrivateIP?: string; + /** + * 带宽类型,枚举值为: 0,非共享带宽; 1,共享带宽 + */ + BandwidthType?: number; + /** + * 带宽 + */ + Bandwidth?: number; + /** + * ULB的详细信息列表,具体结构见下方 ULBIPSet + */ + IPSet?: { + /** + * 弹性IP的运营商信息,枚举值为: Bgp:BGP IP International:国际IP + */ + OperatorName?: string; + /** + * 弹性IP地址 + */ + EIP?: string; + /** + * 弹性IP的ID + */ + EIPId?: string; + /** + * 弹性IP的带宽类型,枚举值:1 表示是共享带宽,0 普通带宽类型(暂未对外开放) + */ + BandwidthType?: number; + /** + * 弹性IP的带宽值(暂未对外开放) + */ + Bandwidth?: number; + }[]; + /** + * ulb下vserver数量 + */ + VServerCount?: number; + /** + * ULB 的类型(InnerMode or OuterMode) + */ + ULBType?: string; + /** + * 防火墙信息,具体结构见下方 FirewallSet + */ + FirewallSet?: { + /** + * 防火墙名称 + */ + FirewallName?: string; + /** + * 防火墙ID + */ + FirewallId?: string; + }[]; + /** + * ULB是否开启日志功能。0,关闭;1,开启 + */ + EnableLog?: number; + /** + * 日志功能相关信息,仅当EnableLog为true时会返回,具体结构见下方 LoggerSet + */ + LogSet?: { + /** + * ulb日志上传的bucket + */ + BucketName?: string; + /** + * 上传到bucket使用的token的tokenid + */ + TokenID?: string; + /** + * bucket的token名称 + */ + TokenName?: string; + }; + }[]; +} +/** + * DescribeVServer - 获取ULB下的VServer的详细信息 + */ +export interface DescribeVServerRequest { + /** + * 负载均衡实例的Id + */ + ULBId: string; + /** + * VServer实例的Id;若指定则返回指定的VServer实例的信息; 若不指定则返回当前负载均衡实例下所有VServer的信息 + */ + VServerId?: string; + /** + * 数据分页值 + */ + Limit?: number; + /** + * 数据偏移量 + */ + Offset?: number; +} +/** + * DescribeVServer - 获取ULB下的VServer的详细信息 + */ +export interface DescribeVServerResponse { + /** + * 满足条件的VServer总数 + */ + TotalCount?: number; + /** + * VServer列表,每项参数详见 ULBVServerSet + */ + DataSet?: { + /** + * 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测, Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path; 报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize + */ + MonitorType: string; + /** + * 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查域名 + */ + Domain?: string; + /** + * 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查路径 + */ + Path?: string; + /** + * 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + */ + RequestMsg?: string; + /** + * 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + */ + ResponseMsg?: string; + /** + * VServer实例的Id + */ + VServerId?: string; + /** + * VServer实例的名字 + */ + VServerName?: string; + /** + * VServer实例的协议。 枚举值为:HTTP,TCP,UDP,HTTPS。 + */ + Protocol?: string; + /** + * VServer服务端口 + */ + FrontendPort?: number; + /** + * VServer负载均衡的模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口)。 + */ + Method?: string; + /** + * VServer会话保持方式。枚举值为: None -> 关闭会话保持; ServerInsert -> 自动生成; UserDefined -> 用户自定义。 + */ + PersistenceType?: string; + /** + * 根据PersistenceType确定: None或ServerInsert,此字段为空; UserDefined,此字段展示用户自定义会话string。 + */ + PersistenceInfo?: string; + /** + * 空闲连接的回收时间,单位:秒。 + */ + ClientTimeout?: number; + /** + * VServer的运行状态。枚举值: 0 -> rs全部运行正常;1 -> rs全部运行异常;2 -> rs部分运行异常。 + */ + Status?: number; + /** + * VServer绑定的SSL证书信息,具体结构见下方 ULBSSLSet。 + */ + SSLSet?: { + /** + * SSL证书的Id + */ + SSLId?: string; + /** + * SSL证书的名字 + */ + SSLName?: string; + /** + * SSL证书类型,暂时只有 Pem 一种类型 + */ + SSLType?: string; + /** + * SSL证书的内容 + */ + SSLContent?: string; + /** + * SSL证书的创建时间 + */ + CreateTime?: number; + /** + * SSL证书的HASH值 + */ + HashValue?: string; + /** + * SSL证书绑定到的对象 + */ + BindedTargetSet?: { + /** + * SSL证书绑定到的VServer的资源ID + */ + VServerId?: string; + /** + * 对应的VServer的名字 + */ + VServerName?: string; + /** + * VServer 所属的ULB实例的资源ID + */ + ULBId?: string; + /** + * ULB实例的名称 + */ + ULBName?: string; + }[]; + }[]; + /** + * 后端资源信息列表,具体结构见下方 ULBBackendSet + */ + BackendSet?: { + /** + * 后端资源实例的Id + */ + BackendId?: string; + /** + * 资源实例的类型 + */ + ResourceType?: string; + /** + * 资源实例的资源Id + */ + ResourceId?: string; + /** + * 资源实例的资源名称 + */ + ResourceName?: string; + /** + * 资源绑定的虚拟网卡实例的类型 + */ + SubResourceType?: string; + /** + * 资源绑定的虚拟网卡实例的资源Id + */ + SubResourceId?: string; + /** + * 资源绑定的虚拟网卡实例的资源名称 + */ + SubResourceName?: string; + /** + * 后端提供服务的内网IP + */ + PrivateIP?: string; + /** + * 后端提供服务的端口 + */ + Port?: number; + /** + * 后端提供服务的实例启用与否,枚举值:0 禁用 1 启用 + */ + Enabled?: number; + /** + * 后端提供服务的实例运行状态,枚举值:0健康检查健康状态 1 健康检查异常 + */ + Status?: number; + /** + * 后端提供服务的资源所在的子网的ID + */ + SubnetId?: string; + /** + * 是否为backup,只有当vserver的Backup属性为1时才会有此字段,说明:0:主rs1:备rs + */ + IsBackup?: number; + }[]; + /** + * 监听器类型,枚举值为: RequestProxy -> 请求代理;PacketsTransmit -> 报文转发 + */ + ListenType?: string; + /** + * 内容转发信息列表,具体结构见下方 ULBPolicySet + */ + PolicySet?: { + /** + * 内容转发Id,默认内容转发类型下为空。 + */ + PolicyId?: string; + /** + * 内容类型,枚举值:Custom -> 客户自定义;Default -> 默认内容转发 + */ + PolicyType?: string; + /** + * 内容转发匹配字段的类型,枚举值:Domain -> 域名;Path -> 路径; 默认内容转发类型下为空 + */ + Type?: string; + /** + * 内容转发匹配字段;默认内容转发类型下为空。 + */ + Match?: string; + /** + * 内容转发优先级,范围[1,9999],数字越大优先级越高。默认内容转发规则下为0。 + */ + PolicyPriority?: number; + /** + * 所属VServerId + */ + VServerId?: string; + /** + * 默认内容转发类型下返回当前rs总数 + */ + TotalCount?: number; + /** + * 内容转发下rs的详细信息,参考PolicyBackendSet + */ + BackendSet?: { + /** + * 所添加的后端资源在ULB中的对象ID,(为ULB系统中使用,与资源自身ID无关 + */ + BackendId?: string; + /** + * 所添加的后端资源的类型,枚举值:UHost -> 云主机;UPM -> 物理云主机; UDHost -> 私有专区主机;UDocker -> 容器;UHybrid->混合云主机;CUBE->Cube;UNI -> 虚拟网卡 + */ + ResourceType?: string; + /** + * 后端资源的实例名称 + */ + ResourceName?: string; + /** + * 如果资源绑定了弹性网卡,则展示弹性网卡的资源ID + */ + SubResourceId?: string; + /** + * 如果资源绑定了弹性网卡,则展示弹性网卡的资源名称 + */ + SubResourceName?: string; + /** + * "UNI"或者为空 + */ + SubResourceType?: string; + /** + * 后端资源的对象ID + */ + ObjectId?: string; + /** + * 所添加的后端资源服务端口 + */ + Port?: number; + /** + * 后端资源的内网IP + */ + PrivateIP?: string; + }[]; + }[]; + }[]; +} +/** + * ReleaseBackend - 从VServer释放后端资源实例 + */ +export interface ReleaseBackendRequest { + /** + * 负载均衡实例的ID + */ + ULBId: string; + /** + * 后端资源实例的ID(ULB后端ID,非资源自身ID) + */ + BackendId: string; +} +/** + * ReleaseBackend - 从VServer释放后端资源实例 + */ +export interface ReleaseBackendResponse { +} +/** + * UnbindSSL - 从VServer解绑SSL证书 + */ +export interface UnbindSSLRequest { + /** + * 所绑定ULB实例ID + */ + ULBId: string; + /** + * 所绑定VServer实例ID + */ + VServerId: string; + /** + * SSL证书的Id + */ + SSLId: string; +} +/** + * UnbindSSL - 从VServer解绑SSL证书 + */ +export interface UnbindSSLResponse { +} +/** + * UpdateBackendAttribute - 更新ULB后端资源实例(服务节点)属性 + */ +export interface UpdateBackendAttributeRequest { + /** + * 负载均衡资源ID + */ + ULBId: string; + /** + * 后端资源实例的ID(ULB后端ID,非资源自身ID) + */ + BackendId: string; + /** + * 后端资源服务端口,取值范围[1-65535] + */ + Port?: number; + /** + * 所添加的后端RS权重(在加权轮询算法下有效),取值范围[0-100],默认为1 + */ + Weight?: number; + /** + * 后端实例状态开关 + */ + Enabled?: number; + /** + * 是否为backup0:主rs1:备rs默认为0 + */ + IsBackup?: number; +} +/** + * UpdateBackendAttribute - 更新ULB后端资源实例(服务节点)属性 + */ +export interface UpdateBackendAttributeResponse { +} +/** + * UpdatePolicy - 更新内容转发规则,包括转发规则后的服务节点 + */ +export interface UpdatePolicyRequest { + /** + * 需要添加内容转发策略的负载均衡实例ID + */ + ULBId: string; + /** + * 需要添加内容转发策略的VServer实例ID,只支持请求代理模式下,HTTP或HTTPS协议的VServer + */ + VServerId: string; + /** + * 内容转发匹配字段 + */ + Match: string; + /** + * 转发规则的ID,当Type为Default时,可以不传或为空 + */ + PolicyId?: string; + /** + * 内容转发策略应用的后端资源实例的ID,来源于 AllocateBackend 返回的 BackendId,不传表示更新转发节点为空 + */ + BackendId?: string[]; + /** + * 内容转发匹配字段的类型,枚举值:Domain -> 域名转发规则;Path -> 路径转发规则;Default -> 默认转发规则,不传默认值Domain + */ + Type?: string; +} +/** + * UpdatePolicy - 更新内容转发规则,包括转发规则后的服务节点 + */ +export interface UpdatePolicyResponse { +} +/** + * UpdateULBAttribute - 更新ULB名字业务组备注等属性字段 + */ +export interface UpdateULBAttributeRequest { + /** + * ULB资源ID + */ + ULBId: string; + /** + * 名字 + */ + Name?: string; + /** + * 业务 + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; +} +/** + * UpdateULBAttribute - 更新ULB名字业务组备注等属性字段 + */ +export interface UpdateULBAttributeResponse { +} +/** + * UpdateVServerAttribute - 更新VServer实例属性 + */ +export interface UpdateVServerAttributeRequest { + /** + * 负载均衡实例ID + */ + ULBId: string; + /** + * VServer实例ID + */ + VServerId: string; + /** + * VServer实例名称,若无此字段则不做修改 + */ + VServerName?: string; + /** + * VServer负载均衡模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口); WeightRoundrobin -> 加权轮询; Leastconn -> 最小连接数;Backup -> 主备模式。ConsistentHash,SourcePort,ConsistentHashPort 只在报文转发中使用;Leastconn只在请求代理中使用;Roundrobin、Source和WeightRoundrobin,Backup在请求代理和报文转发中使用。默认为:"Roundrobin" + */ + Method?: string; + /** + * VServer会话保持模式,若无此字段则不做修改。枚举值:None:关闭;ServerInsert:自动生成KEY;UserDefined:用户自定义KEY。 + */ + PersistenceType?: string; + /** + * 根据PersistenceType确定: None或ServerInsert, 此字段无意义; UserDefined, 则此字段传入用户自定义会话保持String. 若无此字段则不做修改 + */ + PersistenceInfo?: string; + /** + * 请求代理的VServer下表示空闲连接的回收时间,单位:秒,取值范围:时(0,86400],默认值为60;报文转发的VServer下表示回话保持的时间,单位:秒,取值范围:[60,900],0 表示禁用连接保持 + */ + ClientTimeout?: number; + /** + * 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测,Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path;报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize,默认值为Ping + */ + MonitorType?: string; + /** + * MonitorType 为 Path 时指定健康检查发送请求时HTTP HEADER 里的域名 + */ + Domain?: string; + /** + * MonitorType 为 Path 时指定健康检查发送请求时的路径,默认为 / + */ + Path?: string; + /** + * 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + */ + RequestMsg?: string; + /** + * 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + */ + ResponseMsg?: string; +} +/** + * UpdateVServerAttribute - 更新VServer实例属性 + */ +export interface UpdateVServerAttributeResponse { +} diff --git a/lib/services/ulb/index.js b/lib/services/ulb/index.js new file mode 100644 index 0000000..4b13f09 --- /dev/null +++ b/lib/services/ulb/index.js @@ -0,0 +1,196 @@ +"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 **ulb** service + */ +class ULBClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * AllocateBackend - 添加ULB后端资源实例 + * + * See also: https://docs.ucloud.cn/api/ulb-api/allocate_backend + */ + allocateBackend(request) { + const args = Object.assign({ Action: 'AllocateBackend' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * BindSSL - 将SSL证书绑定到VServer + * + * See also: https://docs.ucloud.cn/api/ulb-api/bind_ssl + */ + bindSSL(request) { + const args = Object.assign({ Action: 'BindSSL' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreatePolicy - 创建VServer内容转发策略 + * + * See also: https://docs.ucloud.cn/api/ulb-api/create_policy + */ + createPolicy(request) { + const args = Object.assign({ Action: 'CreatePolicy' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateSSL - 创建SSL证书,可以把整个 Pem 证书内容传过来,或者把证书、私钥、CA证书分别传过来 + * + * See also: https://docs.ucloud.cn/api/ulb-api/create_ssl + */ + createSSL(request) { + const args = Object.assign({ Action: 'CreateSSL' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateULB - 创建负载均衡实例,可以选择内网或者外网 + * + * See also: https://docs.ucloud.cn/api/ulb-api/create_ulb + */ + createULB(request) { + const args = Object.assign({ Action: 'CreateULB' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateVServer - 创建VServer实例,定义监听的协议和端口以及负载均衡算法 + * + * See also: https://docs.ucloud.cn/api/ulb-api/create_vserver + */ + createVServer(request) { + const args = Object.assign({ Action: 'CreateVServer' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeletePolicy - 删除内容转发策略 + * + * See also: https://docs.ucloud.cn/api/ulb-api/delete_policy + */ + deletePolicy(request) { + const args = Object.assign({ Action: 'DeletePolicy' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteSSL - 删除SSL证书 + * + * See also: https://docs.ucloud.cn/api/ulb-api/delete_ssl + */ + deleteSSL(request) { + const args = Object.assign({ Action: 'DeleteSSL' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteULB - 删除负载均衡实例 + * + * See also: https://docs.ucloud.cn/api/ulb-api/delete_ulb + */ + deleteULB(request) { + const args = Object.assign({ Action: 'DeleteULB' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteVServer - 删除VServer实例 + * + * See also: https://docs.ucloud.cn/api/ulb-api/delete_vserver + */ + deleteVServer(request) { + const args = Object.assign({ Action: 'DeleteVServer' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeSSL - 获取SSL证书信息 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_ssl + */ + describeSSL(request) { + const args = Object.assign({ Action: 'DescribeSSL' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeULB - 获取ULB详细信息 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_ulb + */ + describeULB(request) { + const args = Object.assign({ Action: 'DescribeULB' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeULBSimple - 获取ULB信息 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_ulb_simple + */ + describeULBSimple(request) { + const args = Object.assign({ Action: 'DescribeULBSimple' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeVServer - 获取ULB下的VServer的详细信息 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_vserver + */ + describeVServer(request) { + const args = Object.assign({ Action: 'DescribeVServer' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ReleaseBackend - 从VServer释放后端资源实例 + * + * See also: https://docs.ucloud.cn/api/ulb-api/release_backend + */ + releaseBackend(request) { + const args = Object.assign({ Action: 'ReleaseBackend' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UnbindSSL - 从VServer解绑SSL证书 + * + * See also: https://docs.ucloud.cn/api/ulb-api/unbind_ssl + */ + unbindSSL(request) { + const args = Object.assign({ Action: 'UnbindSSL' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateBackendAttribute - 更新ULB后端资源实例(服务节点)属性 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_backend_attribute + */ + updateBackendAttribute(request) { + const args = Object.assign({ Action: 'UpdateBackendAttribute' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdatePolicy - 更新内容转发规则,包括转发规则后的服务节点 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_policy + */ + updatePolicy(request) { + const args = Object.assign({ Action: 'UpdatePolicy' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateULBAttribute - 更新ULB名字业务组备注等属性字段 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_ulb_attribute + */ + updateULBAttribute(request) { + const args = Object.assign({ Action: 'UpdateULBAttribute' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateVServerAttribute - 更新VServer实例属性 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_vserver_attribute + */ + updateVServerAttribute(request) { + const args = Object.assign({ Action: 'UpdateVServerAttribute' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = ULBClient; diff --git a/lib/services/umem/index.d.ts b/lib/services/umem/index.d.ts new file mode 100644 index 0000000..ac8ce49 --- /dev/null +++ b/lib/services/umem/index.d.ts @@ -0,0 +1,1910 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **umem** service + */ +export default class UMemClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * CheckUDredisSpaceAllowance - 检查高性能UMem剩余资源,以及分片扩容前的资源预检查 + * + * See also: https://docs.ucloud.cn/api/umem-api/check_udredis_space_allowance + */ + checkUDredisSpaceAllowance(request?: CheckUDredisSpaceAllowanceRequest): Promise; + /** + * CheckURedisAllowance - 检查主备Redis的资源是否足够创建新实例,以及主备Redis的扩容资源预检查 + * + * See also: https://docs.ucloud.cn/api/umem-api/check_uredis_allowance + */ + checkURedisAllowance(request?: CheckURedisAllowanceRequest): Promise; + /** + * CreateUMemBackup - 创建分布式redis备份 + * + * See also: https://docs.ucloud.cn/api/umem-api/create_umem_backup + */ + createUMemBackup(request?: CreateUMemBackupRequest): Promise; + /** + * CreateUMemSpace - 创建UMem内存空间 + * + * See also: https://docs.ucloud.cn/api/umem-api/create_umem_space + */ + createUMemSpace(request?: CreateUMemSpaceRequest): Promise; + /** + * CreateUMemcacheGroup - 创建单机Memcache + * + * See also: https://docs.ucloud.cn/api/umem-api/create_umem_cache_group + */ + createUMemcacheGroup(request?: CreateUMemcacheGroupRequest): Promise; + /** + * CreateURedisBackup - 创建主备Redis备份 + * + * See also: https://docs.ucloud.cn/api/umem-api/create_uredis_backup + */ + createURedisBackup(request?: CreateURedisBackupRequest): Promise; + /** + * CreateURedisGroup - 创建主备redis + * + * See also: https://docs.ucloud.cn/api/umem-api/create_uredis_group + */ + createURedisGroup(request?: CreateURedisGroupRequest): Promise; + /** + * DeleteUMemSpace - 删除UMem内存空间 + * + * See also: https://docs.ucloud.cn/api/umem-api/delete_umem_space + */ + deleteUMemSpace(request?: DeleteUMemSpaceRequest): Promise; + /** + * DeleteUMemcacheGroup - 删除单机Memcache + * + * See also: https://docs.ucloud.cn/api/umem-api/delete_umem_cache_group + */ + deleteUMemcacheGroup(request?: DeleteUMemcacheGroupRequest): Promise; + /** + * DeleteURedisGroup - 删除主备redis + * + * See also: https://docs.ucloud.cn/api/umem-api/delete_uredis_group + */ + deleteURedisGroup(request?: DeleteURedisGroupRequest): Promise; + /** + * DescribeUDRedisSlowlog - 查询UDRedis慢日志 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_ud_redis_slowlog + */ + describeUDRedisSlowlog(request?: DescribeUDRedisSlowlogRequest): Promise; + /** + * DescribeUMemBackup - 查询分布式redis备份 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_backup + */ + describeUMemBackup(request?: DescribeUMemBackupRequest): Promise; + /** + * DescribeUMemBackupURL - 获取分布式redis 备份下载链接 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_backup_url + */ + describeUMemBackupURL(request?: DescribeUMemBackupURLRequest): Promise; + /** + * DescribeUMemBlockInfo - 拉取UDRedis分片信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_block_info + */ + describeUMemBlockInfo(request?: DescribeUMemBlockInfoRequest): Promise; + /** + * DescribeUMemPrice - 获取UMem实例价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_price + */ + describeUMemPrice(request?: DescribeUMemPriceRequest): Promise; + /** + * DescribeUMemSpace - 获取UMem内存空间列表 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_space + */ + describeUMemSpace(request?: DescribeUMemSpaceRequest): Promise; + /** + * DescribeUMemUpgradePrice - 获取UMem升级价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_upgrade_price + */ + describeUMemUpgradePrice(request?: DescribeUMemUpgradePriceRequest): Promise; + /** + * DescribeUMemcacheGroup - 显示Memcache + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_cache_group + */ + describeUMemcacheGroup(request?: DescribeUMemcacheGroupRequest): Promise; + /** + * DescribeUMemcachePrice - 获取umemcache组价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_cache_price + */ + describeUMemcachePrice(request?: DescribeUMemcachePriceRequest): Promise; + /** + * DescribeUMemcacheUpgradePrice - 获取umemcache升级价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_cache_upgrade_price + */ + describeUMemcacheUpgradePrice(request?: DescribeUMemcacheUpgradePriceRequest): Promise; + /** + * DescribeURedisBackup - 查询主备redis备份 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_backup + */ + describeURedisBackup(request?: DescribeURedisBackupRequest): Promise; + /** + * DescribeURedisBackupURL - 获取主备Redis备份下载链接 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_backup_url + */ + describeURedisBackupURL(request?: DescribeURedisBackupURLRequest): Promise; + /** + * DescribeURedisConfig - 查询主备Redis所有配置文件 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_config + */ + describeURedisConfig(request?: DescribeURedisConfigRequest): Promise; + /** + * DescribeURedisGroup - 查询主备Redis + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_group + */ + describeURedisGroup(request?: DescribeURedisGroupRequest): Promise; + /** + * DescribeURedisPrice - 取uredis价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_price + */ + describeURedisPrice(request?: DescribeURedisPriceRequest): Promise; + /** + * DescribeURedisSlowlog - 查询URedis慢日志 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_slowlog + */ + describeURedisSlowlog(request?: DescribeURedisSlowlogRequest): Promise; + /** + * DescribeURedisUpgradePrice - 获取uredis升级价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_upgrade_price + */ + describeURedisUpgradePrice(request?: DescribeURedisUpgradePriceRequest): Promise; + /** + * DescribeURedisVersion - 获取主Redis可用版本 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_version + */ + describeURedisVersion(request?: DescribeURedisVersionRequest): Promise; + /** + * FlushallURedisGroup - 清除主备redis数据 + * + * See also: https://docs.ucloud.cn/api/umem-api/flushall_uredis_group + */ + flushallURedisGroup(request?: FlushallURedisGroupRequest): Promise; + /** + * GetUMemSpaceState - 获取UMem内存空间列表 + * + * See also: https://docs.ucloud.cn/api/umem-api/get_umem_space_state + */ + getUMemSpaceState(request?: GetUMemSpaceStateRequest): Promise; + /** + * ModifyUMemSpaceName - 修改UMem内存空间名称 + * + * See also: https://docs.ucloud.cn/api/umem-api/modify_umem_space_name + */ + modifyUMemSpaceName(request?: ModifyUMemSpaceNameRequest): Promise; + /** + * ModifyURedisGroupName - 修改主备redis名称 + * + * See also: https://docs.ucloud.cn/api/umem-api/modify_uredis_group_name + */ + modifyURedisGroupName(request?: ModifyURedisGroupNameRequest): Promise; + /** + * ModifyURedisGroupPassword - 修改主备密码/重置密码 + * + * See also: https://docs.ucloud.cn/api/umem-api/modify_uredis_group_password + */ + modifyURedisGroupPassword(request?: ModifyURedisGroupPasswordRequest): Promise; + /** + * RemoveUDRedisData - 清除udredis实例数据 + * + * See also: https://docs.ucloud.cn/api/umem-api/remove_ud_redis_data + */ + removeUDRedisData(request?: RemoveUDRedisDataRequest): Promise; + /** + * ResizeUMemSpace - 调整内存空间容量 + * + * See also: https://docs.ucloud.cn/api/umem-api/resize_umem_space + */ + resizeUMemSpace(request?: ResizeUMemSpaceRequest): Promise; + /** + * ResizeURedisGroup - 通过调用CheckURedisAllowance接口,检查资源情况,根据不同情形来调整主备redis容量,其中主要包括可用区资源不足无法扩容,主备所在宿主机资源不足需要迁移完成扩容(需要主从切换,会闪断及负载升高),以及直接扩容(业务无感知) + * + * See also: https://docs.ucloud.cn/api/umem-api/resize_uredis_group + */ + resizeURedisGroup(request?: ResizeURedisGroupRequest): Promise; + /** + * RestartUMemcacheGroup - 重启单机Memcache + * + * See also: https://docs.ucloud.cn/api/umem-api/restart_umem_cache_group + */ + restartUMemcacheGroup(request?: RestartUMemcacheGroupRequest): Promise; + /** + * RestartURedisGroup - 重启主备实例 + * + * See also: https://docs.ucloud.cn/api/umem-api/restart_uredis_group + */ + restartURedisGroup(request?: RestartURedisGroupRequest): Promise; + /** + * UpdateURedisBackupStrategy - URedisBackupStrategy + * + * See also: https://docs.ucloud.cn/api/umem-api/update_uredis_backup_strategy + */ + updateURedisBackupStrategy(request?: UpdateURedisBackupStrategyRequest): Promise; +} +/** + * CheckUDredisSpaceAllowance - 检查高性能UMem剩余资源,以及分片扩容前的资源预检查 + */ +export interface CheckUDredisSpaceAllowanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 创建实例的容量大小,,扩容时的分片目标容量大小 + */ + Size: number; + /** + * 创建实例的数量,[1-10] + */ + Count: string; + /** + * 资源ID,扩缩容时的必传参数 + */ + GroupId?: string; +} +/** + * CheckUDredisSpaceAllowance - 检查高性能UMem剩余资源,以及分片扩容前的资源预检查 + */ +export interface CheckUDredisSpaceAllowanceResponse { + /** + * 创建实例资源时,表示可创建的数量;扩容资源时,返回1表示可以扩容,0表示可用区资源不足不能扩容 + */ + Count: number; +} +/** + * CheckURedisAllowance - 检查主备Redis的资源是否足够创建新实例,以及主备Redis的扩容资源预检查 + */ +export interface CheckURedisAllowanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 创建实例的容量大小, 单位:GB 目前仅支持1/2/4/8/16/32六种规格;扩缩容时,表示实例的目标资源大小 + */ + Size: number; + /** + * 创建实例的数量,[1-10] + */ + Count: number; + /** + * + */ + Protocol?: string; + /** + * 是否是跨机房URedis(默认false) + */ + RegionFlag?: boolean; + /** + * 资源ID,扩容实例资源时的必传参数 + */ + GroupId?: string; +} +/** + * CheckURedisAllowance - 检查主备Redis的资源是否足够创建新实例,以及主备Redis的扩容资源预检查 + */ +export interface CheckURedisAllowanceResponse { + /** + * 创建实例资源时,表示可创建的数量;扩容资源时,返回1表示可以扩容,0表示可用区资源不足不能扩容 + */ + Count: number; +} +/** + * CreateUMemBackup - 创建分布式redis备份 + */ +export interface CreateUMemBackupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 资源id + */ + SpaceId: string; + /** + * 请求创建备份的名称 (范围[6-63],只能包含英文、数字以及符号-和_) + */ + BackupName: string; +} +/** + * CreateUMemBackup - 创建分布式redis备份 + */ +export interface CreateUMemBackupResponse { + /** + * 备份Id + */ + BackupId?: string; +} +/** + * CreateUMemSpace - 创建UMem内存空间 + */ +export interface CreateUMemSpaceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 内存大小, 单位:GB, 范围[1~1024] + */ + Size: number; + /** + * 空间名称,长度(6<=size<=63) + */ + Name: string; + /** + * 协议:memcache, redis (默认redis).注意:redis无single类型 + */ + Protocol?: string; + /** + * 空间类型:single(无热备),double(热备)(默认: double) + */ + Type?: string; + /** + * Year , Month, Dynamic, Trial 默认: Month + */ + ChargeType?: string; + /** + * 购买时长 默认: 1 + */ + Quantity?: number; + /** + * 使用的代金券id + */ + CouponId?: string; +} +/** + * CreateUMemSpace - 创建UMem内存空间 + */ +export interface CreateUMemSpaceResponse { + /** + * 创建内存空间ID列表 + */ + SpaceId?: string; +} +/** + * CreateUMemcacheGroup - 创建单机Memcache + */ +export interface CreateUMemcacheGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 请求创建组的名称 范围[6-60] + */ + Name: string; + /** + * 每个节点的内存大小,单位GB,默认1GB 目前仅支持1/2/4/8/16/32这几档 + */ + Size?: number; + /** + * 配置ID,目前仅支持默认配置id 默认配置id:"9a891891-c245-4b66-bce8-67e59430d67c" + */ + ConfigId?: string; + /** + * Memcache版本信息,默认为1.4.31 + */ + Version?: string; + /** + * 计费模式,Year , Month, Dynamic 默认: Month + */ + ChargeType?: string; + /** + * 购买时长,默认为1 + */ + Quantity?: number; + /** + * 业务组 默认:Default + */ + Tag?: string; + /** + * + */ + Protocol?: string; + /** + * 代金券ID + */ + CouponId?: string; +} +/** + * CreateUMemcacheGroup - 创建单机Memcache + */ +export interface CreateUMemcacheGroupResponse { + /** + * 创建的组ID + */ + GroupId?: string; +} +/** + * CreateURedisBackup - 创建主备Redis备份 + */ +export interface CreateURedisBackupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 资源id + */ + GroupId: string; + /** + * 请求创建组的名称 (范围[6-63],只能包含英文、数字以及符号-和_) + */ + BackupName: string; + /** + * 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + */ + SlaveZone?: string; +} +/** + * CreateURedisBackup - 创建主备Redis备份 + */ +export interface CreateURedisBackupResponse { + /** + * 备份id + */ + BackupId: string; +} +/** + * CreateURedisGroup - 创建主备redis + */ +export interface CreateURedisGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 请求创建组的名称 (范围[6-63],只能包含英文、数字以及符号-和_) + */ + Name: string; + /** + * 是否开启高可用,enable或disable + */ + HighAvailability: string; + /** + * 每个节点的内存大小,单位GB,默认1GB,目前仅支持1/2/4/8/16/32,六种 + */ + Size?: number; + /** + * 是否自动备份,enable或disable,默认disable + */ + AutoBackup?: string; + /** + * 自动备份开始时间,范围[0-23],默认3点 + */ + BackupTime?: number; + /** + * 配置ID,目前支持 3.0版本配置ID:"03f58ca9-b64d-4bdd-abc7-c6b9a46fd801",3.2版本配置ID:"3e45ac48-f8a2-a9q2-261d-l342dab130gf", 4.0版本配置ID:"6c9298a3-9d7f-428c-b1d0-e87ab3b8a1ea",默认版本3.0,从备份创建为必传项 + */ + ConfigId?: string; + /** + * Redis版本信息(详见DescribeURedisVersion返回结果),默认版本3.0 + */ + Version?: string; + /** + * 计费模式,Year , Month, Dynamic 默认: Month + */ + ChargeType?: string; + /** + * 购买时长,默认为1 + */ + Quantity?: number; + /** + * 业务组名称 + */ + Tag?: string; + /** + * 初始化密码,需要 base64 编码 + */ + Password?: string; + /** + * 有此项代表从备份中创建,无代表正常创建 + */ + BackupId?: string; + /** + * 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + */ + SlaveZone?: string; + /** + * Master Redis Group的ID,创建只读Slave时,必须填写 + */ + MasterGroupId?: string; + /** + * 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + */ + EnableIpV6?: boolean; + /** + * 子网ID + */ + SubnetId?: string; + /** + * VPC的ID + */ + VPCId?: string; + /** + * 代金券ID + */ + CouponId?: string; +} +/** + * CreateURedisGroup - 创建主备redis + */ +export interface CreateURedisGroupResponse { + /** + * 创建的组ID + */ + GroupId?: string; +} +/** + * DeleteUMemSpace - 删除UMem内存空间 + */ +export interface DeleteUMemSpaceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * UMem内存空间ID + */ + SpaceId: string; +} +/** + * DeleteUMemSpace - 删除UMem内存空间 + */ +export interface DeleteUMemSpaceResponse { +} +/** + * DeleteUMemcacheGroup - 删除单机Memcache + */ +export interface DeleteUMemcacheGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 组ID + */ + GroupId: string; +} +/** + * DeleteUMemcacheGroup - 删除单机Memcache + */ +export interface DeleteUMemcacheGroupResponse { +} +/** + * DeleteURedisGroup - 删除主备redis + */ +export interface DeleteURedisGroupRequest { + /** + * 组ID + */ + GroupId: string; +} +/** + * DeleteURedisGroup - 删除主备redis + */ +export interface DeleteURedisGroupResponse { +} +/** + * DescribeUDRedisSlowlog - 查询UDRedis慢日志 + */ +export interface DescribeUDRedisSlowlogRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 实例id + */ + InstanceId: string; + /** + * 分页显示的条目数,默认为10 + */ + Limit?: number; +} +/** + * DescribeUDRedisSlowlog - 查询UDRedis慢日志 + */ +export interface DescribeUDRedisSlowlogResponse { + /** + * 总条目数 + */ + TotalCount: number; + /** + * 条目数据 + */ + DataSet: { + /** + * 查询发生的时间 + */ + StartTime?: number; + /** + * 查询消耗的时间 + */ + SpendTime?: number; + /** + * 查询命令 + */ + Command?: string; + /** + * 分片id + */ + BlockId?: string; + }[]; +} +/** + * DescribeUMemBackup - 查询分布式redis备份 + */ +export interface DescribeUMemBackupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 资源id + */ + SpaceId: string; + /** + * 分页显示的起始偏移, 默认值为0 + */ + Offset?: number; + /** + * 分页显示的条目数, 默认值为10 + */ + Limit?: number; +} +/** + * DescribeUMemBackup - 查询分布式redis备份 + */ +export interface DescribeUMemBackupResponse { + /** + * 分布式redis 备份,数组的每个元素为每个分片的备份 + */ + DataSet?: { + /** + * 备份名称 + */ + BackupName: string; + /** + * 创建时间 + */ + CreateTime: number; + /** + * Starting:备份中 Done:完成 + */ + State: string; + /** + * 空间的备份ID + */ + BackupId: string; + /** + * 备份类型: auto(自动) ,manual(手动) + */ + BackupType: string; + /** + * 本次备份,分片的数量 + */ + BlockCount: number; + }[]; +} +/** + * DescribeUMemBackupURL - 获取分布式redis 备份下载链接 + */ +export interface DescribeUMemBackupURLRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 资源id + */ + SpaceId: string; + /** + * 备份Id + */ + BackupId: string; + /** + * 分片id + */ + BlockId?: string; +} +/** + * DescribeUMemBackupURL - 获取分布式redis 备份下载链接 + */ +export interface DescribeUMemBackupURLResponse { + /** + * 备份url,每个分片一个下载URL + */ + BackupURL: string[]; +} +/** + * DescribeUMemBlockInfo - 拉取UDRedis分片信息 + */ +export interface DescribeUMemBlockInfoRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UMem内存资源ID + */ + SpaceId: string; + /** + * 分页显示的起始偏移, 默认值为0 + */ + Offset: number; + /** + * 分页显示的条目数, 默认值为10 + */ + Limit: number; +} +/** + * DescribeUMemBlockInfo - 拉取UDRedis分片信息 + */ +export interface DescribeUMemBlockInfoResponse { + /** + * 分布式redis 分片信息 + */ + DataSet?: { + /** + * 分片id + */ + BlockId: string; + /** + * 分片ip + */ + BlockVip: string; + /** + * 分片端口 + */ + BlockPort: number; + /** + * 容量单位GB + */ + BlockSize: number; + /** + * 使用量单位MB + */ + BlockUsedSize: number; + /** + * 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中 SetPasswordFail //设置密码失败 + */ + BlockState: string; + /** + * 分片维护的键槽起始值 + */ + BlockSlotBegin: number; + /** + * 分片维护的键槽结束值 + */ + BlockSlotEnd: number; + }[]; +} +/** + * DescribeUMemPrice - 获取UMem实例价格信息 + */ +export interface DescribeUMemPriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 购买umem大小,单位:GB,范围[1~1024] + */ + Size: number; + /** + * 空间类型:single(无热备),double(热备)(默认: double) + */ + Type: string; + /** + * Year, Month, Dynamic 如果不指定,则一次性获取三种计费 + */ + ChargeType?: string; + /** + * 购买UMem的时长,默认值为1 + */ + Quantity?: number; +} +/** + * DescribeUMemPrice - 获取UMem实例价格信息 + */ +export interface DescribeUMemPriceResponse { + /** + * 价格 参数见 UMemPriceSet + */ + DataSet?: { + /** + * Year, Month, Dynamic,Trial + */ + ChargeType?: string; + /** + * 现价 + */ + Price?: number; + /** + * 原价 + */ + OriginalPrice?: number; + }[]; +} +/** + * DescribeUMemSpace - 获取UMem内存空间列表 + */ +export interface DescribeUMemSpaceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 返回数据长度, 默认为20 + */ + Limit?: number; + /** + * 内存空间ID (无ID,则获取所有) + */ + SpaceId?: string; + /** + * 协议类型: memcache, redis + */ + Protocol?: string; +} +/** + * DescribeUMemSpace - 获取UMem内存空间列表 + */ +export interface DescribeUMemSpaceResponse { + /** + * JSON 格式的UMem内存空间实例列表, 详细参见 UMemSpaceSet + */ + DataSet?: { + /** + * 可用区,参见[可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * + */ + Tag: string; + /** + * 运维时间0 //0点1 //1点依次类推 + */ + RewriteTime: number; + /** + * 内存空间ID + */ + SpaceId?: string; + /** + * + */ + SubnetId?: string; + /** + * + */ + VPCId?: string; + /** + * 内存空间名称 + */ + Name?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 到期时间 + */ + ExpireTime?: number; + /** + * 空间类型:single(无热备),double(热备) + */ + Type?: string; + /** + * 协议类型: memcache, redis + */ + Protocol?: string; + /** + * 容量单位GB + */ + Size?: number; + /** + * 使用量单位MB + */ + UsedSize?: number; + /** + * Starting:创建中 Running:运行中 Fail:失败 + */ + State?: string; + /** + * Year, Month, Dynamic, Trial + */ + ChargeType?: string; + /** + * IP端口信息请参见 UMemSpaceAddressSet + */ + Address?: { + /** + * UMem实例访问IP + */ + IP?: string; + /** + * UMem实例访问Port + */ + Port?: number; + }[]; + }[]; + /** + * 根据过滤条件得到的总数 + */ + TotalCount?: number; +} +/** + * DescribeUMemUpgradePrice - 获取UMem升级价格信息 + */ +export interface DescribeUMemUpgradePriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 购买UMem大小,单位:GB + */ + Size: number; + /** + * 空间类型:single(无热备),double(热备)(默认: double) + */ + Type: string; + /** + * 需要升级的空间的SpaceId + */ + SpaceId: string; +} +/** + * DescribeUMemUpgradePrice - 获取UMem升级价格信息 + */ +export interface DescribeUMemUpgradePriceResponse { + /** + * 价格 + */ + Price?: number; + /** + * 原价 + */ + OriginalPrice?: number; +} +/** + * DescribeUMemcacheGroup - 显示Memcache + */ +export interface DescribeUMemcacheGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 组的ID,如果指定则获取描述,否则为列表操 作,需指定Offset/Limit + */ + GroupId?: string; + /** + * 分页显示的起始偏移, 默认值为0 + */ + Offset?: number; + /** + * 分页显示的条目数, 默认值为20 + */ + Limit?: number; +} +/** + * DescribeUMemcacheGroup - 显示Memcache + */ +export interface DescribeUMemcacheGroupResponse { + /** + * 组的总的节点个数 + */ + TotalCount?: number; + /** + * 组列表,参见 UMemcacheGroupSet + */ + DataSet?: { + /** + * 组ID + */ + GroupId?: string; + /** + * 组名称 + */ + Name?: string; + /** + * 节点的配置ID + */ + ConfigId?: string; + /** + * 节点的虚拟IP地址 + */ + VirtualIP?: string; + /** + * 节点分配的服务端口 + */ + Port?: number; + /** + * 容量单位GB + */ + Size?: number; + /** + * 使用量单位MB + */ + UsedSize?: number; + /** + * Memcache版本信息,默认为1.4.31 + */ + Version?: string; + /** + * 状态标记 Creating // 初始化中 CreateFail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中 + */ + State?: string; + /** + * 创建时间 (UNIX时间戳) + */ + CreateTime?: number; + /** + * 修改时间 (UNIX时间戳) + */ + ModifyTime?: number; + /** + * 过期时间 (UNIX时间戳) + */ + ExpireTime?: number; + /** + * 计费类型:Year,Month,Dynamic 默认Dynamic + */ + ChargeType?: string; + /** + * 业务组名称 + */ + Tag?: string; + }[]; +} +/** + * DescribeUMemcachePrice - 获取umemcache组价格信息 + */ +export interface DescribeUMemcachePriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 容量大小,单位:GB 取值范围[1-32] + */ + Size: number; + /** + * 计费模式,Year, Month, Dynamic,默认: Dynamic 默认: 获取所有计费模式的价格 + */ + ChargeType?: string; + /** + * 购买umemcache的时长,默认值为1 + */ + Quantity?: number; + /** + * 空间类型:single(无热备),double(热备)(默认: double) + */ + Type?: string; +} +/** + * DescribeUMemcachePrice - 获取umemcache组价格信息 + */ +export interface DescribeUMemcachePriceResponse { + /** + * 价格列表, 参见 UMemcachePriceSet + */ + DataSet?: { + /** + * 计费模式,Year, Month, Dynamic + */ + ChargeType?: string; + /** + * 总价格 + */ + Price?: number; + /** + * 产品列表价 + */ + ListPrice?: number; + /** + * 原价 + */ + OriginalPrice?: number; + }[]; +} +/** + * DescribeUMemcacheUpgradePrice - 获取umemcache升级价格信息 + */ +export interface DescribeUMemcacheUpgradePriceRequest { + /** + * 购买umemcache大小,单位:GB + */ + Size: number; + /** + * 需要升级的空间的GroupId,请参考DescribeUMemcacheGroup接口 + */ + GroupId: string; +} +/** + * DescribeUMemcacheUpgradePrice - 获取umemcache升级价格信息 + */ +export interface DescribeUMemcacheUpgradePriceResponse { + /** + * 价格,单位:元 + */ + Price?: number; +} +/** + * DescribeURedisBackup - 查询主备redis备份 + */ +export interface DescribeURedisBackupRequest { + /** + * 分页显示的起始偏移, 默认值为0 + */ + Offset?: number; + /** + * 分页显示的条目数, 默认值为10 + */ + Limit?: number; + /** + * 组的ID + */ + GroupId?: string; +} +/** + * DescribeURedisBackup - 查询主备redis备份 + */ +export interface DescribeURedisBackupResponse { + /** + * 用户名下总的备份个数 + */ + TotalCount?: number; + /** + * 备份列表 参见 URedisBackupSet + */ + DataSet?: { + /** + * 备份ID + */ + BackupId?: string; + /** + * 可用区,参见[可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 对应的实例ID + */ + GroupId?: string; + /** + * 组名称 + */ + GroupName?: string; + /** + * 备份的名称 + */ + BackupName?: string; + /** + * 备份时间 (UNIX时间戳) + */ + BackupTime?: number; + /** + * 备份文件大小, 以字节为单位 + */ + BackupSize?: number; + /** + * 备份类型: Manual 手动 Auto 自动 + */ + BackupType?: string; + /** + * 备份的状态: Backuping 备份中 Success 备份成功 Error 备份失败 Expired 备份过期 + */ + State?: string; + }[]; +} +/** + * DescribeURedisBackupURL - 获取主备Redis备份下载链接 + */ +export interface DescribeURedisBackupURLRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 备份ID + */ + BackupId: string; + /** + * 是否是跨机房URedis(默认false) + */ + RegionFlag?: boolean; + /** + * 实例名称 + */ + GroupId?: string; + /** + * 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + */ + SlaveZone?: string; +} +/** + * DescribeURedisBackupURL - 获取主备Redis备份下载链接 + */ +export interface DescribeURedisBackupURLResponse { + /** + * 备份文件公网的地址 + */ + BackupURL?: string; + /** + * 备份文件公网的地址 + */ + BackupPath?: string; +} +/** + * DescribeURedisConfig - 查询主备Redis所有配置文件 + */ +export interface DescribeURedisConfigRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 是否是跨机房URedis(默认false) + */ + RegionFlag: boolean; + /** + * Redis版本号 + */ + Version?: string; + /** + * 配置文件ID + */ + ConfigId?: string; + /** + * 页显示的起始偏移, 默认值为0 + */ + Offset?: number; + /** + * 页显示的条目数, 默认值为10 + */ + Limit?: number; +} +/** + * DescribeURedisConfig - 查询主备Redis所有配置文件 + */ +export interface DescribeURedisConfigResponse { + /** + * 根据过滤条件得到的总数 + */ + TotalCount?: number; + /** + * 配置文件列表 参见 URedisConfigSet + */ + DataSet?: { + /** + * Zone + */ + Zone?: string; + /** + * 配置ID + */ + ConfigId?: string; + /** + * 配置名称 + */ + Name?: string; + /** + * 配置描述 + */ + Description?: string; + /** + * 配置对应的Redis版本 + */ + Version?: string; + /** + * 置是否可以修改 + */ + IsModify?: string; + /** + * 配置所处的状态 + */ + State?: string; + /** + * 创建时间 (UNIX时间戳) + */ + CreateTime?: number; + /** + * 修改时间 (UNIX时间戳) + */ + ModifyTime?: number; + /** + * 是否是跨机房URedis(默认false) + */ + RegionFlag?: boolean; + }[]; +} +/** + * DescribeURedisGroup - 查询主备Redis + */ +export interface DescribeURedisGroupRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 组的ID,如果指定则获取描述,否则为列表操 作,需指定Offset/Limit + */ + GroupId?: string; + /** + * 分页显示的起始偏移, 默认值为0 + */ + Offset?: number; + /** + * 分页显示的条目数, 默认值为20 + */ + Limit?: number; +} +/** + * DescribeURedisGroup - 查询主备Redis + */ +export interface DescribeURedisGroupResponse { + /** + * 组的总的节点个数 + */ + TotalCount?: number; + /** + * 组列表 参见 URedisGroupSet + */ + DataSet?: { + /** + * 实例所在可用区,或者master redis所在可用区,参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 返回运维时间 0 //0点 1 //1点 以此类推 + */ + RewriteTime: number; + /** + * 实例类型 + */ + Role: string; + /** + * vpcid + */ + VPCId?: string; + /** + * subnetid + */ + SubnetId?: string; + /** + * 组ID + */ + GroupId?: string; + /** + * 组名称 + */ + Name?: string; + /** + * 空间类型:single(无热备),double(热备) + */ + Type?: string; + /** + * 协议 + */ + Protocol?: string; + /** + * 容量单位GB + */ + MemorySize?: number; + /** + * 组名称 + */ + GroupName?: string; + /** + * 节点的配置ID + */ + ConfigId?: string; + /** + * 节点的虚拟IP地址 + */ + VirtualIP?: string; + /** + * 节点分配的服务端口 + */ + Port?: number; + /** + * 容量单位GB + */ + Size?: number; + /** + * 使用量单位MB + */ + UsedSize?: number; + /** + * 是否需要自动备份,enable,disable + */ + AutoBackup?: string; + /** + * 组自动备份开始时间,单位小时计,范围[0-23] + */ + BackupTime?: number; + /** + * 是否开启高可用,enable,disable + */ + HighAvailability?: string; + /** + * Redis版本信息 + */ + Version?: string; + /** + * 过期时间 (UNIX时间戳) + */ + ExpireTime?: number; + /** + * 计费类型:Year,Month,Dynamic 默认Dynamic + */ + ChargeType?: string; + /** + * 状态标记 Creating // 初始化中 CreateFail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败 + */ + State?: string; + /** + * 创建时间 (UNIX时间戳) + */ + CreateTime?: number; + /** + * 修改时间 (UNIX时间戳) + */ + ModifyTime?: number; + /** + * 业务组名称 + */ + Tag?: string; + /** + * 跨机房URedis,slave redis所在可用区,参见 [可用区列表](../summary/regionlist.html) + */ + SlaveZone?: string; + }[]; +} +/** + * DescribeURedisPrice - 取uredis价格信息 + */ +export interface DescribeURedisPriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 量大小,单位:GB 取值范围[1-32] + */ + Size: number; + /** + * 计费模式,Year, Month, Dynamic;如果不指定,则一次性获取三种计费 + */ + ChargeType?: string; + /** + * 计费模式为Dynamic时,购买的时长, 默认为1 + */ + Quantity?: number; + /** + * 是否是跨机房URedis(默认false) + */ + RegionFlag?: boolean; + /** + * 产品类型:MS_Redis(标准主备版),S_Redis(从库),默认为MS_Redis + */ + ProductType?: string; +} +/** + * DescribeURedisPrice - 取uredis价格信息 + */ +export interface DescribeURedisPriceResponse { + /** + * 价格 参数见 UMemPriceSet + */ + DataSet?: { + /** + * 原价 + */ + OriginalPrice: number; + /** + * Year, Month, Dynamic,Trial + */ + ChargeType?: string; + /** + * 产品列表价 + */ + ListPrice?: number; + /** + * 总价格 + */ + Price?: number; + }[]; +} +/** + * DescribeURedisSlowlog - 查询URedis慢日志 + */ +export interface DescribeURedisSlowlogRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 资源ID + */ + GroupId: string; + /** + * 分页显示的条目数,默认为10 + */ + Limit?: number; +} +/** + * DescribeURedisSlowlog - 查询URedis慢日志 + */ +export interface DescribeURedisSlowlogResponse { + /** + * 总条目数 + */ + TotalCount: number; + /** + * 条目数据 + */ + DataSet?: { + /** + * 查询发生的时间 + */ + StartTime?: number; + /** + * 查询消耗的时间 + */ + SpendTime?: number; + /** + * 查询命令 + */ + Command?: string; + }[]; +} +/** + * DescribeURedisUpgradePrice - 获取uredis升级价格信息 + */ +export interface DescribeURedisUpgradePriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 购买uredis大小,单位:GB,范围是[1-32] + */ + Size: number; + /** + * 要升级的空间的GroupId,请参考DescribeURedisGroup接口 + */ + GroupId: string; +} +/** + * DescribeURedisUpgradePrice - 获取uredis升级价格信息 + */ +export interface DescribeURedisUpgradePriceResponse { + /** + * 扩容差价,单位: 元,保留小数点后两位有效数字 + */ + Price?: number; +} +/** + * DescribeURedisVersion - 获取主Redis可用版本 + */ +export interface DescribeURedisVersionRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; +} +/** + * DescribeURedisVersion - 获取主Redis可用版本 + */ +export interface DescribeURedisVersionResponse { + /** + * 组列表 参见 URedisVersionSet + */ + DataSet?: { + /** + * Redis版本 + */ + Version?: string; + }[]; + /** + * 总版本个数 + */ + TotalCount?: number; +} +/** + * FlushallURedisGroup - 清除主备redis数据 + */ +export interface FlushallURedisGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 组的ID + */ + GroupId: string; + /** + * FlushDb或FlushAll + */ + FlushType: string; + /** + * 清空的db,FlushType为FlushDb,此项为必传项 + */ + DbNum?: number; + /** + * company_id + */ + TopOrganizationId?: number; + /** + * OrganizationId + */ + OrganizationId?: number; + /** + * 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + */ + SlaveZone?: string; +} +/** + * FlushallURedisGroup - 清除主备redis数据 + */ +export interface FlushallURedisGroupResponse { +} +/** + * GetUMemSpaceState - 获取UMem内存空间列表 + */ +export interface GetUMemSpaceStateRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 内存空间ID + */ + SpaceId: string; +} +/** + * GetUMemSpaceState - 获取UMem内存空间列表 + */ +export interface GetUMemSpaceStateResponse { + /** + * Starting:创建中 Running:运行中 Fail:失败 + */ + State?: string; +} +/** + * ModifyUMemSpaceName - 修改UMem内存空间名称 + */ +export interface ModifyUMemSpaceNameRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * UMem内存空间ID + */ + SpaceId: string; + /** + * 新的名称,长度(6<=size<=63) + */ + Name: string; +} +/** + * ModifyUMemSpaceName - 修改UMem内存空间名称 + */ +export interface ModifyUMemSpaceNameResponse { +} +/** + * ModifyURedisGroupName - 修改主备redis名称 + */ +export interface ModifyURedisGroupNameRequest { + /** + * 组的ID + */ + GroupId: string; + /** + * Redis组名称 (范围[6-63],只能包含英文、数字以及符号-和_) + */ + Name: string; +} +/** + * ModifyURedisGroupName - 修改主备redis名称 + */ +export interface ModifyURedisGroupNameResponse { +} +/** + * ModifyURedisGroupPassword - 修改主备密码/重置密码 + */ +export interface ModifyURedisGroupPasswordRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 组的ID + */ + GroupId: string; + /** + * 新密码字符串,要求长度为6~36个字符,且只能包含英文、数字以及-和下划线;并且需要base64加密;如要取消密码,此值为空字符串, + */ + Password: string; +} +/** + * ModifyURedisGroupPassword - 修改主备密码/重置密码 + */ +export interface ModifyURedisGroupPasswordResponse { +} +/** + * RemoveUDRedisData - 清除udredis实例数据 + */ +export interface RemoveUDRedisDataRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 实例id + */ + SpaceId: string; +} +/** + * RemoveUDRedisData - 清除udredis实例数据 + */ +export interface RemoveUDRedisDataResponse { +} +/** + * ResizeUMemSpace - 调整内存空间容量 + */ +export interface ResizeUMemSpaceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * UMem 内存空间Id + */ + SpaceId: string; + /** + * 内存大小, 单位:GB (需要大于原size,<= 1024) + */ + Size: number; + /** + * 使用的代金券Id + */ + CouponId?: string; +} +/** + * ResizeUMemSpace - 调整内存空间容量 + */ +export interface ResizeUMemSpaceResponse { +} +/** + * ResizeURedisGroup - 通过调用CheckURedisAllowance接口,检查资源情况,根据不同情形来调整主备redis容量,其中主要包括可用区资源不足无法扩容,主备所在宿主机资源不足需要迁移完成扩容(需要主从切换,会闪断及负载升高),以及直接扩容(业务无感知) + */ +export interface ResizeURedisGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 组ID + */ + GroupId: string; + /** + * 内存大小, 单位:GB (需要大于原size,且小于等于32) 目前仅支持1/2/4/8/16/32 G 六种容量规格 + */ + Size: number; + /** + * + */ + ChargeType?: string; + /** + * 空间类型:single(无热备),double(热备)(默认: double) + */ + Type?: string; + /** + * 代金券ID 请参考DescribeCoupon接口 + */ + CouponId?: number; +} +/** + * ResizeURedisGroup - 通过调用CheckURedisAllowance接口,检查资源情况,根据不同情形来调整主备redis容量,其中主要包括可用区资源不足无法扩容,主备所在宿主机资源不足需要迁移完成扩容(需要主从切换,会闪断及负载升高),以及直接扩容(业务无感知) + */ +export interface ResizeURedisGroupResponse { +} +/** + * RestartUMemcacheGroup - 重启单机Memcache + */ +export interface RestartUMemcacheGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 组的ID + */ + GroupId: string; +} +/** + * RestartUMemcacheGroup - 重启单机Memcache + */ +export interface RestartUMemcacheGroupResponse { +} +/** + * RestartURedisGroup - 重启主备实例 + */ +export interface RestartURedisGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 资源ID + */ + GroupId: string; +} +/** + * RestartURedisGroup - 重启主备实例 + */ +export interface RestartURedisGroupResponse { +} +/** + * UpdateURedisBackupStrategy - URedisBackupStrategy + */ +export interface UpdateURedisBackupStrategyRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 组的ID + */ + GroupId: string; + /** + * 备份时间,默认为0 + */ + BackupTime: string; + /** + * 是否打开默认备份功能。enable(打开),disable(关闭),默认enable + */ + AutoBackup?: string; + /** + * 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + */ + SlaveZone?: string; +} +/** + * UpdateURedisBackupStrategy - URedisBackupStrategy + */ +export interface UpdateURedisBackupStrategyResponse { +} diff --git a/lib/services/umem/index.js b/lib/services/umem/index.js new file mode 100644 index 0000000..af66c19 --- /dev/null +++ b/lib/services/umem/index.js @@ -0,0 +1,367 @@ +"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 **umem** service + */ +class UMemClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * CheckUDredisSpaceAllowance - 检查高性能UMem剩余资源,以及分片扩容前的资源预检查 + * + * See also: https://docs.ucloud.cn/api/umem-api/check_udredis_space_allowance + */ + checkUDredisSpaceAllowance(request) { + const args = Object.assign({ Action: 'CheckUDredisSpaceAllowance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CheckURedisAllowance - 检查主备Redis的资源是否足够创建新实例,以及主备Redis的扩容资源预检查 + * + * See also: https://docs.ucloud.cn/api/umem-api/check_uredis_allowance + */ + checkURedisAllowance(request) { + const args = Object.assign({ Action: 'CheckURedisAllowance' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUMemBackup - 创建分布式redis备份 + * + * See also: https://docs.ucloud.cn/api/umem-api/create_umem_backup + */ + createUMemBackup(request) { + const args = Object.assign({ Action: 'CreateUMemBackup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUMemSpace - 创建UMem内存空间 + * + * See also: https://docs.ucloud.cn/api/umem-api/create_umem_space + */ + createUMemSpace(request) { + const args = Object.assign({ Action: 'CreateUMemSpace' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUMemcacheGroup - 创建单机Memcache + * + * See also: https://docs.ucloud.cn/api/umem-api/create_umem_cache_group + */ + createUMemcacheGroup(request) { + const args = Object.assign({ Action: 'CreateUMemcacheGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateURedisBackup - 创建主备Redis备份 + * + * See also: https://docs.ucloud.cn/api/umem-api/create_uredis_backup + */ + createURedisBackup(request) { + const args = Object.assign({ Action: 'CreateURedisBackup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateURedisGroup - 创建主备redis + * + * See also: https://docs.ucloud.cn/api/umem-api/create_uredis_group + */ + createURedisGroup(request) { + const args = Object.assign({ Action: 'CreateURedisGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUMemSpace - 删除UMem内存空间 + * + * See also: https://docs.ucloud.cn/api/umem-api/delete_umem_space + */ + deleteUMemSpace(request) { + const args = Object.assign({ Action: 'DeleteUMemSpace' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUMemcacheGroup - 删除单机Memcache + * + * See also: https://docs.ucloud.cn/api/umem-api/delete_umem_cache_group + */ + deleteUMemcacheGroup(request) { + const args = Object.assign({ Action: 'DeleteUMemcacheGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteURedisGroup - 删除主备redis + * + * See also: https://docs.ucloud.cn/api/umem-api/delete_uredis_group + */ + deleteURedisGroup(request) { + const args = Object.assign({ Action: 'DeleteURedisGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUDRedisSlowlog - 查询UDRedis慢日志 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_ud_redis_slowlog + */ + describeUDRedisSlowlog(request) { + const args = Object.assign({ Action: 'DescribeUDRedisSlowlog' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUMemBackup - 查询分布式redis备份 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_backup + */ + describeUMemBackup(request) { + const args = Object.assign({ Action: 'DescribeUMemBackup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUMemBackupURL - 获取分布式redis 备份下载链接 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_backup_url + */ + describeUMemBackupURL(request) { + const args = Object.assign({ Action: 'DescribeUMemBackupURL' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUMemBlockInfo - 拉取UDRedis分片信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_block_info + */ + describeUMemBlockInfo(request) { + const args = Object.assign({ Action: 'DescribeUMemBlockInfo' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUMemPrice - 获取UMem实例价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_price + */ + describeUMemPrice(request) { + const args = Object.assign({ Action: 'DescribeUMemPrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUMemSpace - 获取UMem内存空间列表 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_space + */ + describeUMemSpace(request) { + const args = Object.assign({ Action: 'DescribeUMemSpace' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUMemUpgradePrice - 获取UMem升级价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_upgrade_price + */ + describeUMemUpgradePrice(request) { + const args = Object.assign({ Action: 'DescribeUMemUpgradePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUMemcacheGroup - 显示Memcache + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_cache_group + */ + describeUMemcacheGroup(request) { + const args = Object.assign({ Action: 'DescribeUMemcacheGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUMemcachePrice - 获取umemcache组价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_cache_price + */ + describeUMemcachePrice(request) { + const args = Object.assign({ Action: 'DescribeUMemcachePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUMemcacheUpgradePrice - 获取umemcache升级价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_cache_upgrade_price + */ + describeUMemcacheUpgradePrice(request) { + const args = Object.assign({ Action: 'DescribeUMemcacheUpgradePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeURedisBackup - 查询主备redis备份 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_backup + */ + describeURedisBackup(request) { + const args = Object.assign({ Action: 'DescribeURedisBackup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeURedisBackupURL - 获取主备Redis备份下载链接 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_backup_url + */ + describeURedisBackupURL(request) { + const args = Object.assign({ Action: 'DescribeURedisBackupURL' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeURedisConfig - 查询主备Redis所有配置文件 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_config + */ + describeURedisConfig(request) { + const args = Object.assign({ Action: 'DescribeURedisConfig' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeURedisGroup - 查询主备Redis + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_group + */ + describeURedisGroup(request) { + const args = Object.assign({ Action: 'DescribeURedisGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeURedisPrice - 取uredis价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_price + */ + describeURedisPrice(request) { + const args = Object.assign({ Action: 'DescribeURedisPrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeURedisSlowlog - 查询URedis慢日志 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_slowlog + */ + describeURedisSlowlog(request) { + const args = Object.assign({ Action: 'DescribeURedisSlowlog' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeURedisUpgradePrice - 获取uredis升级价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_upgrade_price + */ + describeURedisUpgradePrice(request) { + const args = Object.assign({ Action: 'DescribeURedisUpgradePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeURedisVersion - 获取主Redis可用版本 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_version + */ + describeURedisVersion(request) { + const args = Object.assign({ Action: 'DescribeURedisVersion' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * FlushallURedisGroup - 清除主备redis数据 + * + * See also: https://docs.ucloud.cn/api/umem-api/flushall_uredis_group + */ + flushallURedisGroup(request) { + const args = Object.assign({ Action: 'FlushallURedisGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUMemSpaceState - 获取UMem内存空间列表 + * + * See also: https://docs.ucloud.cn/api/umem-api/get_umem_space_state + */ + getUMemSpaceState(request) { + const args = Object.assign({ Action: 'GetUMemSpaceState' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyUMemSpaceName - 修改UMem内存空间名称 + * + * See also: https://docs.ucloud.cn/api/umem-api/modify_umem_space_name + */ + modifyUMemSpaceName(request) { + const args = Object.assign({ Action: 'ModifyUMemSpaceName' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyURedisGroupName - 修改主备redis名称 + * + * See also: https://docs.ucloud.cn/api/umem-api/modify_uredis_group_name + */ + modifyURedisGroupName(request) { + const args = Object.assign({ Action: 'ModifyURedisGroupName' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyURedisGroupPassword - 修改主备密码/重置密码 + * + * See also: https://docs.ucloud.cn/api/umem-api/modify_uredis_group_password + */ + modifyURedisGroupPassword(request) { + const args = Object.assign({ Action: 'ModifyURedisGroupPassword' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * RemoveUDRedisData - 清除udredis实例数据 + * + * See also: https://docs.ucloud.cn/api/umem-api/remove_ud_redis_data + */ + removeUDRedisData(request) { + const args = Object.assign({ Action: 'RemoveUDRedisData' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ResizeUMemSpace - 调整内存空间容量 + * + * See also: https://docs.ucloud.cn/api/umem-api/resize_umem_space + */ + resizeUMemSpace(request) { + const args = Object.assign({ Action: 'ResizeUMemSpace' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ResizeURedisGroup - 通过调用CheckURedisAllowance接口,检查资源情况,根据不同情形来调整主备redis容量,其中主要包括可用区资源不足无法扩容,主备所在宿主机资源不足需要迁移完成扩容(需要主从切换,会闪断及负载升高),以及直接扩容(业务无感知) + * + * See also: https://docs.ucloud.cn/api/umem-api/resize_uredis_group + */ + resizeURedisGroup(request) { + const args = Object.assign({ Action: 'ResizeURedisGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * RestartUMemcacheGroup - 重启单机Memcache + * + * See also: https://docs.ucloud.cn/api/umem-api/restart_umem_cache_group + */ + restartUMemcacheGroup(request) { + const args = Object.assign({ Action: 'RestartUMemcacheGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * RestartURedisGroup - 重启主备实例 + * + * See also: https://docs.ucloud.cn/api/umem-api/restart_uredis_group + */ + restartURedisGroup(request) { + const args = Object.assign({ Action: 'RestartURedisGroup' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateURedisBackupStrategy - URedisBackupStrategy + * + * See also: https://docs.ucloud.cn/api/umem-api/update_uredis_backup_strategy + */ + updateURedisBackupStrategy(request) { + const args = Object.assign({ Action: 'UpdateURedisBackupStrategy' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = UMemClient; diff --git a/lib/services/unet/index.d.ts b/lib/services/unet/index.d.ts new file mode 100644 index 0000000..c3b5c1d --- /dev/null +++ b/lib/services/unet/index.d.ts @@ -0,0 +1,1285 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **unet** service + */ +export default class UNetClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * AllocateEIP - 根据提供信息, 申请弹性IP + * + * See also: https://docs.ucloud.cn/api/unet-api/allocate_eip + */ + allocateEIP(request?: AllocateEIPRequest): Promise; + /** + * AllocateShareBandwidth - 开通共享带宽 + * + * See also: https://docs.ucloud.cn/api/unet-api/allocate_share_bandwidth + */ + allocateShareBandwidth(request?: AllocateShareBandwidthRequest): Promise; + /** + * AssociateEIPWithShareBandwidth - 将EIP加入共享带宽 + * + * See also: https://docs.ucloud.cn/api/unet-api/associate_eip_with_share_bandwidth + */ + associateEIPWithShareBandwidth(request?: AssociateEIPWithShareBandwidthRequest): Promise; + /** + * BindEIP - 将尚未使用的弹性IP绑定到指定的资源 + * + * See also: https://docs.ucloud.cn/api/unet-api/bind_eip + */ + bindEIP(request?: BindEIPRequest): Promise; + /** + * CreateBandwidthPackage - 为非共享带宽模式下, 已绑定资源实例的带宽计费弹性IP附加临时带宽包 + * + * See also: https://docs.ucloud.cn/api/unet-api/create_bandwidth_package + */ + createBandwidthPackage(request?: CreateBandwidthPackageRequest): Promise; + /** + * CreateFirewall - 创建防火墙 + * + * See also: https://docs.ucloud.cn/api/unet-api/create_firewall + */ + createFirewall(request?: CreateFirewallRequest): Promise; + /** + * DeleteBandwidthPackage - 删除弹性IP上已附加带宽包 + * + * See also: https://docs.ucloud.cn/api/unet-api/delete_bandwidth_package + */ + deleteBandwidthPackage(request?: DeleteBandwidthPackageRequest): Promise; + /** + * DeleteFirewall - 删除防火墙 + * + * See also: https://docs.ucloud.cn/api/unet-api/delete_firewall + */ + deleteFirewall(request?: DeleteFirewallRequest): Promise; + /** + * DescribeBandwidthPackage - 获取某地域下的带宽包信息 + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_bandwidth_package + */ + describeBandwidthPackage(request?: DescribeBandwidthPackageRequest): Promise; + /** + * DescribeBandwidthUsage - 获取带宽用量信息 + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_bandwidth_usage + */ + describeBandwidthUsage(request?: DescribeBandwidthUsageRequest): Promise; + /** + * DescribeEIP - 获取弹性IP信息 + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_eip + */ + describeEIP(request?: DescribeEIPRequest): Promise; + /** + * DescribeFirewall - 获取防火墙组信息 + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_firewall + */ + describeFirewall(request?: DescribeFirewallRequest): Promise; + /** + * DescribeFirewallResource - 获取防火墙组所绑定资源的外网IP + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_firewall_resource + */ + describeFirewallResource(request?: DescribeFirewallResourceRequest): Promise; + /** + * DescribeShareBandwidth - 获取共享带宽信息 + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_share_bandwidth + */ + describeShareBandwidth(request?: DescribeShareBandwidthRequest): Promise; + /** + * DisassociateEIPWithShareBandwidth - 将EIP移出共享带宽 + * + * See also: https://docs.ucloud.cn/api/unet-api/disassociate_eip_with_share_bandwidth + */ + disassociateEIPWithShareBandwidth(request?: DisassociateEIPWithShareBandwidthRequest): Promise; + /** + * GetEIPPayMode - 获取弹性IP计费模式 + * + * See also: https://docs.ucloud.cn/api/unet-api/get_eip_pay_mode + */ + getEIPPayMode(request?: GetEIPPayModeRequest): Promise; + /** + * GetEIPPrice - 获取弹性IP价格 + * + * See also: https://docs.ucloud.cn/api/unet-api/get_eip_price + */ + getEIPPrice(request?: GetEIPPriceRequest): Promise; + /** + * GetEIPUpgradePrice - 获取弹性IP带宽改动价格 + * + * See also: https://docs.ucloud.cn/api/unet-api/get_eip_upgrade_price + */ + getEIPUpgradePrice(request?: GetEIPUpgradePriceRequest): Promise; + /** + * GrantFirewall - 将防火墙应用到资源上 + * + * See also: https://docs.ucloud.cn/api/unet-api/grant_firewall + */ + grantFirewall(request?: GrantFirewallRequest): Promise; + /** + * ModifyEIPBandwidth - 调整弹性IP的外网带宽 + * + * See also: https://docs.ucloud.cn/api/unet-api/modify_eip_bandwidth + */ + modifyEIPBandwidth(request?: ModifyEIPBandwidthRequest): Promise; + /** + * ModifyEIPWeight - 修改弹性IP的外网出口权重 + * + * See also: https://docs.ucloud.cn/api/unet-api/modify_eip_weight + */ + modifyEIPWeight(request?: ModifyEIPWeightRequest): Promise; + /** + * ReleaseEIP - 释放弹性IP资源, 所释放弹性IP必须为非绑定状态. + * + * See also: https://docs.ucloud.cn/api/unet-api/release_eip + */ + releaseEIP(request?: ReleaseEIPRequest): Promise; + /** + * ReleaseShareBandwidth - 关闭共享带宽 + * + * See also: https://docs.ucloud.cn/api/unet-api/release_share_bandwidth + */ + releaseShareBandwidth(request?: ReleaseShareBandwidthRequest): Promise; + /** + * ResizeShareBandwidth - 调整共享带宽的带宽值 + * + * See also: https://docs.ucloud.cn/api/unet-api/resize_share_bandwidth + */ + resizeShareBandwidth(request?: ResizeShareBandwidthRequest): Promise; + /** + * SetEIPPayMode - 设置弹性IP计费模式, 切换时会涉及付费/退费. + * + * See also: https://docs.ucloud.cn/api/unet-api/set_eip_pay_mode + */ + setEIPPayMode(request?: SetEIPPayModeRequest): Promise; + /** + * UnBindEIP - 将弹性IP从资源上解绑 + * + * See also: https://docs.ucloud.cn/api/unet-api/un_bind_eip + */ + unBindEIP(request?: UnBindEIPRequest): Promise; + /** + * UpdateEIPAttribute - 更新弹性IP名称,业务组,备注等属性字段 + * + * See also: https://docs.ucloud.cn/api/unet-api/update_eip_attribute + */ + updateEIPAttribute(request?: UpdateEIPAttributeRequest): Promise; + /** + * UpdateFirewall - 更新防火墙规则 + * + * See also: https://docs.ucloud.cn/api/unet-api/update_firewall + */ + updateFirewall(request?: UpdateFirewallRequest): Promise; + /** + * UpdateFirewallAttribute - 更新防火墙规则 + * + * See also: https://docs.ucloud.cn/api/unet-api/update_firewall_attribute + */ + updateFirewallAttribute(request?: UpdateFirewallAttributeRequest): Promise; +} +/** + * AllocateEIP - 根据提供信息, 申请弹性IP + */ +export interface AllocateEIPRequest { + /** + * 弹性IP线路,枚举值:国际线路, International;BGP线路:Bgp。使用BGP线路的地域:北京二、上海金融云、上海二、广州等,其他地域均使用国际线路。 + */ + OperatorName: string; + /** + * 弹性IP的外网带宽, 单位为Mbps. 共享带宽模式必须指定0M带宽, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-10000] + */ + Bandwidth: number; + /** + * 业务组名称, 默认为 "Default" + */ + Tag?: string; + /** + * 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按需付费(需开启权限); Trial, 试用(需开启权限) 默认为按月付费 + */ + ChargeType?: string; + /** + * 购买的时长, 默认: 1 + */ + Quantity?: number; + /** + * 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. 默认为 "Bandwidth".“PostAccurateBandwidth”:带宽后付费模式 + */ + PayMode?: string; + /** + * 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + */ + ShareBandwidthId?: string; + /** + * 弹性IP的名称, 默认为 "EIP" + */ + Name?: string; + /** + * 弹性IP的备注, 默认为空 + */ + Remark?: string; + /** + * 代金券ID, 默认不使用 + */ + CouponId?: string; +} +/** + * AllocateEIP - 根据提供信息, 申请弹性IP + */ +export interface AllocateEIPResponse { + /** + * 申请到的EIP资源详情 参见 UnetAllocateEIPSet + */ + EIPSet?: { + /** + * 申请到的EIP资源ID + */ + EIPId?: string; + /** + * 申请到的IPv4地址. + */ + EIPAddr?: { + /** + * 运营商信息如: 国际: International, BGP: BGP + */ + OperatorName?: string; + /** + * IP地址 + */ + IP?: string; + }[]; + }[]; +} +/** + * AllocateShareBandwidth - 开通共享带宽 + */ +export interface AllocateShareBandwidthRequest { + /** + * 共享带宽名字 + */ + Name: string; + /** + * 付费方式:Year 按年,Month 按月,Dynamic 按时; + */ + ChargeType: string; + /** + * 共享带宽值 + */ + ShareBandwidth: number; + /** + * 购买时长 + */ + Quantity?: number; + /** + * 共享带宽类型,IPv4或者IPv6,不传默认IPv4 + */ + IPVersion?: string; +} +/** + * AllocateShareBandwidth - 开通共享带宽 + */ +export interface AllocateShareBandwidthResponse { + /** + * 共享带宽资源Id + */ + ShareBandwidthId?: string; +} +/** + * AssociateEIPWithShareBandwidth - 将EIP加入共享带宽 + */ +export interface AssociateEIPWithShareBandwidthRequest { + /** + * 要加入共享带宽的EIP的资源Id + */ + EIPIds: string[]; + /** + * 共享带宽ID + */ + ShareBandwidthId: string; + /** + * 共享带宽类型,IPv4或者IPv6,不传默认IPv4 + */ + IPVersion?: string; +} +/** + * AssociateEIPWithShareBandwidth - 将EIP加入共享带宽 + */ +export interface AssociateEIPWithShareBandwidthResponse { +} +/** + * BindEIP - 将尚未使用的弹性IP绑定到指定的资源 + */ +export interface BindEIPRequest { + /** + * 弹性IP的资源Id + */ + EIPId: string; + /** + * 弹性IP请求绑定的资源类型, 枚举值为: uhost: 云主机; ulb, 负载均衡器 upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;natgw:natgw;udb:udb;vpngw:ipsec vpn;ucdr:云灾备;dbaudit:数据库审计;uni:虚拟网卡;cube,Cube容器。如果EIP为普通带宽计费,且带宽值高于2G,则只允许绑定在快杰型云主机和ULB + */ + ResourceType: string; + /** + * 弹性IP请求绑定的资源ID + */ + ResourceId: string; +} +/** + * BindEIP - 将尚未使用的弹性IP绑定到指定的资源 + */ +export interface BindEIPResponse { +} +/** + * CreateBandwidthPackage - 为非共享带宽模式下, 已绑定资源实例的带宽计费弹性IP附加临时带宽包 + */ +export interface CreateBandwidthPackageRequest { + /** + * 带宽大小(单位Mbps), 取值范围[2,800] (最大值受地域限制) + */ + Bandwidth: number; + /** + * 所绑定弹性IP的资源ID + */ + EIPId: string; + /** + * 带宽包有效时长, 取值范围为大于0的整数, 即该带宽包在EnableTime到 EnableTime+TimeRange时间段内生效 + */ + TimeRange: number; + /** + * 生效时间, 格式为 Unix timestamp, 默认为立即开通 + */ + EnableTime?: number; + /** + * 代金券ID + */ + CouponId?: string; +} +/** + * CreateBandwidthPackage - 为非共享带宽模式下, 已绑定资源实例的带宽计费弹性IP附加临时带宽包 + */ +export interface CreateBandwidthPackageResponse { + /** + * 所创建带宽包的资源ID + */ + BandwidthPackageId?: string; +} +/** + * CreateFirewall - 创建防火墙 + */ +export interface CreateFirewallRequest { + /** + * 防火墙规则,例如:TCP|22|192.168.1.1/22|DROP|LOW|禁用22端口,第一个参数代表协议:第二个参数代表端口号,第三个参数为ip,第四个参数为ACCEPT(接受)和DROP(拒绝),第五个参数优先级:HIGH(高),MEDIUM(中),LOW(低),第六个参数为该条规则的自定义备注,bj1不支持添加备注 + */ + Rule: string[]; + /** + * 防火墙名称 + */ + Name: string; + /** + * 防火墙业务组,默认为Default + */ + Tag?: string; + /** + * 防火墙描述,默认为空 + */ + Remark?: string; +} +/** + * CreateFirewall - 创建防火墙 + */ +export interface CreateFirewallResponse { + /** + * 防火墙ID + */ + FWId?: string; +} +/** + * DeleteBandwidthPackage - 删除弹性IP上已附加带宽包 + */ +export interface DeleteBandwidthPackageRequest { + /** + * 带宽包资源ID + */ + BandwidthPackageId: string; +} +/** + * DeleteBandwidthPackage - 删除弹性IP上已附加带宽包 + */ +export interface DeleteBandwidthPackageResponse { +} +/** + * DeleteFirewall - 删除防火墙 + */ +export interface DeleteFirewallRequest { + /** + * 防火墙资源ID + */ + FWId: string; +} +/** + * DeleteFirewall - 删除防火墙 + */ +export interface DeleteFirewallResponse { +} +/** + * DescribeBandwidthPackage - 获取某地域下的带宽包信息 + */ +export interface DescribeBandwidthPackageRequest { + /** + * 返回数据分页值, 取值范围为 [0,10000000] 之间的整数, 默认为20 + */ + Limit?: number; + /** + * 返回数据偏移量, 默认为0 + */ + Offset?: number; +} +/** + * DescribeBandwidthPackage - 获取某地域下的带宽包信息 + */ +export interface DescribeBandwidthPackageResponse { + /** + * 满足条件的带宽包总数 + */ + TotalCount?: number; + /** + * 带宽包详细信息, 参见 UnetBandwidthPackageSet + */ + DataSets?: { + /** + * 带宽包的资源ID + */ + BandwidthPackageId?: string; + /** + * 生效时间, 格式为 Unix Timestamp + */ + EnableTime?: number; + /** + * 失效时间, 格式为 Unix Timestamp + */ + DisableTime?: number; + /** + * 创建时间, 格式为 Unix Timestamp + */ + CreateTime?: number; + /** + * 带宽包的临时带宽值, 单位Mbps + */ + Bandwidth?: number; + /** + * 带宽包所绑定弹性IP的资源ID + */ + EIPId?: string; + /** + * 带宽包所绑定弹性IP的详细信息,只有当EIPId对应双线IP时, EIPAddr的长度为2, 其他情况, EIPAddr长度均为1.参见 EIPAddrSet + */ + EIPAddr?: { + /** + * 运营商信息, 枚举值为: BGP: BGP; International: 国际. + */ + OperatorName?: string; + /** + * 弹性IP地址 + */ + IP?: string; + }[]; + }[]; +} +/** + * DescribeBandwidthUsage - 获取带宽用量信息 + */ +export interface DescribeBandwidthUsageRequest { + /** + * 返回数据分页值, 取值范围为 [0,10000000] 之间的整数, 默认为20 + */ + Limit?: number; + /** + * 返回数据偏移量, 默认为0 + */ + OffSet?: number; + /** + * 弹性IP的资源Id. 如果为空, 则返回当前 Region中符合条件的所有EIP的带宽用量, n为自然数 + */ + EIPIds?: string[]; +} +/** + * DescribeBandwidthUsage - 获取带宽用量信息 + */ +export interface DescribeBandwidthUsageResponse { + /** + * EIPSet中的元素个数 + */ + TotalCount?: number; + /** + * 单个弹性IP的带宽用量详细信息, 详见 UnetBandwidthUsageEIPSet, 如没有弹性IP资源则没有该返回值。 + */ + EIPSet?: { + /** + * 最近5分钟带宽用量, 单位Mbps + */ + CurBandwidth?: number; + /** + * 弹性IP资源ID + */ + EIPId?: string; + }[]; +} +/** + * DescribeEIP - 获取弹性IP信息 + */ +export interface DescribeEIPRequest { + /** + * 弹性IP的资源ID如果为空, 则返回当前 Region中符合条件的的所有EIP + */ + EIPIds?: string[]; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 数据分页值, 默认为20 + */ + Limit?: number; + /** + * IP地址,支持通过ip查询,如果ip与EIP都传,会取并集查询 + */ + IPs?: string[]; +} +/** + * DescribeEIP - 获取弹性IP信息 + */ +export interface DescribeEIPResponse { + /** + * 满足条件的弹性IP总数 + */ + TotalCount?: number; + /** + * 未绑定的弹性IP总数 + */ + UnbindCount?: number; + /** + * 满足条件的弹性IP带宽总和, 单位Mbps + */ + TotalBandwidth?: number; + /** + * 弹性IP列表, 每项参数详见 UnetEIPSet + */ + EIPSet?: { + /** + * 弹性IP的资源ID + */ + EIPId?: string; + /** + * 外网出口权重, 默认为50, 范围[0-100] + */ + Weight?: number; + /** + * 带宽模式, 枚举值为: 0: 非共享带宽模式, 1: 共享带宽模式 + */ + BandwidthType?: number; + /** + * 弹性IP的带宽, 单位为Mbps, 当BandwidthType=1时, 该处显示为共享带宽值. 当BandwidthType=0时, 该处显示这个弹性IP的带宽. + */ + Bandwidth?: number; + /** + * 弹性IP的资源绑定状态, 枚举值为: used: 已绑定, free: 未绑定, freeze: 已冻结 + */ + Status?: string; + /** + * 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按小时付费; Trial, 试用. 按小时付费和试用这两种付费模式需要开通权限. + */ + ChargeType?: string; + /** + * 弹性IP的创建时间, 格式为Unix Timestamp + */ + CreateTime?: number; + /** + * 弹性IP的到期时间, 格式为Unix Timestamp + */ + ExpireTime?: number; + /** + * 弹性IP的详细信息列表, 具体结构见下方 UnetEIPResourceSet + */ + Resource?: { + /** + * 已绑定的资源类型, 枚举值为: uhost, 云主机;natgw:NAT网关;ulb:负载均衡器;upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;vpngw:IPSec VPN;ucdr:云灾备;dbaudit:数据库审计,uni:虚拟网卡。 + */ + ResourceType?: string; + /** + * 已绑定的资源名称 + */ + ResourceName?: string; + /** + * 已绑定资源的资源ID + */ + ResourceID?: string; + /** + * 资源绑定的虚拟网卡的类型。uni,虚拟网卡。 + */ + SubResourceType?: string; + /** + * 资源绑定的虚拟网卡的名称 + */ + SubResourceName?: string; + /** + * 资源绑定的虚拟网卡的ID + */ + SubResourceId?: string; + /** + * 弹性IP的资源ID + */ + EIPId?: string; + }; + /** + * 弹性IP的详细信息列表, 具体结构见下方 UnetEIPAddrSet + */ + EIPAddr?: { + /** + * 运营商信息如: 国际: International, BGP: BGP + */ + OperatorName?: string; + /** + * IP地址 + */ + IP?: string; + }[]; + /** + * 弹性IP的名称,缺省值为 "EIP" + */ + Name?: string; + /** + * 弹性IP的业务组标识, 缺省值为 "Default" + */ + Tag?: string; + /** + * 弹性IP的备注, 缺省值为 "" + */ + Remark?: string; + /** + * 弹性IP的计费模式, 枚举值为: "Bandwidth", 带宽计费; "Traffic", 流量计费; "ShareBandwidth",共享带宽模式. 默认为 "Bandwidth". + */ + PayMode?: string; + /** + * 共享带宽信息 参见 ShareBandwidthSet + */ + ShareBandwidthSet?: { + /** + * 共享带宽带宽值 + */ + ShareBandwidth?: number; + /** + * 共享带宽的资源名称 + */ + ShareBandwidthName?: string; + /** + * 共享带宽ID + */ + ShareBandwidthId?: string; + }; + /** + * 弹性IP是否到期 + */ + Expire?: boolean; + }[]; +} +/** + * DescribeFirewall - 获取防火墙组信息 + */ +export interface DescribeFirewallRequest { + /** + * 防火墙ID,默认为返回所有防火墙 + */ + FWId?: string; + /** + * 绑定防火墙组的资源类型,默认为全部资源类型。枚举值为:"unatgw",NAT网关; "uhost",云主机; "upm",物理云主机; "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计. + */ + ResourceType?: string; + /** + * 绑定防火墙组的资源ID + */ + ResourceId?: string; + /** + * 返回数据长度,默认为20,最大10000000 + */ + Limit?: number; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; +} +/** + * DescribeFirewall - 获取防火墙组信息 + */ +export interface DescribeFirewallResponse { + /** + * 获取的防火墙组详细信息 参见 FirewallDataSet + */ + DataSet?: { + /** + * 防火墙ID + */ + FWId: string; + /** + * 安全组ID(即将废弃) + */ + GroupId: string; + /** + * 防火墙名称 + */ + Name?: string; + /** + * 防火墙业务组 + */ + Tag?: string; + /** + * 防火墙备注 + */ + Remark?: string; + /** + * 防火墙绑定资源数量 + */ + ResourceCount?: number; + /** + * 防火墙组创建时间,格式为Unix Timestamp + */ + CreateTime?: number; + /** + * 防火墙组类型,枚举值为: "user defined", 用户自定义防火墙; "recommend web", 默认Web防火墙; "recommend non web", 默认非Web防火墙 + */ + Type?: string; + /** + * 防火墙组中的规则列表,参见 FirewallRuleSet + */ + Rule?: { + /** + * 源地址 + */ + SrcIP?: string; + /** + * 优先级 + */ + Priority?: string; + /** + * 协议类型 + */ + ProtocolType?: string; + /** + * 目标端口 + */ + DstPort?: string; + /** + * 防火墙动作 + */ + RuleAction?: string; + /** + * 防火墙规则备注 + */ + Remark?: string; + }[]; + }[]; +} +/** + * DescribeFirewallResource - 获取防火墙组所绑定资源的外网IP + */ +export interface DescribeFirewallResourceRequest { + /** + * 防火墙ID + */ + FWId: string; + /** + * 返回数据长度,默认为20,最大10000000 + */ + Limit?: number; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; +} +/** + * DescribeFirewallResource - 获取防火墙组所绑定资源的外网IP + */ +export interface DescribeFirewallResourceResponse { + /** + * 资源列表,见 ResourceSet + */ + ResourceSet?: { + /** + * 可用区 + */ + Zone?: number; + /** + * 名称 + */ + Name?: string; + /** + * 内网IP + */ + PrivateIP?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 绑定该防火墙的资源id + */ + ResourceID?: string; + /** + * 绑定防火墙组的资源类型。"unatgw",NAT网关; "uhost",云主机; "upm",物理云主机; "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计. + */ + ResourceType?: string; + /** + * 状态 + */ + Status?: number; + /** + * 业务组 + */ + Tag?: string; + }[]; + /** + * 绑定资源总数 + */ + TotalCount?: number; +} +/** + * DescribeShareBandwidth - 获取共享带宽信息 + */ +export interface DescribeShareBandwidthRequest { + /** + * 需要返回的共享带宽Id + */ + ShareBandwidthIds?: string[]; +} +/** + * DescribeShareBandwidth - 获取共享带宽信息 + */ +export interface DescribeShareBandwidthResponse { + /** + * 共享带宽信息组 参见 UnetShareBandwidthSet + */ + DataSet?: { + /** + * 共享带宽类型 + */ + IPVersion: string; + /** + * 共享带宽值(预付费)/共享带宽峰值(后付费), 单位Mbps + */ + ShareBandwidth?: number; + /** + * 共享带宽的资源ID + */ + ShareBandwidthId?: string; + /** + * 付费方式, 预付费:Year 按年,Month 按月,Dynamic 按需;后付费:PostPay(按月) + */ + ChargeType?: string; + /** + * 创建时间, 格式为Unix Timestamp + */ + CreateTime?: number; + /** + * 过期时间, 格式为Unix Timestamp + */ + ExpireTime?: number; + /** + * EIP信息,详情见 EIPSetData + */ + EIPSet?: { + /** + * EIP带宽值 + */ + Bandwidth?: number; + /** + * EIP的IP信息,详情见EIPAddrSet + */ + EIPAddr?: { + /** + * 运营商信息, 枚举值为: BGP: BGP; International: 国际. + */ + OperatorName?: string; + /** + * 弹性IP地址 + */ + IP?: string; + }[]; + /** + * EIP资源Id + */ + EIPId?: string; + }[]; + /** + * 共享带宽名称 + */ + Name?: string; + }[]; + /** + * 符合条件的共享带宽总数,大于等于返回DataSet长度 + */ + TotalCount?: number; +} +/** + * DisassociateEIPWithShareBandwidth - 将EIP移出共享带宽 + */ +export interface DisassociateEIPWithShareBandwidthRequest { + /** + * 共享带宽ID + */ + ShareBandwidthId: string; + /** + * 移出共享带宽后,EIP的外网带宽, 单位为Mbps. 各地域带宽范围如下: 流量计费[1-200],带宽计费[1-800] + */ + Bandwidth: number; + /** + * EIP的资源Id;默认移出该共享带宽下所有的EIP + */ + EIPIds?: string[]; + /** + * 移出共享带宽后,EIP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; 默认为 "Bandwidth". + */ + PayMode?: string; + /** + * 共享带宽类型,IPv4或者IPv6,不传默认IPv4 + */ + IPVersion?: string; +} +/** + * DisassociateEIPWithShareBandwidth - 将EIP移出共享带宽 + */ +export interface DisassociateEIPWithShareBandwidthResponse { +} +/** + * GetEIPPayMode - 获取弹性IP计费模式 + */ +export interface GetEIPPayModeRequest { + /** + * 弹性IP的资源Id + */ + EIPId: string[]; +} +/** + * GetEIPPayMode - 获取弹性IP计费模式 + */ +export interface GetEIPPayModeResponse { + /** + * EIP的计费模式, 参见 EIPPayModeSet + */ + EIPPayMode?: { + /** + * EIP的资源ID + */ + EIPId?: string; + /** + * EIP的计费模式. 枚举值为:Bandwidth, 带宽计费;Traffic, 流量计费; "ShareBandwidth",共享带宽模式 + */ + EIPPayMode?: string; + }[]; +} +/** + * GetEIPPrice - 获取弹性IP价格 + */ +export interface GetEIPPriceRequest { + /** + * 弹性IP的线路如下: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International,泉州为移动单线cn-qz:ChinaMobile + */ + OperatorName: string; + /** + * 弹性IP的外网带宽, 单位为Mbps, 范围 [0-800] + */ + Bandwidth: number; + /** + * 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按时付费; 默认为获取三种价格 + */ + ChargeType?: string; + /** + * 弹性IP计费方式r. 枚举值为: Traffic, 流量计费; Bandwidth, 带宽计费; "ShareBandwidth",共享带宽模式. 默认为Bandwidth + */ + PayMode?: string; + /** + * 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末 + */ + Quantity?: number; +} +/** + * GetEIPPrice - 获取弹性IP价格 + */ +export interface GetEIPPriceResponse { + /** + * 弹性IP价格详情 详情见 EIPPriceDetailSet + */ + PriceSet?: { + /** + * 弹性IP付费方式 + */ + ChargeType?: string; + /** + * 购买弹性IP的实际价格, 单位"元" + */ + Price?: number; + /** + * 弹性IP的原价,单位“元” + */ + OriginalPrice?: number; + /** + * 资源有效期, 以Unix Timestamp表示 + */ + PurchaseValue?: number; + }[]; +} +/** + * GetEIPUpgradePrice - 获取弹性IP带宽改动价格 + */ +export interface GetEIPUpgradePriceRequest { + /** + * 弹性IP的资源ID + */ + EIPId: string; + /** + * 弹性IP的外网带宽, 单位为Mbps, 范围 [1-800] + */ + Bandwidth: number; +} +/** + * GetEIPUpgradePrice - 获取弹性IP带宽改动价格 + */ +export interface GetEIPUpgradePriceResponse { + /** + * 调整带宽后的EIP价格, 单位为"元", 如需退费此处为负值 + */ + Price?: number; +} +/** + * GrantFirewall - 将防火墙应用到资源上 + */ +export interface GrantFirewallRequest { + /** + * 防火墙资源ID + */ + FWId: string; + /** + * 绑定防火墙组的资源类型,默认为全部资源类型。枚举值为:"unatgw",NAT网关; "uhost",云主机; "upm",物理云主机; "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计. + */ + ResourceType: string; + /** + * 所应用资源ID + */ + ResourceId: string; +} +/** + * GrantFirewall - 将防火墙应用到资源上 + */ +export interface GrantFirewallResponse { +} +/** + * ModifyEIPBandwidth - 调整弹性IP的外网带宽 + */ +export interface ModifyEIPBandwidthRequest { + /** + * 弹性IP的资源ID + */ + EIPId: string; + /** + * 弹性IP的外网带宽, 单位为Mbps. 各地域的带宽值范围如下:流量计费[1-200],带宽计费[1-800] + */ + Bandwidth: number; +} +/** + * ModifyEIPBandwidth - 调整弹性IP的外网带宽 + */ +export interface ModifyEIPBandwidthResponse { +} +/** + * ModifyEIPWeight - 修改弹性IP的外网出口权重 + */ +export interface ModifyEIPWeightRequest { + /** + * 弹性IP的资源ID + */ + EIPId: string; + /** + * 外网出口权重, 范围[0-100] 取值为0时, 该弹性IP不会被使用. 取值为100时, 同主机下只会使用这个弹性IP,其他弹性IP不会被使用 请勿将多个绑定在同一资源的弹性IP设置为相同权重 + */ + Weight: number; +} +/** + * ModifyEIPWeight - 修改弹性IP的外网出口权重 + */ +export interface ModifyEIPWeightResponse { +} +/** + * ReleaseEIP - 释放弹性IP资源, 所释放弹性IP必须为非绑定状态. + */ +export interface ReleaseEIPRequest { + /** + * 弹性IP的资源ID + */ + EIPId: string; +} +/** + * ReleaseEIP - 释放弹性IP资源, 所释放弹性IP必须为非绑定状态. + */ +export interface ReleaseEIPResponse { +} +/** + * ReleaseShareBandwidth - 关闭共享带宽 + */ +export interface ReleaseShareBandwidthRequest { + /** + * 共享带宽ID + */ + ShareBandwidthId: string; + /** + * 关闭共享带宽后,各EIP恢复为的带宽值 + */ + EIPBandwidth: number; + /** + * 默认为 Bandwidth 带宽计费 + */ + PayMode?: string; +} +/** + * ReleaseShareBandwidth - 关闭共享带宽 + */ +export interface ReleaseShareBandwidthResponse { +} +/** + * ResizeShareBandwidth - 调整共享带宽的带宽值 + */ +export interface ResizeShareBandwidthRequest { + /** + * 带宽值,单位为Mb,范围 [20-5000] (最大值受地域限制) + */ + ShareBandwidth: number; + /** + * 共享带宽的Id + */ + ShareBandwidthId: string; +} +/** + * ResizeShareBandwidth - 调整共享带宽的带宽值 + */ +export interface ResizeShareBandwidthResponse { +} +/** + * SetEIPPayMode - 设置弹性IP计费模式, 切换时会涉及付费/退费. + */ +export interface SetEIPPayModeRequest { + /** + * 弹性IP的资源Id + */ + EIPId: string; + /** + * 计费模式. 枚举值:"Traffic", 流量计费模式; "Bandwidth", 带宽计费模式 + */ + PayMode: string; + /** + * 调整的目标带宽值, 单位Mbps. 各地域的带宽值范围如下: 流量计费[1-200],其余情况[1-800] + */ + Bandwidth: number; +} +/** + * SetEIPPayMode - 设置弹性IP计费模式, 切换时会涉及付费/退费. + */ +export interface SetEIPPayModeResponse { +} +/** + * UnBindEIP - 将弹性IP从资源上解绑 + */ +export interface UnBindEIPRequest { + /** + * 弹性IP的资源Id + */ + EIPId: string; + /** + * 弹性IP请求解绑的资源类型, 枚举值为: uhost: 云主机; ulb, 负载均衡器 upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;natgw:NAT网关;udb:udb;vpngw:ipsec vpn;ucdr:云灾备;dbaudit:数据库审计; + */ + ResourceType: string; + /** + * 弹性IP请求解绑的资源ID + */ + ResourceId: string; +} +/** + * UnBindEIP - 将弹性IP从资源上解绑 + */ +export interface UnBindEIPResponse { +} +/** + * UpdateEIPAttribute - 更新弹性IP名称,业务组,备注等属性字段 + */ +export interface UpdateEIPAttributeRequest { + /** + * EIP资源ID + */ + EIPId: string; + /** + * 名字(Name Tag Remark都为空则报错) + */ + Name?: string; + /** + * 业务 + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; +} +/** + * UpdateEIPAttribute - 更新弹性IP名称,业务组,备注等属性字段 + */ +export interface UpdateEIPAttributeResponse { +} +/** + * UpdateFirewall - 更新防火墙规则 + */ +export interface UpdateFirewallRequest { + /** + * 防火墙资源ID + */ + FWId: string; + /** + * 防火墙规则,例如:TCP|22|192.168.1.1/22|DROP|LOW|禁用22端口,第一个参数代表协议:第二个参数代表端口号,第三个参数为ip,第四个参数为ACCEPT(接受)和DROP(拒绝),第五个参数优先级:HIGH(高),MEDIUM(中),LOW(低),第六个参数为该条规则的自定义备注 + */ + Rule: string[]; +} +/** + * UpdateFirewall - 更新防火墙规则 + */ +export interface UpdateFirewallResponse { + /** + * 防火墙id + */ + FWId?: string; +} +/** + * UpdateFirewallAttribute - 更新防火墙规则 + */ +export interface UpdateFirewallAttributeRequest { + /** + * 防火墙资源ID + */ + FWId: string; + /** + * 防火墙名称,默认为空,为空则不做修改。Name,Tag,Remark必须填写1个及以上 + */ + Name?: string; + /** + * 防火墙业务组,默认为空,为空则不做修改。Name,Tag,Remark必须填写1个及以上 + */ + Tag?: string; + /** + * 防火墙备注,默认为空,为空则不做修改。Name,Tag,Remark必须填写1个及以上 + */ + Remark?: string; +} +/** + * UpdateFirewallAttribute - 更新防火墙规则 + */ +export interface UpdateFirewallAttributeResponse { +} diff --git a/lib/services/unet/index.js b/lib/services/unet/index.js new file mode 100644 index 0000000..a3c7802 --- /dev/null +++ b/lib/services/unet/index.js @@ -0,0 +1,277 @@ +"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 **unet** service + */ +class UNetClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * AllocateEIP - 根据提供信息, 申请弹性IP + * + * See also: https://docs.ucloud.cn/api/unet-api/allocate_eip + */ + allocateEIP(request) { + const args = Object.assign({ Action: 'AllocateEIP' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * AllocateShareBandwidth - 开通共享带宽 + * + * See also: https://docs.ucloud.cn/api/unet-api/allocate_share_bandwidth + */ + allocateShareBandwidth(request) { + const args = Object.assign({ Action: 'AllocateShareBandwidth' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * AssociateEIPWithShareBandwidth - 将EIP加入共享带宽 + * + * See also: https://docs.ucloud.cn/api/unet-api/associate_eip_with_share_bandwidth + */ + associateEIPWithShareBandwidth(request) { + const args = Object.assign({ Action: 'AssociateEIPWithShareBandwidth' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * BindEIP - 将尚未使用的弹性IP绑定到指定的资源 + * + * See also: https://docs.ucloud.cn/api/unet-api/bind_eip + */ + bindEIP(request) { + const args = Object.assign({ Action: 'BindEIP' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateBandwidthPackage - 为非共享带宽模式下, 已绑定资源实例的带宽计费弹性IP附加临时带宽包 + * + * See also: https://docs.ucloud.cn/api/unet-api/create_bandwidth_package + */ + createBandwidthPackage(request) { + const args = Object.assign({ Action: 'CreateBandwidthPackage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateFirewall - 创建防火墙 + * + * See also: https://docs.ucloud.cn/api/unet-api/create_firewall + */ + createFirewall(request) { + const args = Object.assign({ Action: 'CreateFirewall' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteBandwidthPackage - 删除弹性IP上已附加带宽包 + * + * See also: https://docs.ucloud.cn/api/unet-api/delete_bandwidth_package + */ + deleteBandwidthPackage(request) { + const args = Object.assign({ Action: 'DeleteBandwidthPackage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteFirewall - 删除防火墙 + * + * See also: https://docs.ucloud.cn/api/unet-api/delete_firewall + */ + deleteFirewall(request) { + const args = Object.assign({ Action: 'DeleteFirewall' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeBandwidthPackage - 获取某地域下的带宽包信息 + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_bandwidth_package + */ + describeBandwidthPackage(request) { + const args = Object.assign({ Action: 'DescribeBandwidthPackage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeBandwidthUsage - 获取带宽用量信息 + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_bandwidth_usage + */ + describeBandwidthUsage(request) { + const args = Object.assign({ Action: 'DescribeBandwidthUsage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeEIP - 获取弹性IP信息 + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_eip + */ + describeEIP(request) { + const args = Object.assign({ Action: 'DescribeEIP' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeFirewall - 获取防火墙组信息 + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_firewall + */ + describeFirewall(request) { + const args = Object.assign({ Action: 'DescribeFirewall' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeFirewallResource - 获取防火墙组所绑定资源的外网IP + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_firewall_resource + */ + describeFirewallResource(request) { + const args = Object.assign({ Action: 'DescribeFirewallResource' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeShareBandwidth - 获取共享带宽信息 + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_share_bandwidth + */ + describeShareBandwidth(request) { + const args = Object.assign({ Action: 'DescribeShareBandwidth' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DisassociateEIPWithShareBandwidth - 将EIP移出共享带宽 + * + * See also: https://docs.ucloud.cn/api/unet-api/disassociate_eip_with_share_bandwidth + */ + disassociateEIPWithShareBandwidth(request) { + const args = Object.assign({ Action: 'DisassociateEIPWithShareBandwidth' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetEIPPayMode - 获取弹性IP计费模式 + * + * See also: https://docs.ucloud.cn/api/unet-api/get_eip_pay_mode + */ + getEIPPayMode(request) { + const args = Object.assign({ Action: 'GetEIPPayMode' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetEIPPrice - 获取弹性IP价格 + * + * See also: https://docs.ucloud.cn/api/unet-api/get_eip_price + */ + getEIPPrice(request) { + const args = Object.assign({ Action: 'GetEIPPrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetEIPUpgradePrice - 获取弹性IP带宽改动价格 + * + * See also: https://docs.ucloud.cn/api/unet-api/get_eip_upgrade_price + */ + getEIPUpgradePrice(request) { + const args = Object.assign({ Action: 'GetEIPUpgradePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GrantFirewall - 将防火墙应用到资源上 + * + * See also: https://docs.ucloud.cn/api/unet-api/grant_firewall + */ + grantFirewall(request) { + const args = Object.assign({ Action: 'GrantFirewall' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyEIPBandwidth - 调整弹性IP的外网带宽 + * + * See also: https://docs.ucloud.cn/api/unet-api/modify_eip_bandwidth + */ + modifyEIPBandwidth(request) { + const args = Object.assign({ Action: 'ModifyEIPBandwidth' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyEIPWeight - 修改弹性IP的外网出口权重 + * + * See also: https://docs.ucloud.cn/api/unet-api/modify_eip_weight + */ + modifyEIPWeight(request) { + const args = Object.assign({ Action: 'ModifyEIPWeight' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ReleaseEIP - 释放弹性IP资源, 所释放弹性IP必须为非绑定状态. + * + * See also: https://docs.ucloud.cn/api/unet-api/release_eip + */ + releaseEIP(request) { + const args = Object.assign({ Action: 'ReleaseEIP' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ReleaseShareBandwidth - 关闭共享带宽 + * + * See also: https://docs.ucloud.cn/api/unet-api/release_share_bandwidth + */ + releaseShareBandwidth(request) { + const args = Object.assign({ Action: 'ReleaseShareBandwidth' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ResizeShareBandwidth - 调整共享带宽的带宽值 + * + * See also: https://docs.ucloud.cn/api/unet-api/resize_share_bandwidth + */ + resizeShareBandwidth(request) { + const args = Object.assign({ Action: 'ResizeShareBandwidth' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * SetEIPPayMode - 设置弹性IP计费模式, 切换时会涉及付费/退费. + * + * See also: https://docs.ucloud.cn/api/unet-api/set_eip_pay_mode + */ + setEIPPayMode(request) { + const args = Object.assign({ Action: 'SetEIPPayMode' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UnBindEIP - 将弹性IP从资源上解绑 + * + * See also: https://docs.ucloud.cn/api/unet-api/un_bind_eip + */ + unBindEIP(request) { + const args = Object.assign({ Action: 'UnBindEIP' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateEIPAttribute - 更新弹性IP名称,业务组,备注等属性字段 + * + * See also: https://docs.ucloud.cn/api/unet-api/update_eip_attribute + */ + updateEIPAttribute(request) { + const args = Object.assign({ Action: 'UpdateEIPAttribute' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateFirewall - 更新防火墙规则 + * + * See also: https://docs.ucloud.cn/api/unet-api/update_firewall + */ + updateFirewall(request) { + const args = Object.assign({ Action: 'UpdateFirewall' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateFirewallAttribute - 更新防火墙规则 + * + * See also: https://docs.ucloud.cn/api/unet-api/update_firewall_attribute + */ + updateFirewallAttribute(request) { + const args = Object.assign({ Action: 'UpdateFirewallAttribute' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = UNetClient; diff --git a/lib/services/uphost/index.d.ts b/lib/services/uphost/index.d.ts new file mode 100644 index 0000000..c7d7c52 --- /dev/null +++ b/lib/services/uphost/index.d.ts @@ -0,0 +1,1014 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **uphost** service + */ +export default class UPHostClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * CreatePHost - 指定数据中心,根据资源使用量创建指定数量的UPHost物理云主机实例。 + * + * See also: https://docs.ucloud.cn/api/uphost-api/create_phost + */ + createPHost(request?: CreatePHostRequest): Promise; + /** + * DescribeBaremetalMachineType - 获取裸金属机型的详细描述信息 + * + * See also: https://docs.ucloud.cn/api/uphost-api/describe_baremetal_machine_type + */ + describeBaremetalMachineType(request?: DescribeBaremetalMachineTypeRequest): Promise; + /** + * DescribePHost - 获取物理机详细信息 + * + * See also: https://docs.ucloud.cn/api/uphost-api/describe_phost + */ + describePHost(request?: DescribePHostRequest): Promise; + /** + * DescribePHostImage - 获取物理云主机镜像列表 + * + * See also: https://docs.ucloud.cn/api/uphost-api/describe_phost_image + */ + describePHostImage(request?: DescribePHostImageRequest): Promise; + /** + * DescribePHostMachineType - 获取物理云机型的详细描述信息 + * + * See also: https://docs.ucloud.cn/api/uphost-api/describe_phost_machine_type + */ + describePHostMachineType(request?: DescribePHostMachineTypeRequest): Promise; + /** + * DescribePHostTags - 获取物理机tag列表(业务组) + * + * See also: https://docs.ucloud.cn/api/uphost-api/describe_phost_tags + */ + describePHostTags(request?: DescribePHostTagsRequest): Promise; + /** + * GetPHostDiskUpgradePrice - 获取物理云裸金属挂载磁盘的升级价格 + * + * See also: https://docs.ucloud.cn/api/uphost-api/get_phost_disk_upgrade_price + */ + getPHostDiskUpgradePrice(request?: GetPHostDiskUpgradePriceRequest): Promise; + /** + * GetPHostPrice - 获取物理机价格列表 + * + * See also: https://docs.ucloud.cn/api/uphost-api/get_phost_price + */ + getPHostPrice(request?: GetPHostPriceRequest): Promise; + /** + * ModifyPHostInfo - 更改物理机信息 + * + * See also: https://docs.ucloud.cn/api/uphost-api/modify_phost_info + */ + modifyPHostInfo(request?: ModifyPHostInfoRequest): Promise; + /** + * PoweroffPHost - 断电物理云主机 + * + * See also: https://docs.ucloud.cn/api/uphost-api/poweroff_phost + */ + poweroffPHost(request?: PoweroffPHostRequest): Promise; + /** + * RebootPHost - 重启物理机 + * + * See also: https://docs.ucloud.cn/api/uphost-api/reboot_phost + */ + rebootPHost(request?: RebootPHostRequest): Promise; + /** + * ReinstallPHost - 重装物理机操作系统 + * + * See also: https://docs.ucloud.cn/api/uphost-api/reinstall_phost + */ + reinstallPHost(request?: ReinstallPHostRequest): Promise; + /** + * ResetPHostPassword - 重置裸金属实例的管理员密码 + * + * See also: https://docs.ucloud.cn/api/uphost-api/reset_phost_password + */ + resetPHostPassword(request?: ResetPHostPasswordRequest): Promise; + /** + * ResizePHostAttachedDisk - 修改裸金属物理云已经挂载的云盘容量大小 + * + * See also: https://docs.ucloud.cn/api/uphost-api/resize_phost_attached_disk + */ + resizePHostAttachedDisk(request?: ResizePHostAttachedDiskRequest): Promise; + /** + * StartPHost - 启动物理机 + * + * See also: https://docs.ucloud.cn/api/uphost-api/start_phost + */ + startPHost(request?: StartPHostRequest): Promise; + /** + * TerminatePHost - 删除物理云主机 + * + * See also: https://docs.ucloud.cn/api/uphost-api/terminate_phost + */ + terminatePHost(request?: TerminatePHostRequest): Promise; +} +/** + * CreatePHost - 指定数据中心,根据资源使用量创建指定数量的UPHost物理云主机实例。 + */ +export interface CreatePHostRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * ImageId,可以通过接口 [DescribePHostImage](api/uphost-api/describe_phost_image.html)获取 + */ + ImageId: string; + /** + * 密码(密码需使用base64进行编码) + */ + Password: string; + /** + * 物理机类型,默认为:db-2(基础型-SAS-V3) + */ + Type?: string; + /** + * 物理机名称,默认为phost + */ + Name?: string; + /** + * 物理机备注,默认为空 + */ + Remark?: string; + /** + * 业务组,默认为default + */ + Tag?: string; + /** + * 计费模式,枚举值为:year, 按年付费; month,按月付费;默认为按月付费 + */ + ChargeType?: string; + /** + * 购买时长,1-10个月或1-10年;默认值为1。月付时,此参数传0,代表购买至月末,1代表整月。 + */ + Quantity?: string; + /** + * 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + */ + SecurityGroupId?: string; + /** + * Raid配置,默认Raid10 支持:Raid0、Raid1、Raid5、Raid10,NoRaid + */ + Raid?: string; + /** + * VPC ID,不填为默认,VPC2.0下需要填写此字段。 + */ + VPCId?: string; + /** + * 子网ID,不填为默认,VPC2.0下需要填写此字段。 + */ + SubnetId?: string; + /** + * 网络环境,可选千兆:1G ,万兆:10G, 默认1G。智能网卡可以选择25G。 + */ + Cluster?: string; + /** + * + */ + Disks?: { + /** + * 裸金属机型参数->是否是系统盘。枚举值: True,是系统盘。 False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + */ + IsBoot?: string; + /** + * 裸金属机型参数->磁盘类型:枚举值:CLOUD_RSSD + */ + Type?: string; + /** + * 裸金属机型参数->磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB,数据盘单块盘20-32000GB。 + */ + Size?: number; + /** + * 裸金属机型参数->云盘代金券id。不适用于系统盘。请通过DescribeCoupon接口查询,或登录用户中心查看 + */ + CouponId?: string; + }[]; + /** + * 指定内网ip创建 + */ + VpcIp?: string; + /** + * 代金券 + */ + CouponId?: string; +} +/** + * CreatePHost - 指定数据中心,根据资源使用量创建指定数量的UPHost物理云主机实例。 + */ +export interface CreatePHostResponse { + /** + * PHost的资源ID数组 + */ + PHostId?: string[]; +} +/** + * DescribeBaremetalMachineType - 获取裸金属机型的详细描述信息 + */ +export interface DescribeBaremetalMachineTypeRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 具体机型。若不填写,则返回全部机型 + */ + Type?: string; +} +/** + * DescribeBaremetalMachineType - 获取裸金属机型的详细描述信息 + */ +export interface DescribeBaremetalMachineTypeResponse { + /** + * 机型列表,模型:PHostMachineTypeSet + */ + MachineTypes?: string; +} +/** + * DescribePHost - 获取物理机详细信息 + */ +export interface DescribePHostRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * PHost资源ID,若为空,则返回当前Region所有PHost。 + */ + PHostId?: string[]; + /** + * 数据偏移量,默认为0 + */ + Offset?: number; + /** + * 返回数据长度,默认为20 + */ + Limit?: number; + /** + * 要挂载的云盘id,过滤返回能被UDiskId挂载的云主机。目前主要针对rssd云盘使用 + */ + UDiskIdForAttachment?: string; +} +/** + * DescribePHost - 获取物理机详细信息 + */ +export interface DescribePHostResponse { + /** + * 满足条件的PHost总数 + */ + TotalCount?: number; + /** + * PHost资源列表,参见 PHostSet + */ + PHostSet?: { + /** + * 可用区,参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * PHost资源ID + */ + PHostId?: string; + /** + * 物理机序列号 + */ + SN?: string; + /** + * 物理云主机状态。枚举值:\\ > 初始化:Initializing; \\ > 启动中:Starting; \\ > 运行中:Running;\\ > 关机中:Stopping; \\ > 安装失败:InstallFailed; \\ > 重启中:Rebooting;\\ > 关机:Stopped; + */ + PMStatus?: string; + /** + * 物理机名称 + */ + Name?: string; + /** + * 物理机备注 + */ + Remark?: string; + /** + * 业务组 + */ + Tag?: string; + /** + * 镜像名称 + */ + ImageName?: string; + /** + * 操作系统名称 + */ + OSname?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 到期时间 + */ + ExpireTime?: number; + /** + * 计费模式,枚举值为: Year,按年付费; Month,按月付费;默认为月付 + */ + ChargeType?: string; + /** + * 电源状态,on 或 off + */ + PowerState?: string; + /** + * 物理机类型,参见DescribePHostMachineType返回值 + */ + PHostType?: string; + /** + * 内存大小,单位:MB + */ + Memory?: number; + /** + * CPU信息,见 PHostCPUSet + */ + CPUSet?: { + /** + * CPU型号 + */ + Model?: string; + /** + * CPU主频 + */ + Frequence?: number; + /** + * CPU个数 + */ + Count?: number; + /** + * CPU核数 + */ + CoreCount?: number; + }; + /** + * 磁盘信息,见 PHostDiskSet + */ + DiskSet?: { + /** + * 单盘大小,单位GB + */ + Space?: number; + /** + * 磁盘数量 + */ + Count?: number; + /** + * 磁盘属性 + */ + Type?: string; + /** + * 磁盘名称,sys/data + */ + Name?: string; + /** + * 磁盘IO性能,单位MB/s(待废弃) + */ + IOCap?: number; + /** + * 裸金属机型参数:磁盘盘符 + */ + Drive?: string; + /** + * 裸金属机型参数:磁盘ID + */ + DiskId?: string; + /** + * 裸金属机型参数:是否是启动盘。True/False + */ + IsBoot?: string; + }[]; + /** + * IP信息,见 PHostIPSet + */ + IPSet?: { + /** + * 国际: Internation, BGP: BGP, 内网: Private + */ + OperatorName?: string; + /** + * IP资源ID(内网IP无资源ID)(待废弃) + */ + IPId?: string; + /** + * IP地址, + */ + IPAddr?: string; + /** + * MAC地址 + */ + MACAddr?: string; + /** + * IP对应带宽,单位Mb,内网IP不显示带宽信息 + */ + Bandwidth?: number; + /** + * 子网ID + */ + SubnetId?: string; + /** + * VPC ID + */ + VPCId?: string; + }[]; + /** + * 网络环境。枚举值:千兆:1G ,万兆:10G + */ + Cluster?: string; + /** + * 自动续费 + */ + AutoRenew?: string; + /** + * 是否支持紧急登录 + */ + IsSupportKVM?: string; + /** + * 操作系统类型 + */ + OSType?: string; + /** + * 组件信息(暂不支持) + */ + Components?: string; + /** + * 是否支持Raid。枚举值:Yes:支持;No:不支持。 + */ + RaidSupported?: string; + /** + * 物理云产品类型,枚举值:LocalDisk=>代表传统本地盘机型, CloudDisk=>云盘裸金属机型 + */ + PhostClass?: string; + }[]; +} +/** + * DescribePHostImage - 获取物理云主机镜像列表 + */ +export interface DescribePHostImageRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 镜像类别,枚举值,Base是基础镜像; + */ + ImageType?: string; + /** + * 镜像ID + */ + ImageId?: string[]; + /** + * 数据偏移量,默认为0 + */ + Offset?: number; + /** + * 返回数据长度,默认为20 + */ + Limit?: number; + /** + * 机器型号,只支持当前zone的展示机型 + */ + MachineType?: string; +} +/** + * DescribePHostImage - 获取物理云主机镜像列表 + */ +export interface DescribePHostImageResponse { + /** + * 满足条件的镜像总数 + */ + TotalCount?: number; + /** + * 镜像列表 PHostImageSet + */ + ImageSet?: { + /** + * 镜像ID + */ + ImageId?: string; + /** + * 镜像名称 + */ + ImageName?: string; + /** + * 操作系统名称 + */ + OsName?: string; + /** + * 操作系统类型 + */ + OsType?: string; + /** + * 支持的机型 + */ + Support?: string[]; + /** + * 当前版本 + */ + Version?: string; + }[]; +} +/** + * DescribePHostMachineType - 获取物理云机型的详细描述信息 + */ +export interface DescribePHostMachineTypeRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 具体机型。若不填写,则返回全部机型 + */ + Type?: string; +} +/** + * DescribePHostMachineType - 获取物理云机型的详细描述信息 + */ +export interface DescribePHostMachineTypeResponse { + /** + * 机型列表,模型:PHostMachineTypeSet + */ + MachineTypes: { + /** + * 物理云主机机型别名,全网唯一。 + */ + Type: string; + /** + * CPU信息 + */ + CPU?: { + /** + * CPU型号 + */ + Model?: string; + /** + * CPU主频 + */ + Frequence?: number; + /** + * CPU个数 + */ + Count?: number; + /** + * CPU核数 + */ + CoreCount?: number; + }; + /** + * 内存大小,单位MB + */ + Memory?: number; + /** + * 磁盘信息 + */ + Disks?: { + /** + * 单盘大小,单位GB + */ + Space?: number; + /** + * 磁盘数量 + */ + Count?: number; + /** + * 磁盘属性 + */ + Type?: string; + /** + * 磁盘名称,sys/data + */ + Name?: string; + /** + * 磁盘IO性能,单位MB/s(待废弃) + */ + IOCap?: number; + /** + * 裸金属机型参数:磁盘盘符 + */ + Drive?: string; + /** + * 裸金属机型参数:磁盘ID + */ + DiskId?: string; + /** + * 裸金属机型参数:是否是启动盘。True/False + */ + IsBoot?: string; + }[]; + /** + * 其他组件信息 + */ + Components?: { + /** + * 组件名称 + */ + Name?: string; + /** + * 组件数量 + */ + Count?: string; + }; + /** + * 集群库存信息 + */ + Clusters?: { + /** + * 集群名。枚举值:千兆网络集群:1G;万兆网络集群:10G;智能网卡网络:25G; + */ + Name?: string; + /** + * 库存状态。枚举值:有库存:Available;无库存:SoldOut + */ + StockStatus?: string; + }[]; + /** + * 是否支持Raid。枚举值:支持:YES;不支持:NO + */ + RaidSupported?: string; + }[]; +} +/** + * DescribePHostTags - 获取物理机tag列表(业务组) + */ +export interface DescribePHostTagsRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; +} +/** + * DescribePHostTags - 获取物理机tag列表(业务组) + */ +export interface DescribePHostTagsResponse { + /** + * Tag的个数 + */ + TotalCount?: number; + /** + * 具体参见 PHostTagSet + */ + TagSet?: { + /** + * 业务组名称 + */ + Tag?: string; + /** + * 该业务组中包含的主机个数 + */ + TotalCount?: number; + }[]; +} +/** + * GetPHostDiskUpgradePrice - 获取物理云裸金属挂载磁盘的升级价格 + */ +export interface GetPHostDiskUpgradePriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UPHost实例ID。 + */ + PHostId: string; + /** + * 磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB,数据盘单块盘20-32000GB。 + */ + DiskSpace: number; + /** + * 磁盘 ID。获取扩容价格必填(只能扩不能减);重装时候不需要填(根据所选盘大小决定) + */ + UDiskId?: string; + /** + * 是否重装价格获取。复用此接口。扩容只能增加云盘大小。重装不限制。枚举值:true/false + */ + ReinstallTag?: boolean; +} +/** + * GetPHostDiskUpgradePrice - 获取物理云裸金属挂载磁盘的升级价格 + */ +export interface GetPHostDiskUpgradePriceResponse { + /** + * 升级差价。精度为小数点后2位。 + */ + Price: number; + /** + * 升价差价原价。精度为小数点后2位。 + */ + OriginalPrice?: number; +} +/** + * GetPHostPrice - 获取物理机价格列表 + */ +export interface GetPHostPriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 购买数量,范围[1-5] + */ + Count: number; + /** + * 计费模式,枚举值为: Year/Month + */ + ChargeType: string; + /** + * 购买时长,1-10个月或1-10年;默认值为1。月付时,此参数传0,代表购买至月末,1代表整月。 + */ + Quantity: number; + /** + * 网络环境,可选千兆:1G ;万兆:10G;25G网络:25G。 + */ + Cluster?: string; + /** + * 默认为:DB(数据库型),可以通过接口 [DescribePHostMachineType](api/uphost-api/describe_phost_machine_type.html)获取 + */ + Type?: string; + /** + * + */ + Disks?: { + /** + * 裸金属机型参数->枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + */ + IsBoot?: string; + /** + * 裸金属机型参数->磁盘类型:枚举值:CLOUD_RSSD + */ + Type?: string; + /** + * 裸金属机型参数->磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB。数据盘是20-32000G。 + */ + Size?: string; + }[]; +} +/** + * GetPHostPrice - 获取物理机价格列表 + */ +export interface GetPHostPriceResponse { + /** + * 价格列表 见 PHostPriceSet + */ + PriceSet?: { + /** + * Year/Month + */ + ChargeType?: string; + /** + * 价格, 单位:元, 保留小数点后两位有效数字 + */ + Price?: number; + /** + * 枚举值:phost=>为主机价格,如果是云盘包括了系统盘价格。cloudDisk=>所有数据盘价格,只是裸金属机型才返回此参数。 + */ + Product?: string; + /** + * 原价格, 单位:元, 保留小数点后两位有效数字 + */ + OriginalPrice?: number; + }[]; +} +/** + * ModifyPHostInfo - 更改物理机信息 + */ +export interface ModifyPHostInfoRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 物理机资源ID + */ + PHostId: string; + /** + * 物理机名称,默认不更改 + */ + Name?: string; + /** + * 物理机备注,默认不更改 + */ + Remark?: string; + /** + * 业务组,默认不更改 + */ + Tag?: string; +} +/** + * ModifyPHostInfo - 更改物理机信息 + */ +export interface ModifyPHostInfoResponse { + /** + * PHost 的资源ID + */ + PHostId?: string; +} +/** + * PoweroffPHost - 断电物理云主机 + */ +export interface PoweroffPHostRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * PHost资源ID + */ + PHostId: string; +} +/** + * PoweroffPHost - 断电物理云主机 + */ +export interface PoweroffPHostResponse { + /** + * PHost 的资源ID + */ + PHostId?: string; +} +/** + * RebootPHost - 重启物理机 + */ +export interface RebootPHostRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * PHost资源ID + */ + PHostId: string; +} +/** + * RebootPHost - 重启物理机 + */ +export interface RebootPHostResponse { + /** + * PHost 的资源ID + */ + PHostId?: string; +} +/** + * ReinstallPHost - 重装物理机操作系统 + */ +export interface ReinstallPHostRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * PHost资源ID + */ + PHostId: string; + /** + * 密码 + */ + Password: string; + /** + * 镜像Id,参考镜像列表,默认使用原镜像 + */ + ImageId?: string; + /** + * 物理机名称,默认不更改 + */ + Name?: string; + /** + * 物理机备注,默认为不更改。 + */ + Remark?: string; + /** + * 业务组,默认不更改。 + */ + Tag?: string; + /** + * 是否保留数据盘,保留:Yes,不报留:No, 默认:Yes + */ + ReserveDisk?: string; + /** + * 不保留数据盘重装,可选Raid + */ + Raid?: string; + /** + * 裸金属机型参数->系统盘大小。 单位:GB, 范围[20,500], 步长:10 + */ + BootDiskSpace?: number; +} +/** + * ReinstallPHost - 重装物理机操作系统 + */ +export interface ReinstallPHostResponse { + /** + * PHost 的资源ID + */ + PHostId?: string; +} +/** + * ResetPHostPassword - 重置裸金属实例的管理员密码 + */ +export interface ResetPHostPasswordRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 裸金属实例ID + */ + PHostId: string; + /** + * PHost新密码(密码格式使用BASE64编码) + */ + Password: string; +} +/** + * ResetPHostPassword - 重置裸金属实例的管理员密码 + */ +export interface ResetPHostPasswordResponse { + /** + * 裸金属实例ID + */ + PHostId: string; +} +/** + * ResizePHostAttachedDisk - 修改裸金属物理云已经挂载的云盘容量大小 + */ +export interface ResizePHostAttachedDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UPHost实例ID。 + */ + PHostId?: string; + /** + * 磁盘ID。 + */ + UDiskId?: string; + /** + * 裸金属机型参数->磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB,数据盘单块盘20-32000GB。 + */ + DiskSpace?: number; +} +/** + * ResizePHostAttachedDisk - 修改裸金属物理云已经挂载的云盘容量大小 + */ +export interface ResizePHostAttachedDiskResponse { + /** + * 改配成功的磁盘id + */ + DiskId?: string; +} +/** + * StartPHost - 启动物理机 + */ +export interface StartPHostRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * PHost资源ID + */ + PHostId: string; +} +/** + * StartPHost - 启动物理机 + */ +export interface StartPHostResponse { + /** + * PHost 的资源ID + */ + PHostId?: string; +} +/** + * TerminatePHost - 删除物理云主机 + */ +export interface TerminatePHostRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * PHost资源ID + */ + PHostId: string; + /** + * 是否释放绑定的EIP。true: 解绑EIP后,并释放;其他值或不填:解绑EIP。 + */ + ReleaseEIP?: boolean; + /** + * 裸金属机型参数->删除主机时是否同时删除挂载的数据盘。默认为false。 + */ + ReleaseUDisk?: boolean; +} +/** + * TerminatePHost - 删除物理云主机 + */ +export interface TerminatePHostResponse { + /** + * PHost 的资源ID + */ + PHostId?: string; +} diff --git a/lib/services/uphost/index.js b/lib/services/uphost/index.js new file mode 100644 index 0000000..cf54f1e --- /dev/null +++ b/lib/services/uphost/index.js @@ -0,0 +1,160 @@ +"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 **uphost** service + */ +class UPHostClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * CreatePHost - 指定数据中心,根据资源使用量创建指定数量的UPHost物理云主机实例。 + * + * See also: https://docs.ucloud.cn/api/uphost-api/create_phost + */ + createPHost(request) { + const args = Object.assign({ Action: 'CreatePHost' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeBaremetalMachineType - 获取裸金属机型的详细描述信息 + * + * See also: https://docs.ucloud.cn/api/uphost-api/describe_baremetal_machine_type + */ + describeBaremetalMachineType(request) { + const args = Object.assign({ Action: 'DescribeBaremetalMachineType' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribePHost - 获取物理机详细信息 + * + * See also: https://docs.ucloud.cn/api/uphost-api/describe_phost + */ + describePHost(request) { + const args = Object.assign({ Action: 'DescribePHost' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribePHostImage - 获取物理云主机镜像列表 + * + * See also: https://docs.ucloud.cn/api/uphost-api/describe_phost_image + */ + describePHostImage(request) { + const args = Object.assign({ Action: 'DescribePHostImage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribePHostMachineType - 获取物理云机型的详细描述信息 + * + * See also: https://docs.ucloud.cn/api/uphost-api/describe_phost_machine_type + */ + describePHostMachineType(request) { + const args = Object.assign({ Action: 'DescribePHostMachineType' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribePHostTags - 获取物理机tag列表(业务组) + * + * See also: https://docs.ucloud.cn/api/uphost-api/describe_phost_tags + */ + describePHostTags(request) { + const args = Object.assign({ Action: 'DescribePHostTags' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetPHostDiskUpgradePrice - 获取物理云裸金属挂载磁盘的升级价格 + * + * See also: https://docs.ucloud.cn/api/uphost-api/get_phost_disk_upgrade_price + */ + getPHostDiskUpgradePrice(request) { + const args = Object.assign({ Action: 'GetPHostDiskUpgradePrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetPHostPrice - 获取物理机价格列表 + * + * See also: https://docs.ucloud.cn/api/uphost-api/get_phost_price + */ + getPHostPrice(request) { + const args = Object.assign({ Action: 'GetPHostPrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyPHostInfo - 更改物理机信息 + * + * See also: https://docs.ucloud.cn/api/uphost-api/modify_phost_info + */ + modifyPHostInfo(request) { + const args = Object.assign({ Action: 'ModifyPHostInfo' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * PoweroffPHost - 断电物理云主机 + * + * See also: https://docs.ucloud.cn/api/uphost-api/poweroff_phost + */ + poweroffPHost(request) { + const args = Object.assign({ Action: 'PoweroffPHost' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * RebootPHost - 重启物理机 + * + * See also: https://docs.ucloud.cn/api/uphost-api/reboot_phost + */ + rebootPHost(request) { + const args = Object.assign({ Action: 'RebootPHost' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ReinstallPHost - 重装物理机操作系统 + * + * See also: https://docs.ucloud.cn/api/uphost-api/reinstall_phost + */ + reinstallPHost(request) { + const args = Object.assign({ Action: 'ReinstallPHost' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ResetPHostPassword - 重置裸金属实例的管理员密码 + * + * See also: https://docs.ucloud.cn/api/uphost-api/reset_phost_password + */ + resetPHostPassword(request) { + const args = Object.assign({ Action: 'ResetPHostPassword' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ResizePHostAttachedDisk - 修改裸金属物理云已经挂载的云盘容量大小 + * + * See also: https://docs.ucloud.cn/api/uphost-api/resize_phost_attached_disk + */ + resizePHostAttachedDisk(request) { + const args = Object.assign({ Action: 'ResizePHostAttachedDisk' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * StartPHost - 启动物理机 + * + * See also: https://docs.ucloud.cn/api/uphost-api/start_phost + */ + startPHost(request) { + const args = Object.assign({ Action: 'StartPHost' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * TerminatePHost - 删除物理云主机 + * + * See also: https://docs.ucloud.cn/api/uphost-api/terminate_phost + */ + terminatePHost(request) { + const args = Object.assign({ Action: 'TerminatePHost' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = UPHostClient; diff --git a/lib/services/usms/index.d.ts b/lib/services/usms/index.d.ts new file mode 100644 index 0000000..99b6079 --- /dev/null +++ b/lib/services/usms/index.d.ts @@ -0,0 +1,518 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **usms** service + */ +export default class USMSClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * CreateUSMSSignature - 调用接口CreateUSMSSignature申请短信签名 + * + * See also: https://docs.ucloud.cn/api/usms-api/create_usms_signature + */ + createUSMSSignature(request?: CreateUSMSSignatureRequest): Promise; + /** + * CreateUSMSTemplate - 调用接口CreateUSMSTemplate申请短信模板 + * + * See also: https://docs.ucloud.cn/api/usms-api/create_usms_template + */ + createUSMSTemplate(request?: CreateUSMSTemplateRequest): Promise; + /** + * DeleteUSMSSignature - 调用接口DeleteUSMSSignature删除短信签名 + * + * See also: https://docs.ucloud.cn/api/usms-api/delete_usms_signature + */ + deleteUSMSSignature(request?: DeleteUSMSSignatureRequest): Promise; + /** + * DeleteUSMSTemplate - 调用接口DeleteUSMSTemplate删除短信模板 + * + * See also: https://docs.ucloud.cn/api/usms-api/delete_usms_template + */ + deleteUSMSTemplate(request?: DeleteUSMSTemplateRequest): Promise; + /** + * GetUSMSSendReceipt - 调用接口GetUSMSSendReceipt短信发送状态信息 + * + * See also: https://docs.ucloud.cn/api/usms-api/get_usms_send_receipt + */ + getUSMSSendReceipt(request?: GetUSMSSendReceiptRequest): Promise; + /** + * QueryUSMSSignature - 调用接口QueryUSMSSignature查询短信签名申请状态 + * + * See also: https://docs.ucloud.cn/api/usms-api/query_usms_signature + */ + queryUSMSSignature(request?: QueryUSMSSignatureRequest): Promise; + /** + * QueryUSMSTemplate - 调用接口QueryUSMSTemplate查询短信模板申请状态 + * + * See also: https://docs.ucloud.cn/api/usms-api/query_usms_template + */ + queryUSMSTemplate(request?: QueryUSMSTemplateRequest): Promise; + /** + * SendBatchUSMSMessage - 调用SendBatchUSMSMessage接口批量发送短信 + * + * See also: https://docs.ucloud.cn/api/usms-api/send_batch_usms_message + */ + sendBatchUSMSMessage(request?: SendBatchUSMSMessageRequest): Promise; + /** + * SendUSMSMessage - 调用接口SendUSMSMessage发送短信 + * + * See also: https://docs.ucloud.cn/api/usms-api/send_usms_message + */ + sendUSMSMessage(request?: SendUSMSMessageRequest): Promise; + /** + * UpdateUSMSSignature - 调用接口UpdateUSMSSignature修改未通过审核的短信签名,并重新提交审核 + * + * See also: https://docs.ucloud.cn/api/usms-api/update_usms_signature + */ + updateUSMSSignature(request?: UpdateUSMSSignatureRequest): Promise; + /** + * UpdateUSMSTemplate - 调用接口UpdateUSMSTemplate修改未通过审核的短信模板,并重新提交审核 + * + * See also: https://docs.ucloud.cn/api/usms-api/update_usms_template + */ + updateUSMSTemplate(request?: UpdateUSMSTemplateRequest): Promise; +} +/** + * CreateUSMSSignature - 调用接口CreateUSMSSignature申请短信签名 + */ +export interface CreateUSMSSignatureRequest { + /** + * 签名类型,说明如下:0-公司或企业的全称或简称;1-App应用的全称或简称;2-工信部备案网站的全称或简称;3-公众号或小程序的全称或简称;4-商标名的全称或简称;5-政府/机关事业单位/其他单位的全称或简称; + */ + SigType: number; + /** + * 签名用途,0-自用,1-他用; + */ + SigPurpose: number; + /** + * 签名的资质证明文件类型,需与签名类型保持一致,说明如下:0-三证合一/企业营业执照/组织机构代码证书/社会信用代码证书;1-应用商店后台开发者管理截图;2-备案服务商的备案成功截图(含域名,网站名称,备案号);3-公众号或小程序的管理界面截图;4-商标注册证书;5-组织机构代码证书、社会信用代码证书; + */ + CertificateType: number; + /** + * 短信签名申请原因 + */ + Description: string; + /** + * 短信签名的资质证明文件,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB + */ + File: string; + /** + * 国内/国际短信。true:国际短信,false:国内短信,若不传值则默认该值为false + */ + International?: boolean; + /** + * 短信签名授权委托文件,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB;当您是代理并使用第三方的签名时(也即SigPurpose为1-他用),该项为必填项; + */ + ProxyFile?: string; +} +/** + * CreateUSMSSignature - 调用接口CreateUSMSSignature申请短信签名 + */ +export interface CreateUSMSSignatureResponse { + /** + * 短信签名ID(短信签名申请时的工单ID) + */ + SigId?: string; +} +/** + * CreateUSMSTemplate - 调用接口CreateUSMSTemplate申请短信模板 + */ +export interface CreateUSMSTemplateRequest { + /** + * 短信模板用途类型:1-验证码类短信模板;2-系统通知类短信模板;3-会员推广类短信模板; + */ + Purpose: number; + /** + * 短信模板名称,不超过32个字符,每个中文、符号、英文、数字等都计为1个字。 + */ + TemplateName: string; + /** + * 短信模板内容,说明如下:字数不超过500,每个中文、符号、英文、数组等都计为一个字;模板中的变量填写格式:{N},其中N为大于1的整数,有多个参数时,建议N从1开始顺次,例如:{1}、{2}等;短信模板禁止仅包括变量的情况; + */ + Template: string; + /** + * 标记是否为国际短信。true:国际短信,false:国内短信,若不传值则默认该值为false + */ + International?: boolean; + /** + * 短信模板申请原因说明,字数不超过128,每个中文、符号、英文、数字等都计为1个字。 + */ + Remark?: string; +} +/** + * CreateUSMSTemplate - 调用接口CreateUSMSTemplate申请短信模板 + */ +export interface CreateUSMSTemplateResponse { + /** + * 短信模板ID(短信模板申请时的工单ID) + */ + TemplateId: string; +} +/** + * DeleteUSMSSignature - 调用接口DeleteUSMSSignature删除短信签名 + */ +export interface DeleteUSMSSignatureRequest { + /** + * 签名ID(也即短信签名申请时的工单ID),支持以数组的方式,举例,以SigIds.0、SigIds.1...SigIds.N方式传入 + */ + SigIds: string[]; +} +/** + * DeleteUSMSSignature - 调用接口DeleteUSMSSignature删除短信签名 + */ +export interface DeleteUSMSSignatureResponse { +} +/** + * DeleteUSMSTemplate - 调用接口DeleteUSMSTemplate删除短信模板 + */ +export interface DeleteUSMSTemplateRequest { + /** + * 模板ID(也即短信模板申请时的工单ID),支持以数组的方式,举例,以TemplateIds.0、TemplateIds.1...TemplateIds.N方式传入 + */ + TemplateIds: string[]; +} +/** + * DeleteUSMSTemplate - 调用接口DeleteUSMSTemplate删除短信模板 + */ +export interface DeleteUSMSTemplateResponse { +} +/** + * GetUSMSSendReceipt - 调用接口GetUSMSSendReceipt短信发送状态信息 + */ +export interface GetUSMSSendReceiptRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 发送短信时返回的SessionNo集合,SessionNoSet.0,SessionNoSet.1....格式 + */ + SessionNoSet: string[]; +} +/** + * GetUSMSSendReceipt - 调用接口GetUSMSSendReceipt短信发送状态信息 + */ +export interface GetUSMSSendReceiptResponse { + /** + * 回执信息集合 + */ + Data: { + /** + * 发送短信时返回的SessionNo + */ + SessionNo: string; + /** + * 每个手机号的短信回执信息集合 + */ + ReceiptSet: { + /** + * 手机号码 + */ + Phone: string; + /** + * 消耗短信条数 + */ + CostCount: number; + /** + * 回执结果,枚举值:\\ > 发送成功: 代表成功 \\ > Success: 代表成功 \\ > 发送失败: 代表失败 \\ > Fail: 代表失败 \\ > 状态未知: 代表未知 \\ > Unknow: 代表未知 + */ + ReceiptResult: string; + /** + * 状态报告编码 + */ + ReceiptCode: string; + /** + * 回执结果描述 + */ + ReceiptDesc: string; + /** + * 回执返回时间 + */ + ReceiptTime: number; + /** + * 自定义的业务标识ID,字符串 + */ + UserId: string; + }[]; + }[]; +} +/** + * QueryUSMSSignature - 调用接口QueryUSMSSignature查询短信签名申请状态 + */ +export interface QueryUSMSSignatureRequest { + /** + * 已申请的短信签名ID(短信签名申请时的工单ID);签名ID和签名至少需填写1项; + */ + SigId?: string; + /** + * 签名内容;签名ID和签名至少需填写1项; + */ + SigContent?: string; +} +/** + * QueryUSMSSignature - 调用接口QueryUSMSSignature查询短信签名申请状态 + */ +export interface QueryUSMSSignatureResponse { + /** + * 签名信息 + */ + Data: { + /** + * 短信签名ID + */ + SigId: string; + /** + * 短信签名内容 + */ + SigContent: string; + /** + * 签名状态,0-待审核 1-审核中 2-审核通过 3-审核未通过 4-被禁用 + */ + Status: number; + /** + * 短信签名未通过审核原因 + */ + ErrDesc: string; + }; +} +/** + * QueryUSMSTemplate - 调用接口QueryUSMSTemplate查询短信模板申请状态 + */ +export interface QueryUSMSTemplateRequest { + /** + * 模板ID + */ + TemplateId: string; +} +/** + * QueryUSMSTemplate - 调用接口QueryUSMSTemplate查询短信模板申请状态 + */ +export interface QueryUSMSTemplateResponse { + /** + * 短信模板明细信息,各字段说明详见OutTemplate + */ + Data?: { + /** + * 短信模板ID + */ + TemplateId: string; + /** + * 模板类型,选项:1-验证码类 2-通知类 3-会员推广类 + */ + Purpose: number; + /** + * 短信模板名称 + */ + TemplateName: string; + /** + * 短信模板内容 + */ + Template: string; + /** + * 退订信息;一般填写方式“回T退订”,当purpose为3(也即会员推广类)时,为必填项 + */ + UnsubscribeInfo: string; + /** + * 短信模板状态;状态说明:0-待审核,1-审核中,2-审核通过,3-审核未通过,4-被禁用 + */ + Status: number; + /** + * 模板说明 + */ + Remark: string; + /** + * 审核失败原因 + */ + ErrDesc: string; + /** + * 创建时间 + */ + CreateTime: number; + }; +} +/** + * SendBatchUSMSMessage - 调用SendBatchUSMSMessage接口批量发送短信 + */ +export interface SendBatchUSMSMessageRequest { + /** + * 批量发送内容,该参数是json数组的base64编码结果。发送内容json数组中,每个“模板+签名”组合作为一个子项,每个子项内支持多个号码,示例:发送内容json数组(base64编码前):[{"TemplateId": "UTA20212831C85C", "SigContent": "UCloud", "Target": [{"TemplateParams": ["123456"], "Phone": "18500000123", "ExtendCode": "123", "UserId": "456"} ] } ] 。json数组中各参数的定义:"TemplateId":模板ID,"SigContent"短信签名内容,"Target"具体到号码粒度的发送内容。"Target"中的具体字段有:"TemplateParams"实际发送的模板参数(若使用的是无参数模板,该参数不能传值),"Phone"手机号码, "ExtendCode"短信扩展码, "UserId"自定义业务标识ID。其中必传参数为"TemplateId", "SigContent", "Target"("Target"中必传参数为"Phone")。实际调用本接口时TaskContent传值(发送内容base64编码后)为:W3siVGVtcGxhdGVJZCI6ICJVVEEyMDIxMjgzMUM4NUMiLCAiU2lnQ29udGVudCI6ICJVQ2xvdWQiLCAiVGFyZ2V0IjogW3siVGVtcGxhdGVQYXJhbXMiOiBbIjEyMzQ1NiJdLCAiUGhvbmUiOiAiMTg1MDAwMDAxMjMiLCAiRXh0ZW5kQ29kZSI6ICIxMjMiLCAiVXNlcklkIjogIjQ1NiJ9IF0gfSBdIA== + */ + TaskContent: string; +} +/** + * SendBatchUSMSMessage - 调用SendBatchUSMSMessage接口批量发送短信 + */ +export interface SendBatchUSMSMessageResponse { + /** + * 本次提交发送任务的唯一ID,可根据该值查询本次发送的短信列表。注:成功提交短信数大于0时,才返回该字段 + */ + SessionNo?: string; + /** + * 本次请求Uuid + */ + ReqUuid?: string; + /** + * 成功提交短信(未拆分)条数 + */ + SuccessCount?: number; + /** + * 未发送成功的详情,返回码非0时该字段有效,可根据该字段数据重发 + */ + FailContent?: { + /** + * 模板ID + */ + TemplateId: string; + /** + * 签名 + */ + SigContent: string; + /** + * 具体号码信息 + */ + Target: { + /** + * 模板参数 + */ + TemplateParams: string[]; + /** + * 手机号 + */ + Phone: string; + /** + * 扩展号码 + */ + ExtendCode?: string; + /** + * 用户自定义ID + */ + UserId?: string; + /** + * 发送失败原因。注:若模板/签名校验失败,该字段为空 + */ + FailureDetails?: string; + }[]; + /** + * 未能成功发送的详情。注:模板/签名检验失败时,该字段有效 + */ + FailureDetails?: string; + }[]; +} +/** + * SendUSMSMessage - 调用接口SendUSMSMessage发送短信 + */ +export interface SendUSMSMessageRequest { + /** + * 电话号码数组,电话号码格式为(60)1xxxxxxxx,()中为国际长途区号(如中国为86或0086,两种格式都支持),后面为电话号码.若不传入国际区号,如1851623xxxx,则默认为国内手机号 + */ + PhoneNumbers: string[]; + /** + * 短信签名内容,请到[USMS控制台](https://console.ucloud.cn/usms)的签名管理页面查看;使用的短信签名必须是已申请并且通过审核; + */ + SigContent: string; + /** + * 模板ID(也即短信模板申请时的工单ID),请到[USMS控制台](https://console.ucloud.cn/usms)的模板管理页面查看;使用的短信模板必须是已申请并通过审核; + */ + TemplateId: string; + /** + * 模板可变参数,以数组的方式填写,举例,TempalteParams.0,TempalteParams.1,... 若模板中无可变参数,则该项可不填写;若模板中有可变参数,则该项为必填项,参数个数需与变量个数保持一致,否则无法发送; + */ + TemplateParams?: string[]; + /** + * 短信扩展码,格式为阿拉伯数字串,默认不开通,如需开通请联系 UCloud技术支持 + */ + ExtendCode?: string; + /** + * 自定义的业务标识ID,字符串( 长度不能超过32 位) + */ + UserId?: string; +} +/** + * SendUSMSMessage - 调用接口SendUSMSMessage发送短信 + */ +export interface SendUSMSMessageResponse { + /** + * 本次提交发送的短信的唯一ID,可根据该值查询本次发送的短信列表 + */ + SessionNo?: string; + /** + * 本次提交的自定义业务标识ID,仅当发送时传入有效的UserId,才返回该字段。 + */ + UserId?: string; +} +/** + * UpdateUSMSSignature - 调用接口UpdateUSMSSignature修改未通过审核的短信签名,并重新提交审核 + */ +export interface UpdateUSMSSignatureRequest { + /** + * 签名ID(也即短信签名申请时的工单ID),支持以数组的方式,举例,以SigIds.0、SigIds.1...SigIds.N方式传入 + */ + SigId: string; + /** + * 新的短信签名内容;长度为2-12个字符, 可包含中文、数字和符号;无需填写【】或[],系统会自动添加 + */ + SigContent: string; + /** + * 签名类型,说明如下:0-公司或企业的全称或简称;1-App应用的全称或简称;2-工信部备案网站的全称或简称;3-公众号或小程序的全称或简称;4-商标名的全称或简称;5-政府/机关事业单位/其他单位的全称或简称; + */ + SigType: number; + /** + * 签名用途,0-自用,1-他用; + */ + SigPurpose: number; + /** + * 短信签名的资质证明文件内容,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB。内容格式如下: [file type];[code type],[base64] 如:image/jpeg;base64,5YaF5a65 + */ + File?: string; + /** + * 签名的资质证明文件类型,需与签名类型保持一致,说明如下:0-三证合一/企业营业执照/组织机构代码证书/社会信用代码证书;1-应用商店后台开发者管理截图;2-备案服务商的备案成功截图(含域名,网站名称,备案号);3-公众号或小程序的管理界面截图;4-商标注册证书;5-组织机构代码证书、社会信用代码证书; + */ + CertificateType?: number; + /** + * 短信签名授权委托文件内容,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB;当您是代理并使用第三方的签名时(也即SigPurpose为1-他用),该项为必填项;格式和File类似。 + */ + ProxyFile?: string; + /** + * 短信签名的资质证明文件URL,若未更改审核材料,则该处使用已上传审核材料的URL链接,否则使用File参数 + */ + Document?: string; + /** + * 短信签名授权委托文件URL,若未更改授权委托文件,则该处填写已上传的授权委托文件的URL链接,否则使用ProxyFile参数 + */ + ProxyDoc?: string; +} +/** + * UpdateUSMSSignature - 调用接口UpdateUSMSSignature修改未通过审核的短信签名,并重新提交审核 + */ +export interface UpdateUSMSSignatureResponse { +} +/** + * UpdateUSMSTemplate - 调用接口UpdateUSMSTemplate修改未通过审核的短信模板,并重新提交审核 + */ +export interface UpdateUSMSTemplateRequest { + /** + * 短信模板ID + */ + TemplateId: string; + /** + * 新的模板内容。模板名称和模板内容必须提供一个,否则会报错。小于等于600个字 + */ + Template: string; + /** + * 新的模板名称。小于等于32个字,每个中文、英文、数组、符合都计为一个字 + */ + TemplateName?: string; + /** + * 短信模板申请原因说明,字数不超过128,每个中文、符号、英文、数字等都计为1个字。 + */ + Remark?: string; +} +/** + * UpdateUSMSTemplate - 调用接口UpdateUSMSTemplate修改未通过审核的短信模板,并重新提交审核 + */ +export interface UpdateUSMSTemplateResponse { +} diff --git a/lib/services/usms/index.js b/lib/services/usms/index.js new file mode 100644 index 0000000..471585b --- /dev/null +++ b/lib/services/usms/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 **usms** service + */ +class USMSClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * CreateUSMSSignature - 调用接口CreateUSMSSignature申请短信签名 + * + * See also: https://docs.ucloud.cn/api/usms-api/create_usms_signature + */ + createUSMSSignature(request) { + const args = Object.assign({ Action: 'CreateUSMSSignature' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateUSMSTemplate - 调用接口CreateUSMSTemplate申请短信模板 + * + * See also: https://docs.ucloud.cn/api/usms-api/create_usms_template + */ + createUSMSTemplate(request) { + const args = Object.assign({ Action: 'CreateUSMSTemplate' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUSMSSignature - 调用接口DeleteUSMSSignature删除短信签名 + * + * See also: https://docs.ucloud.cn/api/usms-api/delete_usms_signature + */ + deleteUSMSSignature(request) { + const args = Object.assign({ Action: 'DeleteUSMSSignature' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUSMSTemplate - 调用接口DeleteUSMSTemplate删除短信模板 + * + * See also: https://docs.ucloud.cn/api/usms-api/delete_usms_template + */ + deleteUSMSTemplate(request) { + const args = Object.assign({ Action: 'DeleteUSMSTemplate' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUSMSSendReceipt - 调用接口GetUSMSSendReceipt短信发送状态信息 + * + * See also: https://docs.ucloud.cn/api/usms-api/get_usms_send_receipt + */ + getUSMSSendReceipt(request) { + const args = Object.assign({ Action: 'GetUSMSSendReceipt' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * QueryUSMSSignature - 调用接口QueryUSMSSignature查询短信签名申请状态 + * + * See also: https://docs.ucloud.cn/api/usms-api/query_usms_signature + */ + queryUSMSSignature(request) { + const args = Object.assign({ Action: 'QueryUSMSSignature' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * QueryUSMSTemplate - 调用接口QueryUSMSTemplate查询短信模板申请状态 + * + * See also: https://docs.ucloud.cn/api/usms-api/query_usms_template + */ + queryUSMSTemplate(request) { + const args = Object.assign({ Action: 'QueryUSMSTemplate' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * SendBatchUSMSMessage - 调用SendBatchUSMSMessage接口批量发送短信 + * + * See also: https://docs.ucloud.cn/api/usms-api/send_batch_usms_message + */ + sendBatchUSMSMessage(request) { + const args = Object.assign({ Action: 'SendBatchUSMSMessage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * SendUSMSMessage - 调用接口SendUSMSMessage发送短信 + * + * See also: https://docs.ucloud.cn/api/usms-api/send_usms_message + */ + sendUSMSMessage(request) { + const args = Object.assign({ Action: 'SendUSMSMessage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateUSMSSignature - 调用接口UpdateUSMSSignature修改未通过审核的短信签名,并重新提交审核 + * + * See also: https://docs.ucloud.cn/api/usms-api/update_usms_signature + */ + updateUSMSSignature(request) { + const args = Object.assign({ Action: 'UpdateUSMSSignature' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateUSMSTemplate - 调用接口UpdateUSMSTemplate修改未通过审核的短信模板,并重新提交审核 + * + * See also: https://docs.ucloud.cn/api/usms-api/update_usms_template + */ + updateUSMSTemplate(request) { + const args = Object.assign({ Action: 'UpdateUSMSTemplate' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = USMSClient; diff --git a/lib/services/vpc/index.d.ts b/lib/services/vpc/index.d.ts new file mode 100644 index 0000000..b28c701 --- /dev/null +++ b/lib/services/vpc/index.d.ts @@ -0,0 +1,2981 @@ +import Client from '../../core/client'; +import { ConfigOptions } from '../../core/config'; +import { CredentialOptions } from '../../core/credential'; +/** + * This client is used to call actions of **vpc** service + */ +export default class VPCClient extends Client { + constructor({ config, credential, }: { + config: ConfigOptions; + credential: CredentialOptions; + }); + /** + * AddSnatRule - 对于绑定了多个EIP的NAT网关,您可以将一个子网下的某台云主机映射到某个特定的EIP上,规则生效后,则该云主机通过该特定的EIP访问互联网。 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/add_snat_rule + */ + addSnatRule(request?: AddSnatRuleRequest): Promise; + /** + * AddVPCNetwork - 添加VPC网段 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/add_vpc_network + */ + addVPCNetwork(request?: AddVPCNetworkRequest): Promise; + /** + * AddWhiteListResource - 添加NAT网关白名单 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/add_white_list_resource + */ + addWhiteListResource(request?: AddWhiteListResourceRequest): Promise; + /** + * AllocateSecondaryIp - 分配ip(用于uk8s使用) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/allocate_secondary_ip + */ + allocateSecondaryIp(request?: AllocateSecondaryIpRequest): Promise; + /** + * AllocateVIP - 根据提供信息,申请内网VIP(Virtual IP),多用于高可用程序作为漂移IP。 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/allocate_vip + */ + allocateVIP(request?: AllocateVIPRequest): Promise; + /** + * AssociateRouteTable - 绑定子网的路由表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/associate_route_table + */ + associateRouteTable(request?: AssociateRouteTableRequest): Promise; + /** + * CloneRouteTable - 将现有的路由表复制为一张新的路由表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/clone_route_table + */ + cloneRouteTable(request?: CloneRouteTableRequest): Promise; + /** + * CreateNATGW - 创建NAT网关 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_natgw + */ + createNATGW(request?: CreateNATGWRequest): Promise; + /** + * CreateNATGWPolicy - 添加NAT网关端口转发规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_natgw_policy + */ + createNATGWPolicy(request?: CreateNATGWPolicyRequest): Promise; + /** + * CreateNetworkAcl - 创建网络ACL + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_network_acl + */ + createNetworkAcl(request?: CreateNetworkAclRequest): Promise; + /** + * CreateNetworkAclAssociation - 创建ACL的绑定关系 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_network_acl_association + */ + createNetworkAclAssociation(request?: CreateNetworkAclAssociationRequest): Promise; + /** + * CreateNetworkAclEntry - 创建ACL的规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_network_acl_entry + */ + createNetworkAclEntry(request?: CreateNetworkAclEntryRequest): Promise; + /** + * CreateRouteTable - 创建路由表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_route_table + */ + createRouteTable(request?: CreateRouteTableRequest): Promise; + /** + * CreateSubnet - 创建子网 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_subnet + */ + createSubnet(request?: CreateSubnetRequest): Promise; + /** + * CreateVPC - 创建VPC + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_vpc + */ + createVPC(request?: CreateVPCRequest): Promise; + /** + * CreateVPCIntercom - 新建VPC互通关系 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_vpc_intercom + */ + createVPCIntercom(request?: CreateVPCIntercomRequest): Promise; + /** + * DeleteNATGW - 删除NAT网关 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_natgw + */ + deleteNATGW(request?: DeleteNATGWRequest): Promise; + /** + * DeleteNATGWPolicy - 删除NAT网关端口转发规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_natgw_policy + */ + deleteNATGWPolicy(request?: DeleteNATGWPolicyRequest): Promise; + /** + * DeleteNetworkAcl - 删除网络ACL + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_network_acl + */ + deleteNetworkAcl(request?: DeleteNetworkAclRequest): Promise; + /** + * DeleteNetworkAclAssociation - 删除网络ACL绑定关系 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_network_acl_association + */ + deleteNetworkAclAssociation(request?: DeleteNetworkAclAssociationRequest): Promise; + /** + * DeleteNetworkAclEntry - 删除ACL的规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_network_acl_entry + */ + deleteNetworkAclEntry(request?: DeleteNetworkAclEntryRequest): Promise; + /** + * DeleteRouteTable - 删除自定义路由表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_route_table + */ + deleteRouteTable(request?: DeleteRouteTableRequest): Promise; + /** + * DeleteSecondaryIp - 删除ip(用于uk8s使用) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_secondary_ip + */ + deleteSecondaryIp(request?: DeleteSecondaryIpRequest): Promise; + /** + * DeleteSnatRule - 删除指定的出口规则(SNAT规则) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_snat_rule + */ + deleteSnatRule(request?: DeleteSnatRuleRequest): Promise; + /** + * DeleteSubnet - 删除子网 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_subnet + */ + deleteSubnet(request?: DeleteSubnetRequest): Promise; + /** + * DeleteVPC - 删除VPC + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_vpc + */ + deleteVPC(request?: DeleteVPCRequest): Promise; + /** + * DeleteVPCIntercom - 删除VPC互通关系 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_vpc_intercom + */ + deleteVPCIntercom(request?: DeleteVPCIntercomRequest): Promise; + /** + * DeleteWhiteListResource - 删除NAT网关白名单列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_white_list_resource + */ + deleteWhiteListResource(request?: DeleteWhiteListResourceRequest): Promise; + /** + * DescribeNATGW - 获取NAT网关信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_natgw + */ + describeNATGW(request?: DescribeNATGWRequest): Promise; + /** + * DescribeNATGWPolicy - 展示NAT网关端口转发规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_natgw_policy + */ + describeNATGWPolicy(request?: DescribeNATGWPolicyRequest): Promise; + /** + * DescribeNetworkAcl - 获取网络ACL + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_network_acl + */ + describeNetworkAcl(request?: DescribeNetworkAclRequest): Promise; + /** + * DescribeNetworkAclAssociation - 获取网络ACL的绑定关系列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_network_acl_association + */ + describeNetworkAclAssociation(request?: DescribeNetworkAclAssociationRequest): Promise; + /** + * DescribeNetworkAclAssociationBySubnet - 获取子网的ACL绑定信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_network_acl_association_by_subnet + */ + describeNetworkAclAssociationBySubnet(request?: DescribeNetworkAclAssociationBySubnetRequest): Promise; + /** + * DescribeNetworkAclEntry - 获取ACL的规则信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_network_acl_entry + */ + describeNetworkAclEntry(request?: DescribeNetworkAclEntryRequest): Promise; + /** + * DescribeRouteTable - 获取路由表详细信息(包括路由策略) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_route_table + */ + describeRouteTable(request?: DescribeRouteTableRequest): Promise; + /** + * DescribeSecondaryIp - 查询SecondaryIp(uk8s使用) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_secondary_ip + */ + describeSecondaryIp(request?: DescribeSecondaryIpRequest): Promise; + /** + * DescribeSnatRule - 获取Nat网关的出口规则(SNAT规则) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_snat_rule + */ + describeSnatRule(request?: DescribeSnatRuleRequest): Promise; + /** + * DescribeSubnet - 获取子网信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_subnet + */ + describeSubnet(request?: DescribeSubnetRequest): Promise; + /** + * DescribeSubnetResource - 展示子网资源 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_subnet_resource + */ + describeSubnetResource(request?: DescribeSubnetResourceRequest): Promise; + /** + * DescribeVIP - 获取内网VIP详细信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_vip + */ + describeVIP(request?: DescribeVIPRequest): Promise; + /** + * DescribeVPC - 获取VPC信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_vpc + */ + describeVPC(request?: DescribeVPCRequest): Promise; + /** + * DescribeVPCIntercom - 获取VPC互通信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_vpc_intercom + */ + describeVPCIntercom(request?: DescribeVPCIntercomRequest): Promise; + /** + * DescribeWhiteListResource - 展示NAT网关白名单资源列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_white_list_resource + */ + describeWhiteListResource(request?: DescribeWhiteListResourceRequest): Promise; + /** + * EnableWhiteList - 修改NAT网关白名单开关 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/enable_white_list + */ + enableWhiteList(request?: EnableWhiteListRequest): Promise; + /** + * GetAvailableResourceForPolicy - 获取NAT网关可配置端口转发规则的资源信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/get_available_resource_for_policy + */ + getAvailableResourceForPolicy(request?: GetAvailableResourceForPolicyRequest): Promise; + /** + * GetAvailableResourceForSnatRule - 获取可用于添加snat规则(出口规则)的资源列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/get_available_resource_for_snat_rule + */ + getAvailableResourceForSnatRule(request?: GetAvailableResourceForSnatRuleRequest): Promise; + /** + * GetAvailableResourceForWhiteList - 获取NAT网关可添加白名单的资源 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/get_available_resource_for_white_list + */ + getAvailableResourceForWhiteList(request?: GetAvailableResourceForWhiteListRequest): Promise; + /** + * GetNetworkAclTargetResource - 获取ACL规则应用目标列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/get_network_acl_target_resource + */ + getNetworkAclTargetResource(request?: GetNetworkAclTargetResourceRequest): Promise; + /** + * ListSubnetForNATGW - 展示NAT网关可绑定的子网列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/list_subnet_for_natgw + */ + listSubnetForNATGW(request?: ListSubnetForNATGWRequest): Promise; + /** + * ModifyRouteRule - 路由策略增、删、改 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/modify_route_rule + */ + modifyRouteRule(request?: ModifyRouteRuleRequest): Promise; + /** + * ReleaseVIP - 释放VIP资源 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/release_vip + */ + releaseVIP(request?: ReleaseVIPRequest): Promise; + /** + * SetGwDefaultExport - 设置NAT网关的默认出口 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/set_gw_default_export + */ + setGwDefaultExport(request?: SetGwDefaultExportRequest): Promise; + /** + * UpdateNATGWPolicy - 更新NAT网关端口转发规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_natgw_policy + */ + updateNATGWPolicy(request?: UpdateNATGWPolicyRequest): Promise; + /** + * UpdateNATGWSubnet - 更新NAT网关绑定的子网 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_natgw_subnet + */ + updateNATGWSubnet(request?: UpdateNATGWSubnetRequest): Promise; + /** + * UpdateNetworkAcl - 更改ACL + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_network_acl + */ + updateNetworkAcl(request?: UpdateNetworkAclRequest): Promise; + /** + * UpdateNetworkAclEntry - 更新ACL的规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_network_acl_entry + */ + updateNetworkAclEntry(request?: UpdateNetworkAclEntryRequest): Promise; + /** + * UpdateRouteTableAttribute - 更新路由表基本信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_route_table_attribute + */ + updateRouteTableAttribute(request?: UpdateRouteTableAttributeRequest): Promise; + /** + * UpdateSnatRule - 更新指定的出口规则(SNAT规则) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_snat_rule + */ + updateSnatRule(request?: UpdateSnatRuleRequest): Promise; + /** + * UpdateSubnetAttribute - 更新子网信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_subnet_attribute + */ + updateSubnetAttribute(request?: UpdateSubnetAttributeRequest): Promise; + /** + * UpdateVIPAttribute - 更新VIP信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_vip_attribute + */ + updateVIPAttribute(request?: UpdateVIPAttributeRequest): Promise; + /** + * UpdateVPCNetwork - 更新VPC网段 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_vpc_network + */ + updateVPCNetwork(request?: UpdateVPCNetworkRequest): Promise; +} +/** + * AddSnatRule - 对于绑定了多个EIP的NAT网关,您可以将一个子网下的某台云主机映射到某个特定的EIP上,规则生效后,则该云主机通过该特定的EIP访问互联网。 + */ +export interface AddSnatRuleRequest { + /** + * NAT网关的ID + */ + NATGWId: string; + /** + * 需要出外网的私网IP地址,例如10.9.7.xx + */ + SourceIp: string; + /** + * EIP的ip地址,例如106.75.xx.xx + */ + SnatIp: string; + /** + * snat规则名称,默认为“出口规则” + */ + Name?: string; +} +/** + * AddSnatRule - 对于绑定了多个EIP的NAT网关,您可以将一个子网下的某台云主机映射到某个特定的EIP上,规则生效后,则该云主机通过该特定的EIP访问互联网。 + */ +export interface AddSnatRuleResponse { +} +/** + * AddVPCNetwork - 添加VPC网段 + */ +export interface AddVPCNetworkRequest { + /** + * 源VPC短ID + */ + VPCId: string; + /** + * 增加网段 + */ + Network: string[]; +} +/** + * AddVPCNetwork - 添加VPC网段 + */ +export interface AddVPCNetworkResponse { +} +/** + * AddWhiteListResource - 添加NAT网关白名单 + */ +export interface AddWhiteListResourceRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 可添加白名单的资源Id + */ + ResourceIds: string[]; +} +/** + * AddWhiteListResource - 添加NAT网关白名单 + */ +export interface AddWhiteListResourceResponse { +} +/** + * AllocateSecondaryIp - 分配ip(用于uk8s使用) + */ +export interface AllocateSecondaryIpRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 节点mac + */ + Mac: string; + /** + * 资源Id + */ + ObjectId: string; + /** + * 子网Id(若未指定,则根据zone获取默认子网进行创建) + */ + SubnetId?: string; + /** + * vpcId + */ + VPCId?: string; + /** + * 指定Ip分配 + */ + Ip?: string; +} +/** + * AllocateSecondaryIp - 分配ip(用于uk8s使用) + */ +export interface AllocateSecondaryIpResponse { + /** + * + */ + IpInfo: { + /** + * + */ + Ip?: string; + /** + * + */ + Mask?: string; + /** + * + */ + Gateway?: string; + /** + * + */ + Mac?: string; + /** + * + */ + SubnetId?: string; + /** + * + */ + VPCId?: string; + }; +} +/** + * AllocateVIP - 根据提供信息,申请内网VIP(Virtual IP),多用于高可用程序作为漂移IP。 + */ +export interface AllocateVIPRequest { + /** + * 可用区 + */ + Zone?: string; + /** + * 指定vip所属的VPC + */ + VPCId: string; + /** + * 子网id + */ + SubnetId: string; + /** + * 指定ip + */ + Ip?: string; + /** + * 申请数量,默认: 1 + */ + Count?: number; + /** + * vip名,默认:VIP + */ + Name?: string; + /** + * 业务组名称,默认为Default + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 业务组 + */ + BusinessId?: string; +} +/** + * AllocateVIP - 根据提供信息,申请内网VIP(Virtual IP),多用于高可用程序作为漂移IP。 + */ +export interface AllocateVIPResponse { + /** + * 申请到的VIP资源相关信息 + */ + VIPSet?: { + /** + * 虚拟ip + */ + VIP?: string; + /** + * 虚拟ip id + */ + VIPId?: string; + /** + * VPC id + */ + VPCId?: string; + }[]; + /** + * 申请到的VIP地址 + */ + DataSet?: string[]; +} +/** + * AssociateRouteTable - 绑定子网的路由表 + */ +export interface AssociateRouteTableRequest { + /** + * 子网ID + */ + SubnetId: string; + /** + * 路由表资源ID + */ + RouteTableId: string; +} +/** + * AssociateRouteTable - 绑定子网的路由表 + */ +export interface AssociateRouteTableResponse { +} +/** + * CloneRouteTable - 将现有的路由表复制为一张新的路由表 + */ +export interface CloneRouteTableRequest { + /** + * 被克隆的路由表ID + */ + RouteTableId: string; +} +/** + * CloneRouteTable - 将现有的路由表复制为一张新的路由表 + */ +export interface CloneRouteTableResponse { + /** + * 复制后新的路由表资源ID + */ + RouteTableId?: string; +} +/** + * CreateNATGW - 创建NAT网关 + */ +export interface CreateNATGWRequest { + /** + * NAT网关名称 + */ + NATGWName: string; + /** + * NAT网关绑定的子网Id + */ + SubnetworkIds: string[]; + /** + * NAT网关绑定的EIPId + */ + EIPIds: string[]; + /** + * NAT网关绑定的防火墙Id + */ + FirewallId: string; + /** + * NAT网关所属的VPC Id。默认为Default VPC Id + */ + VPCId?: string; + /** + * 白名单开关标记。0表示关闭,1表示开启。默认为0 + */ + IfOpen?: number; + /** + * 业务组。默认为空 + */ + Tag?: string; + /** + * 备注。默认为空 + */ + Remark?: string; +} +/** + * CreateNATGW - 创建NAT网关 + */ +export interface CreateNATGWResponse { + /** + * 申请到的NATGateWay Id + */ + NATGWId?: string; +} +/** + * CreateNATGWPolicy - 添加NAT网关端口转发规则 + */ +export interface CreateNATGWPolicyRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 协议类型。枚举值为:TCP、UDP + */ + Protocol: string; + /** + * 源IP。填写对应的EIP Id + */ + SrcEIPId: string; + /** + * 源端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535 + */ + SrcPort: string; + /** + * 目标IP。填写对应的目标IP地址 + */ + DstIP: string; + /** + * 目标端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535 + */ + DstPort: string; + /** + * 转发策略名称。默认为空 + */ + PolicyName?: string; +} +/** + * CreateNATGWPolicy - 添加NAT网关端口转发规则 + */ +export interface CreateNATGWPolicyResponse { + /** + * 创建时分配的策略Id + */ + PolicyId: string; +} +/** + * CreateNetworkAcl - 创建网络ACL + */ +export interface CreateNetworkAclRequest { + /** + * 将要创建的ACL所属VPC的ID + */ + VpcId: string; + /** + * ACL的名称 + */ + AclName: string; + /** + * ACL的描述 + */ + Description?: string; +} +/** + * CreateNetworkAcl - 创建网络ACL + */ +export interface CreateNetworkAclResponse { + /** + * 创建的ACL的ID + */ + AclId: string; +} +/** + * CreateNetworkAclAssociation - 创建ACL的绑定关系 + */ +export interface CreateNetworkAclAssociationRequest { + /** + * ACL的ID + */ + AclId: string; + /** + * 需要绑定的子网ID + */ + SubnetworkId: string; +} +/** + * CreateNetworkAclAssociation - 创建ACL的绑定关系 + */ +export interface CreateNetworkAclAssociationResponse { + /** + * 创建的绑定关系的ID + */ + AssociationId: string; + /** + * 该子网之前的绑定关系信息 + */ + PrevAssociation?: { + /** + * 绑定ID + */ + AssociationId: string; + /** + * ACL的ID + */ + AclId: string; + /** + * 绑定的子网ID + */ + SubnetworkId: string; + /** + * 创建的Unix时间戳 + */ + CreateTime: number; + }; +} +/** + * CreateNetworkAclEntry - 创建ACL的规则 + */ +export interface CreateNetworkAclEntryRequest { + /** + * ACL的ID + */ + AclId: string; + /** + * Entry的优先级,对于同样的Direction来说,不能重复 + */ + Priority: number; + /** + * 出向或者入向(“Ingress”, "Egress") + */ + Direction: string; + /** + * 协议规则描述 + */ + IpProtocol: string; + /** + * IPv4段的CIDR表示 + */ + CidrBlock: string; + /** + * 针对的端口范围 + */ + PortRange: string; + /** + * 规则的行为("Accept", "Reject") + */ + EntryAction: string; + /** + * 描述。长度限制为不超过32字节。 + */ + Description?: string; + /** + * 应用目标类型。0代表“子网内全部资源”,1代表“子网内指定资源”,默认为0 + */ + TargetType?: number; + /** + * 应用目标资源列表。默认为全部资源生效。TargetType为0时不用填写该值。 + */ + TargetResourceIds?: string[]; +} +/** + * CreateNetworkAclEntry - 创建ACL的规则 + */ +export interface CreateNetworkAclEntryResponse { + /** + * 创建的Entry的ID + */ + EntryId: string; +} +/** + * CreateRouteTable - 创建路由表 + */ +export interface CreateRouteTableRequest { + /** + * 所属的VPC资源ID + */ + VPCId: string; + /** + * 路由表名称。默认为RouteTable + */ + Name?: string; + /** + * 路由表所属业务组 + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; +} +/** + * CreateRouteTable - 创建路由表 + */ +export interface CreateRouteTableResponse { + /** + * 路由表ID + */ + RouteTableId?: string; +} +/** + * CreateSubnet - 创建子网 + */ +export interface CreateSubnetRequest { + /** + * VPC资源ID + */ + VPCId: string; + /** + * 子网网络地址,例如192.168.0.0 + */ + Subnet: string; + /** + * 子网网络号位数,默认为24 + */ + Netmask?: number; + /** + * 子网名称,默认为Subnet + */ + SubnetName?: string; + /** + * 业务组名称,默认为Default + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; +} +/** + * CreateSubnet - 创建子网 + */ +export interface CreateSubnetResponse { + /** + * 子网ID + */ + SubnetId?: string; +} +/** + * CreateVPC - 创建VPC + */ +export interface CreateVPCRequest { + /** + * VPC名称 + */ + Name: string; + /** + * VPC网段 + */ + Network: string[]; + /** + * 业务组名称 + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; +} +/** + * CreateVPC - 创建VPC + */ +export interface CreateVPCResponse { + /** + * VPC资源Id + */ + VPCId?: string; +} +/** + * CreateVPCIntercom - 新建VPC互通关系 + */ +export interface CreateVPCIntercomRequest { + /** + * 源VPC短ID + */ + VPCId: string; + /** + * 目的VPC短ID + */ + DstVPCId: string; + /** + * 目的VPC所在地域,默认与源VPC同地域。 + */ + DstRegion?: string; + /** + * 目的VPC项目ID。默认与源VPC同项目。 + */ + DstProjectId?: string; +} +/** + * CreateVPCIntercom - 新建VPC互通关系 + */ +export interface CreateVPCIntercomResponse { +} +/** + * DeleteNATGW - 删除NAT网关 + */ +export interface DeleteNATGWRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 是否释放绑定的EIP。true:解绑并释放;false:只解绑不释放。默认为false + */ + ReleaseEip?: boolean; +} +/** + * DeleteNATGW - 删除NAT网关 + */ +export interface DeleteNATGWResponse { +} +/** + * DeleteNATGWPolicy - 删除NAT网关端口转发规则 + */ +export interface DeleteNATGWPolicyRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 端口转发规则Id + */ + PolicyId: string; +} +/** + * DeleteNATGWPolicy - 删除NAT网关端口转发规则 + */ +export interface DeleteNATGWPolicyResponse { +} +/** + * DeleteNetworkAcl - 删除网络ACL + */ +export interface DeleteNetworkAclRequest { + /** + * 需要删除的AclId + */ + AclId: string; +} +/** + * DeleteNetworkAcl - 删除网络ACL + */ +export interface DeleteNetworkAclResponse { +} +/** + * DeleteNetworkAclAssociation - 删除网络ACL绑定关系 + */ +export interface DeleteNetworkAclAssociationRequest { + /** + * 需要删除的AclId + */ + AclId: string; + /** + * 绑定的子网ID + */ + SubnetworkId: string; +} +/** + * DeleteNetworkAclAssociation - 删除网络ACL绑定关系 + */ +export interface DeleteNetworkAclAssociationResponse { +} +/** + * DeleteNetworkAclEntry - 删除ACL的规则 + */ +export interface DeleteNetworkAclEntryRequest { + /** + * Acl的ID + */ + AclId: string; + /** + * 需要删除的EntryId + */ + EntryId: string; +} +/** + * DeleteNetworkAclEntry - 删除ACL的规则 + */ +export interface DeleteNetworkAclEntryResponse { +} +/** + * DeleteRouteTable - 删除自定义路由表 + */ +export interface DeleteRouteTableRequest { + /** + * 路由表资源ID + */ + RouteTableId: string; +} +/** + * DeleteRouteTable - 删除自定义路由表 + */ +export interface DeleteRouteTableResponse { +} +/** + * DeleteSecondaryIp - 删除ip(用于uk8s使用) + */ +export interface DeleteSecondaryIpRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * ip + */ + Ip: string; + /** + * mac + */ + Mac: string; + /** + * 子网Id + */ + SubnetId: string; + /** + * VPCId + */ + VPCId?: string; + /** + * 资源Id + */ + ObjectId?: string; +} +/** + * DeleteSecondaryIp - 删除ip(用于uk8s使用) + */ +export interface DeleteSecondaryIpResponse { +} +/** + * DeleteSnatRule - 删除指定的出口规则(SNAT规则) + */ +export interface DeleteSnatRuleRequest { + /** + * NAT网关的ID + */ + NATGWId: string; + /** + * 需要出外网的私网IP地址,例如10.9.7.xx + */ + SourceIp: string; +} +/** + * DeleteSnatRule - 删除指定的出口规则(SNAT规则) + */ +export interface DeleteSnatRuleResponse { +} +/** + * DeleteSubnet - 删除子网 + */ +export interface DeleteSubnetRequest { + /** + * 子网ID + */ + SubnetId: string; +} +/** + * DeleteSubnet - 删除子网 + */ +export interface DeleteSubnetResponse { +} +/** + * DeleteVPC - 删除VPC + */ +export interface DeleteVPCRequest { + /** + * VPC资源Id + */ + VPCId: string; +} +/** + * DeleteVPC - 删除VPC + */ +export interface DeleteVPCResponse { +} +/** + * DeleteVPCIntercom - 删除VPC互通关系 + */ +export interface DeleteVPCIntercomRequest { + /** + * 源VPC短ID + */ + VPCId: string; + /** + * 目的VPC短ID + */ + DstVPCId: string; + /** + * 目的VPC所在地域,默认为源VPC所在地域 + */ + DstRegion?: string; + /** + * 目的VPC所在项目ID,默认为源VPC所在项目ID + */ + DstProjectId?: string; +} +/** + * DeleteVPCIntercom - 删除VPC互通关系 + */ +export interface DeleteVPCIntercomResponse { +} +/** + * DeleteWhiteListResource - 删除NAT网关白名单列表 + */ +export interface DeleteWhiteListResourceRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 删除白名单的资源Id + */ + ResourceIds: string[]; +} +/** + * DeleteWhiteListResource - 删除NAT网关白名单列表 + */ +export interface DeleteWhiteListResourceResponse { +} +/** + * DescribeNATGW - 获取NAT网关信息 + */ +export interface DescribeNATGWRequest { + /** + * NAT网关Id。默认为该项目下所有NAT网关 + */ + NATGWIds?: string[]; + /** + * 数据偏移量。默认为0 + */ + Offset?: number; + /** + * 数据分页值。默认为20 + */ + Limit?: number; +} +/** + * DescribeNATGW - 获取NAT网关信息 + */ +export interface DescribeNATGWResponse { + /** + * 满足条件的实例的总数 + */ + TotalCount: number; + /** + * 查到的NATGW信息列表 + */ + DataSet: { + /** + * natgw id + */ + NATGWId: string; + /** + * natgw名称 + */ + NATGWName: string; + /** + * natgw创建时间 + */ + CreateTime: number; + /** + * 业务组 + */ + Tag: string; + /** + * 备注 + */ + Remark: string; + /** + * 绑定的防火墙Id + */ + FirewallId: string; + /** + * 所属VPC Id + */ + VPCId: string; + /** + * 子网 Id + */ + SubnetSet: { + /** + * 子网id + */ + SubnetworkId: string; + /** + * 子网网段 + */ + Subnet: string; + /** + * 子网名字 + */ + SubnetName: string; + }[]; + /** + * 绑定的EIP 信息 + */ + IPSet: { + /** + * 外网IP的 EIPId + */ + EIPId: string; + /** + * 权重为100的为出口 + */ + Weight: number; + /** + * EIP带宽类型 + */ + BandwidthType: string; + /** + * 带宽 + */ + Bandwidth: number; + /** + * 外网IP信息 + */ + IPResInfo: { + /** + * IP的运营商信息 + */ + OperatorName: string; + /** + * 外网IP + */ + EIP: string; + }[]; + }[]; + /** + * 转发策略Id + */ + PolicyId?: string[]; + }[]; +} +/** + * DescribeNATGWPolicy - 展示NAT网关端口转发规则 + */ +export interface DescribeNATGWPolicyRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 返回数据长度,默认为10000 + */ + Limit?: number; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; +} +/** + * DescribeNATGWPolicy - 展示NAT网关端口转发规则 + */ +export interface DescribeNATGWPolicyResponse { + /** + * 满足条件的转发策略总数 + */ + TotalCount: number; + /** + * 查到的NATGW 转发策略的详细信息 + */ + DataSet?: { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 转发策略Id + */ + PolicyId: string; + /** + * 协议类型 + */ + Protocol: string; + /** + * 端口转发前端EIP + */ + SrcEIP: string; + /** + * 端口转发前端EIP Id + */ + SrcEIPId: string; + /** + * 源端口 + */ + SrcPort: string; + /** + * 目的地址 + */ + DstIP: string; + /** + * 目的端口 + */ + DstPort: string; + /** + * 转发策略名称 + */ + PolicyName?: string; + }[]; +} +/** + * DescribeNetworkAcl - 获取网络ACL + */ +export interface DescribeNetworkAclRequest { + /** + * 列表偏移量 + */ + Offset?: number; + /** + * 列表获取的个数限制 + */ + Limit?: string; + /** + * 需要获取的ACL所属的VPC的ID + */ + VpcId?: string; +} +/** + * DescribeNetworkAcl - 获取网络ACL + */ +export interface DescribeNetworkAclResponse { + /** + * ACL的信息,具体结构见下方AclInfo + */ + AclList: { + /** + * ACL所属的VPC ID + */ + VpcId: string; + /** + * ACL的ID + */ + AclId: string; + /** + * 名称 + */ + AclName: string; + /** + * 描述 + */ + Description: string; + /** + * 所有的规则 + */ + Entries: { + /** + * Entry的ID + */ + EntryId: string; + /** + * 优先级 + */ + Priority: string; + /** + * 出向或者入向 + */ + Direction: string; + /** + * 针对的IP协议 + */ + IpProtocol: string; + /** + * IP段的CIDR信息 + */ + CidrBlock: string; + /** + * Port的段信息 + */ + PortRange: string; + /** + * 匹配规则的动作 + */ + EntryAction: string; + /** + * 应用目标类型。 0代表“子网内全部资源” ,1代表“子网内指定资源” 。 + */ + TargetType: number; + /** + * 创建的Unix时间戳 + */ + CreateTime: number; + /** + * 更改的Unix时间戳 + */ + UpdateTime: number; + /** + * 应用目标资源信息。TargetType为0时不返回该值。具体结构见下方TargetResourceInfo + */ + TargetResourceList?: { + /** + * 子网ID + */ + SubnetworkId: string; + /** + * 资源名称 + */ + ResourceName: string; + /** + * 资源ID + */ + ResourceId: string; + /** + * 资源类型 + */ + ResourceType: number; + /** + * 资源绑定的虚拟网卡的名称 + */ + SubResourceName: string; + /** + * 资源绑定的虚拟网卡的ID + */ + SubResourceId: string; + /** + * 资源绑定虚拟网卡的类型 + */ + SubResourceType: number; + /** + * 资源内网IP + */ + PrivateIp: string; + }[]; + /** + * 应用目标资源数量。TargetType为0时不返回该值。 + */ + TargetResourceCount?: number; + }[]; + /** + * 所有的绑定关系,具体结构见下方AssociationInfo + */ + Associations: { + /** + * 绑定ID + */ + AssociationId: string; + /** + * ACL的ID + */ + AclId: string; + /** + * 绑定的子网ID + */ + SubnetworkId: string; + /** + * 创建的Unix时间戳 + */ + CreateTime: number; + }[]; + /** + * 创建的Unix时间戳 + */ + CreateTime: number; + /** + * 更改的Unix时间戳 + */ + UpdateTime: number; + }[]; +} +/** + * DescribeNetworkAclAssociation - 获取网络ACL的绑定关系列表 + */ +export interface DescribeNetworkAclAssociationRequest { + /** + * Acl的ID + */ + AclId: string; + /** + * 列表偏移量 + */ + Offset?: number; + /** + * 列表获取的个数限制 + */ + Limit?: string; +} +/** + * DescribeNetworkAclAssociation - 获取网络ACL的绑定关系列表 + */ +export interface DescribeNetworkAclAssociationResponse { + /** + * 绑定信息列表 + */ + AssociationList: { + /** + * 绑定ID + */ + AssociationId: string; + /** + * ACL的ID + */ + AclId: string; + /** + * 绑定的子网ID + */ + SubnetworkId: string; + /** + * 创建的Unix时间戳 + */ + CreateTime: number; + }[]; +} +/** + * DescribeNetworkAclAssociationBySubnet - 获取子网的ACL绑定信息 + */ +export interface DescribeNetworkAclAssociationBySubnetRequest { + /** + * 子网的ID + */ + SubnetworkId: string; +} +/** + * DescribeNetworkAclAssociationBySubnet - 获取子网的ACL绑定信息 + */ +export interface DescribeNetworkAclAssociationBySubnetResponse { + /** + * 绑定信息 + */ + Association: { + /** + * 绑定ID + */ + AssociationId: string; + /** + * ACL的ID + */ + AclId: string; + /** + * 绑定的子网ID + */ + SubnetworkId: string; + /** + * 创建的Unix时间戳 + */ + CreateTime: number; + }; +} +/** + * DescribeNetworkAclEntry - 获取ACL的规则信息 + */ +export interface DescribeNetworkAclEntryRequest { + /** + * ACL的ID + */ + AclId: string; +} +/** + * DescribeNetworkAclEntry - 获取ACL的规则信息 + */ +export interface DescribeNetworkAclEntryResponse { + /** + * 所有的规则信息 + */ + EntryList: { + /** + * Entry的ID + */ + EntryId: string; + /** + * 优先级 + */ + Priority: string; + /** + * 出向或者入向 + */ + Direction: string; + /** + * 针对的IP协议 + */ + IpProtocol: string; + /** + * IP段的CIDR信息 + */ + CidrBlock: string; + /** + * Port的段信息 + */ + PortRange: string; + /** + * 匹配规则的动作 + */ + EntryAction: string; + /** + * 应用目标类型。 0代表“子网内全部资源” ,1代表“子网内指定资源” 。 + */ + TargetType: number; + /** + * 创建的Unix时间戳 + */ + CreateTime: number; + /** + * 更改的Unix时间戳 + */ + UpdateTime: number; + /** + * 应用目标资源信息。TargetType为0时不返回该值。具体结构见下方TargetResourceInfo + */ + TargetResourceList?: { + /** + * 子网ID + */ + SubnetworkId: string; + /** + * 资源名称 + */ + ResourceName: string; + /** + * 资源ID + */ + ResourceId: string; + /** + * 资源类型 + */ + ResourceType: number; + /** + * 资源绑定的虚拟网卡的名称 + */ + SubResourceName: string; + /** + * 资源绑定的虚拟网卡的ID + */ + SubResourceId: string; + /** + * 资源绑定虚拟网卡的类型 + */ + SubResourceType: number; + /** + * 资源内网IP + */ + PrivateIp: string; + }[]; + /** + * 应用目标资源数量。TargetType为0时不返回该值。 + */ + TargetResourceCount?: number; + }[]; +} +/** + * DescribeRouteTable - 获取路由表详细信息(包括路由策略) + */ +export interface DescribeRouteTableRequest { + /** + * 所属VPC的资源ID + */ + VPCId?: string; + /** + * 路由表资源ID + */ + RouteTableId?: string; + /** + * 数据偏移量。默认为0 + */ + OffSet?: number; + /** + * 数据分页值。默认为20 + */ + Limit?: number; + /** + * 业务组ID + */ + BusinessId?: string; +} +/** + * DescribeRouteTable - 获取路由表详细信息(包括路由策略) + */ +export interface DescribeRouteTableResponse { + /** + * 路由表信息 + */ + RouteTables?: { + /** + * 路由表资源ID + */ + RouteTableId?: string; + /** + * 路由表类型。1为默认路由表,0为自定义路由表 + */ + RouteTableType?: number; + /** + * 绑定该路由表的子网数量 + */ + SubnetCount?: number; + /** + * 路由表所属的VPC资源ID + */ + VPCId?: string; + /** + * 路由表所属的VPC资源名称 + */ + VPCName?: string; + /** + * 路由表所属业务组 + */ + Tag?: string; + /** + * 路由表备注 + */ + Remark?: string; + /** + * 创建时间戳 + */ + CreateTime?: number; + /** + * 路由规则 + */ + RouteRules?: { + /** + * 项目ID信息 + */ + AccountId?: number; + /** + * 目的地址 + */ + DstAddr?: string; + /** + * 保留字段,暂未使用 + */ + DstPort?: number; + /** + * 路由下一跳资源ID + */ + NexthopId?: string; + /** + * 路由表下一跳类型。LOCAL,本VPC内部通信路由;PUBLIC,公共服务路由;CNAT,外网路由;UDPN,跨域高速通道路由;HYBRIDGW,混合云路由;INSTANCE,实例路由;VNET,VPC联通路由;IPSEC VPN,指向VPN网关的路由。 + */ + NexthopType?: string; + /** + * 保留字段,暂未使用 + */ + OriginAddr?: string; + /** + * 保留字段,暂未使用 + */ + Priority?: number; + /** + * 路由规则备注 + */ + Remark?: string; + /** + * 规则ID + */ + RouteRuleId?: string; + /** + * 路由表资源ID + */ + RouteTableId?: string; + /** + * 路由规则类型。0,系统路由规则;1,自定义路由规则 + */ + RuleType?: number; + /** + * 保留字段,暂未使用 + */ + SrcAddr?: string; + /** + * 保留字段,暂未使用 + */ + SrcPort?: number; + /** + * 所属的VPC + */ + VNetId?: string; + }[]; + }[]; + /** + * RouteTables字段的数量 + */ + TotalCount?: number; +} +/** + * DescribeSecondaryIp - 查询SecondaryIp(uk8s使用) + */ +export interface DescribeSecondaryIpRequest { + /** + * 子网Id + */ + SubnetId: string; + /** + * VPCId + */ + VPCId: string; + /** + * Ip + */ + Ip?: string; + /** + * Mac + */ + Mac?: string; +} +/** + * DescribeSecondaryIp - 查询SecondaryIp(uk8s使用) + */ +export interface DescribeSecondaryIpResponse { + /** + * + */ + DataSet?: { + /** + * + */ + Ip?: string; + /** + * + */ + Mask?: string; + /** + * + */ + Gateway?: string; + /** + * + */ + Mac?: string; + /** + * + */ + SubnetId?: string; + /** + * + */ + VPCId?: string; + }[]; +} +/** + * DescribeSnatRule - 获取Nat网关的出口规则(SNAT规则) + */ +export interface DescribeSnatRuleRequest { + /** + * NAT网关的ID + */ + NATGWId: string; + /** + * 需要出外网的私网IP地址,例如10.9.7.xx + */ + SourceIp?: string; + /** + * EIP的ip地址,例如106.75.xx.xx + */ + SnatIp?: string; + /** + * 偏移,默认为0 + */ + Offset?: string; + /** + * 分页,默认为20 + */ + Limit?: string; +} +/** + * DescribeSnatRule - 获取Nat网关的出口规则(SNAT规则) + */ +export interface DescribeSnatRuleResponse { + /** + * 某个NAT网关的所有Snat规则 + */ + DataSet: { + /** + * EIP地址,如106.76.xx.xx + */ + SnatIp: string; + /** + * 资源的内网IP地址 + */ + SourceIp: string; + /** + * SourceIp所属的子网id + */ + SubnetworkId: string; + /** + * snat规则名称 + */ + Name: string; + }[]; + /** + * 规则数量 + */ + TotalCount: number; +} +/** + * DescribeSubnet - 获取子网信息 + */ +export interface DescribeSubnetRequest { + /** + * 子网id数组,适用于一次查询多个子网信息 + */ + SubnetIds?: string[]; + /** + * 子网id,适用于一次查询一个子网信息 + */ + SubnetId?: string; + /** + * 路由表Id + */ + RouteTableId?: string; + /** + * VPC资源id + */ + VPCId?: string; + /** + * 业务组名称,默认为Default + */ + Tag?: string; + /** + * 偏移量,默认为0 + */ + Offset?: number; + /** + * 列表长度,默认为20 + */ + Limit?: number; + /** + * 是否返回子网的可用IP数,true为是,false为否,默认不返回 + */ + ShowAvailableIPs?: boolean; +} +/** + * DescribeSubnet - 获取子网信息 + */ +export interface DescribeSubnetResponse { + /** + * 子网总数量 + */ + TotalCount: number; + /** + * 子网信息数组,具体资源见下方SubnetInfo + */ + DataSet: { + /** + * 可用区名称 + */ + Zone?: string; + /** + * 子网关联的IPv6网段 + */ + IPv6Network?: string; + /** + * VPCId + */ + VPCId?: string; + /** + * VPC名称 + */ + VPCName?: string; + /** + * 子网Id + */ + SubnetId?: string; + /** + * 子网名称 + */ + SubnetName?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 业务组 + */ + Tag?: string; + /** + * 子网类型 + */ + SubnetType?: number; + /** + * 子网网段 + */ + Subnet?: string; + /** + * 子网掩码 + */ + Netmask?: string; + /** + * 子网网关 + */ + Gateway?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 是否有natgw + */ + HasNATGW?: boolean; + /** + * 路由表Id + */ + RouteTableId?: string; + /** + * 可用IP数量 + */ + AvailableIPs?: number; + }[]; +} +/** + * DescribeSubnetResource - 展示子网资源 + */ +export interface DescribeSubnetResourceRequest { + /** + * 子网id + */ + SubnetId: string; + /** + * 资源类型,默认为全部资源类型。枚举值为:UHOST,云主机;PHOST,物理云主机;ULB,负载均衡;UHADOOP_HOST,hadoop节点;UFORTRESS_HOST,堡垒机;UNATGW,NAT网关;UKAFKA,Kafka消息队列;UMEM,内存存储;DOCKER,容器集群;UDB,数据库;UDW,数据仓库;VIP,内网VIP. + */ + ResourceType?: string; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; + /** + * 单页返回数据长度,默认为20 + */ + Limit?: number; +} +/** + * DescribeSubnetResource - 展示子网资源 + */ +export interface DescribeSubnetResourceResponse { + /** + * 总数 + */ + TotalCount?: number; + /** + * 返回数据集,请见SubnetResource + */ + DataSet?: { + /** + * 名称 + */ + Name?: string; + /** + * 资源Id + */ + ResourceId?: string; + /** + * 资源类型。对应的资源类型:UHOST,云主机;PHOST,物理云主机;ULB,负载均衡;UHADOOP_HOST,hadoop节点;UFORTRESS_HOST,堡垒机;UNATGW,NAT网关;UKAFKA,分布式消息系统;UMEM,内存存储;DOCKER,容器集群;UDB,数据库;UDW,数据仓库;VIP,内网VIP. + */ + ResourceType?: string; + /** + * 资源ip + */ + IP?: string; + }[]; +} +/** + * DescribeVIP - 获取内网VIP详细信息 + */ +export interface DescribeVIPRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * vpc的id,指定SubnetId时必填 + */ + VPCId?: string; + /** + * 子网id,不指定则获取VPCId下的所有vip + */ + SubnetId?: string; + /** + * VIP ID + */ + VIPId?: string; + /** + * 业务组名称, 默认为 Default + */ + Tag?: string; + /** + * 业务组 + */ + BusinessId?: string; +} +/** + * DescribeVIP - 获取内网VIP详细信息 + */ +export interface DescribeVIPResponse { + /** + * 内网VIP详情,请见VIPDetailSet + */ + VIPSet?: { + /** + * 地域 + */ + Zone?: string; + /** + * 虚拟ip id + */ + VIPId?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 真实主机ip + */ + RealIp?: string; + /** + * 虚拟ip + */ + VIP?: string; + /** + * 子网id + */ + SubnetId?: string; + /** + * VPC id + */ + VPCId?: string; + /** + * VIP名称 + */ + Name?: string; + /** + * VIP备注 + */ + Remark?: string; + /** + * VIP所属业务组 + */ + Tag?: string; + }[]; + /** + * 内网VIP地址列表 + */ + DataSet?: string[]; + /** + * vip数量 + */ + TotalCount?: number; +} +/** + * DescribeVPC - 获取VPC信息 + */ +export interface DescribeVPCRequest { + /** + * VPCId + */ + VPCIds?: string[]; + /** + * 业务组名称 + */ + Tag?: string; + /** + * + */ + Offset?: number; + /** + * + */ + Limit?: number; +} +/** + * DescribeVPC - 获取VPC信息 + */ +export interface DescribeVPCResponse { + /** + * vpc信息,具体结构见下方VPCInfo + */ + DataSet?: { + /** + * + */ + NetworkInfo: { + /** + * vpc地址空间 + */ + Network?: string; + /** + * 地址空间中子网数量 + */ + SubnetCount?: number; + }[]; + /** + * + */ + SubnetCount: number; + /** + * + */ + CreateTime: number; + /** + * + */ + UpdateTime: number; + /** + * + */ + Tag: string; + /** + * + */ + Name: string; + /** + * VPCId + */ + VPCId?: string; + /** + * + */ + Network?: string[]; + /** + * VPC关联的IPv6网段 + */ + IPv6Network?: string; + /** + * VPC关联的IPv6网段所属运营商 + */ + OperatorName?: string; + }[]; +} +/** + * DescribeVPCIntercom - 获取VPC互通信息 + */ +export interface DescribeVPCIntercomRequest { + /** + * VPC短ID + */ + VPCId: string; + /** + * 目的VPC所在地域,默认为全部地域 + */ + DstRegion?: string; + /** + * 目的项目ID,默认为全部项目 + */ + DstProjectId?: string; +} +/** + * DescribeVPCIntercom - 获取VPC互通信息 + */ +export interface DescribeVPCIntercomResponse { + /** + * 联通VPC信息数组 + */ + DataSet?: { + /** + * 项目Id + */ + ProjectId?: string; + /** + * vpc类型(1表示托管VPC,0表示公有云VPC) + */ + VPCType: number; + /** + * 项目Id(数字) + */ + AccountId: number; + /** + * VPC的地址空间 + */ + Network?: string[]; + /** + * 所属地域 + */ + DstRegion?: string; + /** + * VPC名字 + */ + Name?: string; + /** + * VPCId + */ + VPCId?: string; + /** + * 业务组(未分组显示为 Default) + */ + Tag?: string; + }[]; +} +/** + * DescribeWhiteListResource - 展示NAT网关白名单资源列表 + */ +export interface DescribeWhiteListResourceRequest { + /** + * NAT网关的Id + */ + NATGWIds: string[]; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 数据分页值, 默认为20 + */ + Limit?: number; +} +/** + * DescribeWhiteListResource - 展示NAT网关白名单资源列表 + */ +export interface DescribeWhiteListResourceResponse { + /** + * 白名单资源的详细信息,详见DescribeResourceWhiteListDataSet + */ + DataSet: { + /** + * NATGateWay Id + */ + NATGWId: string; + /** + * 白名单开关标记 + */ + IfOpen: number; + /** + * 白名单详情 + */ + ObjectIPInfo: { + /** + * natgw字符串 + */ + GwType: string; + /** + * 白名单资源的内网IP + */ + PrivateIP: string; + /** + * 白名单资源Id信息 + */ + ResourceId: string; + /** + * 白名单资源名称 + */ + ResourceName: string; + /** + * 白名单资源类型 + */ + ResourceType: string; + /** + * 资源绑定的虚拟网卡的实例ID + */ + SubResourceId: string; + /** + * 资源绑定的虚拟网卡的实例名称 + */ + SubResourceName: string; + /** + * 资源绑定的虚拟网卡的类型 + */ + SubResourceType: string; + /** + * 白名单资源所属VPCId + */ + VPCId?: string; + }[]; + }[]; + /** + * 上述DataSet总数量 + */ + TotalCount: number; +} +/** + * EnableWhiteList - 修改NAT网关白名单开关 + */ +export interface EnableWhiteListRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 白名单开关标记。0:关闭;1:开启。默认为0 + */ + IfOpen: number; +} +/** + * EnableWhiteList - 修改NAT网关白名单开关 + */ +export interface EnableWhiteListResponse { +} +/** + * GetAvailableResourceForPolicy - 获取NAT网关可配置端口转发规则的资源信息 + */ +export interface GetAvailableResourceForPolicyRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 返回数据长度,默认为20 + */ + Limit?: number; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; +} +/** + * GetAvailableResourceForPolicy - 获取NAT网关可配置端口转发规则的资源信息 + */ +export interface GetAvailableResourceForPolicyResponse { + /** + * 支持资源类型的信息 + */ + DataSet: { + /** + * 资源的Id + */ + ResourceId: string; + /** + * 资源对应的内网Ip + */ + PrivateIP: string; + /** + * 资源类型。"uhost":云主机; "upm",物理云主机; "hadoophost":hadoop节点; "fortresshost":堡垒机: "udockhost",容器 + */ + ResourceType: string; + }[]; +} +/** + * GetAvailableResourceForSnatRule - 获取可用于添加snat规则(出口规则)的资源列表 + */ +export interface GetAvailableResourceForSnatRuleRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 数据分页值, 默认为20 + */ + Limit?: number; +} +/** + * GetAvailableResourceForSnatRule - 获取可用于添加snat规则(出口规则)的资源列表 + */ +export interface GetAvailableResourceForSnatRuleResponse { + /** + * 返回的资源详细信息 + */ + DataSet: { + /** + * 资源ID + */ + ResourceId?: string; + /** + * 资源名称 + */ + ResourceName?: string; + /** + * 资源内网IP + */ + PrivateIP?: string; + /** + * 资源类型 + */ + ResourceType?: string; + /** + * 资源所属VPC的ID + */ + SubnetworkId?: string; + /** + * 资源所属子网的ID + */ + VPCId?: string; + }[]; + /** + * 总数 + */ + TotalCount: number; +} +/** + * GetAvailableResourceForWhiteList - 获取NAT网关可添加白名单的资源 + */ +export interface GetAvailableResourceForWhiteListRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 数据分页值, 默认为20 + */ + Limit?: number; +} +/** + * GetAvailableResourceForWhiteList - 获取NAT网关可添加白名单的资源 + */ +export interface GetAvailableResourceForWhiteListResponse { + /** + * 返回白名单列表的详细信息 + */ + DataSet: { + /** + * 资源类型Id + */ + ResourceId: string; + /** + * 资源名称 + */ + ResourceName: string; + /** + * 资源的内网Ip + */ + PrivateIP: string; + /** + * 资源类型。"uhost":云主机; "upm",物理云主机; "hadoophost":hadoop节点; "fortresshost":堡垒机: "udockhost",容器 + */ + ResourceType: string; + /** + * 资源绑定的虚拟网卡的实例名称 + */ + SubResourceName: string; + /** + * 资源所属VPCId + */ + VPCId: string; + /** + * 资源所属子网Id + */ + SubnetworkId: string; + /** + * 资源绑定的虚拟网卡的实例ID + */ + SubResourceId?: string; + /** + * 资源绑定的虚拟网卡的实例类型 + */ + SubResourceType?: string; + }[]; + /** + * 白名单资源列表的总的个数 + */ + TotalCount: number; +} +/** + * GetNetworkAclTargetResource - 获取ACL规则应用目标列表 + */ +export interface GetNetworkAclTargetResourceRequest { + /** + * 子网ID。 + */ + SubnetworkId: string[]; +} +/** + * GetNetworkAclTargetResource - 获取ACL规则应用目标列表 + */ +export interface GetNetworkAclTargetResourceResponse { + /** + * ACL规则应用目标资源列表,具体结构见下方TargetResourceInfo + */ + TargetResourceList: { + /** + * 子网ID + */ + SubnetworkId: string; + /** + * 资源名称 + */ + ResourceName: string; + /** + * 资源ID + */ + ResourceId: string; + /** + * 资源类型 + */ + ResourceType: number; + /** + * 资源绑定的虚拟网卡的名称 + */ + SubResourceName: string; + /** + * 资源绑定的虚拟网卡的ID + */ + SubResourceId: string; + /** + * 资源绑定虚拟网卡的类型 + */ + SubResourceType: number; + /** + * 资源内网IP + */ + PrivateIp: string; + }[]; + /** + * ACL规则应用目标资源总数 + */ + TotalCount: number; +} +/** + * ListSubnetForNATGW - 展示NAT网关可绑定的子网列表 + */ +export interface ListSubnetForNATGWRequest { + /** + * NAT网关所属VPC Id。默认值为Default VPC Id + */ + VPCId?: string; +} +/** + * ListSubnetForNATGW - 展示NAT网关可绑定的子网列表 + */ +export interface ListSubnetForNATGWResponse { + /** + * 具体参数请见NatgwSubnetDataSet + */ + DataSet?: { + /** + * 子网id + */ + SubnetId: string; + /** + * 子网网段 + */ + Subnet: string; + /** + * 掩码 + */ + Netmask: string; + /** + * 子网名字 + */ + SubnetName: string; + /** + * 是否绑定NATGW + */ + HasNATGW: boolean; + }[]; +} +/** + * ModifyRouteRule - 路由策略增、删、改 + */ +export interface ModifyRouteRuleRequest { + /** + * 通过DescribeRouteTable拿到 + */ + RouteTableId: string; + /** + * 格式: RouteRuleId | 目的网段 | 下一跳类型(支持INSTANCE、VIP) | 下一跳 |优先级(保留字段,填写0即可)| 备注 | 增、删、改标志(add/delete/update) 。"添加"示例: test_id | 10.8.0.0/16 | instance | uhost-xd8ja | 0 | Default Route Rule| add (添加的RouteRuleId填任意非空字符串) 。"删除"示例: routerule-xk3jxa | 10.8.0.0/16 | instance | uhost-xd8ja | 0 | Default Route Rule| delete (RouteRuleId来自DescribeRouteTable中) 。“修改”示例: routerule-xk3jxa | 10.8.0.0/16 | instance | uhost-cjksa2 | 0 | Default Route Rule| update (RouteRuleId来自DescribeRouteTable中) + */ + RouteRule: string[]; +} +/** + * ModifyRouteRule - 路由策略增、删、改 + */ +export interface ModifyRouteRuleResponse { +} +/** + * ReleaseVIP - 释放VIP资源 + */ +export interface ReleaseVIPRequest { + /** + * 可用区 + */ + Zone?: string; + /** + * 内网VIP的id + */ + VIPId: string; +} +/** + * ReleaseVIP - 释放VIP资源 + */ +export interface ReleaseVIPResponse { +} +/** + * SetGwDefaultExport - 设置NAT网关的默认出口 + */ +export interface SetGwDefaultExportRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * NAT网关绑定的EIP。ExportIp和ExportEipId必填一个 + */ + ExportIp?: string; + /** + * NAT网关绑定的EIP Id。ExportIp和ExportEipId必填一个 + */ + ExportEipId?: string; +} +/** + * SetGwDefaultExport - 设置NAT网关的默认出口 + */ +export interface SetGwDefaultExportResponse { +} +/** + * UpdateNATGWPolicy - 更新NAT网关端口转发规则 + */ +export interface UpdateNATGWPolicyRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 转发策略Id + */ + PolicyId: string; + /** + * 协议类型。枚举值为:TCP 、 UDP + */ + Protocol: string; + /** + * 源IP。填写对应的EIP Id + */ + SrcEIPId: string; + /** + * 源端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-6553 + */ + SrcPort: string; + /** + * 目标IP。填写对饮的目标IP地址 + */ + DstIP: string; + /** + * 目标端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535 + */ + DstPort: string; + /** + * 转发策略名称。默认为空 + */ + PolicyName?: string; +} +/** + * UpdateNATGWPolicy - 更新NAT网关端口转发规则 + */ +export interface UpdateNATGWPolicyResponse { +} +/** + * UpdateNATGWSubnet - 更新NAT网关绑定的子网 + */ +export interface UpdateNATGWSubnetRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * NAT网关绑定的子网Id + */ + SubnetworkIds: string[]; +} +/** + * UpdateNATGWSubnet - 更新NAT网关绑定的子网 + */ +export interface UpdateNATGWSubnetResponse { +} +/** + * UpdateNetworkAcl - 更改ACL + */ +export interface UpdateNetworkAclRequest { + /** + * Acl的名称 + */ + AclName: string; + /** + * 需要更改的ACL ID + */ + AclId: string; + /** + * 描述 + */ + Description: string; +} +/** + * UpdateNetworkAcl - 更改ACL + */ +export interface UpdateNetworkAclResponse { +} +/** + * UpdateNetworkAclEntry - 更新ACL的规则 + */ +export interface UpdateNetworkAclEntryRequest { + /** + * ACL的ID + */ + AclId: string; + /** + * 需要更新的Entry Id + */ + EntryId: string; + /** + * Entry的优先级,对于同样的Direction来说,不能重复 + */ + Priority: number; + /** + * 出向或者入向(“Ingress”, "Egress") + */ + Direction: string; + /** + * 针对的协议规则 + */ + IpProtocol: string; + /** + * IPv4段的CIDR表示 + */ + CidrBlock: string; + /** + * 针对的端口范围 + */ + PortRange: string; + /** + * 规则的行为("Accept", "Reject") + */ + EntryAction: string; + /** + * 描述 + */ + Description?: string; + /** + * 应用目标类型。0代表“子网内全部资源”, 1代表“子网内指定资源”。默认为0 + */ + TargetType?: number; + /** + * 应用目标资源列表。默认为全部资源生效。TargetType为0时不用填写该值 + */ + TargetResourceIds?: string[]; +} +/** + * UpdateNetworkAclEntry - 更新ACL的规则 + */ +export interface UpdateNetworkAclEntryResponse { +} +/** + * UpdateRouteTableAttribute - 更新路由表基本信息 + */ +export interface UpdateRouteTableAttributeRequest { + /** + * 路由表ID + */ + RouteTableId: string; + /** + * 名称 + */ + Name?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 业务组名称 + */ + Tag?: string; +} +/** + * UpdateRouteTableAttribute - 更新路由表基本信息 + */ +export interface UpdateRouteTableAttributeResponse { +} +/** + * UpdateSnatRule - 更新指定的出口规则(SNAT规则) + */ +export interface UpdateSnatRuleRequest { + /** + * NAT网关的ID, + */ + NATGWId: string; + /** + * 需要出外网的私网IP地址,例如10.9.7.xx + */ + SourceIp: string; + /** + * EIP的ip地址,例如106.75.xx.xx + */ + SnatIp: string; + /** + * snat名称,即出口规则名称 + */ + Name?: string; +} +/** + * UpdateSnatRule - 更新指定的出口规则(SNAT规则) + */ +export interface UpdateSnatRuleResponse { +} +/** + * UpdateSubnetAttribute - 更新子网信息 + */ +export interface UpdateSubnetAttributeRequest { + /** + * 子网ID + */ + SubnetId: string; + /** + * 子网名称(如果Name不填写,Tag必须填写) + */ + Name?: string; + /** + * 业务组名称(如果Tag不填写,Name必须填写) + */ + Tag?: string; +} +/** + * UpdateSubnetAttribute - 更新子网信息 + */ +export interface UpdateSubnetAttributeResponse { +} +/** + * UpdateVIPAttribute - 更新VIP信息 + */ +export interface UpdateVIPAttributeRequest { + /** + * 内网VIP的资源Id + */ + VIPId: string; + /** + * 内网VIP的备注 + */ + Remark?: string; + /** + * 内网VIP的名称 + */ + Name?: string; + /** + * 内网VIP所属的业务组 + */ + Tag?: string; +} +/** + * UpdateVIPAttribute - 更新VIP信息 + */ +export interface UpdateVIPAttributeResponse { +} +/** + * UpdateVPCNetwork - 更新VPC网段 + */ +export interface UpdateVPCNetworkRequest { + /** + * VPC的ID + */ + VPCId: string; + /** + * 需要保留的VPC网段。当前仅支持删除VPC网段,添加网段请参考[AddVPCNetwork](https://docs.ucloud.cn/api/vpc2.0-api/add_vpc_network) + */ + Network: string[]; +} +/** + * UpdateVPCNetwork - 更新VPC网段 + */ +export interface UpdateVPCNetworkResponse { +} diff --git a/lib/services/vpc/index.js b/lib/services/vpc/index.js new file mode 100644 index 0000000..68d091b --- /dev/null +++ b/lib/services/vpc/index.js @@ -0,0 +1,565 @@ +"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 **vpc** service + */ +class VPCClient extends client_1.default { + constructor({ config, credential, }) { + super({ config, credential }); + } + /** + * AddSnatRule - 对于绑定了多个EIP的NAT网关,您可以将一个子网下的某台云主机映射到某个特定的EIP上,规则生效后,则该云主机通过该特定的EIP访问互联网。 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/add_snat_rule + */ + addSnatRule(request) { + const args = Object.assign({ Action: 'AddSnatRule' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * AddVPCNetwork - 添加VPC网段 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/add_vpc_network + */ + addVPCNetwork(request) { + const args = Object.assign({ Action: 'AddVPCNetwork' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * AddWhiteListResource - 添加NAT网关白名单 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/add_white_list_resource + */ + addWhiteListResource(request) { + const args = Object.assign({ Action: 'AddWhiteListResource' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * AllocateSecondaryIp - 分配ip(用于uk8s使用) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/allocate_secondary_ip + */ + allocateSecondaryIp(request) { + const args = Object.assign({ Action: 'AllocateSecondaryIp' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * AllocateVIP - 根据提供信息,申请内网VIP(Virtual IP),多用于高可用程序作为漂移IP。 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/allocate_vip + */ + allocateVIP(request) { + const args = Object.assign({ Action: 'AllocateVIP' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * AssociateRouteTable - 绑定子网的路由表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/associate_route_table + */ + associateRouteTable(request) { + const args = Object.assign({ Action: 'AssociateRouteTable' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CloneRouteTable - 将现有的路由表复制为一张新的路由表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/clone_route_table + */ + cloneRouteTable(request) { + const args = Object.assign({ Action: 'CloneRouteTable' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateNATGW - 创建NAT网关 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_natgw + */ + createNATGW(request) { + const args = Object.assign({ Action: 'CreateNATGW' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateNATGWPolicy - 添加NAT网关端口转发规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_natgw_policy + */ + createNATGWPolicy(request) { + const args = Object.assign({ Action: 'CreateNATGWPolicy' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateNetworkAcl - 创建网络ACL + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_network_acl + */ + createNetworkAcl(request) { + const args = Object.assign({ Action: 'CreateNetworkAcl' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateNetworkAclAssociation - 创建ACL的绑定关系 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_network_acl_association + */ + createNetworkAclAssociation(request) { + const args = Object.assign({ Action: 'CreateNetworkAclAssociation' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateNetworkAclEntry - 创建ACL的规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_network_acl_entry + */ + createNetworkAclEntry(request) { + const args = Object.assign({ Action: 'CreateNetworkAclEntry' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateRouteTable - 创建路由表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_route_table + */ + createRouteTable(request) { + const args = Object.assign({ Action: 'CreateRouteTable' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateSubnet - 创建子网 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_subnet + */ + createSubnet(request) { + const args = Object.assign({ Action: 'CreateSubnet' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateVPC - 创建VPC + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_vpc + */ + createVPC(request) { + const args = Object.assign({ Action: 'CreateVPC' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * CreateVPCIntercom - 新建VPC互通关系 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_vpc_intercom + */ + createVPCIntercom(request) { + const args = Object.assign({ Action: 'CreateVPCIntercom' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteNATGW - 删除NAT网关 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_natgw + */ + deleteNATGW(request) { + const args = Object.assign({ Action: 'DeleteNATGW' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteNATGWPolicy - 删除NAT网关端口转发规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_natgw_policy + */ + deleteNATGWPolicy(request) { + const args = Object.assign({ Action: 'DeleteNATGWPolicy' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteNetworkAcl - 删除网络ACL + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_network_acl + */ + deleteNetworkAcl(request) { + const args = Object.assign({ Action: 'DeleteNetworkAcl' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteNetworkAclAssociation - 删除网络ACL绑定关系 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_network_acl_association + */ + deleteNetworkAclAssociation(request) { + const args = Object.assign({ Action: 'DeleteNetworkAclAssociation' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteNetworkAclEntry - 删除ACL的规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_network_acl_entry + */ + deleteNetworkAclEntry(request) { + const args = Object.assign({ Action: 'DeleteNetworkAclEntry' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteRouteTable - 删除自定义路由表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_route_table + */ + deleteRouteTable(request) { + const args = Object.assign({ Action: 'DeleteRouteTable' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteSecondaryIp - 删除ip(用于uk8s使用) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_secondary_ip + */ + deleteSecondaryIp(request) { + const args = Object.assign({ Action: 'DeleteSecondaryIp' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteSnatRule - 删除指定的出口规则(SNAT规则) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_snat_rule + */ + deleteSnatRule(request) { + const args = Object.assign({ Action: 'DeleteSnatRule' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteSubnet - 删除子网 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_subnet + */ + deleteSubnet(request) { + const args = Object.assign({ Action: 'DeleteSubnet' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteVPC - 删除VPC + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_vpc + */ + deleteVPC(request) { + const args = Object.assign({ Action: 'DeleteVPC' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteVPCIntercom - 删除VPC互通关系 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_vpc_intercom + */ + deleteVPCIntercom(request) { + const args = Object.assign({ Action: 'DeleteVPCIntercom' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteWhiteListResource - 删除NAT网关白名单列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_white_list_resource + */ + deleteWhiteListResource(request) { + const args = Object.assign({ Action: 'DeleteWhiteListResource' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeNATGW - 获取NAT网关信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_natgw + */ + describeNATGW(request) { + const args = Object.assign({ Action: 'DescribeNATGW' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeNATGWPolicy - 展示NAT网关端口转发规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_natgw_policy + */ + describeNATGWPolicy(request) { + const args = Object.assign({ Action: 'DescribeNATGWPolicy' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeNetworkAcl - 获取网络ACL + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_network_acl + */ + describeNetworkAcl(request) { + const args = Object.assign({ Action: 'DescribeNetworkAcl' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeNetworkAclAssociation - 获取网络ACL的绑定关系列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_network_acl_association + */ + describeNetworkAclAssociation(request) { + const args = Object.assign({ Action: 'DescribeNetworkAclAssociation' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeNetworkAclAssociationBySubnet - 获取子网的ACL绑定信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_network_acl_association_by_subnet + */ + describeNetworkAclAssociationBySubnet(request) { + const args = Object.assign({ Action: 'DescribeNetworkAclAssociationBySubnet' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeNetworkAclEntry - 获取ACL的规则信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_network_acl_entry + */ + describeNetworkAclEntry(request) { + const args = Object.assign({ Action: 'DescribeNetworkAclEntry' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeRouteTable - 获取路由表详细信息(包括路由策略) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_route_table + */ + describeRouteTable(request) { + const args = Object.assign({ Action: 'DescribeRouteTable' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeSecondaryIp - 查询SecondaryIp(uk8s使用) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_secondary_ip + */ + describeSecondaryIp(request) { + const args = Object.assign({ Action: 'DescribeSecondaryIp' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeSnatRule - 获取Nat网关的出口规则(SNAT规则) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_snat_rule + */ + describeSnatRule(request) { + const args = Object.assign({ Action: 'DescribeSnatRule' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeSubnet - 获取子网信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_subnet + */ + describeSubnet(request) { + const args = Object.assign({ Action: 'DescribeSubnet' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeSubnetResource - 展示子网资源 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_subnet_resource + */ + describeSubnetResource(request) { + const args = Object.assign({ Action: 'DescribeSubnetResource' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeVIP - 获取内网VIP详细信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_vip + */ + describeVIP(request) { + const args = Object.assign({ Action: 'DescribeVIP' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeVPC - 获取VPC信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_vpc + */ + describeVPC(request) { + const args = Object.assign({ Action: 'DescribeVPC' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeVPCIntercom - 获取VPC互通信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_vpc_intercom + */ + describeVPCIntercom(request) { + const args = Object.assign({ Action: 'DescribeVPCIntercom' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeWhiteListResource - 展示NAT网关白名单资源列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_white_list_resource + */ + describeWhiteListResource(request) { + const args = Object.assign({ Action: 'DescribeWhiteListResource' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * EnableWhiteList - 修改NAT网关白名单开关 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/enable_white_list + */ + enableWhiteList(request) { + const args = Object.assign({ Action: 'EnableWhiteList' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetAvailableResourceForPolicy - 获取NAT网关可配置端口转发规则的资源信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/get_available_resource_for_policy + */ + getAvailableResourceForPolicy(request) { + const args = Object.assign({ Action: 'GetAvailableResourceForPolicy' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetAvailableResourceForSnatRule - 获取可用于添加snat规则(出口规则)的资源列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/get_available_resource_for_snat_rule + */ + getAvailableResourceForSnatRule(request) { + const args = Object.assign({ Action: 'GetAvailableResourceForSnatRule' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetAvailableResourceForWhiteList - 获取NAT网关可添加白名单的资源 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/get_available_resource_for_white_list + */ + getAvailableResourceForWhiteList(request) { + const args = Object.assign({ Action: 'GetAvailableResourceForWhiteList' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetNetworkAclTargetResource - 获取ACL规则应用目标列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/get_network_acl_target_resource + */ + getNetworkAclTargetResource(request) { + const args = Object.assign({ Action: 'GetNetworkAclTargetResource' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ListSubnetForNATGW - 展示NAT网关可绑定的子网列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/list_subnet_for_natgw + */ + listSubnetForNATGW(request) { + const args = Object.assign({ Action: 'ListSubnetForNATGW' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ModifyRouteRule - 路由策略增、删、改 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/modify_route_rule + */ + modifyRouteRule(request) { + const args = Object.assign({ Action: 'ModifyRouteRule' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * ReleaseVIP - 释放VIP资源 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/release_vip + */ + releaseVIP(request) { + const args = Object.assign({ Action: 'ReleaseVIP' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * SetGwDefaultExport - 设置NAT网关的默认出口 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/set_gw_default_export + */ + setGwDefaultExport(request) { + const args = Object.assign({ Action: 'SetGwDefaultExport' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateNATGWPolicy - 更新NAT网关端口转发规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_natgw_policy + */ + updateNATGWPolicy(request) { + const args = Object.assign({ Action: 'UpdateNATGWPolicy' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateNATGWSubnet - 更新NAT网关绑定的子网 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_natgw_subnet + */ + updateNATGWSubnet(request) { + const args = Object.assign({ Action: 'UpdateNATGWSubnet' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateNetworkAcl - 更改ACL + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_network_acl + */ + updateNetworkAcl(request) { + const args = Object.assign({ Action: 'UpdateNetworkAcl' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateNetworkAclEntry - 更新ACL的规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_network_acl_entry + */ + updateNetworkAclEntry(request) { + const args = Object.assign({ Action: 'UpdateNetworkAclEntry' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateRouteTableAttribute - 更新路由表基本信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_route_table_attribute + */ + updateRouteTableAttribute(request) { + const args = Object.assign({ Action: 'UpdateRouteTableAttribute' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateSnatRule - 更新指定的出口规则(SNAT规则) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_snat_rule + */ + updateSnatRule(request) { + const args = Object.assign({ Action: 'UpdateSnatRule' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateSubnetAttribute - 更新子网信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_subnet_attribute + */ + updateSubnetAttribute(request) { + const args = Object.assign({ Action: 'UpdateSubnetAttribute' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateVIPAttribute - 更新VIP信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_vip_attribute + */ + updateVIPAttribute(request) { + const args = Object.assign({ Action: 'UpdateVIPAttribute' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateVPCNetwork - 更新VPC网段 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_vpc_network + */ + updateVPCNetwork(request) { + const args = Object.assign({ Action: 'UpdateVPCNetwork' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } +} +exports.default = VPCClient; diff --git a/lib/version.d.ts b/lib/version.d.ts new file mode 100644 index 0000000..b34824a --- /dev/null +++ b/lib/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "0.0.1"; diff --git a/lib/version.js b/lib/version.js new file mode 100644 index 0000000..a912553 --- /dev/null +++ b/lib/version.js @@ -0,0 +1,4 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VERSION = void 0; +exports.VERSION = "0.0.1"; diff --git a/package.json b/package.json new file mode 100644 index 0000000..22059ea --- /dev/null +++ b/package.json @@ -0,0 +1,48 @@ +{ + "name": "@ucloud-sdks/ucloud-sdk-js", + "description": "ucloud-sdk-js", + "version": "0.0.5", + "author": "oas@ucloud.cn", + "license": "MIT", + "private": false, + "main": "./lib", + "files": [ + "package.json", + "README", + "LICENSE", + "lib" + ], + "scripts": { + "start": "node lib/index.js", + "start:example": "node --no-warnings example/index.js", + "build": "node_modules/.bin/tsc", + "test": "node_modules/.bin/jest index.test.ts", + "coverage": "node_modules/.bin/jest", + "tslint": "node_modules/.bin/tslint ./src/**/**/*.ts", + "prettier:base": "node_modules/.bin/prettier", + "example": "npm run build && node examples/uhost/index.js", + "prettier:check": "prettier --check src/**/*.ts src/**/**/*.ts", + "prettier:write": "prettier --write src/**/*.ts src/**/**/*.ts" + }, + "devDependencies": { + "@types/jest": "^23.3.1", + "@types/node": "^10.9.2", + "coveralls": "^3.0.2", + "husky": "^1.0.0-rc.13", + "jest": "^26.6.3", + "jest-junit": "^5.1.0", + "prettier": "^2.3.0", + "ts-jest": "^23.1.4", + "tslint": "^5.11.0", + "tslint-config-prettier": "^1.15.0", + "typescript": "^3.0.1" + }, + "husky": { + "hooks": { + "pre-commit": "yarn build && git add lib/" + } + }, + "dependencies": { + "axios": "^0.21.1" + } +} diff --git a/src/core/client.ts b/src/core/client.ts new file mode 100644 index 0000000..46c4b86 --- /dev/null +++ b/src/core/client.ts @@ -0,0 +1,112 @@ +import Config, { ConfigOptions } from './config'; +import Credential, { CredentialOptions } from './credential'; +import Request from './request'; +import Response from './response'; +import { Context, MiddlewareOptions } from './middleware'; +import { Transport } from './transport'; +import { VERSION } from '../version'; +import { EXC_TYPE_TRANSPORT, UCloudError } from './exception'; +import { + credentialMiddleware, + defaultsMiddleware, + logMiddleware, +} from './middlewares'; + +export default class Client { + config: Config; + + credential: Credential; + + middlewares: MiddlewareOptions[]; + + transport: Transport; + + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + this.config = new Config(config); + this.credential = new Credential(credential); + this.middlewares = [ + defaultsMiddleware, + credentialMiddleware, + logMiddleware, + ]; + + let ua = `JS-SDK/${VERSION}`; + if (!!config.userAgent) { + ua += config.userAgent; + } + this.transport = new Transport({ + baseUrl: this.config.baseUrl, + userAgent: ua, + }); + } + + useMiddleware(options: MiddlewareOptions) { + this.middlewares.push(options); + } + + withTransport(transport: Transport) { + this.transport = transport; + } + + async invoke(req: Request): Promise { + const ctx = new Context({ + config: this.config, + credential: this.credential, + request: req, + }); + + // resolve request + this.middlewares.forEach((middleware) => { + if (!middleware.request) { + return; + } + ctx.request = middleware.request(ctx); + }); + + // do invoking + let resp; + const maxRetries = this.config.maxRetries || 3; + for (let k = 0; k <= maxRetries; k++) { + try { + resp = await this.transport.invoke(ctx.request); + break; // success, stop retrying + } catch (e) { + ctx.exception = e; + this.middlewares.forEach((middleware) => { + if (!middleware.error) { + return; + } + middleware.error(ctx); + }); + if (k == maxRetries) { + throw e; + } + } + } + + // resolve response + ctx.response = resp; + this.middlewares.forEach((middleware) => { + if (!middleware.response) { + return; + } + ctx.response = middleware.response(ctx); + }); + + if (!resp) { + throw new UCloudError({ + typ: EXC_TYPE_TRANSPORT, + retCode: -1, + message: 'invalid response', + requestId: '', + }); + } + return resp; + } +} diff --git a/src/core/config/index.test.ts b/src/core/config/index.test.ts new file mode 100644 index 0000000..c902a64 --- /dev/null +++ b/src/core/config/index.test.ts @@ -0,0 +1,17 @@ +import Config from './index'; + +describe('config', () => { + const cfg = new Config({}); + + test('test generate signature', () => { + Object.keys(cfg).map((k) => { + expect(cfg.region).not.toBeNull(); + expect(cfg.projectId).not.toBeNull(); + expect(cfg.baseUrl).not.toBeNull(); + expect(cfg.userAgent).not.toBeNull(); + expect(cfg.timeout).not.toBeNull(); + expect(cfg.maxRetries).not.toBeNull(); + expect(cfg.logger).not.toBeNull(); + }); + }); +}); diff --git a/src/core/config/index.ts b/src/core/config/index.ts new file mode 100644 index 0000000..4594d19 --- /dev/null +++ b/src/core/config/index.ts @@ -0,0 +1,77 @@ +import { DefaultLogger, Logger, LogLevel } from '../logger'; + +export type ConfigOptions = { + region?: string; + projectId?: string; + baseUrl?: string; + userAgent?: string; + timeout?: number; + maxRetries?: number; + logger?: Logger | null; +}; + +export default class Config { + /** + * Region is the region of backend service. + * See also ... + */ + region?: string; + + /** + * ProjectId is the unique identify of project, used for organize resources, + * Most of resources should belong to a project. + * Sub-Account must have an project id. + * See also ... + */ + projectId?: string; + + /** + * BaseUrl is the url of backend api. + * See also ... + */ + baseUrl?: string; + + /** + * UserAgent is an attribute for sdk client, used for distinguish who is using sdk. + * See also https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent + * It will be appended to the end of sdk user-agent. + * eg. "Terraform/0.10.1" -> "GO/1.9.1 GO-SDK/0.1.0 Terraform/0.10.1" + * NOTE: it will conflict with the User-Agent of HTTPHeaders + */ + userAgent?: string; + + /** + * Timeout is timeout for every request. + */ + timeout?: number; + + /** + * MaxRetries is the number of max retry times. + * Set MaxRetries more than 0 to enable auto-retry for network and service availability problem + * if auto-retry is enabled, it will enable default retry policy using exponential backoff. + */ + maxRetries?: number; + + /** + * Logger + */ + logger?: Logger | null; + + constructor({ + region = '', + projectId = '', + baseUrl = 'https://api.ucloud.cn', + userAgent = '', + timeout = 30, + maxRetries = 3, + logger = new DefaultLogger(LogLevel.Info), + }: ConfigOptions) { + this.region = region; + this.projectId = projectId; + this.baseUrl = baseUrl; + this.userAgent = userAgent; + this.timeout = timeout; + this.maxRetries = maxRetries; + this.logger = logger; + } +} diff --git a/src/core/credential/index.test.ts b/src/core/credential/index.test.ts new file mode 100644 index 0000000..e84acc2 --- /dev/null +++ b/src/core/credential/index.test.ts @@ -0,0 +1,29 @@ +import Credential from './index'; + +describe('credential', () => { + const cred = new Credential({ + publicKey: 'ucloudsomeone@example.com1296235120854146120', + privateKey: '46f09bb9fab4f12dfc160dae12273d5332b5debe', + }); + + const args = { + Action: 'DescribeUHostInstance', + Region: 'cn-bj2', + Limit: 10, + Foo: null, + }; + + test('test generate signature', () => { + expect(cred.verifyAc(args)).toEqual( + 'cba5cf5ec4d4233d206b1b54951e3787350a642f' + ); + }); + + test('test attach signature to args', () => { + expect(cred.sign(args)).toEqual({ + PublicKey: cred.publicKey, + Signature: 'cba5cf5ec4d4233d206b1b54951e3787350a642f', + ...args, + }); + }); +}); diff --git a/src/core/credential/index.ts b/src/core/credential/index.ts new file mode 100644 index 0000000..427030e --- /dev/null +++ b/src/core/credential/index.ts @@ -0,0 +1,52 @@ +const { createHash } = require('crypto'); + +type argsT = { [index: string]: any }; + +export type CredentialOptions = { + publicKey: string; + privateKey: string; +}; + +export default class Credential { + publicKey: string; + + privateKey: string; + + constructor({ publicKey, privateKey }: CredentialOptions) { + this.publicKey = publicKey; + this.privateKey = privateKey; + } + + verifyAc(args: argsT) { + const obj = { ...args }; + obj['PublicKey'] = this.publicKey; + + // key sorting + const keys = Object.keys(obj); + keys.sort(); + + // concat string + let s = ''; + keys.forEach((key) => { + const value = obj[key]; + if (value == null) { + return; + } + s += key; + s += value.toString(); + }); + s += this.privateKey; + + // hash by sha1 + let hash = createHash('sha1'); + hash.update(s); + return hash.digest('hex'); + } + + sign(args: argsT): argsT { + const obj = { ...args }; + obj['Signature'] = this.verifyAc(obj); + obj['PublicKey'] = this.publicKey; + return obj; + } +} diff --git a/src/core/exception/index.ts b/src/core/exception/index.ts new file mode 100644 index 0000000..3438d7d --- /dev/null +++ b/src/core/exception/index.ts @@ -0,0 +1,30 @@ +export const EXC_TYPE_RET_CODE = 'RetCode'; + +export const EXC_TYPE_TRANSPORT = 'Transport'; + +export const EXC_TYPE_UNKNOWN = 'Unknown'; + +export class UCloudError extends Error { + typ: string; + + retCode?: number; + + requestId?: string; + + constructor({ + typ, + message, + retCode, + requestId, + }: { + typ: string; + message: string; + retCode?: number; + requestId?: string; + }) { + super(message); + this.typ = typ; + this.retCode = retCode; + this.requestId = requestId; + } +} diff --git a/src/core/logger/index.test.ts b/src/core/logger/index.test.ts new file mode 100644 index 0000000..97602c3 --- /dev/null +++ b/src/core/logger/index.test.ts @@ -0,0 +1,17 @@ +import { DefaultLogger, LogLevel } from './index'; + +describe('request', () => { + test('test encode request', () => { + let logger = new DefaultLogger(100 as LogLevel); + logger.debug('debug'); + logger.info('info'); + logger.error('error'); + + logger = new DefaultLogger(-1 as LogLevel); + logger.debug('debug'); + logger.info('info'); + logger.error('error'); + + logger.log(-1, 'asd'); + }); +}); diff --git a/src/core/logger/index.ts b/src/core/logger/index.ts new file mode 100644 index 0000000..8320344 --- /dev/null +++ b/src/core/logger/index.ts @@ -0,0 +1,58 @@ +export enum LogLevel { + Debug, + Info, + Error, +} + +export interface Logger { + debug(message: any, extras?: object): void; + + info(message: any, extras?: object): void; + + error(message: any, extras?: object): void; +} + +export class DefaultLogger { + level: LogLevel; + + constructor(level: LogLevel) { + this.level = level; + } + + log(level: LogLevel, message: string, extras?: object) { + switch (level) { + case LogLevel.Debug: + console.log(message); + break; + case LogLevel.Info: + console.log(message); + break; + case LogLevel.Error: + console.log(message); + break; + default: + console.log(message); + } + } + + debug(message: string, extras?: object) { + if (LogLevel.Debug < this.level) { + return; + } + this.log(LogLevel.Debug, message, extras); + } + + info(message: string, extras?: object) { + if (LogLevel.Info < this.level) { + return; + } + this.log(LogLevel.Info, message, extras); + } + + error(message: string, extras?: object) { + if (LogLevel.Error < this.level) { + return; + } + this.log(LogLevel.Error, message, extras); + } +} diff --git a/src/core/middleware/context.ts b/src/core/middleware/context.ts new file mode 100644 index 0000000..33ee0be --- /dev/null +++ b/src/core/middleware/context.ts @@ -0,0 +1,37 @@ +import Credential from '../credential'; +import Config from '../config'; +import Request from '../request'; +import Response from '../response'; +import { UCloudError } from '../exception'; + +export class Context { + credential: Credential; + + config: Config; + + request: Request; + + response?: Response; + + exception?: UCloudError; + + constructor({ + credential, + config, + request, + response, + exception, + }: { + credential: Credential; + config: Config; + request: Request; + response?: Response; + exception?: UCloudError; + }) { + this.credential = credential; + this.config = config; + this.request = request; + this.response = response; + this.exception = exception; + } +} diff --git a/src/core/middleware/index.ts b/src/core/middleware/index.ts new file mode 100644 index 0000000..f65c340 --- /dev/null +++ b/src/core/middleware/index.ts @@ -0,0 +1,7 @@ +export { Context } from './context'; + +export type MiddlewareOptions = { + request?: Function; + response?: Function; + error?: Function; +}; diff --git a/src/core/middlewares.ts b/src/core/middlewares.ts new file mode 100644 index 0000000..7eb82c7 --- /dev/null +++ b/src/core/middlewares.ts @@ -0,0 +1,51 @@ +import { Context, MiddlewareOptions } from './middleware'; +import Request from './request'; + +export const credentialMiddleware: MiddlewareOptions = { + request: function (ctx: Context) { + const signed = ctx.credential.sign(ctx.request.toObject()); + return new Request(signed); + }, +}; + +export const defaultsMiddleware: MiddlewareOptions = { + request: function (ctx: Context) { + const req = ctx.request; + const cfg = ctx.config; + + if (!req.data['Region'] && cfg.region) { + req.data['Region'] = cfg.region; + } + + if (!req.data['ProjectId'] && cfg.projectId) { + req.data['ProjectId'] = cfg.projectId; + } + return req; + }, +}; + +export const logMiddleware: MiddlewareOptions = { + request: function (ctx: Context) { + if (!ctx.config.logger) { + return ctx.request; + } + ctx.config.logger.info(ctx.request.toObject()); + return ctx.request; + }, + response: function (ctx: Context) { + if (!ctx.config.logger) { + return ctx.response; + } + if (ctx.response) { + ctx.config.logger.info(ctx.response.toObject()); + } + return ctx.response; + }, + error: function (ctx: Context) { + console.log('debug', !ctx.config.logger); + if (!ctx.config.logger) { + return; + } + ctx.config.logger.error(ctx.exception?.message); + }, +}; diff --git a/src/core/request/index.test.ts b/src/core/request/index.test.ts new file mode 100644 index 0000000..d42969c --- /dev/null +++ b/src/core/request/index.test.ts @@ -0,0 +1,24 @@ +import Request from './index'; + +describe('request', () => { + test('test encode request', () => { + const req = new Request({ + Name: 'foo', + CPU: 1, + Size: 42.0, + Foo: null, + UHostIds: ['uhost-xxx', 'uhost-yyy'], + Led: { Enabled: true }, + NetworkInterface: [{ Bandwidth: 42 }], + }); + expect(req.toObject()).toEqual({ + Name: 'foo', + CPU: 1, + Size: 42.0, + 'UHostIds.0': 'uhost-xxx', + 'UHostIds.1': 'uhost-yyy', + 'Led.Enabled': true, + 'NetworkInterface.0.Bandwidth': 42, + }); + }); +}); diff --git a/src/core/request/index.ts b/src/core/request/index.ts new file mode 100644 index 0000000..607ec41 --- /dev/null +++ b/src/core/request/index.ts @@ -0,0 +1,44 @@ +type argsT = { [index: string]: any }; + +export default class Request { + data: argsT; + + constructor(data: object, options?: object) { + this.data = data; + } + + toObject(): argsT { + return this.encode(this.data); + } + + private encode(args: argsT): argsT { + const result: argsT = {}; + for (const k in args) { + if (args.hasOwnProperty(k)) { + const v: any = args[k]; + if (v == null) { + continue; + } + + if (Object.prototype.toString.call(v) === '[object Array]') { + v.forEach((value: any, index: number) => { + if (value instanceof Object) { + Object.entries(this.encode(value)).forEach(([key, value]) => { + result[`${k}.${index}.${key}`] = value; + }); + } else { + result[`${k}.${index}`] = value; + } + }); + } else if (Object.prototype.toString.call(v) === '[object Object]') { + Object.entries(this.encode(v)).forEach(([key, value]) => { + result[`${k}.${key}`] = value; + }); + } else { + result[k] = v; + } + } + } + return result; + } +} diff --git a/src/core/response/index.ts b/src/core/response/index.ts new file mode 100644 index 0000000..328abf8 --- /dev/null +++ b/src/core/response/index.ts @@ -0,0 +1,26 @@ +export default class Response { + data: { [index: string]: any }; + + requestId?: string; + + constructor(data: object, requestId?: string) { + this.data = data; + this.requestId = requestId; + } + + toObject(): object { + return this.data; + } + + getMessage(): string { + return this.data['Message'] || ''; + } + + getRetCode(): number { + return this.data['RetCode'] || 0; + } + + getRequestId(): string { + return this.requestId || ''; + } +} diff --git a/src/core/transport/index.ts b/src/core/transport/index.ts new file mode 100644 index 0000000..e4941b6 --- /dev/null +++ b/src/core/transport/index.ts @@ -0,0 +1,60 @@ +import Request from '../request'; +import Response from '../response'; +import { UCloudError, EXC_TYPE_TRANSPORT } from '../exception'; +import axios from 'axios'; + +export class Transport { + baseUrl?: string; + + userAgent?: string; + + options?: object; + + constructor({ + baseUrl, + userAgent, + options, + }: { + baseUrl?: string; + userAgent?: string; + options?: object; + }) { + this.baseUrl = baseUrl; + this.userAgent = userAgent; + this.options = options; + } + + async invoke(req: Request): Promise { + let resp; + try { + const httpResp = await axios({ + method: 'post', + baseURL: this.baseUrl, + headers: { + 'User-Agent': this.userAgent, + 'Content-Type': 'application/json', + }, + data: req.toObject(), + ...this.options, + }); + const requestId = httpResp.headers['x-ucloud-request-uuid']; + resp = new Response(httpResp.data, requestId); + } catch (e) { + throw new UCloudError({ + typ: EXC_TYPE_TRANSPORT, + message: e.message, + retCode: -1, + }); + } + + if (resp != null && resp.getRetCode() != 0) { + throw new UCloudError({ + typ: EXC_TYPE_TRANSPORT, + message: resp.getMessage(), + retCode: resp.getRetCode(), + requestId: resp.getRequestId(), + }); + } + return resp; + } +} diff --git a/src/index.test.ts b/src/index.test.ts new file mode 100644 index 0000000..77998a9 --- /dev/null +++ b/src/index.test.ts @@ -0,0 +1,124 @@ +import Request from "./core/request"; +import Client from "./core/client"; +import {Transport} from "./core/transport"; +import {AxiosRequestConfig} from "axios"; +import Response from "./core/response"; +import {Context} from "./core/middleware"; + +describe('invoke', () => { + const tests = [{ + request: { + Action: "GetRegion", + }, + response: { + RetCOde: 0, + DataSet: [] + }, + hasError: false + }, { + request: { + Action: "GetRegion", + }, + response: { + RetCOde: 0, + DataSet: [] + }, + config: { + logger: null + }, + hasError: false + }, { + request: { + Action: "NotFound", + }, + response: { + RetCode: 161, + Message: "Action [NotFound] not found" + }, + hasError: true + }, { + request: { + Action: "NotFound", + }, + response: { + RetCode: 161, + Message: "Action [NotFound] not found" + }, + config: { + logger: null + }, + hasError: true + }, { + request: { + Action: "Invalid", + }, + response: { + RetCode: 0, + DataSet: [] + }, + config: { + maxRetries: -1, + }, + hasError: true + }, { + request: { + Action: "Get", + }, + transportError: "some transport error", + hasError: true + }]; + + tests.forEach((tt, index) => { + test(`test client invoking - ${index}`, async () => { + const client = new Client({ + config: { + region: 'cn-bj2', + projectId: process.env.UCLOUD_PROJECT_ID || '', + userAgent: "UnitTest", + ...(tt.config || {}) + }, + credential: { + publicKey: process.env.UCLOUD_PUBLIC_KEY || '', + privateKey: process.env.UCLOUD_PRIVATE_KEY || '', + } + }); + client.useMiddleware({ + response: function (ctx: Context) { + + } + }); + + const transport = new Transport({ + baseUrl: "https://api.ucloud.cn", + userAgent: "JS-SDK-UnitTest", + options: { + adapter: async (config: AxiosRequestConfig) => { + if (tt.transportError) { + throw tt.transportError; + } + return { + data: tt.response, + status: 200, + statusText: 'OK', + headers: {'content-type': 'application/json'}, + config: config, + request: null + }; + } + } + }); + client.withTransport(transport); + + let req = new Request(tt.request); + let resp: Response | null = null; + try { + resp = await client.invoke(req); + } catch (e) { + expect(true).toEqual(tt.hasError); + return; + } + expect(resp.toObject()).toEqual(tt.response); + expect(false).toEqual(tt.hasError); + }); + }) +}); diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..ca77b59 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,8 @@ +export { Client } from './services'; + +export { default as Credential } from './core/credential'; +export { default as Config } from './core/config'; +export { default as Request } from './core/request'; +export { default as Response } from './core/response'; +export { UCloudError } from './core/exception'; +export { Context as MiddlewareContext, MiddlewareOptions } from './core/middleware'; diff --git a/src/services/cube/index.ts b/src/services/cube/index.ts new file mode 100644 index 0000000..df48c6e --- /dev/null +++ b/src/services/cube/index.ts @@ -0,0 +1,781 @@ +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 **cube** service + */ +export default class CubeClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * CreateCubeDeployment - 创建Cube的Deployment + * + * See also: https://docs.ucloud.cn/api/cube-api/create_cube_deployment + */ + createCubeDeployment( + request?: CreateCubeDeploymentRequest + ): Promise { + const args = { Action: 'CreateCubeDeployment', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateCubeDeploymentResponse + ); + } + + /** + * CreateCubePod - 创建Pod + * + * See also: https://docs.ucloud.cn/api/cube-api/create_cube_pod + */ + createCubePod( + request?: CreateCubePodRequest + ): Promise { + const args = { Action: 'CreateCubePod', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateCubePodResponse + ); + } + + /** + * DeleteCubeDeployment - 删除Cube的Deployment + * + * See also: https://docs.ucloud.cn/api/cube-api/delete_cube_deployment + */ + deleteCubeDeployment( + request?: DeleteCubeDeploymentRequest + ): Promise { + const args = { Action: 'DeleteCubeDeployment', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteCubeDeploymentResponse + ); + } + + /** + * DeleteCubePod - 删除Pod + * + * See also: https://docs.ucloud.cn/api/cube-api/delete_cube_pod + */ + deleteCubePod( + request?: DeleteCubePodRequest + ): Promise { + const args = { Action: 'DeleteCubePod', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteCubePodResponse + ); + } + + /** + * GetCubeDeployment - 获取Deployment的详细信息 + * + * See also: https://docs.ucloud.cn/api/cube-api/get_cube_deployment + */ + getCubeDeployment( + request?: GetCubeDeploymentRequest + ): Promise { + const args = { Action: 'GetCubeDeployment', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetCubeDeploymentResponse + ); + } + + /** + * GetCubeExtendInfo - 获取Cube的额外信息 + * + * See also: https://docs.ucloud.cn/api/cube-api/get_cube_extend_info + */ + getCubeExtendInfo( + request?: GetCubeExtendInfoRequest + ): Promise { + const args = { Action: 'GetCubeExtendInfo', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetCubeExtendInfoResponse + ); + } + + /** + * GetCubeMetrics - 获取Cube实例(Pod,PodX,Deploy等)监控数据时间序列 + * + * See also: https://docs.ucloud.cn/api/cube-api/get_cube_metrics + */ + getCubeMetrics( + request?: GetCubeMetricsRequest + ): Promise { + const args = { Action: 'GetCubeMetrics', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetCubeMetricsResponse + ); + } + + /** + * GetCubePod - 获取Pod的详细信息 + * + * See also: https://docs.ucloud.cn/api/cube-api/get_cube_pod + */ + getCubePod(request?: GetCubePodRequest): Promise { + const args = { Action: 'GetCubePod', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetCubePodResponse + ); + } + + /** + * GetCubePrice - 获取cube的价格 + * + * See also: https://docs.ucloud.cn/api/cube-api/get_cube_price + */ + getCubePrice(request?: GetCubePriceRequest): Promise { + const args = { Action: 'GetCubePrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetCubePriceResponse + ); + } + + /** + * ListCubePod - 获取Pods列表 + * + * See also: https://docs.ucloud.cn/api/cube-api/list_cube_pod + */ + listCubePod(request?: ListCubePodRequest): Promise { + const args = { Action: 'ListCubePod', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ListCubePodResponse + ); + } + + /** + * ModifyCubeExtendInfo - 修改Cube额外信息 + * + * See also: https://docs.ucloud.cn/api/cube-api/modify_cube_extend_info + */ + modifyCubeExtendInfo( + request?: ModifyCubeExtendInfoRequest + ): Promise { + const args = { Action: 'ModifyCubeExtendInfo', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyCubeExtendInfoResponse + ); + } + + /** + * ModifyCubeTag - 修改业务组名字 + * + * See also: https://docs.ucloud.cn/api/cube-api/modify_cube_tag + */ + modifyCubeTag( + request?: ModifyCubeTagRequest + ): Promise { + const args = { Action: 'ModifyCubeTag', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyCubeTagResponse + ); + } + + /** + * RenewCubePod - 更新Pod + * + * See also: https://docs.ucloud.cn/api/cube-api/renew_cube_pod + */ + renewCubePod(request?: RenewCubePodRequest): Promise { + const args = { Action: 'RenewCubePod', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RenewCubePodResponse + ); + } + + /** + * UpdateCubeDeployment - 更新Deployment + * + * See also: https://docs.ucloud.cn/api/cube-api/update_cube_deployment + */ + updateCubeDeployment( + request?: UpdateCubeDeploymentRequest + ): Promise { + const args = { Action: 'UpdateCubeDeployment', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateCubeDeploymentResponse + ); + } +} + +/** + * CreateCubeDeployment - 创建Cube的Deployment + */ +export interface CreateCubeDeploymentRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * VPCId + */ + VPCId: string; + /** + * 子网Id + */ + SubnetId: string; + /** + * base64编码的Deployment的yaml。大小不超过16KB + */ + Deployment: string; + /** + * Deployment名称 + */ + Name?: string; + /** + * 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Postpay, \\ 后付费;默认为后付费 + */ + ChargeType?: string; + /** + * Cpu平台(V6:Intel、A2:AMD),默认V6。支持的地域(北京2B、北京2E、上海2A、广东、香港 、东京)目前北京2E仅有A2,其余地域仅有V6 + */ + CpuPlatform?: string; + /** + * base64编码的kubeconfig。大小不超过16KB + */ + KubeConfig?: string; + /** + * 购买时长。默认:值 1。 月付时,此参数传0,代表购买至月末。 + */ + Quantity?: number; + /** + * 业务组。默认:Default(Default即为未分组) + */ + Tag?: string; +} + +/** + * CreateCubeDeployment - 创建Cube的Deployment + */ +export interface CreateCubeDeploymentResponse { + /** + * 控制器ID + */ + DeploymentId: string; + /** + * 经过base64编码的Deployment的yaml + */ + Deployment?: string; +} + +/** + * CreateCubePod - 创建Pod + */ +export interface CreateCubePodRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * VPCId + */ + VPCId: string; + /** + * 子网Id + */ + SubnetId: string; + /** + * base64编码的Pod的yaml。大小不超过16KB + */ + Pod: string; + /** + * pod所在组 + */ + Group?: string; + /** + * pod的名字 + */ + Name?: string; + /** + * 业务组。默认:Default(Default即为未分组) + */ + Tag?: string; + /** + * Cpu平台(V6:Intel、A2:AMD、Auto),默认Auto。支持的地域(北京2B、北京2E、上海2A、广东、香港 、东京)目前北京2E仅有A2,其余地域仅有V6 + */ + CpuPlatform?: string; + /** + * 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Postpay, \\ 后付费;默认为后付费 + */ + ChargeType?: string; + /** + * 购买时长。默认:值 1。 月付时,此参数传0,代表购买至月末。 + */ + Quantity?: number; + /** + * base64编码的kubeconfig。大小不超过16KB + */ + KubeConfig?: string; + /** + * 代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 + */ + CouponId?: string; +} + +/** + * CreateCubePod - 创建Pod + */ +export interface CreateCubePodResponse { + /** + * base64编码的yaml + */ + Pod: string; + /** + * cube的资源Id + */ + CubeId?: string; +} + +/** + * DeleteCubeDeployment - 删除Cube的Deployment + */ +export interface DeleteCubeDeploymentRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 控制器Id + */ + DeploymentId: string; +} + +/** + * DeleteCubeDeployment - 删除Cube的Deployment + */ +export interface DeleteCubeDeploymentResponse {} + +/** + * DeleteCubePod - 删除Pod + */ +export interface DeleteCubePodRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * cubeid和uid任意一个(必须) + */ + Uid?: string; + /** + * cubeid和uid任意一个(必须) + */ + CubeId?: string; + /** + * 删除cube时是否释放绑定的EIP。默认为false。 + */ + ReleaseEIP?: boolean; +} + +/** + * DeleteCubePod - 删除Pod + */ +export interface DeleteCubePodResponse {} + +/** + * GetCubeDeployment - 获取Deployment的详细信息 + */ +export interface GetCubeDeploymentRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * Deployment的Id + */ + DeploymentId: string; +} + +/** + * GetCubeDeployment - 获取Deployment的详细信息 + */ +export interface GetCubeDeploymentResponse { + /** + * 经过base64编码的Deployment的yaml + */ + Deployment: string; +} + +/** + * GetCubeExtendInfo - 获取Cube的额外信息 + */ +export interface GetCubeExtendInfoRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * id列表以逗号(,)分割 + */ + CubeIds: string; +} + +/** + * GetCubeExtendInfo - 获取Cube的额外信息 + */ +export interface GetCubeExtendInfoResponse { + /** + * CubeExtendInfo + */ + ExtendInfo: { + /** + * Cube的Id + */ + CubeId: string; + /** + * Cube的名称 + */ + Name?: string; + /** + * EIPSet + */ + Eip?: { + /** + * EIP带宽值 + */ + Bandwidth?: number; + /** + * 带宽类型0标准普通带宽,1表示共享带宽 + */ + BandwidthType?: number; + /** + * EIP创建时间 + */ + CreateTime?: number; + /** + * EIP地址 + */ + EIPAddr?: { + /** + * IP地址 + */ + IP?: string; + /** + * 线路名称BGP或者internalation + */ + OperatorName?: string; + }[]; + /** + * EIPId + */ + EIPId?: string; + /** + * 付费模式,带宽付费或者流量付费 + */ + PayMode?: string; + /** + * EIP绑定对象的资源Id + */ + Resource?: string; + /** + * EIP状态,表示使用中或者空闲 + */ + Status?: string; + /** + * EIP权重 + */ + Weight?: number; + }[]; + /** + * 资源有效期 + */ + Expiration?: number; + /** + * 业务组名称 + */ + Tag?: string; + }[]; +} + +/** + * GetCubeMetrics - 获取Cube实例(Pod,PodX,Deploy等)监控数据时间序列 + */ +export interface GetCubeMetricsRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * Cube实例资源ID + */ + ResourceId: string; + /** + * 监控指标名称 + */ + MetricName: string[]; + /** + * 开始时间 + */ + BeginTime: number; + /** + * 结束时间,必须大于开始时间 + */ + EndTime: number; + /** + * Pod内容器名称 + */ + ContainerName: string; +} + +/** + * GetCubeMetrics - 获取Cube实例(Pod,PodX,Deploy等)监控数据时间序列 + */ +export interface GetCubeMetricsResponse { + /** + * 时间序列集合 + */ + DataSets?: { + /** + * + */ + MetricName?: string; + /** + * + */ + Values?: { + /** + * + */ + Value: number; + /** + * + */ + Timestamp?: number; + }[]; + }[]; +} + +/** + * GetCubePod - 获取Pod的详细信息 + */ +export interface GetCubePodRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * CubeId和Uid任意一个 + */ + CubeId?: string; + /** + * CubeId和Uid任意一个 + */ + Uid?: string; +} + +/** + * GetCubePod - 获取Pod的详细信息 + */ +export interface GetCubePodResponse { + /** + * base64编码的pod的yaml + */ + Pod: string; +} + +/** + * GetCubePrice - 获取cube的价格 + */ +export interface GetCubePriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 购买数量 + */ + Count: string; + /** + * CPU 配置,单位为毫核,例如如 1 核则须输入 1000 + */ + Cpu: string; + /** + * 内存配置,单位为 Mi,例如 1Gi 须输入 1024 + */ + Mem: string; + /** + * 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按秒后付费,默认为月付 + */ + ChargeType: string; + /** + * 购买时长。默认:值 1。按小时购买(Dynamic/Postpay)时无需此参数。 月付时,此参数传0,代表购买至月末。 + */ + Quantity: number; +} + +/** + * GetCubePrice - 获取cube的价格 + */ +export interface GetCubePriceResponse { + /** + * 折扣后价格,单位为分 + */ + Price: number; + /** + * 列表价格,单位为分 + */ + OriginalPrice: number; +} + +/** + * ListCubePod - 获取Pods列表 + */ +export interface ListCubePodRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * VPC的Id + */ + VPCId?: string; + /** + * 子网Id + */ + SubnetId?: string; + /** + * 组名称 + */ + Group?: string; + /** + * 默认0 + */ + Offset?: number; + /** + * 默认20 + */ + Limit?: number; +} + +/** + * ListCubePod - 获取Pods列表 + */ +export interface ListCubePodResponse { + /** + * Pod列表,每条数据都做了base64编码 + */ + Pods: string[]; + /** + * Cube的总数 + */ + TotalCount?: number; +} + +/** + * ModifyCubeExtendInfo - 修改Cube额外信息 + */ +export interface ModifyCubeExtendInfoRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * cube的id + */ + CubeId: string; + /** + * 修改的名字,规则(^[a-zA-Z0-9-_.\u4e00-\u9fa5]{1,32}) + */ + Name?: string; +} + +/** + * ModifyCubeExtendInfo - 修改Cube额外信息 + */ +export interface ModifyCubeExtendInfoResponse {} + +/** + * ModifyCubeTag - 修改业务组名字 + */ +export interface ModifyCubeTagRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * CubeId + */ + CubeId: string; + /** + * 业务组名称 + */ + Tag: string; +} + +/** + * ModifyCubeTag - 修改业务组名字 + */ +export interface ModifyCubeTagResponse { + /** + * CubeId + */ + CubeId: string; +} + +/** + * RenewCubePod - 更新Pod + */ +export interface RenewCubePodRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 容器Id + */ + CubeId: string; + /** + * base64编码的Pod的yaml + */ + Pod: string; +} + +/** + * RenewCubePod - 更新Pod + */ +export interface RenewCubePodResponse { + /** + * base64编码过的yaml,需要解码获取信息 + */ + Pod: string; +} + +/** + * UpdateCubeDeployment - 更新Deployment + */ +export interface UpdateCubeDeploymentRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * Deployment的Id + */ + DeploymentId: string; + /** + * base64编码的Deployment的yaml。大小不超过16KB + */ + Deployment: string; + /** + * Deployment的name + */ + Name?: string; +} + +/** + * UpdateCubeDeployment - 更新Deployment + */ +export interface UpdateCubeDeploymentResponse { + /** + * 经过base64编码的Deployment的yaml + */ + Deployment?: string; +} diff --git a/src/services/index.ts b/src/services/index.ts new file mode 100644 index 0000000..552ec79 --- /dev/null +++ b/src/services/index.ts @@ -0,0 +1,145 @@ +import { ConfigOptions } from '../core/config'; +import { CredentialOptions } from '../core/credential'; +const BaseClient = require('../core/client').default; + +const CubeClient = require('./cube').default; +const IPSecVPNClient = require('./ipsecvpn').default; +const PathXClient = require('./pathx').default; +const UAccountClient = require('./uaccount').default; +const UBillClient = require('./ubill').default; +const UCDNClient = require('./ucdn').default; +const UDBClient = require('./udb').default; +const UDDBClient = require('./uddb').default; +const UDiskClient = require('./udisk').default; +const UDPNClient = require('./udpn').default; +const UECClient = require('./uec').default; +const UFileClient = require('./ufile').default; +const UFSClient = require('./ufs').default; +const UHostClient = require('./uhost').default; +const UK8SClient = require('./uk8s').default; +const ULBClient = require('./ulb').default; +const UMemClient = require('./umem').default; +const UNetClient = require('./unet').default; +const UPHostClient = require('./uphost').default; +const USMSClient = require('./usms').default; +const VPCClient = require('./vpc').default; + +export class Client extends BaseClient { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + cube() { + return new CubeClient({ config: this.config, credential: this.credential }); + } + + ipsecvpn() { + return new IPSecVPNClient({ + config: this.config, + credential: this.credential, + }); + } + + pathx() { + return new PathXClient({ + config: this.config, + credential: this.credential, + }); + } + + uaccount() { + return new UAccountClient({ + config: this.config, + credential: this.credential, + }); + } + + ubill() { + return new UBillClient({ + config: this.config, + credential: this.credential, + }); + } + + ucdn() { + return new UCDNClient({ config: this.config, credential: this.credential }); + } + + udb() { + return new UDBClient({ config: this.config, credential: this.credential }); + } + + uddb() { + return new UDDBClient({ config: this.config, credential: this.credential }); + } + + udisk() { + return new UDiskClient({ + config: this.config, + credential: this.credential, + }); + } + + udpn() { + return new UDPNClient({ config: this.config, credential: this.credential }); + } + + uec() { + return new UECClient({ config: this.config, credential: this.credential }); + } + + ufile() { + return new UFileClient({ + config: this.config, + credential: this.credential, + }); + } + + ufs() { + return new UFSClient({ config: this.config, credential: this.credential }); + } + + uhost() { + return new UHostClient({ + config: this.config, + credential: this.credential, + }); + } + + uk8s() { + return new UK8SClient({ config: this.config, credential: this.credential }); + } + + ulb() { + return new ULBClient({ config: this.config, credential: this.credential }); + } + + umem() { + return new UMemClient({ config: this.config, credential: this.credential }); + } + + unet() { + return new UNetClient({ config: this.config, credential: this.credential }); + } + + uphost() { + return new UPHostClient({ + config: this.config, + credential: this.credential, + }); + } + + usms() { + return new USMSClient({ config: this.config, credential: this.credential }); + } + + vpc() { + return new VPCClient({ config: this.config, credential: this.credential }); + } +} diff --git a/src/services/ipsecvpn/index.ts b/src/services/ipsecvpn/index.ts new file mode 100644 index 0000000..3b3d4e8 --- /dev/null +++ b/src/services/ipsecvpn/index.ts @@ -0,0 +1,934 @@ +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 **ipsecvpn** service + */ +export default class IPSecVPNClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * CreateRemoteVPNGateway - 创建客户VPN网关 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/create_remote_vpn_gateway + */ + createRemoteVPNGateway( + request?: CreateRemoteVPNGatewayRequest + ): Promise { + const args = { Action: 'CreateRemoteVPNGateway', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateRemoteVPNGatewayResponse + ); + } + + /** + * CreateVPNGateway - 创建VPN网关 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/create_vpn_gateway + */ + createVPNGateway( + request?: CreateVPNGatewayRequest + ): Promise { + const args = { Action: 'CreateVPNGateway', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateVPNGatewayResponse + ); + } + + /** + * CreateVPNTunnel - 创建VPN隧道 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/create_vpn_tunnel + */ + createVPNTunnel( + request?: CreateVPNTunnelRequest + ): Promise { + const args = { Action: 'CreateVPNTunnel', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateVPNTunnelResponse + ); + } + + /** + * DeleteRemoteVPNGateway - 删除客户VPN网关 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/delete_remote_vpn_gateway + */ + deleteRemoteVPNGateway( + request?: DeleteRemoteVPNGatewayRequest + ): Promise { + const args = { Action: 'DeleteRemoteVPNGateway', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteRemoteVPNGatewayResponse + ); + } + + /** + * DeleteVPNGateway - 删除VPN网关 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/delete_vpn_gateway + */ + deleteVPNGateway( + request?: DeleteVPNGatewayRequest + ): Promise { + const args = { Action: 'DeleteVPNGateway', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteVPNGatewayResponse + ); + } + + /** + * DeleteVPNTunnel - 删除VPN隧道 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/delete_vpn_tunnel + */ + deleteVPNTunnel( + request?: DeleteVPNTunnelRequest + ): Promise { + const args = { Action: 'DeleteVPNTunnel', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteVPNTunnelResponse + ); + } + + /** + * DescribeRemoteVPNGateway - 获取客户VPN网关信息 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/describe_remote_vpn_gateway + */ + describeRemoteVPNGateway( + request?: DescribeRemoteVPNGatewayRequest + ): Promise { + const args = { Action: 'DescribeRemoteVPNGateway', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeRemoteVPNGatewayResponse + ); + } + + /** + * DescribeVPNGateway - 获取VPN网关信息 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/describe_vpn_gateway + */ + describeVPNGateway( + request?: DescribeVPNGatewayRequest + ): Promise { + const args = { Action: 'DescribeVPNGateway', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeVPNGatewayResponse + ); + } + + /** + * DescribeVPNTunnel - 获取VPN隧道信息 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/describe_vpn_tunnel + */ + describeVPNTunnel( + request?: DescribeVPNTunnelRequest + ): Promise { + const args = { Action: 'DescribeVPNTunnel', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeVPNTunnelResponse + ); + } + + /** + * GetVPNGatewayPrice - 获取VPN价格 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/get_vpn_gateway_price + */ + getVPNGatewayPrice( + request?: GetVPNGatewayPriceRequest + ): Promise { + const args = { Action: 'GetVPNGatewayPrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetVPNGatewayPriceResponse + ); + } + + /** + * GetVPNGatewayUpgradePrice - 获取VPN网关规格改动价格 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/get_vpn_gateway_upgrade_price + */ + getVPNGatewayUpgradePrice( + request?: GetVPNGatewayUpgradePriceRequest + ): Promise { + const args = { Action: 'GetVPNGatewayUpgradePrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetVPNGatewayUpgradePriceResponse + ); + } + + /** + * UpdateVPNGateway - 更改VPN网关规格 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/update_vpn_gateway + */ + updateVPNGateway( + request?: UpdateVPNGatewayRequest + ): Promise { + const args = { Action: 'UpdateVPNGateway', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateVPNGatewayResponse + ); + } + + /** + * UpdateVPNTunnelAttribute - 更新VPN隧道属性 + * + * See also: https://docs.ucloud.cn/api/ipsecvpn-api/update_vpn_tunnel_attribute + */ + updateVPNTunnelAttribute( + request?: UpdateVPNTunnelAttributeRequest + ): Promise { + const args = { Action: 'UpdateVPNTunnelAttribute', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateVPNTunnelAttributeResponse + ); + } +} + +/** + * CreateRemoteVPNGateway - 创建客户VPN网关 + */ +export interface CreateRemoteVPNGatewayRequest { + /** + * 客户VPN网关名称 + */ + RemoteVPNGatewayName: string; + /** + * 客户VPN网关地址 + */ + RemoteVPNGatewayAddr: string; + /** + * 业务组名称,默认为 "Default" + */ + Tag?: string; + /** + * 备注,默认为空 + */ + Remark?: string; +} + +/** + * CreateRemoteVPNGateway - 创建客户VPN网关 + */ +export interface CreateRemoteVPNGatewayResponse { + /** + * 新建客户VPN网关的资源ID + */ + RemoteVPNGatewayId?: string; +} + +/** + * CreateVPNGateway - 创建VPN网关 + */ +export interface CreateVPNGatewayRequest { + /** + * 新建VPN网关名称 + */ + VPNGatewayName: string; + /** + * 新建VPN网关所属VPC的资源ID + */ + VPCId: string; + /** + * 购买的VPN网关规格,枚举值为: Standard, 标准型; Enhanced, 增强型 + */ + Grade: string; + /** + * 备注,默认为空 + */ + Remark?: string; + /** + * 业务组名称,默认为 "Default" + */ + Tag?: string; + /** + * 购买时长, 默认: 1 + */ + Quantity?: number; + /** + * 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费;Dynamic, 按需付费(需开启权限);Trial, 试用(需开启权限);默认为按月付费 + */ + ChargeType?: string; + /** + * 业务组ID + */ + BusinessId?: string; + /** + * 若要绑定EIP,在此填上EIP的资源ID + */ + EIPId?: string; + /** + * 代金券ID, 默认不使用 + */ + CouponId?: string; +} + +/** + * CreateVPNGateway - 创建VPN网关 + */ +export interface CreateVPNGatewayResponse { + /** + * 新建VPN网关的资源ID + */ + VPNGatewayId?: string; +} + +/** + * CreateVPNTunnel - 创建VPN隧道 + */ +export interface CreateVPNTunnelRequest { + /** + * VPN隧道名称 + */ + VPNTunnelName: string; + /** + * VPN网关的资源ID + */ + VPNGatewayId: string; + /** + * 客户VPN网关的资源ID + */ + RemoteVPNGatewayId: string; + /** + * 预共享密钥 + */ + IKEPreSharedKey: string; + /** + * vpcId + */ + VPCId: string; + /** + * 指定VPN连接的本地子网的资源ID,最多可填写10个。 + */ + IPSecLocalSubnetIds: string[]; + /** + * 指定VPN连接的客户网段,最多可填写20个。 + */ + IPSecRemoteSubnets: string[]; + /** + * ike版本,枚举值: "IKE V1","IKE V2",默认v1 + */ + IKEVersion: string; + /** + * 业务组,默认为“Default” + */ + Tag?: string; + /** + * 备注,默认为空 + */ + Remark?: string; + /** + * IKE协商过程中使用的加密算法,枚举值,"aes128", "aes192", "aes256", "aes512", "3des"。默认值为“aes128” + */ + IKEEncryptionAlgorithm?: string; + /** + * IKE协商过程中使用的认证算法,"md5", "sha1", "sha2-256"。默认值为“sha1” + */ + IKEAuthenticationAlgorithm?: string; + /** + * IKE协商过程中使用的模式,枚举值,主模式,“main”;野蛮模式,“aggressive”。IKEV1默认为主模式“main”,IKEV2时不使用该参数。 + */ + IKEExchangeMode?: string; + /** + * 本端标识。枚举值,自动识别,“auto”;IP地址或域名。默认为自动识别“auto”。IKEV2必填该参数 + */ + IKELocalId?: string; + /** + * 客户端标识。枚举值,自动识别,“auto”;IP地址或域名。默认为“自动识别“auto”。IKEV2必填该参数 + */ + IKERemoteId?: string; + /** + * IKE协商过程中使用的DH组,枚举值,"1", "2", "5", "14", "15", "16"。默认为“15” + */ + IKEDhGroup?: string; + /** + * IKE中SA的生存时间,可填写范围为600-604800。默认为86400。 + */ + IKESALifetime?: string; + /** + * 使用的安全协议,枚举值,“esp”,“ah”。默认为“esp” + */ + IPSecProtocol?: string; + /** + * IPSec隧道中使用的加密算法,枚举值,"aes128", "aes192", "aes256", "aes512", "3des"。默认值为“aes128” + */ + IPSecEncryptionAlgorithm?: string; + /** + * IPSec隧道中使用的认证算法,枚举值,"md5", "sha1"。默认值为“sha1” + */ + IPSecAuthenticationAlgorithm?: string; + /** + * IPSec中SA的生存时间,可填写范围为1200 - 604800。默认为3600 + */ + IPSecSALifetime?: string; + /** + * IPSec中SA的生存时间(以字节计)。可选为8000 – 20000000。默认使用SA生存时间, + */ + IPSecSALifetimeBytes?: string; + /** + * IPSec的PFS是否开启,枚举值,,不开启,"disable";数字表示DH组, "1", "2", "5", "14", "15", "16"。默认为“disable”。 + */ + IPSecPFSDhGroup?: string; +} + +/** + * CreateVPNTunnel - 创建VPN隧道 + */ +export interface CreateVPNTunnelResponse { + /** + * VPN隧道的资源ID + */ + VPNTunnelId?: string; +} + +/** + * DeleteRemoteVPNGateway - 删除客户VPN网关 + */ +export interface DeleteRemoteVPNGatewayRequest { + /** + * 客户VPN网关的资源ID + */ + RemoteVPNGatewayId: string; +} + +/** + * DeleteRemoteVPNGateway - 删除客户VPN网关 + */ +export interface DeleteRemoteVPNGatewayResponse {} + +/** + * DeleteVPNGateway - 删除VPN网关 + */ +export interface DeleteVPNGatewayRequest { + /** + * VPN网关的资源ID + */ + VPNGatewayId: string; + /** + * 删除VPN时是否一并释放EIP。false,只解绑EIP不删除EIP;true,解绑并释放EIP。默认是false + */ + ReleaseEip?: boolean; +} + +/** + * DeleteVPNGateway - 删除VPN网关 + */ +export interface DeleteVPNGatewayResponse {} + +/** + * DeleteVPNTunnel - 删除VPN隧道 + */ +export interface DeleteVPNTunnelRequest { + /** + * VPN隧道的资源ID + */ + VPNTunnelId: string; +} + +/** + * DeleteVPNTunnel - 删除VPN隧道 + */ +export interface DeleteVPNTunnelResponse {} + +/** + * DescribeRemoteVPNGateway - 获取客户VPN网关信息 + */ +export interface DescribeRemoteVPNGatewayRequest { + /** + * 客户VPN网关的资源ID,例如RemoteVPNGatewayIds.0代表希望获取客户VPN网关1的信息,RemoteVPNGatewayIds.1代表客户VPN网关2,如果为空,则返回当前Region中所有客户VPN网关实例的信息 + */ + RemoteVPNGatewayIds?: string[]; + /** + * 业务组名称,若指定则返回业务组下所有客户VPN网关信息 + */ + Tag?: string; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 数据分页值, 默认为20 + */ + Limit?: number; +} + +/** + * DescribeRemoteVPNGateway - 获取客户VPN网关信息 + */ +export interface DescribeRemoteVPNGatewayResponse { + /** + * 符合条件的客户VPN网关总数 + */ + TotalCount?: number; + /** + * 客户VPN网关列表, 每项参数详见 RemoteVPNGatewayDataSet + */ + DataSet?: { + /** + * 客户网关ID + */ + RemoteVPNGatewayId?: string; + /** + * 客户网关名称 + */ + RemoteVPNGatewayName?: string; + /** + * 客户网关IP地址 + */ + RemoteVPNGatewayAddr?: string; + /** + * 用户组 + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 活跃的隧道数量 + */ + TunnelCount?: number; + }[]; +} + +/** + * DescribeVPNGateway - 获取VPN网关信息 + */ +export interface DescribeVPNGatewayRequest { + /** + * VPN网关的资源ID,例如VPNGatewayIds.0代表希望获取VPN网关1的信息,VPNGatewayIds.1代表VPN网关2,如果为空,则返回当前Region中所有VPN网关的信息 + */ + VPNGatewayIds?: string[]; + /** + * VPC的资源ID,返回指定的VPC下的所有VPN网关的信息。默认返回当前Region中所有VPN网关实例的信息 + */ + VPCId?: string; + /** + * 数据偏移量。默认为0 + */ + Offset?: number; + /** + * 业务组名称,若指定则返回指定的业务组下的所有VPN网关的信息。 + */ + Tag?: string; + /** + * 数据分页值。默认为20 + */ + Limit?: number; +} + +/** + * DescribeVPNGateway - 获取VPN网关信息 + */ +export interface DescribeVPNGatewayResponse { + /** + * 满足条件的VPN网关总数 + */ + TotalCount?: number; + /** + * 获取的VPN网关信息列表,每项参数详见 VPNGatewayDataSet + */ + DataSet?: { + /** + * 网关Id + */ + VPNGatewayId?: string; + /** + * 网关名字 + */ + VPNGatewayName?: string; + /** + * 网关业务组 + */ + Tag?: string; + /** + * 网关备注 + */ + Remark?: string; + /** + * 所属VPCId + */ + VPCId?: string; + /** + * 所属VPC名字 + */ + VPCName?: string; + /** + * 付费类型 + */ + ChargeType?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 到期时间 + */ + ExpireTime?: number; + /** + * 是否自动续费 + */ + AutoRenew?: string; + /** + * 网关类型 + */ + Grade?: string; + /** + * 绑定EIP的IP地址 + */ + EIP?: string; + /** + * EIP类型 + */ + EIPType?: string; + /** + * EIPID + */ + EIPId?: string; + }[]; +} + +/** + * DescribeVPNTunnel - 获取VPN隧道信息 + */ +export interface DescribeVPNTunnelRequest { + /** + * VPN隧道的资源ID,例如VPNTunnelIds.0代表希望获取信息的VPN隧道1,VPNTunneIds.1代表VPN隧道2,如果为空,则返回当前Region中所有的VPN隧道实例 + */ + VPNTunnelIds?: string[]; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 数据分页值, 默认为20 + */ + Limit?: number; + /** + * 业务组名称,若指定则返回指定的业务组下的所有VPN网关的信息 + */ + Tag?: string; +} + +/** + * DescribeVPNTunnel - 获取VPN隧道信息 + */ +export interface DescribeVPNTunnelResponse { + /** + * VPN隧道总数 + */ + TotalCount?: number; + /** + * 获取的VPN隧道信息列表,每项参数详见 VPNTunnelDataSet + */ + DataSet?: { + /** + * 隧道id + */ + VPNTunnelId?: string; + /** + * 隧道名称 + */ + VPNTunnelName?: string; + /** + * 用户组 + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 所属VPN网关id + */ + VPNGatewayId?: string; + /** + * 对端网关Id + */ + RemoteVPNGatewayId?: string; + /** + * VPN网关名字 + */ + VPNGatewayName?: string; + /** + * 对端网关名字 + */ + RemoteVPNGatewayName?: string; + /** + * 所属VPCId + */ + VPCId?: string; + /** + * 所属VOC名字 + */ + VPCName?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * IKE参数 + */ + IKEData?: { + /** + * IKE认证算法 + */ + IKEAuthenticationAlgorithm?: string; + /** + * IKEDH组 + */ + IKEDhGroup?: string; + /** + * IKE加密算法 + */ + IKEEncryptionAlgorithm?: string; + /** + * IKEv1协商模式 + */ + IKEExchangeMode?: string; + /** + * IKE本地ID标识 + */ + IKELocalId?: string; + /** + * IKE预共享秘钥 + */ + IKEPreSharedKey?: string; + /** + * IKE对端ID标识 + */ + IKERemoteId?: string; + /** + * IKE秘钥生存时间 + */ + IKESALifetime?: string; + /** + * IKE版本 + */ + IKEVersion?: string; + }; + /** + * IPSec参数 + */ + IPSecData?: { + /** + * IPSec通道中使用的认证算法 + */ + IPSecAuthenticationAlgorithm?: string; + /** + * IPSec通道中使用的加密算法 + */ + IPSecEncryptionAlgorithm?: string; + /** + * 指定VPN连接的本地子网,用逗号分隔 + */ + IPSecLocalSubnetIds?: string[]; + /** + * 使用的安全协议,ESP或AH + */ + IPSecProtocol?: string; + /** + * 指定VPN连接的客户网段,用逗号分隔 + */ + IPSecRemoteSubnets?: string[]; + /** + * IPSec中SA的生存时间 + */ + IPSecSALifetime?: string; + /** + * IPSec中SA的生存时间(以字节计) + */ + IPSecSALifetimeBytes?: string; + /** + * 是否开启PFS功能,Disable表示关闭,数字表示DH组 + */ + IPSecPFSDhGroup?: string; + }; + }[]; +} + +/** + * GetVPNGatewayPrice - 获取VPN价格 + */ +export interface GetVPNGatewayPriceRequest { + /** + * VPN网关规格。枚举值,包括:标准型:Standard,增强型:Enhanced。 + */ + Grade: string; + /** + * 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按需付费(需开启权限); 默认为获取三种价格 + */ + ChargeType?: string; + /** + * 购买时长, 默认: 1 + */ + Quantity?: number; +} + +/** + * GetVPNGatewayPrice - 获取VPN价格 + */ +export interface GetVPNGatewayPriceResponse { + /** + * 获取的VPN网关价格信息列表,每项参数详见 VPNGatewayPriceSet + */ + PriceSet?: { + /** + * VPN网关付费方式 + */ + ChargeType?: string; + /** + * VPN网关价格, 单位"元" + */ + Price?: number; + /** + * 资源有效期, 以Unix Timestamp表示 + */ + PurchaseValue?: number; + }[]; +} + +/** + * GetVPNGatewayUpgradePrice - 获取VPN网关规格改动价格 + */ +export interface GetVPNGatewayUpgradePriceRequest { + /** + * VPN网关的资源ID + */ + VPNGatewayId: string; + /** + * 更改的VPN网关规格,枚举值为: Standard, 标准型; Enhanced, 增强型。 + */ + Grade: string; +} + +/** + * GetVPNGatewayUpgradePrice - 获取VPN网关规格改动价格 + */ +export interface GetVPNGatewayUpgradePriceResponse { + /** + * 调整规格后的VPN网关价格, 单位为"元", 如需退费此处为负值 + */ + Price?: number; +} + +/** + * UpdateVPNGateway - 更改VPN网关规格 + */ +export interface UpdateVPNGatewayRequest { + /** + * VPN网关的资源ID + */ + VPNGatewayId: string; + /** + * 网关规格。枚举值为: Standard, 标准型; Enhanced, 增强型。 + */ + Grade: string; +} + +/** + * UpdateVPNGateway - 更改VPN网关规格 + */ +export interface UpdateVPNGatewayResponse {} + +/** + * UpdateVPNTunnelAttribute - 更新VPN隧道属性 + */ +export interface UpdateVPNTunnelAttributeRequest { + /** + * VPN隧道的资源ID + */ + VPNTunnelId: string; + /** + * 预共享密钥 + */ + IKEPreSharedKey?: string; + /** + * IKE协商过程中使用的加密算法 + */ + IKEEncryptionAlgorithm?: string; + /** + * IKE协商过程中使用的认证算法 + */ + IKEAuthenticationAlgorithm?: string; + /** + * IKE协商过程中使用的模式,可选“主动模式”与“野蛮模式”。IKEV2不使用该参数。 + */ + IKEExchangeMode?: string; + /** + * 本端标识。不填时默认使用之前的参数,结合IKEversion进行校验,IKEV2时不能为auto。 + */ + IKELocalId?: string; + /** + * 客户端标识。不填时默认使用之前的参数,结合IKEversion进行校验,IKEV2时不能为auto。 + */ + IKERemoteId?: string; + /** + * IKE协商过程中使用的DH组 + */ + IKEDhGroup?: string; + /** + * IKE中SA的生存时间 + */ + IKESALifetime?: string; + /** + * 使用的安全协议,ESP或AH + */ + IPSecProtocol?: string; + /** + * 指定VPN连接的本地子网的id,用逗号分隔 + */ + IPSecLocalSubnetIds?: string[]; + /** + * 指定VPN连接的客户网段,用逗号分隔 + */ + IPSecRemoteSubnets?: string[]; + /** + * IPSec隧道中使用的加密算法 + */ + IPSecEncryptionAlgorithm?: string; + /** + * IPSec隧道中使用的认证算法 + */ + IPSecAuthenticationAlgorithm?: string; + /** + * IPSec中SA的生存时间 + */ + IPSecSALifetime?: string; + /** + * IPSec中SA的生存时间(以字节计) + */ + IPSecSALifetimeBytes?: string; + /** + * IPSec中的PFS是否开启 + */ + IPSecPFSDhGroup?: string; + /** + * 枚举值:"IKE V1","IKE V2" + */ + IKEVersion?: string; +} + +/** + * UpdateVPNTunnelAttribute - 更新VPN隧道属性 + */ +export interface UpdateVPNTunnelAttributeResponse {} diff --git a/src/services/pathx/index.ts b/src/services/pathx/index.ts new file mode 100644 index 0000000..110470c --- /dev/null +++ b/src/services/pathx/index.ts @@ -0,0 +1,1614 @@ +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 **pathx** service + */ +export default class PathXClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * BindPathXSSL - 绑定PathX SSL证书 + * + * See also: https://docs.ucloud.cn/api/pathx-api/bind_path_xssl + */ + bindPathXSSL(request?: BindPathXSSLRequest): Promise { + const args = { Action: 'BindPathXSSL', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as BindPathXSSLResponse + ); + } + + /** + * CreateGlobalSSHInstance - 创建GlobalSSH实例 + * + * See also: https://docs.ucloud.cn/api/pathx-api/create_global_ssh_instance + */ + createGlobalSSHInstance( + request?: CreateGlobalSSHInstanceRequest + ): Promise { + const args = { Action: 'CreateGlobalSSHInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateGlobalSSHInstanceResponse + ); + } + + /** + * CreatePathXSSL - 创建SSL证书,可以把整个 Pem 证书内容传到SSLContent,或者把证书、私钥、CA证书分别传过来 + * + * See also: https://docs.ucloud.cn/api/pathx-api/create_path_xssl + */ + createPathXSSL( + request?: CreatePathXSSLRequest + ): Promise { + const args = { Action: 'CreatePathXSSL', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreatePathXSSLResponse + ); + } + + /** + * CreateUGAForwarder - 创建加速实例转发器,支持HTTPS接入HTTPS回源、HTTPS接入HTTP回源、HTTP接入HTTP回源、TCP接入TCP回源、UDP接入UDP回源、 支持WSS接入WSS回源、WSS接入WS回源、WS接入WS回源 + * + * See also: https://docs.ucloud.cn/api/pathx-api/create_uga_forwarder + */ + createUGAForwarder( + request?: CreateUGAForwarderRequest + ): Promise { + const args = { Action: 'CreateUGAForwarder', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUGAForwarderResponse + ); + } + + /** + * CreateUGAInstance - 创建全球加速配置项 + * + * See also: https://docs.ucloud.cn/api/pathx-api/create_uga_instance + */ + createUGAInstance( + request?: CreateUGAInstanceRequest + ): Promise { + const args = { Action: 'CreateUGAInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUGAInstanceResponse + ); + } + + /** + * CreateUPath - 创建UPath + * + * See also: https://docs.ucloud.cn/api/pathx-api/create_upath + */ + createUPath(request?: CreateUPathRequest): Promise { + const args = { Action: 'CreateUPath', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUPathResponse + ); + } + + /** + * DeleteGlobalSSHInstance - 删除GlobalSSH实例 + * + * See also: https://docs.ucloud.cn/api/pathx-api/delete_global_ssh_instance + */ + deleteGlobalSSHInstance( + request?: DeleteGlobalSSHInstanceRequest + ): Promise { + const args = { Action: 'DeleteGlobalSSHInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteGlobalSSHInstanceResponse + ); + } + + /** + * DeletePathXSSL - 删除PathX SSL证书 + * + * See also: https://docs.ucloud.cn/api/pathx-api/delete_path_xssl + */ + deletePathXSSL( + request?: DeletePathXSSLRequest + ): Promise { + const args = { Action: 'DeletePathXSSL', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeletePathXSSLResponse + ); + } + + /** + * DeleteUGAForwarder - 删除加速实例转发器 按接入端口删除 + * + * See also: https://docs.ucloud.cn/api/pathx-api/delete_uga_forwarder + */ + deleteUGAForwarder( + request?: DeleteUGAForwarderRequest + ): Promise { + const args = { Action: 'DeleteUGAForwarder', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUGAForwarderResponse + ); + } + + /** + * DeleteUGAInstance - 删除全球加速服务加速配置 + * + * See also: https://docs.ucloud.cn/api/pathx-api/delete_uga_instance + */ + deleteUGAInstance( + request?: DeleteUGAInstanceRequest + ): Promise { + const args = { Action: 'DeleteUGAInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUGAInstanceResponse + ); + } + + /** + * DeleteUPath - 删除UPath + * + * See also: https://docs.ucloud.cn/api/pathx-api/delete_upath + */ + deleteUPath(request?: DeleteUPathRequest): Promise { + const args = { Action: 'DeleteUPath', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUPathResponse + ); + } + + /** + * DescribeGlobalSSHInstance - 获取GlobalSSH实例列表(传实例ID获取单个实例信息,不传获取项目下全部实例) + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_global_ssh_instance + */ + describeGlobalSSHInstance( + request?: DescribeGlobalSSHInstanceRequest + ): Promise { + const args = { Action: 'DescribeGlobalSSHInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeGlobalSSHInstanceResponse + ); + } + + /** + * DescribePathXLineConfig - 获取全球加速线路信息 + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_path_x_line_config + */ + describePathXLineConfig( + request?: DescribePathXLineConfigRequest + ): Promise { + const args = { Action: 'DescribePathXLineConfig', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribePathXLineConfigResponse + ); + } + + /** + * DescribePathXSSL - 获取SSL证书信息,支持分页,支持按证书名称 证书域名模糊搜索 + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_path_xssl + */ + describePathXSSL( + request?: DescribePathXSSLRequest + ): Promise { + const args = { Action: 'DescribePathXSSL', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribePathXSSLResponse + ); + } + + /** + * DescribeUGAInstance - 获取全球加速服务加速配置信息,指定实例ID返回单个实例。未指定实例ID时 指定分页参数 则按创建时间降序 返回记录 + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_uga_instance + */ + describeUGAInstance( + request?: DescribeUGAInstanceRequest + ): Promise { + const args = { Action: 'DescribeUGAInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUGAInstanceResponse + ); + } + + /** + * DescribeUPath - 获取加速线路信息 + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_upath + */ + describeUPath( + request?: DescribeUPathRequest + ): Promise { + const args = { Action: 'DescribeUPath', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUPathResponse + ); + } + + /** + * DescribeUPathTemplate - 查询UPath的监控模板 + * + * See also: https://docs.ucloud.cn/api/pathx-api/describe_upath_template + */ + describeUPathTemplate( + request?: DescribeUPathTemplateRequest + ): Promise { + const args = { Action: 'DescribeUPathTemplate', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUPathTemplateResponse + ); + } + + /** + * GetGlobalSSHPrice - 获取GlobalSSH价格 + * + * See also: https://docs.ucloud.cn/api/pathx-api/get_global_ssh_price + */ + getGlobalSSHPrice( + request?: GetGlobalSSHPriceRequest + ): Promise { + const args = { Action: 'GetGlobalSSHPrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetGlobalSSHPriceResponse + ); + } + + /** + * GetGlobalSSHUpdatePrice - 获取GlobalSSH升级价格 + * + * See also: https://docs.ucloud.cn/api/pathx-api/get_global_ssh_update_price + */ + getGlobalSSHUpdatePrice( + request?: GetGlobalSSHUpdatePriceRequest + ): Promise { + const args = { Action: 'GetGlobalSSHUpdatePrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetGlobalSSHUpdatePriceResponse + ); + } + + /** + * GetPathXMetric - 获取全球加速监控信息 + * + * See also: https://docs.ucloud.cn/api/pathx-api/get_path_x_metric + */ + getPathXMetric( + request?: GetPathXMetricRequest + ): Promise { + const args = { Action: 'GetPathXMetric', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetPathXMetricResponse + ); + } + + /** + * ModifyGlobalSSHPort - 修改GlobalSSH端口 + * + * See also: https://docs.ucloud.cn/api/pathx-api/modify_global_ssh_port + */ + modifyGlobalSSHPort( + request?: ModifyGlobalSSHPortRequest + ): Promise { + const args = { Action: 'ModifyGlobalSSHPort', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyGlobalSSHPortResponse + ); + } + + /** + * ModifyGlobalSSHType - 修改GlobalSSH实例类型,仅支持低版本升级到高版本,不支持高版本降级到低版本 + * + * See also: https://docs.ucloud.cn/api/pathx-api/modify_global_ssh_type + */ + modifyGlobalSSHType( + request?: ModifyGlobalSSHTypeRequest + ): Promise { + const args = { Action: 'ModifyGlobalSSHType', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyGlobalSSHTypeResponse + ); + } + + /** + * ModifyUPathBandwidth - 修改加速线路带宽 + * + * See also: https://docs.ucloud.cn/api/pathx-api/modify_upath_bandwidth + */ + modifyUPathBandwidth( + request?: ModifyUPathBandwidthRequest + ): Promise { + const args = { Action: 'ModifyUPathBandwidth', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyUPathBandwidthResponse + ); + } + + /** + * ModifyUPathTemplate - 修改UPath监控告警项 + * + * See also: https://docs.ucloud.cn/api/pathx-api/modify_upath_template + */ + modifyUPathTemplate( + request?: ModifyUPathTemplateRequest + ): Promise { + const args = { Action: 'ModifyUPathTemplate', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyUPathTemplateResponse + ); + } + + /** + * UGABindUPath - UGA绑定UPath + * + * See also: https://docs.ucloud.cn/api/pathx-api/uga_bind_upath + */ + uGABindUPath(request?: UGABindUPathRequest): Promise { + const args = { Action: 'UGABindUPath', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UGABindUPathResponse + ); + } + + /** + * UGAUnBindUPath - UGA与UPath解绑 + * + * See also: https://docs.ucloud.cn/api/pathx-api/uga_un_bind_upath + */ + uGAUnBindUPath( + request?: UGAUnBindUPathRequest + ): Promise { + const args = { Action: 'UGAUnBindUPath', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UGAUnBindUPathResponse + ); + } + + /** + * UnBindPathXSSL - 解绑PathX SSL 证书 + * + * See also: https://docs.ucloud.cn/api/pathx-api/un_bind_path_xssl + */ + unBindPathXSSL( + request?: UnBindPathXSSLRequest + ): Promise { + const args = { Action: 'UnBindPathXSSL', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UnBindPathXSSLResponse + ); + } +} + +/** + * BindPathXSSL - 绑定PathX SSL证书 + */ +export interface BindPathXSSLRequest { + /** + * 证书ID,如果没有指定证书ID也没有申请免费证书,HTTPS接入无法正常工作 + */ + SSLId: string; + /** + * UGA实例ID + */ + UGAId: string; + /** + * 绑定SSL证书的HTTPS端口。Port.0 Port.1对应多个Port。如果Port不存在则不会绑定 + */ + Port: number[]; +} + +/** + * BindPathXSSL - 绑定PathX SSL证书 + */ +export interface BindPathXSSLResponse {} + +/** + * CreateGlobalSSHInstance - 创建GlobalSSH实例 + */ +export interface CreateGlobalSSHInstanceRequest { + /** + * 填写支持SSH访问IP的地区名称,如“洛杉矶”,“新加坡”,“香港”,“东京”,“华盛顿”,“法兰克福”。Area和AreaCode两者必填一个 + */ + Area: string; + /** + * 被SSH访问的源站IP,仅支持IPv4地址。 + */ + TargetIP: string; + /** + * 源站服务器监听的SSH端口,可取范围[1-65535],不能使用80,443, 65123端口。如果InstanceType=Free,取值范围缩小为[22,3389],linux系统选择22,windows系统自动选3389。 + */ + Port: number; + /** + * AreaCode, 区域航空港国际通用代码。Area和AreaCode两者必填一个 + */ + AreaCode: string; + /** + * 备注信息 + */ + Remark?: string; + /** + * 支付方式,如按月、按年、按时 + */ + ChargeType?: string; + /** + * 购买数量 + */ + Quantity?: number; + /** + * 枚举值:["Enterprise","Basic","Free"], 分别代表企业版,基础版,免费版 + */ + InstanceType?: string; + /** + * Ultimate版本带宽包大小,枚举值:[0,20,40]。单位MB + */ + BandwidthPackage?: number; + /** + * InstanceType等于Basic时可以在["cn-bj2","cn-sh2","cn-gd"]中选择1个作为转发机房,Free版本固定为cn-bj2,其他付费版默认配置三个转发机房 + */ + ForwardRegion?: string; + /** + * 使用代金券可冲抵部分费用 + */ + CouponId?: string; +} + +/** + * CreateGlobalSSHInstance - 创建GlobalSSH实例 + */ +export interface CreateGlobalSSHInstanceResponse { + /** + * 实例ID,资源唯一标识 + */ + InstanceId: string; + /** + * 加速域名,访问该域名可就近接入 + */ + AcceleratingDomain?: string; +} + +/** + * CreatePathXSSL - 创建SSL证书,可以把整个 Pem 证书内容传到SSLContent,或者把证书、私钥、CA证书分别传过来 + */ +export interface CreatePathXSSLRequest { + /** + * SSL证书的名字 + */ + SSLName: string; + /** + * 所添加的SSL证书类型,目前只支持Pem格式 + */ + SSLType?: string; + /** + * SSL证书的完整内容,私钥不可使用密码,包括加密证书的私钥、用户证书或CA证书等 + */ + SSLContent?: string; + /** + * 用户自签证书内容 + */ + UserCert?: string; + /** + * 加密证书的私钥,不可使用密码保护,开启密码保护后,重启服务需要输入密码 + */ + PrivateKey?: string; + /** + * CA颁发证书内容 + */ + CACert?: string; +} + +/** + * CreatePathXSSL - 创建SSL证书,可以把整个 Pem 证书内容传到SSLContent,或者把证书、私钥、CA证书分别传过来 + */ +export interface CreatePathXSSLResponse { + /** + * SSL证书的Id + */ + SSLId: string; +} + +/** + * CreateUGAForwarder - 创建加速实例转发器,支持HTTPS接入HTTPS回源、HTTPS接入HTTP回源、HTTP接入HTTP回源、TCP接入TCP回源、UDP接入UDP回源、 支持WSS接入WSS回源、WSS接入WS回源、WS接入WS回源 + */ +export interface CreateUGAForwarderRequest { + /** + * 加速配置实例ID + */ + UGAId: string; + /** + * HTTP接入HTTP回源转发,接入端口。禁用65123端口 + */ + HTTPHTTP?: number[]; + /** + * HTTP接入HTTP回源转发,源站监听端口 + */ + HTTPHTTPRS?: number[]; + /** + * HTTPS接入HTTP回源转发,接入端口。禁用65123端口 + */ + HTTPSHTTP?: number[]; + /** + * HTTPS接入HTTP回源转发,回源端口 + */ + HTTPSHTTPRS?: number[]; + /** + * HTTPS接入HTTPS回源转发,接入端口。禁用65123端口 + */ + HTTPSHTTPS?: number[]; + /** + * HTTPS接入HTTPS回源转发,源站监听端口 + */ + HTTPSHTTPSRS?: number[]; + /** + * TCP接入端口 + */ + TCP?: number[]; + /** + * TCP回源端口 + */ + TCPRS?: number[]; + /** + * UDP接入端口 + */ + UDP?: number[]; + /** + * UDP回源端口 + */ + UDPRS?: number[]; +} + +/** + * CreateUGAForwarder - 创建加速实例转发器,支持HTTPS接入HTTPS回源、HTTPS接入HTTP回源、HTTP接入HTTP回源、TCP接入TCP回源、UDP接入UDP回源、 支持WSS接入WSS回源、WSS接入WS回源、WS接入WS回源 + */ +export interface CreateUGAForwarderResponse {} + +/** + * CreateUGAInstance - 创建全球加速配置项 + */ +export interface CreateUGAInstanceRequest { + /** + * 加速配置实例名称 + */ + Name: string; + /** + * 加速源IP,多个IP用英文半角逗号(,)隔开;IPList和Domain二选一必填 + */ + IPList?: string; + /** + * 加速源域名,IPList和Domain二选一必填 + */ + Domain?: string; + /** + * TCP端口号,已废弃。请使用 CreateUGAForwarder API 创建端口 + */ + TCP?: string[]; + /** + * UDP端口号,已废弃。请使用 CreateUGAForwarder API 创建端口 + */ + UDP?: string[]; +} + +/** + * CreateUGAInstance - 创建全球加速配置项 + */ +export interface CreateUGAInstanceResponse { + /** + * 加速配置ID + */ + UGAId: string; + /** + * 加速域名 用户可把业务域名CName到此域名上。注意:未绑定线路情况时 加速域名解析不出IP。 + */ + CName?: string; +} + +/** + * CreateUPath - 创建UPath + */ +export interface CreateUPathRequest { + /** + * UPath名字 + */ + Name: string; + /** + * 选择的线路 + */ + LineId: string; + /** + * 线路带宽,最小1Mbps,最大带宽由 DescribePathXLineConfig 接口获得。如需更大带宽,请联系产品团队。 + */ + Bandwidth: number; + /** + * 计费模式,默认为Month 按月收费,可选范围['Month','Year','Dynamic'] + */ + ChargeType?: string; + /** + * 购买周期,ChargeType为Month时,Quantity默认为0代表购买到月底,按时和按年付费该参数必须大于0 + */ + Quantity?: number; + /** + * 是否开启后付费, 默认为false + */ + PostPaid?: boolean; + /** + * 代金券Id + */ + CouponId?: string; +} + +/** + * CreateUPath - 创建UPath + */ +export interface CreateUPathResponse { + /** + * 加速线路实例Id + */ + UPathId: string; +} + +/** + * DeleteGlobalSSHInstance - 删除GlobalSSH实例 + */ +export interface DeleteGlobalSSHInstanceRequest { + /** + * 实例Id,资源的唯一标识 + */ + InstanceId: string; +} + +/** + * DeleteGlobalSSHInstance - 删除GlobalSSH实例 + */ +export interface DeleteGlobalSSHInstanceResponse {} + +/** + * DeletePathXSSL - 删除PathX SSL证书 + */ +export interface DeletePathXSSLRequest { + /** + * SSL证书的ID + */ + SSLId: string; +} + +/** + * DeletePathXSSL - 删除PathX SSL证书 + */ +export interface DeletePathXSSLResponse {} + +/** + * DeleteUGAForwarder - 删除加速实例转发器 按接入端口删除 + */ +export interface DeleteUGAForwarderRequest { + /** + * 加速配置实例ID + */ + UGAId: string; + /** + * HTTP接入HTTP回源,接入端口。禁用65123端口 + */ + HTTPHTTP?: number[]; + /** + * HTTPS接入HTTP回源, 接入端口。禁用65123端口 + */ + HTTPSHTTP?: number[]; + /** + * HTTPS接入HTTPS回源, 接入端口。禁用65123端口 + */ + HTTPSHTTPS?: number[]; + /** + * TCP接入端口 + */ + TCP?: number[]; + /** + * UDP接入端口 + */ + UDP?: number[]; +} + +/** + * DeleteUGAForwarder - 删除加速实例转发器 按接入端口删除 + */ +export interface DeleteUGAForwarderResponse {} + +/** + * DeleteUGAInstance - 删除全球加速服务加速配置 + */ +export interface DeleteUGAInstanceRequest { + /** + * 加速配置实例ID + */ + UGAId: string; +} + +/** + * DeleteUGAInstance - 删除全球加速服务加速配置 + */ +export interface DeleteUGAInstanceResponse {} + +/** + * DeleteUPath - 删除UPath + */ +export interface DeleteUPathRequest { + /** + * 加速线路实例ID + */ + UPathId: string; +} + +/** + * DeleteUPath - 删除UPath + */ +export interface DeleteUPathResponse {} + +/** + * DescribeGlobalSSHInstance - 获取GlobalSSH实例列表(传实例ID获取单个实例信息,不传获取项目下全部实例) + */ +export interface DescribeGlobalSSHInstanceRequest { + /** + * 实例ID,资源唯一标识 + */ + InstanceId?: string; +} + +/** + * DescribeGlobalSSHInstance - 获取GlobalSSH实例列表(传实例ID获取单个实例信息,不传获取项目下全部实例) + */ +export interface DescribeGlobalSSHInstanceResponse { + /** + * GlobalSSH实例列表,实例的属性参考GlobalSSHInfo模型 + */ + InstanceSet?: { + /** + * 实例ID,资源唯一标识 + */ + InstanceId: string; + /** + * 枚举值:["Enterprise","Basic","Free","Welfare"], 分别代表企业版,基础版本,免费版本,较早的公测免费版 + */ + InstanceType: string; + /** + * GlobalSSH分配的加速域名。 + */ + AcceleratingDomain: string; + /** + * 被SSH访问的IP所在地区 + */ + Area: string; + /** + * 被SSH访问的源站 IPv4地址。 + */ + TargetIP: string; + /** + * 备注信息 + */ + Remark: string; + /** + * 源站服务器监听的SSH端口,windows系统为RDP端口 + */ + Port: number; + /** + * InstanceType等于Free时,由系统自动分配,不等于源站Port值。InstanceType不等于Free时,与源站Port值相同。 + */ + GlobalSSHPort: number; + /** + * 支付周期,如Month,Year,Dynamic等 + */ + ChargeType: string; + /** + * 资源创建时间戳 + */ + CreateTime: number; + /** + * 资源过期时间戳 + */ + ExpireTime: number; + /** + * 是否过期 + */ + Expire: boolean; + /** + * globalssh Ultimate带宽包大小 + */ + BandwidthPackage?: number; + /** + * InstanceType为Basic版本时,需要展示具体分配的转发机房 + */ + ForwardRegion?: string; + }[]; +} + +/** + * DescribePathXLineConfig - 获取全球加速线路信息 + */ +export interface DescribePathXLineConfigRequest {} + +/** + * DescribePathXLineConfig - 获取全球加速线路信息 + */ +export interface DescribePathXLineConfigResponse { + /** + * UGAA线路列表,参考UGAALine字段定义 + */ + LineSet?: { + /** + * 线路源 + */ + LineFrom: string; + /** + * 线路目的 + */ + LineTo: string; + /** + * 线路源中文名称 + */ + LineFromName: string; + /** + * 线路目的中文名称 + */ + LineToName: string; + /** + * 线路可售最大带宽 + */ + MaxBandwidth: number; + /** + * 线路计费Id + */ + LineId?: string; + /** + * 子线路信息 + */ + LineDetail?: { + /** + * 线路源 + */ + LineFrom: string; + /** + * 线路目的 + */ + LineTo: string; + /** + * 线路计费Id + */ + LineId?: string; + /** + * 线路源中文名称 + */ + LineFromName: string; + /** + * 线路目的中文名称 + */ + LineToName: string; + }[]; + }[]; +} + +/** + * DescribePathXSSL - 获取SSL证书信息,支持分页,支持按证书名称 证书域名模糊搜索 + */ +export interface DescribePathXSSLRequest { + /** + * SSL证书的Id,不传分页获取证书列表 + */ + SSLId?: string; + /** + * 不为空则按证书名称、证书域名模糊搜索 分页返回结果 + */ + SearchValue?: string; + /** + * 最大返回条数,默认100,最大400 + */ + Limit?: number; + /** + * 偏移值 默认为0 + */ + Offset?: number; +} + +/** + * DescribePathXSSL - 获取SSL证书信息,支持分页,支持按证书名称 证书域名模糊搜索 + */ +export interface DescribePathXSSLResponse { + /** + * SSL证书详细信息,具体结构见 PathXSSLSet + */ + DataSet?: { + /** + * SSL证书的Id + */ + SSLId?: string; + /** + * SSL证书的名字 + */ + SSLName?: string; + /** + * 证书域名 + */ + SubjectName?: string; + /** + * 证书过期时间 时间戳 + */ + ExpireTime?: number; + /** + * 证书来源,0:用户上传 1: 免费颁发 + */ + SourceType?: number; + /** + * SSL证书(用户证书、私钥、ca证书合并)内容md5值 + */ + SSLMD5?: string; + /** + * SSL证书的创建时间 时间戳 + */ + CreateTime?: number; + /** + * SSL证书绑定的对象 + */ + SSLBindedTargetSet?: { + /** + * SSL证书绑定到的实例ID + */ + ResourceId: string; + /** + * SSL证书绑定到的实例名称 + */ + ResourceName?: string; + }[]; + /** + * SSL证书内容 + */ + SSLContent?: string; + }[]; + /** + * 符合条件的证书总数 + */ + TotalCount?: number; +} + +/** + * DescribeUGAInstance - 获取全球加速服务加速配置信息,指定实例ID返回单个实例。未指定实例ID时 指定分页参数 则按创建时间降序 返回记录 + */ +export interface DescribeUGAInstanceRequest { + /** + * 加速配置实例ID,如果传了实例ID 则返回匹配实例ID的记录;如果没传则返回 ProjectId 下全部实例且符合分页要求 + */ + UGAId?: string; + /** + * 返回的最大条数,默认为100,最大值400 + */ + Limit?: number; + /** + * 偏移量,默认为0 + */ + Offset?: number; +} + +/** + * DescribeUGAInstance - 获取全球加速服务加速配置信息,指定实例ID返回单个实例。未指定实例ID时 指定分页参数 则按创建时间降序 返回记录 + */ +export interface DescribeUGAInstanceResponse { + /** + * 全球加速实例信息列表 + */ + UGAList?: { + /** + * 加速配置实例ID + */ + UGAId: string; + /** + * 加速域名,请在加速区域配置您的业务域名的CName记录值为加速域名 + */ + CName: string; + /** + * 加速配置名称 + */ + UGAName: string; + /** + * 源站IP列表,多个值由半角英文逗号相隔 + */ + IPList?: string[]; + /** + * 源站域名 + */ + Domain?: string; + /** + * 源站所在区域,加速实例在绑定线路后会自动设置该值。console页面上通过该值过滤加速实例可以绑定的upath实例。注意:缺少该值会导致在console上无法修改线路 + */ + Location?: string; + /** + * 绑定的加速线路 + */ + UPathSet?: { + /** + * UPath名字 + */ + UPathName?: string; + /** + * UPath 实例ID + */ + UPathId?: string; + /** + * 带宽 Mbps, 1~800Mbps + */ + Bandwidth?: number; + /** + * 线路ID + */ + LineId?: string; + /** + * 线路起点中文名字,加速区域 + */ + LineFromName?: string; + /** + * 线路对端中文名字,源站区域 + */ + LineToName?: string; + /** + * 线路起点英文代号,加速区域 + */ + LineFrom?: string; + /** + * 线路对端英文代号,源站区域 + */ + LineTo?: string; + }[]; + /** + * 端口配置信息(不再维护,建议使用ForwarderSet) + */ + TaskSet?: { + /** + * 接入端口 + */ + Port: number; + /** + * 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 + */ + Protocol: string; + }[]; + /** + * UGA 4层转发器配置,记录接入或回源端口,接入或回源协议信息 + */ + L4ForwarderSet?: { + /** + * 接入端口 + */ + Port: number; + /** + * 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 + */ + Protocol: string; + /** + * RSPort,源站监听端口 + */ + RSPort: number; + }[]; + /** + * UGA 7层转发器配置,记录接入或回源端口,接入或回源协议信息 如绑定证书会返回证书ID + */ + L7ForwarderSet?: { + /** + * 接入端口 + */ + Port: number; + /** + * 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 + */ + Protocol: string; + /** + * RSPort,源站监听端口 + */ + RSPort: number; + /** + * 证书ID + */ + SSLId?: string; + /** + * 证书名称 + */ + SSLName?: string; + }[]; + /** + * 线路出口IP地址 + */ + OutPublicIpList?: { + /** + * 线路出口EIP + */ + IP?: string; + /** + * 线路出口机房代号 + */ + Area?: string; + }[]; + }[]; + /** + * 符合条件的总数 + */ + TotalCount?: number; +} + +/** + * DescribeUPath - 获取加速线路信息 + */ +export interface DescribeUPathRequest { + /** + * 如果不填参数 返回 ProjectId 下所有的线路资源,填此参数则返回upath实例ID匹配的线路 + */ + UPathId?: string; +} + +/** + * DescribeUPath - 获取加速线路信息 + */ +export interface DescribeUPathResponse { + /** + * 线路信息数组 + */ + UPathSet: { + /** + * 是否为后付费实例 + */ + PostPaid?: boolean; + /** + * 计费模式,默认为Month 按月收费,可选范围['Month','Year','Dynamic'] + */ + ChargeType?: string; + /** + * UPath实例名字 + */ + Name?: string; + /** + * UPath加速线路实例ID + */ + UPathId?: string; + /** + * 带宽,单位Mbps + */ + Bandwidth?: number; + /** + * 选择的线路 + */ + LineId?: string; + /** + * 与该UPath绑定的UGA列表 + */ + UGAList?: { + /** + * 加速配置ID + */ + UGAId?: string; + /** + * 源站IP列表,多个值由半角英文逗号相隔 + */ + IPList?: string[]; + /** + * 源站域名 + */ + Domain?: string; + }[]; + /** + * UPath创建的时间,10位时间戳 + */ + CreateTime?: number; + /** + * UPath的过期时间,10位时间戳 + */ + ExpireTime?: number; + /** + * 线路入口名称 + */ + LineFromName?: string; + /** + * 线路出口名称 + */ + LineToName?: string; + /** + * 线路出口IP数组 + */ + OutPublicIpList?: { + /** + * 线路出口EIP + */ + IP?: string; + /** + * 线路出口机房代号 + */ + Area?: string; + }[]; + }[]; +} + +/** + * DescribeUPathTemplate - 查询UPath的监控模板 + */ +export interface DescribeUPathTemplateRequest { + /** + * 加速线路实例ID,格式 upath-xxxx + */ + UPathId: string; +} + +/** + * DescribeUPathTemplate - 查询UPath的监控模板 + */ +export interface DescribeUPathTemplateResponse { + /** + * 监控模板详情 + */ + DataSet: { + /** + * 收敛策略,可选范围 ['Exponential','Continuous','Once'],分别对应指数递增、连续告警、单次告警 + */ + AlarmStrategy: string; + /** + * 告警探测周期,单位秒 + */ + AlarmFrequency: number; + /** + * 比较策略,可选 ['GE','LE'] 分别代表不小于和不大于 + */ + Compare: string; + /** + * 联系组ID + */ + ContactGroupId: number; + /** + * 告警指标名称, 所有n的个数必须一致。目前仅允许以下四项:UpathNetworkOut:出向带宽,UpathNetworkIn:入向带宽,UpathNetworkOutUsage:出向带宽使用率,UpathNetworkInUsage:入向带宽使用率 + */ + MetricName: string; + /** + * 告警阈值,带宽使用率的阈值范围是[50,100]的正整数,带宽告警阈值为1000000的倍数, 如大于2Mbps则告警 阈值应该传 2000000 + */ + Threshold: number; + /** + * 告警触发周期(次数) + */ + TriggerCount: number; + /** + * 告警模板策略ID + */ + AlarmTemplateRuleId: number; + /** + * 资源类型 + */ + ResourceType?: string; + }[]; +} + +/** + * GetGlobalSSHPrice - 获取GlobalSSH价格 + */ +export interface GetGlobalSSHPriceRequest { + /** + * 购买周期,如果ChargeType为Month,Quantity默认为0;其他情况必须为大于0的整数 + */ + Quantity?: number; + /** + * 计费类型:Dynamic,Month,Year + */ + ChargeType?: string; + /** + * 版本类型。枚举值,Enterprise:企业版;Basic:基础版。可不填,默认为Basic。 + */ + InstanceType?: string; +} + +/** + * GetGlobalSSHPrice - 获取GlobalSSH价格 + */ +export interface GetGlobalSSHPriceResponse { + /** + * 价格,返回单位为元 + */ + Price?: number; +} + +/** + * GetGlobalSSHUpdatePrice - 获取GlobalSSH升级价格 + */ +export interface GetGlobalSSHUpdatePriceRequest { + /** + * 升级后的实例类型。枚举值,Enterprise:企业版;Basic:基础版。 + */ + InstanceType: string; + /** + * 实例ID,唯一资源标识。从免费版升级到付费版可不填,其他情况必填。 + */ + InstanceId?: string; + /** + * 购买周期,如果ChargeType为Month,Quantity可以不填默认为0;其他情况必须为正整数。 + */ + Quantity?: number; + /** + * 计费类型:Dynamic,Month,Year。从免费版升级到付费版必须传,其他情况不需要传 + */ + ChargeType?: string; +} + +/** + * GetGlobalSSHUpdatePrice - 获取GlobalSSH升级价格 + */ +export interface GetGlobalSSHUpdatePriceResponse { + /** + * 价格,返回单位为元。正数表示付费升级,负数表示降级退费。 + */ + Price?: number; +} + +/** + * GetPathXMetric - 获取全球加速监控信息 + */ +export interface GetPathXMetricRequest { + /** + * ResourceId,如upath ID 和 uga ID + */ + ResourceId: string; + /** + * 查询起始时间,10位长度时间戳 + */ + BeginTime: number; + /** + * 查询结束时间,10位长度时间戳 + */ + EndTime: number; + /** + * 查询监控的指标项。目前仅允许以下四项:NetworkOut:出向带宽,NetworkIn:入向带宽,NetworkOutUsage:出向带宽使用率,NetworkInUsage:入向带宽使用率 + */ + MetricName: string[]; + /** + * upath:加速线路,uga:加速实例 + */ + ResourceType: string; + /** + * 具体线路id,调用DescribePathXLineConfig接口获取线路列表 + */ + LineId: string; +} + +/** + * GetPathXMetric - 获取全球加速监控信息 + */ +export interface GetPathXMetricResponse { + /** + * 监控数据结果集 + */ + DataSet?: { + /** + * 出向带宽 + */ + NetworkOut?: { + /** + * 时间戳 + */ + Timestamp?: number; + /** + * 监控点数值 + */ + Value?: number; + }[]; + /** + * 入向带宽 + */ + NetworkIn?: { + /** + * 时间戳 + */ + Timestamp?: number; + /** + * 监控点数值 + */ + Value?: number; + }[]; + /** + * 出向带宽使用率 + */ + NetworkOutUsage?: { + /** + * 时间戳 + */ + Timestamp?: number; + /** + * 监控点数值 + */ + Value?: number; + }[]; + /** + * 入向带宽使用率 + */ + NetworkInUsage?: { + /** + * 时间戳 + */ + Timestamp?: number; + /** + * 监控点数值 + */ + Value?: number; + }[]; + }; +} + +/** + * ModifyGlobalSSHPort - 修改GlobalSSH端口 + */ +export interface ModifyGlobalSSHPortRequest { + /** + * 实例ID,资源唯一标识。当前仅收费版GlobalSSH实例可以修改端口。 + */ + InstanceId: string; + /** + * 源站服务器监听的SSH端口号。收费版本端口范围[1,65535]且不能为80,443,65123端口。免费版不支持修改端口。 + */ + Port: number; +} + +/** + * ModifyGlobalSSHPort - 修改GlobalSSH端口 + */ +export interface ModifyGlobalSSHPortResponse {} + +/** + * ModifyGlobalSSHType - 修改GlobalSSH实例类型,仅支持低版本升级到高版本,不支持高版本降级到低版本 + */ +export interface ModifyGlobalSSHTypeRequest { + /** + * 实例ID,资源唯一标识 + */ + InstanceId: string; + /** + * 取值范围["Enterprise","Basic"],分别对应企业版和基础版,表示升级后的实例类型。比如从Free版本升级为Basic版或Enterprise版,不可从收费版降级为免费版,或从企业版降级为基础版 + */ + InstanceType: string; + /** + * 支付方式,如按月、按年、按时 + */ + ChargeType?: string; + /** + * 购买时间,当ChargeType为Month,Quantity为0代表购买到月底 + */ + Quantity?: string; + /** + * 可抵扣费用的券,通常不使用 + */ + CouponId?: string; +} + +/** + * ModifyGlobalSSHType - 修改GlobalSSH实例类型,仅支持低版本升级到高版本,不支持高版本降级到低版本 + */ +export interface ModifyGlobalSSHTypeResponse {} + +/** + * ModifyUPathBandwidth - 修改加速线路带宽 + */ +export interface ModifyUPathBandwidthRequest { + /** + * UPath 加速线路实例Id + */ + UPathId: string; + /** + * 线路带宽,单位Mbps。最小1Mbps,最大带宽由 DescribePathXLineConfig 接口获得。如需更大带宽,请联系产品团队。 + */ + Bandwidth: number; +} + +/** + * ModifyUPathBandwidth - 修改加速线路带宽 + */ +export interface ModifyUPathBandwidthResponse {} + +/** + * ModifyUPathTemplate - 修改UPath监控告警项 + */ +export interface ModifyUPathTemplateRequest { + /** + * 加速线路实例ID + */ + UPathId: string; + /** + * 告警指标名称, 所有n的个数必须一致。目前仅允许以下四项:UpathNetworkOut:出向带宽,UpathNetworkIn:入向带宽,UpathNetworkOutUsage:出向带宽使用率,UpathNetworkInUsage:入向带宽使用率 + */ + MetricName?: string[]; + /** + * 告警阈值,带宽使用率的阈值范围是[50,100]的正整数,带宽告警阈值为1000000的倍数, 如大于2Mbps则告警 阈值应该传 2000000 + */ + Threshold?: number[]; + /** + * 告警探测周期,单位:秒 + */ + AlarmFrequency?: number[]; + /** + * 告警组id + */ + ContactGroupId?: number[]; + /** + * 比较策略,可选 ['GE','LE'] 分别代表不小于和不大于 + */ + Compare?: string[]; + /** + * 收敛策略,可选范围 ['Exponential','Continuous','Once'],分别对应指数递增、连续告警、单次告警 + */ + AlarmStrategy?: string[]; + /** + * 告警触发周期(次数) + */ + TriggerCount?: number[]; +} + +/** + * ModifyUPathTemplate - 修改UPath监控告警项 + */ +export interface ModifyUPathTemplateResponse {} + +/** + * UGABindUPath - UGA绑定UPath + */ +export interface UGABindUPathRequest { + /** + * 加速配置实例ID,格式uga-xxxx + */ + UGAId: string; + /** + * 加速线路实例ID,格式upath-xxx + */ + UPathId: string; + /** + * 代金券 + */ + CouponId?: string; +} + +/** + * UGABindUPath - UGA绑定UPath + */ +export interface UGABindUPathResponse {} + +/** + * UGAUnBindUPath - UGA与UPath解绑 + */ +export interface UGAUnBindUPathRequest { + /** + * 加速配置实例ID 格式uga-xxx + */ + UGAId: string; + /** + * 加速线路实例ID 格式upath-xxx + */ + UPathId: string; +} + +/** + * UGAUnBindUPath - UGA与UPath解绑 + */ +export interface UGAUnBindUPathResponse {} + +/** + * UnBindPathXSSL - 解绑PathX SSL 证书 + */ +export interface UnBindPathXSSLRequest { + /** + * UGA实例ID。 + */ + UGAId: string; + /** + * SSL证书ID。 + */ + SSLId: string; + /** + * 解绑SSL证书的HTTPS端口。Port.0 Port.1格式 端口错误则解绑失败。 + */ + Port: number[]; +} + +/** + * UnBindPathXSSL - 解绑PathX SSL 证书 + */ +export interface UnBindPathXSSLResponse {} diff --git a/src/services/uaccount/index.ts b/src/services/uaccount/index.ts new file mode 100644 index 0000000..48db3cd --- /dev/null +++ b/src/services/uaccount/index.ts @@ -0,0 +1,381 @@ +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 **uaccount** service + */ +export default class UAccountClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * AddMemberToProject - 添加成员到项目 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/add_member_to_project + */ + addMemberToProject( + request?: AddMemberToProjectRequest + ): Promise { + const args = { Action: 'AddMemberToProject', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AddMemberToProjectResponse + ); + } + + /** + * CreateProject - 创建项目 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/create_project + */ + createProject( + request?: CreateProjectRequest + ): Promise { + const args = { Action: 'CreateProject', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateProjectResponse + ); + } + + /** + * FreezeMember - 冻结成员 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/freeze_member + */ + freezeMember(request?: FreezeMemberRequest): Promise { + const args = { Action: 'FreezeMember', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as FreezeMemberResponse + ); + } + + /** + * GetNetworkMask - 查询登录与API调用的网络掩码 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/get_network_mask + */ + getNetworkMask( + request?: GetNetworkMaskRequest + ): Promise { + const args = { Action: 'GetNetworkMask', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetNetworkMaskResponse + ); + } + + /** + * GetProjectList - 获取项目列表 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/get_project_list + */ + getProjectList( + request?: GetProjectListRequest + ): Promise { + const args = { Action: 'GetProjectList', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetProjectListResponse + ); + } + + /** + * GetRegion - 获取用户在各数据中心的权限等信息 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/get_region + */ + getRegion(request?: GetRegionRequest): Promise { + const args = { Action: 'GetRegion', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetRegionResponse + ); + } + + /** + * InviteSubaccount - 邀请子帐号成员 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/invite_subaccount + */ + inviteSubaccount( + request?: InviteSubaccountRequest + ): Promise { + const args = { Action: 'InviteSubaccount', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as InviteSubaccountResponse + ); + } + + /** + * RemoveMemberFromProject - 从项目中移除成员 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/remove_member_from_project + */ + removeMemberFromProject( + request?: RemoveMemberFromProjectRequest + ): Promise { + const args = { Action: 'RemoveMemberFromProject', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RemoveMemberFromProjectResponse + ); + } + + /** + * SetNetworkMask - 设置登录与API调用的网络掩码 + * + * See also: https://docs.ucloud.cn/api/uaccount-api/set_network_mask + */ + setNetworkMask( + request?: SetNetworkMaskRequest + ): Promise { + const args = { Action: 'SetNetworkMask', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as SetNetworkMaskResponse + ); + } +} + +/** + * AddMemberToProject - 添加成员到项目 + */ +export interface AddMemberToProjectRequest { + /** + * 被加入成员Email + */ + MemberEmail: string; + /** + * 被加入成员归属角色ID + */ + CharacterId: string; +} + +/** + * AddMemberToProject - 添加成员到项目 + */ +export interface AddMemberToProjectResponse {} + +/** + * CreateProject - 创建项目 + */ +export interface CreateProjectRequest { + /** + * 项目名称,不得与现有项目重名 + */ + ProjectName: string; +} + +/** + * CreateProject - 创建项目 + */ +export interface CreateProjectResponse { + /** + * 所创建项目的Id + */ + ProjectId: string; +} + +/** + * FreezeMember - 冻结成员 + */ +export interface FreezeMemberRequest { + /** + * 需要被冻结的成员Email + */ + MemberEmail: string; +} + +/** + * FreezeMember - 冻结成员 + */ +export interface FreezeMemberResponse {} + +/** + * GetNetworkMask - 查询登录与API调用的网络掩码 + */ +export interface GetNetworkMaskRequest {} + +/** + * GetNetworkMask - 查询登录与API调用的网络掩码 + */ +export interface GetNetworkMaskResponse { + /** + * 接口返回数据 + */ + Data?: { + /** + * API调用网络掩码,默认空字符串,不限制登录IP,多个IP以英文逗号分隔。 + */ + APINetworkMask: string; + /** + * 登录网络掩码,默认空字符串,不限制登录IP,多个IP以英文逗号分隔。 + */ + LoginNetworkMask: string; + }; +} + +/** + * GetProjectList - 获取项目列表 + */ +export interface GetProjectListRequest { + /** + * 是否是财务账号(Yes:是,No:否) + */ + IsFinance?: string; +} + +/** + * GetProjectList - 获取项目列表 + */ +export interface GetProjectListResponse { + /** + * 项目总数 + */ + ProjectCount: number; + /** + * JSON格式的项目列表实例 + */ + ProjectSet: { + /** + * 项目ID + */ + ProjectId: string; + /** + * 项目名称 + */ + ProjectName: string; + /** + * 创建时间(Unix时间戳) + */ + CreateTime: number; + /** + * 是否为默认项目 + */ + IsDefault: boolean; + /** + * 项目下资源数量(已废弃,不建议使用) + */ + ResourceCount: number; + /** + * 项目下成员数量 + */ + MemberCount: number; + /** + * 父项目ID(已废弃) + */ + ParentId?: string; + /** + * 父项目名称(已废弃) + */ + ParentName?: string; + }[]; +} + +/** + * GetRegion - 获取用户在各数据中心的权限等信息 + */ +export interface GetRegionRequest {} + +/** + * GetRegion - 获取用户在各数据中心的权限等信息 + */ +export interface GetRegionResponse { + /** + * 各数据中心信息 + */ + Regions?: { + /** + * 数据中心ID + */ + RegionId: number; + /** + * 数据中心名称 + */ + RegionName: string; + /** + * 是否用户当前默认数据中心 + */ + IsDefault: boolean; + /** + * 用户在此数据中心的权限位 + */ + BitMaps: string; + /** + * 地域名字,如cn-bj + */ + Region: string; + /** + * 可用区名字,如cn-bj-01 + */ + Zone: string; + }[]; +} + +/** + * InviteSubaccount - 邀请子帐号成员 + */ +export interface InviteSubaccountRequest { + /** + * 受邀成员邮箱地址,不得重复 + */ + UserEmail: string; + /** + * 受邀成员手机号码 + */ + UserPhone: string; + /** + * 受邀成员姓名 + */ + UserName: string; + /** + * 是否有财务权限(true:是,false:否,默认为否) + */ + IsFinance: string; +} + +/** + * InviteSubaccount - 邀请子帐号成员 + */ +export interface InviteSubaccountResponse {} + +/** + * RemoveMemberFromProject - 从项目中移除成员 + */ +export interface RemoveMemberFromProjectRequest { + /** + * 需要被移除成员Email + */ + MemberEmail: string; +} + +/** + * RemoveMemberFromProject - 从项目中移除成员 + */ +export interface RemoveMemberFromProjectResponse {} + +/** + * SetNetworkMask - 设置登录与API调用的网络掩码 + */ +export interface SetNetworkMaskRequest { + /** + * 短信验证码 + */ + Code: string; + /** + * API调用网络掩码,多个IP以英文逗号分隔。默认空字符串,不限制登录IP。 + */ + APINetworkMask?: string; + /** + * 登录网络掩码,多个IP以英文逗号分隔。默认空字符串,不限制登录IP。 + */ + LoginNetworkMask?: string; +} + +/** + * SetNetworkMask - 设置登录与API调用的网络掩码 + */ +export interface SetNetworkMaskResponse {} diff --git a/src/services/ubill/index.ts b/src/services/ubill/index.ts new file mode 100644 index 0000000..55f08c2 --- /dev/null +++ b/src/services/ubill/index.ts @@ -0,0 +1,117 @@ +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 **ubill** service + */ +export default class UBillClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * GetBalance - 获取账户余额 + * + * See also: https://docs.ucloud.cn/api/ubill-api/get_balance + */ + getBalance(request?: GetBalanceRequest): Promise { + const args = { Action: 'GetBalance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetBalanceResponse + ); + } + + /** + * GetBillDataFileUrl - 生成账单数据文件下载的 url + * + * See also: https://docs.ucloud.cn/api/ubill-api/get_bill_data_file_url + */ + getBillDataFileUrl( + request?: GetBillDataFileUrlRequest + ): Promise { + const args = { Action: 'GetBillDataFileUrl', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetBillDataFileUrlResponse + ); + } +} + +/** + * GetBalance - 获取账户余额 + */ +export interface GetBalanceRequest {} + +/** + * GetBalance - 获取账户余额 + */ +export interface GetBalanceResponse { + /** + * 账户余额信息 + */ + AccountInfo: { + /** + * 冻结账户金额 + */ + AmountFreeze?: string; + /** + * 信用账户余额 + */ + AmountCredit?: string; + /** + * 赠送账户余额 + */ + AmountFree?: string; + /** + * 账户余额 + */ + Amount?: string; + /** + * 账户可用余额 + */ + AmountAvailable?: string; + }; +} + +/** + * GetBillDataFileUrl - 生成账单数据文件下载的 url + */ +export interface GetBillDataFileUrlRequest { + /** + * 账期(时间戳格式) + */ + BillPeriod: number; + /** + * 账单类型,传 0 时获取账单总览报表,传 1 获取账单明细报表 + */ + BillType: number; + /** + * 获取账单总览报表时,账单的支付状态,传 0 时获取待支付账单,传 1 时获取已支付账单。获取账单明细报表时该参数无效 + */ + PaidType?: number; + /** + * 如需求其他语言版本的账单则使用此参数。默认中文。如 RequireVersion = "EN",则提供英文版本账单。 + */ + RequireVersion?: string; +} + +/** + * GetBillDataFileUrl - 生成账单数据文件下载的 url + */ +export interface GetBillDataFileUrlResponse { + /** + * 交易账单数据下载URL + */ + FileUrl?: string; + /** + * 生成的 URL是否有效,即有对应数据文件 + */ + IsValid?: string; +} diff --git a/src/services/ucdn/index.ts b/src/services/ucdn/index.ts new file mode 100644 index 0000000..c966a09 --- /dev/null +++ b/src/services/ucdn/index.ts @@ -0,0 +1,3504 @@ +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 **ucdn** service + */ +export default class UCDNClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * DescribeNewUcdnPrefetchCacheTask - 获取预取任务状态 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/describe_new_ucdn_prefetch_cache_task + */ + describeNewUcdnPrefetchCacheTask( + request?: DescribeNewUcdnPrefetchCacheTaskRequest + ): Promise { + const args = { + Action: 'DescribeNewUcdnPrefetchCacheTask', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeNewUcdnPrefetchCacheTaskResponse + ); + } + + /** + * DescribeNewUcdnRefreshCacheTask - 获取域名刷新任务状态 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/describe_new_ucdn_refresh_cache_task + */ + describeNewUcdnRefreshCacheTask( + request?: DescribeNewUcdnRefreshCacheTaskRequest + ): Promise { + const args = { + Action: 'DescribeNewUcdnRefreshCacheTask', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeNewUcdnRefreshCacheTaskResponse + ); + } + + /** + * GetNewUcdnDomainBandwidth - 获取域名带宽数据 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_new_ucdn_domain_bandwidth + */ + getNewUcdnDomainBandwidth( + request?: GetNewUcdnDomainBandwidthRequest + ): Promise { + const args = { Action: 'GetNewUcdnDomainBandwidth', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetNewUcdnDomainBandwidthResponse + ); + } + + /** + * GetNewUcdnDomainHitRate - 获取域名命中率 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_new_ucdn_domain_hit_rate + */ + getNewUcdnDomainHitRate( + request?: GetNewUcdnDomainHitRateRequest + ): Promise { + const args = { Action: 'GetNewUcdnDomainHitRate', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetNewUcdnDomainHitRateResponse + ); + } + + /** + * GetNewUcdnDomainHttpCode - 获取域名状态码监控 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_new_ucdn_domain_http_code + */ + getNewUcdnDomainHttpCode( + request?: GetNewUcdnDomainHttpCodeRequest + ): Promise { + const args = { Action: 'GetNewUcdnDomainHttpCode', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetNewUcdnDomainHttpCodeResponse + ); + } + + /** + * GetNewUcdnDomainHttpCodeV2 - 获取域名详细状态码监控 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_new_ucdn_domain_http_code_v2 + */ + getNewUcdnDomainHttpCodeV2( + request?: GetNewUcdnDomainHttpCodeV2Request + ): Promise { + const args = { Action: 'GetNewUcdnDomainHttpCodeV2', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetNewUcdnDomainHttpCodeV2Response + ); + } + + /** + * GetUcdnDomain95BandwidthV2 - 获取域名九五峰值带宽数据 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain95_bandwidth_v2 + */ + getUcdnDomain95BandwidthV2( + request?: GetUcdnDomain95BandwidthV2Request + ): Promise { + const args = { Action: 'GetUcdnDomain95BandwidthV2', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnDomain95BandwidthV2Response + ); + } + + /** + * GetUcdnDomainBandwidthV2 - 获取域名带宽数据(新) + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_bandwidth_v2 + */ + getUcdnDomainBandwidthV2( + request?: GetUcdnDomainBandwidthV2Request + ): Promise { + const args = { Action: 'GetUcdnDomainBandwidthV2', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnDomainBandwidthV2Response + ); + } + + /** + * GetUcdnDomainConfig - 批量获取加速域名配置 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_config + */ + getUcdnDomainConfig( + request?: GetUcdnDomainConfigRequest + ): Promise { + const args = { Action: 'GetUcdnDomainConfig', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnDomainConfigResponse + ); + } + + /** + * GetUcdnDomainHitRate - 获取域名命中率 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_hit_rate + */ + getUcdnDomainHitRate( + request?: GetUcdnDomainHitRateRequest + ): Promise { + const args = { Action: 'GetUcdnDomainHitRate', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnDomainHitRateResponse + ); + } + + /** + * GetUcdnDomainHttpCodeV2 - 获取域名状态码信息 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_http_code_v2 + */ + getUcdnDomainHttpCodeV2( + request?: GetUcdnDomainHttpCodeV2Request + ): Promise { + const args = { Action: 'GetUcdnDomainHttpCodeV2', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnDomainHttpCodeV2Response + ); + } + + /** + * GetUcdnDomainInfoList - 获取域名基本信息 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_info_list + */ + getUcdnDomainInfoList( + request?: GetUcdnDomainInfoListRequest + ): Promise { + const args = { Action: 'GetUcdnDomainInfoList', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnDomainInfoListResponse + ); + } + + /** + * GetUcdnDomainLog - 获取加速域名原始日志 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_log + */ + getUcdnDomainLog( + request?: GetUcdnDomainLogRequest + ): Promise { + const args = { Action: 'GetUcdnDomainLog', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnDomainLogResponse + ); + } + + /** + * GetUcdnDomainOriginRequestNum - 获取域名回源请求数 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_origin_request_num + */ + getUcdnDomainOriginRequestNum( + request?: GetUcdnDomainOriginRequestNumRequest + ): Promise { + const args = { + Action: 'GetUcdnDomainOriginRequestNum', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnDomainOriginRequestNumResponse + ); + } + + /** + * GetUcdnDomainPrefetchEnable - 获取域名预取开启状态 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_prefetch_enable + */ + getUcdnDomainPrefetchEnable( + request?: GetUcdnDomainPrefetchEnableRequest + ): Promise { + const args = { Action: 'GetUcdnDomainPrefetchEnable', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnDomainPrefetchEnableResponse + ); + } + + /** + * GetUcdnDomainRequestNumV2 - 获取域名请求数 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_request_num_v2 + */ + getUcdnDomainRequestNumV2( + request?: GetUcdnDomainRequestNumV2Request + ): Promise { + const args = { Action: 'GetUcdnDomainRequestNumV2', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnDomainRequestNumV2Response + ); + } + + /** + * GetUcdnDomainRequestNumV3 - 获取域名请求数 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_request_num_v3 + */ + getUcdnDomainRequestNumV3( + request?: GetUcdnDomainRequestNumV3Request + ): Promise { + const args = { Action: 'GetUcdnDomainRequestNumV3', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnDomainRequestNumV3Response + ); + } + + /** + * GetUcdnDomainTraffic - 获取加速域名流量使用信息 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_traffic + */ + getUcdnDomainTraffic( + request?: GetUcdnDomainTrafficRequest + ): Promise { + const args = { Action: 'GetUcdnDomainTraffic', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnDomainTrafficResponse + ); + } + + /** + * GetUcdnPassBandwidth - 获取回源带宽数据(cdn回客户源站部分) + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_pass_bandwidth + */ + getUcdnPassBandwidth( + request?: GetUcdnPassBandwidthRequest + ): Promise { + const args = { Action: 'GetUcdnPassBandwidth', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnPassBandwidthResponse + ); + } + + /** + * GetUcdnPassBandwidthV2 - 获取回源带宽数据(cdn回客户源站部分) + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_pass_bandwidth_v2 + */ + getUcdnPassBandwidthV2( + request?: GetUcdnPassBandwidthV2Request + ): Promise { + const args = { Action: 'GetUcdnPassBandwidthV2', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnPassBandwidthV2Response + ); + } + + /** + * GetUcdnProIspBandwidthV2 - 按省份运营商获取域名带宽数据 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_pro_isp_bandwidth_v2 + */ + getUcdnProIspBandwidthV2( + request?: GetUcdnProIspBandwidthV2Request + ): Promise { + const args = { Action: 'GetUcdnProIspBandwidthV2', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnProIspBandwidthV2Response + ); + } + + /** + * GetUcdnProIspRequestNumV2 - 按省份运营商获取域名请求数 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_pro_isp_request_num_v2 + */ + getUcdnProIspRequestNumV2( + request?: GetUcdnProIspRequestNumV2Request + ): Promise { + const args = { Action: 'GetUcdnProIspRequestNumV2', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnProIspRequestNumV2Response + ); + } + + /** + * GetUcdnTraffic - 获取流量信息 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_traffic + */ + getUcdnTraffic( + request?: GetUcdnTrafficRequest + ): Promise { + const args = { Action: 'GetUcdnTraffic', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnTrafficResponse + ); + } + + /** + * GetUcdnTrafficV2 - 获取流量信息 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_traffic_v2 + */ + getUcdnTrafficV2( + request?: GetUcdnTrafficV2Request + ): Promise { + const args = { Action: 'GetUcdnTrafficV2', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUcdnTrafficV2Response + ); + } + + /** + * PrefetchNewUcdnDomainCache - 提交预取任务 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/prefetch_new_ucdn_domain_cache + */ + prefetchNewUcdnDomainCache( + request?: PrefetchNewUcdnDomainCacheRequest + ): Promise { + const args = { Action: 'PrefetchNewUcdnDomainCache', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as PrefetchNewUcdnDomainCacheResponse + ); + } + + /** + * RefreshNewUcdnDomainCache - 刷新缓存 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/refresh_new_ucdn_domain_cache + */ + refreshNewUcdnDomainCache( + request?: RefreshNewUcdnDomainCacheRequest + ): Promise { + const args = { Action: 'RefreshNewUcdnDomainCache', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RefreshNewUcdnDomainCacheResponse + ); + } + + /** + * SwitchUcdnChargeType - 切换账号计费方式 + * + * See also: https://docs.ucloud.cn/api/ucdn-api/switch_ucdn_charge_type + */ + switchUcdnChargeType( + request?: SwitchUcdnChargeTypeRequest + ): Promise { + const args = { Action: 'SwitchUcdnChargeType', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as SwitchUcdnChargeTypeResponse + ); + } +} + +/** + * DescribeNewUcdnPrefetchCacheTask - 获取预取任务状态 + */ +export interface DescribeNewUcdnPrefetchCacheTaskRequest { + /** + * 提交任务时返回的任务ID + */ + TaskId?: string[]; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; + /** + * 需要获取的内容预热的状态,枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败; unknow:未知,默认选择所有状态 + */ + Status?: string; + /** + * 数据偏移量,默认为0,自然数 + */ + Offset?: number; + /** + * 返回数据长度,默认全部,自然数 + */ + Limit?: number; +} + +/** + * DescribeNewUcdnPrefetchCacheTask - 获取预取任务状态 + */ +export interface DescribeNewUcdnPrefetchCacheTaskResponse { + /** + * 预热任务的总数 + */ + TotalCount?: number; + /** + * 预热任务信息,参考TaskInfo + */ + TaskList?: { + /** + * 提交任务时返回的任务ID + */ + TaskId?: string; + /** + * 任务url的信息列表,参考UrlProgressInfo + */ + UrlLists?: { + /** + * 刷新的单条url + */ + Url?: string; + /** + * 刷新任务创建的时间。格式为Unix Timestamp + */ + CreateTime?: number; + /** + * 任务完成时间。格式为Unix Timestamp + */ + FinishTime?: number; + /** + * 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知 + */ + Status?: string; + /** + * 刷新进度,单位% + */ + Progress?: number; + }[]; + /** + * 刷新任务创建的时间。格式为Unix Timestamp + */ + CreateTime?: number; + /** + * 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知 + */ + Status?: string; + }[]; +} + +/** + * DescribeNewUcdnRefreshCacheTask - 获取域名刷新任务状态 + */ +export interface DescribeNewUcdnRefreshCacheTaskRequest { + /** + * 提交任务时返回的任务ID + */ + TaskId?: string[]; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; + /** + * 需要获取的内容刷新的状态,枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败; unknow:未知,默认选择所有状态 + */ + Status?: string; + /** + * 数据偏移量,默认为0,自然数 + */ + Offset?: number; + /** + * 返回数据长度,默认全部,自然数 + */ + Limit?: number; +} + +/** + * DescribeNewUcdnRefreshCacheTask - 获取域名刷新任务状态 + */ +export interface DescribeNewUcdnRefreshCacheTaskResponse { + /** + * 刷新任务的总数 + */ + TotalCount?: number; + /** + * 刷新任务信息,参考TaskInfo + */ + TaskList?: { + /** + * 提交任务时返回的任务ID + */ + TaskId?: string; + /** + * 任务url的信息列表,参考UrlProgressInfo + */ + UrlLists?: { + /** + * 刷新的单条url + */ + Url?: string; + /** + * 刷新任务创建的时间。格式为Unix Timestamp + */ + CreateTime?: number; + /** + * 任务完成时间。格式为Unix Timestamp + */ + FinishTime?: number; + /** + * 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知 + */ + Status?: string; + /** + * 刷新进度,单位% + */ + Progress?: number; + }[]; + /** + * 刷新任务创建的时间。格式为Unix Timestamp + */ + CreateTime?: number; + /** + * 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知 + */ + Status?: string; + }[]; +} + +/** + * GetNewUcdnDomainBandwidth - 获取域名带宽数据 + */ +export interface GetNewUcdnDomainBandwidthRequest { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度) + */ + Type: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域 + */ + Areacode?: string; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; +} + +/** + * GetNewUcdnDomainBandwidth - 获取域名带宽数据 + */ +export interface GetNewUcdnDomainBandwidthResponse { + /** + * 带宽信息列表,参见BandwidthInfo + */ + BandwidthList?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps(如果请求参数Type为0,则Value是五分钟粒度的带宽值,如果Type为1,则Value是1小时的带宽峰值,如果Type为2,则Value是一天内的带宽峰值) + */ + CdnBandwidth?: number; + }[]; + /** + * 从起始时间到结束时间内的所使用的CDN总流量,单位GB + */ + Traffic?: number; +} + +/** + * GetNewUcdnDomainHitRate - 获取域名命中率 + */ +export interface GetNewUcdnDomainHitRateRequest { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度)默认5分钟 + */ + Type?: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; +} + +/** + * GetNewUcdnDomainHitRate - 获取域名命中率 + */ +export interface GetNewUcdnDomainHitRateResponse { + /** + * 请求数实例表。 + */ + HitRateList?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 流量命中率,单位% + */ + FlowHitRate?: number; + /** + * 请求数命中率,单位% + */ + RequestHitRate?: number; + }[]; +} + +/** + * GetNewUcdnDomainHttpCode - 获取域名状态码监控 + */ +export interface GetNewUcdnDomainHttpCodeRequest { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度) + */ + Type: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; +} + +/** + * GetNewUcdnDomainHttpCode - 获取域名状态码监控 + */ +export interface GetNewUcdnDomainHttpCodeResponse { + /** + * 状态码实例表。详细见HttpCodeInfo + */ + HttpCodeDetail?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 1xx数量 + */ + HttpOneXX?: number; + /** + * 2xx数量 + */ + HttpTwoXX?: number; + /** + * 3xx数量 + */ + HttpThreeXX?: number; + /** + * 4xx数量 + */ + HttpFourXX?: number; + /** + * 5xx数量 + */ + HttpFiveXX?: number; + }[]; +} + +/** + * GetNewUcdnDomainHttpCodeV2 - 获取域名详细状态码监控 + */ +export interface GetNewUcdnDomainHttpCodeV2Request { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天粒度,3表示按照一分钟粒度) + */ + Type: number; + /** + * 查询的起始时间,格式为Unix Timestamp。 + */ + BeginTime: number; + /** + * 查询的结束时间,格式为Unix Timestamp。 + */ + EndTime: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; +} + +/** + * GetNewUcdnDomainHttpCodeV2 - 获取域名详细状态码监控 + */ +export interface GetNewUcdnDomainHttpCodeV2Response { + /** + * 状态码详情 + */ + HttpCodeV2Detail?: { + /** + * 时间 + */ + Time?: number; + /** + * 当前分组的总状态码数 + */ + Total?: number; + /** + * http100数量 + */ + Http100?: number; + /** + * http101数量 + */ + Http101?: number; + /** + * http102数量 + */ + Http102?: number; + /** + * http200数量 + */ + Http200?: number; + /** + * http201数量 + */ + Http201?: number; + /** + * http202数量 + */ + Http202?: number; + /** + * http203数量 + */ + Http203?: number; + /** + * http204数量 + */ + Http204?: number; + /** + * http205数量 + */ + Http205?: number; + /** + * http206数量 + */ + Http206?: number; + /** + * http207数量 + */ + Http207?: number; + /** + * http300数量 + */ + Http300?: number; + /** + * http301数量 + */ + Http301?: number; + /** + * http302数量 + */ + Http302?: number; + /** + * http303数量 + */ + Http303?: number; + /** + * http304数量 + */ + Http304?: number; + /** + * http305数量 + */ + Http305?: number; + /** + * http306数量 + */ + Http306?: number; + /** + * http307数量 + */ + Http307?: number; + /** + * http400数量 + */ + Http400?: number; + /** + * http401数量 + */ + Http401?: number; + /** + * http402数量 + */ + Http402?: number; + /** + * http403数量 + */ + Http403?: number; + /** + * http404数量 + */ + Http404?: number; + /** + * http405数量 + */ + Http405?: number; + /** + * http406数量 + */ + Http406?: number; + /** + * http407数量 + */ + Http407?: number; + /** + * http408数量 + */ + Http408?: number; + /** + * http409数量 + */ + Http409?: number; + /** + * http410数量 + */ + Http410?: number; + /** + * http411数量 + */ + Http411?: number; + /** + * http412数量 + */ + Http412?: number; + /** + * http413数量 + */ + Http413?: number; + /** + * http414数量 + */ + Http414?: number; + /** + * http415数量 + */ + Http415?: number; + /** + * http416数量 + */ + Http416?: number; + /** + * http417数量 + */ + Http417?: number; + /** + * http418数量 + */ + Http418?: number; + /** + * http421数量 + */ + Http421?: number; + /** + * http422数量 + */ + Http422?: number; + /** + * http423数量 + */ + Http423?: number; + /** + * http424数量 + */ + Http424?: number; + /** + * http425数量 + */ + Http425?: number; + /** + * http426数量 + */ + Http426?: number; + /** + * http449数量 + */ + Http449?: number; + /** + * http451数量 + */ + Http451?: number; + /** + * http500数量 + */ + Http500?: number; + /** + * http501数量 + */ + Http501?: number; + /** + * http502数量 + */ + Http502?: number; + /** + * http503数量 + */ + Http503?: number; + /** + * http504数量 + */ + Http504?: number; + /** + * http505数量 + */ + Http505?: number; + /** + * http506数量 + */ + Http506?: number; + /** + * http507数量 + */ + Http507?: number; + /** + * http509数量 + */ + Http509?: number; + /** + * http510数量 + */ + Http510?: number; + }[]; +} + +/** + * GetUcdnDomain95BandwidthV2 - 获取域名九五峰值带宽数据 + */ +export interface GetUcdnDomain95BandwidthV2Request { + /** + * 查询的起始日期,格式为Unix Timestamp + */ + BeginTime: number; + /** + * 查询的结束日期,格式为Unix Timestamp + */ + EndTime: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域 + */ + Areacode?: string; +} + +/** + * GetUcdnDomain95BandwidthV2 - 获取域名九五峰值带宽数据 + */ +export interface GetUcdnDomain95BandwidthV2Response { + /** + * 查询时间期间的95带宽时间点 Unix时间戳 + */ + Time: number; + /** + * 查询期间的CDN的95带宽值,单位Mbps + */ + CdnBandwidth?: number; +} + +/** + * GetUcdnDomainBandwidthV2 - 获取域名带宽数据(新) + */ +export interface GetUcdnDomainBandwidthV2Request { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照1分钟粒度) + */ + Type: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域 + */ + Areacode?: string; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; + /** + * 协议,http、https 不传则查所有协议的带宽 + */ + Protocol?: string; +} + +/** + * GetUcdnDomainBandwidthV2 - 获取域名带宽数据(新) + */ +export interface GetUcdnDomainBandwidthV2Response { + /** + * 带宽信息列表,参见BandwidthTrafficInfo + */ + BandwidthTrafficList?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time: number; + /** + * 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps(如果请求参数Type为0,则Value是五分钟粒度的带宽值,如果Type为1,则Value是1小时的带宽峰值,如果Type为2,则Value是一天内的带宽峰值) + */ + CdnBandwidth: number; + /** + * 对应时间粒度的流量,单位字节 + */ + Traffic: number; + }[]; +} + +/** + * GetUcdnDomainConfig - 批量获取加速域名配置 + */ +export interface GetUcdnDomainConfigRequest { + /** + * 数据偏移量,默认0,非负整数 + */ + Offset?: number; + /** + * 返回数据长度, 默认全部,非负整数 + */ + Limit?: number; + /** + * 域名id,创建域名时生成的id。默认获取账号下的所有域名信息,n为自然数,从DomainId.0开始。 + */ + DomainId?: string[]; + /** + * 产品类型ucdn,可不填,默认为ucdn + */ + ChannelType?: string; +} + +/** + * GetUcdnDomainConfig - 批量获取加速域名配置 + */ +export interface GetUcdnDomainConfigResponse { + /** + * 获取的域名信息,具体参考下面DomainConfig + */ + DomainList: { + /** + * 查询带宽区域 cn代表国内 abroad代表海外 all表示全部区域 + */ + AreaCode: string; + /** + * 加速域名的业务类型,web代表网站,stream代表视频 ,download 代表下载 + */ + CdnType: string; + /** + * 创建的加速域名的当前的状态。check代表审核中,checkSuccess代表审核通过,checkFail代表审核失败,enable代表加速中,disable代表停止加速,delete代表删除加速enableing代表正在开启加速,disableing代表正在停止加速中,deleteing代表删除中 + */ + Status: string; + /** + * cdn域名。创建加速域名生成的cdn域名,用于设置CNAME记录 + */ + Cname: string; + /** + * 域名创建的时间。格式:时间戳 + */ + CreateTime: number; + /** + * 测试url。用于域名创建加速时的测试 + */ + TestUrl: string; + /** + * 国内https状态 enableing-开启中 fail-开启失败 enable-启用 disable-未启用 + */ + HttpsStatusCn: string; + /** + * 国外https状态 enableing-开启中 fail-开启失败 enable-启用 disable-未启用 + */ + HttpsStatusAbroad: string; + /** + * 国内证书名称 + */ + CertNameCn: string; + /** + * 国外证书名称 + */ + CertNameAbroad: string; + /** + * 业务组:Default + */ + Tag: string; + /** + * 域名Id + */ + DomainId?: string; + /** + * 域名 + */ + Domain?: string; + /** + * 源站配置 参考OriginConf + */ + OriginConf?: { + /** + * 源站ip即cdn服务器回源访问的ip地址。多个源站ip,可以这样表述,如:["1.1.1.1","2.2.2.2"] + */ + OriginIpList?: string[]; + /** + * 回源Http请求头部Host,默认是加速域名 + */ + OriginHost?: string; + /** + * 回源端口 + */ + OriginPort?: number; + /** + * 1如果为false表示BackupOriginIp为空,表示没有备份源站,忽略BackupOriginIp,BackupOriginHost字段2如果为true表示BackupOriginIp.n必须至少有一个备份源站地址 + */ + BackupOriginEnable?: boolean; + /** + * 备份源站ip即cdn服务器回源访问的ip地址。多个源站ip,可以这样表述,如:["1.1.1.1","2.2.2.2"] + */ + BackupOriginIpList?: string[]; + /** + * 备份回源Http请求头部Host,默认是加速域名 + */ + BackupOriginHost?: string; + /** + * 主源响应的回源错误码(如:404|500),默认空字符串 + */ + OriginErrorCode?: string; + /** + * 回主源的回源失败数,默认1 + */ + OriginErrorNum?: number; + /** + * 源站协议http,http|https 默认http + */ + OriginProtocol?: string; + /** + * 跟随301跳转 0=不跟随 1=跟随 + */ + OriginFollow301?: number; + }; + /** + * 访问控制配置 参考AccessControlConf + */ + AccessControlConf?: { + /** + * ip黑名单,多个ip,可表示为:IpBlackList.0=1.1.1.1,IpBlackList.1=2.2.2.2 + */ + IpBlackList?: string[]; + /** + * refer配置 + */ + ReferConf?: { + /** + * Refer防盗链配置 0白名单,1黑名单 + */ + ReferType?: number; + /** + * ReferType为白名单时(删除),NullRefer为0代表不允许NULL refer访问,为1代表允许Null refer访问 + */ + NullRefer?: number; + /** + * Refer防盗链规则列表,支持正则表达式 + */ + ReferList?: string[]; + }; + }; + /** + * 缓存配置 参考CacheAllConfig + */ + CacheConf?: { + /** + * 缓存Host,不同的域名可以配置为同一个CacheHost来实现缓存共享,默认为加速域名 + */ + CacheHost?: string; + /** + * 缓存配置列表,参见CacheConf + */ + CacheList?: { + /** + * 状态码模式,非200,206状态码,多个状态码用竖线(|)分隔,该属性仅仅在状态码缓存配置列表中返回 + */ + HttpCodePattern?: string; + /** + * 路径模式,支持正则 + */ + PathPattern?: string; + /** + * 缓存规则描述 + */ + Description?: string; + /** + * 缓存时间 + */ + CacheTTL?: number; + /** + * 缓存时间的单位。sec(秒),min(分钟),hour(小时),day(天)。上限1年。 + */ + CacheUnit?: string; + /** + * 是否缓存,true为缓存,flase为不缓存。为flase的情况下,CacheTTL和CacheUnit强制不生效 + */ + CacheBehavior?: boolean; + /** + * 是否优先遵循源站头部缓存策略,false为不优先遵循源站,true为优先遵循源站缓存头部。默认为0 + */ + FollowOriginRule?: boolean; + }[]; + /** + * 状态码缓存配置列表,参见CacheConf + */ + HttpCodeCacheList?: { + /** + * 状态码模式,非200,206状态码,多个状态码用竖线(|)分隔,该属性仅仅在状态码缓存配置列表中返回 + */ + HttpCodePattern?: string; + /** + * 路径模式,支持正则 + */ + PathPattern?: string; + /** + * 缓存规则描述 + */ + Description?: string; + /** + * 缓存时间 + */ + CacheTTL?: number; + /** + * 缓存时间的单位。sec(秒),min(分钟),hour(小时),day(天)。上限1年。 + */ + CacheUnit?: string; + /** + * 是否缓存,true为缓存,flase为不缓存。为flase的情况下,CacheTTL和CacheUnit强制不生效 + */ + CacheBehavior?: boolean; + /** + * 是否优先遵循源站头部缓存策略,false为不优先遵循源站,true为优先遵循源站缓存头部。默认为0 + */ + FollowOriginRule?: boolean; + }[]; + /** + * 忽略参数缓存配置列表,参见CacheKeyInfo + */ + CacheKeyList?: { + /** + * 是否忽略 + */ + Ignore?: boolean; + /** + * 路径模式,支持正则 + */ + PathPattern?: string; + /** + * 自定义变量,以$符号开头,多个变量用加号(+)连接,$querystring表示所有变量 + */ + QueryString?: string; + }[]; + }; + /** + * 高级配置 参考AdvancedConf + */ + AdvancedConf?: { + /** + * 客户端响应http头列表 + */ + HttpClientHeader?: string[]; + /** + * 源站http头列表 + */ + HttpOriginHeader?: string[]; + /** + * http转https回源 true是,false否 + */ + Http2Https?: boolean; + }; + }[]; +} + +/** + * GetUcdnDomainHitRate - 获取域名命中率 + */ +export interface GetUcdnDomainHitRateRequest { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照一分钟的粒度)默认5分钟 + */ + Type: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; + /** + * 命中类型:0=整体命中 1=边缘命中 默认是0 + */ + HitType?: number; +} + +/** + * GetUcdnDomainHitRate - 获取域名命中率 + */ +export interface GetUcdnDomainHitRateResponse { + /** + * 请求数实例表。 + */ + HitRateList?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 总流量命中率,单位% + */ + FlowHitRate?: number; + /** + * 请求数命中率,单位% + */ + RequestHitRate?: number; + }[]; +} + +/** + * GetUcdnDomainHttpCodeV2 - 获取域名状态码信息 + */ +export interface GetUcdnDomainHttpCodeV2Request { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示1分钟粒度) + */ + Type: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; + /** + * 指定获取的状态码是边缘还是上层 edge 表示边缘 layer 表示上层 + */ + Layer?: string; +} + +/** + * GetUcdnDomainHttpCodeV2 - 获取域名状态码信息 + */ +export interface GetUcdnDomainHttpCodeV2Response { + /** + * 状态码实例表。详细见HttpCodeInfoV2 + */ + HttpCodeDetail?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 1xx信息,参考HttpCodeV2Detail结构 + */ + Http1XX?: { + /** + * 时间 + */ + Time?: number; + /** + * 当前分组的总状态码数 + */ + Total?: number; + /** + * http100数量 + */ + Http100?: number; + /** + * http101数量 + */ + Http101?: number; + /** + * http102数量 + */ + Http102?: number; + /** + * http200数量 + */ + Http200?: number; + /** + * http201数量 + */ + Http201?: number; + /** + * http202数量 + */ + Http202?: number; + /** + * http203数量 + */ + Http203?: number; + /** + * http204数量 + */ + Http204?: number; + /** + * http205数量 + */ + Http205?: number; + /** + * http206数量 + */ + Http206?: number; + /** + * http207数量 + */ + Http207?: number; + /** + * http300数量 + */ + Http300?: number; + /** + * http301数量 + */ + Http301?: number; + /** + * http302数量 + */ + Http302?: number; + /** + * http303数量 + */ + Http303?: number; + /** + * http304数量 + */ + Http304?: number; + /** + * http305数量 + */ + Http305?: number; + /** + * http306数量 + */ + Http306?: number; + /** + * http307数量 + */ + Http307?: number; + /** + * http400数量 + */ + Http400?: number; + /** + * http401数量 + */ + Http401?: number; + /** + * http402数量 + */ + Http402?: number; + /** + * http403数量 + */ + Http403?: number; + /** + * http404数量 + */ + Http404?: number; + /** + * http405数量 + */ + Http405?: number; + /** + * http406数量 + */ + Http406?: number; + /** + * http407数量 + */ + Http407?: number; + /** + * http408数量 + */ + Http408?: number; + /** + * http409数量 + */ + Http409?: number; + /** + * http410数量 + */ + Http410?: number; + /** + * http411数量 + */ + Http411?: number; + /** + * http412数量 + */ + Http412?: number; + /** + * http413数量 + */ + Http413?: number; + /** + * http414数量 + */ + Http414?: number; + /** + * http415数量 + */ + Http415?: number; + /** + * http416数量 + */ + Http416?: number; + /** + * http417数量 + */ + Http417?: number; + /** + * http418数量 + */ + Http418?: number; + /** + * http421数量 + */ + Http421?: number; + /** + * http422数量 + */ + Http422?: number; + /** + * http423数量 + */ + Http423?: number; + /** + * http424数量 + */ + Http424?: number; + /** + * http425数量 + */ + Http425?: number; + /** + * http426数量 + */ + Http426?: number; + /** + * http449数量 + */ + Http449?: number; + /** + * http451数量 + */ + Http451?: number; + /** + * http500数量 + */ + Http500?: number; + /** + * http501数量 + */ + Http501?: number; + /** + * http502数量 + */ + Http502?: number; + /** + * http503数量 + */ + Http503?: number; + /** + * http504数量 + */ + Http504?: number; + /** + * http505数量 + */ + Http505?: number; + /** + * http506数量 + */ + Http506?: number; + /** + * http507数量 + */ + Http507?: number; + /** + * http509数量 + */ + Http509?: number; + /** + * http510数量 + */ + Http510?: number; + }; + /** + * 2xx信息,参考HttpCodeV2Detail结构 + */ + Http2XX?: { + /** + * 时间 + */ + Time?: number; + /** + * 当前分组的总状态码数 + */ + Total?: number; + /** + * http100数量 + */ + Http100?: number; + /** + * http101数量 + */ + Http101?: number; + /** + * http102数量 + */ + Http102?: number; + /** + * http200数量 + */ + Http200?: number; + /** + * http201数量 + */ + Http201?: number; + /** + * http202数量 + */ + Http202?: number; + /** + * http203数量 + */ + Http203?: number; + /** + * http204数量 + */ + Http204?: number; + /** + * http205数量 + */ + Http205?: number; + /** + * http206数量 + */ + Http206?: number; + /** + * http207数量 + */ + Http207?: number; + /** + * http300数量 + */ + Http300?: number; + /** + * http301数量 + */ + Http301?: number; + /** + * http302数量 + */ + Http302?: number; + /** + * http303数量 + */ + Http303?: number; + /** + * http304数量 + */ + Http304?: number; + /** + * http305数量 + */ + Http305?: number; + /** + * http306数量 + */ + Http306?: number; + /** + * http307数量 + */ + Http307?: number; + /** + * http400数量 + */ + Http400?: number; + /** + * http401数量 + */ + Http401?: number; + /** + * http402数量 + */ + Http402?: number; + /** + * http403数量 + */ + Http403?: number; + /** + * http404数量 + */ + Http404?: number; + /** + * http405数量 + */ + Http405?: number; + /** + * http406数量 + */ + Http406?: number; + /** + * http407数量 + */ + Http407?: number; + /** + * http408数量 + */ + Http408?: number; + /** + * http409数量 + */ + Http409?: number; + /** + * http410数量 + */ + Http410?: number; + /** + * http411数量 + */ + Http411?: number; + /** + * http412数量 + */ + Http412?: number; + /** + * http413数量 + */ + Http413?: number; + /** + * http414数量 + */ + Http414?: number; + /** + * http415数量 + */ + Http415?: number; + /** + * http416数量 + */ + Http416?: number; + /** + * http417数量 + */ + Http417?: number; + /** + * http418数量 + */ + Http418?: number; + /** + * http421数量 + */ + Http421?: number; + /** + * http422数量 + */ + Http422?: number; + /** + * http423数量 + */ + Http423?: number; + /** + * http424数量 + */ + Http424?: number; + /** + * http425数量 + */ + Http425?: number; + /** + * http426数量 + */ + Http426?: number; + /** + * http449数量 + */ + Http449?: number; + /** + * http451数量 + */ + Http451?: number; + /** + * http500数量 + */ + Http500?: number; + /** + * http501数量 + */ + Http501?: number; + /** + * http502数量 + */ + Http502?: number; + /** + * http503数量 + */ + Http503?: number; + /** + * http504数量 + */ + Http504?: number; + /** + * http505数量 + */ + Http505?: number; + /** + * http506数量 + */ + Http506?: number; + /** + * http507数量 + */ + Http507?: number; + /** + * http509数量 + */ + Http509?: number; + /** + * http510数量 + */ + Http510?: number; + }; + /** + * 3xx信息,参考HttpCodeV2Detail结构 + */ + Http3XX?: { + /** + * 时间 + */ + Time?: number; + /** + * 当前分组的总状态码数 + */ + Total?: number; + /** + * http100数量 + */ + Http100?: number; + /** + * http101数量 + */ + Http101?: number; + /** + * http102数量 + */ + Http102?: number; + /** + * http200数量 + */ + Http200?: number; + /** + * http201数量 + */ + Http201?: number; + /** + * http202数量 + */ + Http202?: number; + /** + * http203数量 + */ + Http203?: number; + /** + * http204数量 + */ + Http204?: number; + /** + * http205数量 + */ + Http205?: number; + /** + * http206数量 + */ + Http206?: number; + /** + * http207数量 + */ + Http207?: number; + /** + * http300数量 + */ + Http300?: number; + /** + * http301数量 + */ + Http301?: number; + /** + * http302数量 + */ + Http302?: number; + /** + * http303数量 + */ + Http303?: number; + /** + * http304数量 + */ + Http304?: number; + /** + * http305数量 + */ + Http305?: number; + /** + * http306数量 + */ + Http306?: number; + /** + * http307数量 + */ + Http307?: number; + /** + * http400数量 + */ + Http400?: number; + /** + * http401数量 + */ + Http401?: number; + /** + * http402数量 + */ + Http402?: number; + /** + * http403数量 + */ + Http403?: number; + /** + * http404数量 + */ + Http404?: number; + /** + * http405数量 + */ + Http405?: number; + /** + * http406数量 + */ + Http406?: number; + /** + * http407数量 + */ + Http407?: number; + /** + * http408数量 + */ + Http408?: number; + /** + * http409数量 + */ + Http409?: number; + /** + * http410数量 + */ + Http410?: number; + /** + * http411数量 + */ + Http411?: number; + /** + * http412数量 + */ + Http412?: number; + /** + * http413数量 + */ + Http413?: number; + /** + * http414数量 + */ + Http414?: number; + /** + * http415数量 + */ + Http415?: number; + /** + * http416数量 + */ + Http416?: number; + /** + * http417数量 + */ + Http417?: number; + /** + * http418数量 + */ + Http418?: number; + /** + * http421数量 + */ + Http421?: number; + /** + * http422数量 + */ + Http422?: number; + /** + * http423数量 + */ + Http423?: number; + /** + * http424数量 + */ + Http424?: number; + /** + * http425数量 + */ + Http425?: number; + /** + * http426数量 + */ + Http426?: number; + /** + * http449数量 + */ + Http449?: number; + /** + * http451数量 + */ + Http451?: number; + /** + * http500数量 + */ + Http500?: number; + /** + * http501数量 + */ + Http501?: number; + /** + * http502数量 + */ + Http502?: number; + /** + * http503数量 + */ + Http503?: number; + /** + * http504数量 + */ + Http504?: number; + /** + * http505数量 + */ + Http505?: number; + /** + * http506数量 + */ + Http506?: number; + /** + * http507数量 + */ + Http507?: number; + /** + * http509数量 + */ + Http509?: number; + /** + * http510数量 + */ + Http510?: number; + }; + /** + * 4xx信息,参考HttpCodeV2Detail结构 + */ + Http4XX?: { + /** + * 时间 + */ + Time?: number; + /** + * 当前分组的总状态码数 + */ + Total?: number; + /** + * http100数量 + */ + Http100?: number; + /** + * http101数量 + */ + Http101?: number; + /** + * http102数量 + */ + Http102?: number; + /** + * http200数量 + */ + Http200?: number; + /** + * http201数量 + */ + Http201?: number; + /** + * http202数量 + */ + Http202?: number; + /** + * http203数量 + */ + Http203?: number; + /** + * http204数量 + */ + Http204?: number; + /** + * http205数量 + */ + Http205?: number; + /** + * http206数量 + */ + Http206?: number; + /** + * http207数量 + */ + Http207?: number; + /** + * http300数量 + */ + Http300?: number; + /** + * http301数量 + */ + Http301?: number; + /** + * http302数量 + */ + Http302?: number; + /** + * http303数量 + */ + Http303?: number; + /** + * http304数量 + */ + Http304?: number; + /** + * http305数量 + */ + Http305?: number; + /** + * http306数量 + */ + Http306?: number; + /** + * http307数量 + */ + Http307?: number; + /** + * http400数量 + */ + Http400?: number; + /** + * http401数量 + */ + Http401?: number; + /** + * http402数量 + */ + Http402?: number; + /** + * http403数量 + */ + Http403?: number; + /** + * http404数量 + */ + Http404?: number; + /** + * http405数量 + */ + Http405?: number; + /** + * http406数量 + */ + Http406?: number; + /** + * http407数量 + */ + Http407?: number; + /** + * http408数量 + */ + Http408?: number; + /** + * http409数量 + */ + Http409?: number; + /** + * http410数量 + */ + Http410?: number; + /** + * http411数量 + */ + Http411?: number; + /** + * http412数量 + */ + Http412?: number; + /** + * http413数量 + */ + Http413?: number; + /** + * http414数量 + */ + Http414?: number; + /** + * http415数量 + */ + Http415?: number; + /** + * http416数量 + */ + Http416?: number; + /** + * http417数量 + */ + Http417?: number; + /** + * http418数量 + */ + Http418?: number; + /** + * http421数量 + */ + Http421?: number; + /** + * http422数量 + */ + Http422?: number; + /** + * http423数量 + */ + Http423?: number; + /** + * http424数量 + */ + Http424?: number; + /** + * http425数量 + */ + Http425?: number; + /** + * http426数量 + */ + Http426?: number; + /** + * http449数量 + */ + Http449?: number; + /** + * http451数量 + */ + Http451?: number; + /** + * http500数量 + */ + Http500?: number; + /** + * http501数量 + */ + Http501?: number; + /** + * http502数量 + */ + Http502?: number; + /** + * http503数量 + */ + Http503?: number; + /** + * http504数量 + */ + Http504?: number; + /** + * http505数量 + */ + Http505?: number; + /** + * http506数量 + */ + Http506?: number; + /** + * http507数量 + */ + Http507?: number; + /** + * http509数量 + */ + Http509?: number; + /** + * http510数量 + */ + Http510?: number; + }; + /** + * 5xx信息,参考HttpCodeV2Detail结构 + */ + Http5XX?: { + /** + * 时间 + */ + Time?: number; + /** + * 当前分组的总状态码数 + */ + Total?: number; + /** + * http100数量 + */ + Http100?: number; + /** + * http101数量 + */ + Http101?: number; + /** + * http102数量 + */ + Http102?: number; + /** + * http200数量 + */ + Http200?: number; + /** + * http201数量 + */ + Http201?: number; + /** + * http202数量 + */ + Http202?: number; + /** + * http203数量 + */ + Http203?: number; + /** + * http204数量 + */ + Http204?: number; + /** + * http205数量 + */ + Http205?: number; + /** + * http206数量 + */ + Http206?: number; + /** + * http207数量 + */ + Http207?: number; + /** + * http300数量 + */ + Http300?: number; + /** + * http301数量 + */ + Http301?: number; + /** + * http302数量 + */ + Http302?: number; + /** + * http303数量 + */ + Http303?: number; + /** + * http304数量 + */ + Http304?: number; + /** + * http305数量 + */ + Http305?: number; + /** + * http306数量 + */ + Http306?: number; + /** + * http307数量 + */ + Http307?: number; + /** + * http400数量 + */ + Http400?: number; + /** + * http401数量 + */ + Http401?: number; + /** + * http402数量 + */ + Http402?: number; + /** + * http403数量 + */ + Http403?: number; + /** + * http404数量 + */ + Http404?: number; + /** + * http405数量 + */ + Http405?: number; + /** + * http406数量 + */ + Http406?: number; + /** + * http407数量 + */ + Http407?: number; + /** + * http408数量 + */ + Http408?: number; + /** + * http409数量 + */ + Http409?: number; + /** + * http410数量 + */ + Http410?: number; + /** + * http411数量 + */ + Http411?: number; + /** + * http412数量 + */ + Http412?: number; + /** + * http413数量 + */ + Http413?: number; + /** + * http414数量 + */ + Http414?: number; + /** + * http415数量 + */ + Http415?: number; + /** + * http416数量 + */ + Http416?: number; + /** + * http417数量 + */ + Http417?: number; + /** + * http418数量 + */ + Http418?: number; + /** + * http421数量 + */ + Http421?: number; + /** + * http422数量 + */ + Http422?: number; + /** + * http423数量 + */ + Http423?: number; + /** + * http424数量 + */ + Http424?: number; + /** + * http425数量 + */ + Http425?: number; + /** + * http426数量 + */ + Http426?: number; + /** + * http449数量 + */ + Http449?: number; + /** + * http451数量 + */ + Http451?: number; + /** + * http500数量 + */ + Http500?: number; + /** + * http501数量 + */ + Http501?: number; + /** + * http502数量 + */ + Http502?: number; + /** + * http503数量 + */ + Http503?: number; + /** + * http504数量 + */ + Http504?: number; + /** + * http505数量 + */ + Http505?: number; + /** + * http506数量 + */ + Http506?: number; + /** + * http507数量 + */ + Http507?: number; + /** + * http509数量 + */ + Http509?: number; + /** + * http510数量 + */ + Http510?: number; + }; + /** + * 6xx信息,参考HttpCodeV2Detail结构 + */ + Http6XX?: { + /** + * 时间 + */ + Time?: number; + /** + * 当前分组的总状态码数 + */ + Total?: number; + /** + * http100数量 + */ + Http100?: number; + /** + * http101数量 + */ + Http101?: number; + /** + * http102数量 + */ + Http102?: number; + /** + * http200数量 + */ + Http200?: number; + /** + * http201数量 + */ + Http201?: number; + /** + * http202数量 + */ + Http202?: number; + /** + * http203数量 + */ + Http203?: number; + /** + * http204数量 + */ + Http204?: number; + /** + * http205数量 + */ + Http205?: number; + /** + * http206数量 + */ + Http206?: number; + /** + * http207数量 + */ + Http207?: number; + /** + * http300数量 + */ + Http300?: number; + /** + * http301数量 + */ + Http301?: number; + /** + * http302数量 + */ + Http302?: number; + /** + * http303数量 + */ + Http303?: number; + /** + * http304数量 + */ + Http304?: number; + /** + * http305数量 + */ + Http305?: number; + /** + * http306数量 + */ + Http306?: number; + /** + * http307数量 + */ + Http307?: number; + /** + * http400数量 + */ + Http400?: number; + /** + * http401数量 + */ + Http401?: number; + /** + * http402数量 + */ + Http402?: number; + /** + * http403数量 + */ + Http403?: number; + /** + * http404数量 + */ + Http404?: number; + /** + * http405数量 + */ + Http405?: number; + /** + * http406数量 + */ + Http406?: number; + /** + * http407数量 + */ + Http407?: number; + /** + * http408数量 + */ + Http408?: number; + /** + * http409数量 + */ + Http409?: number; + /** + * http410数量 + */ + Http410?: number; + /** + * http411数量 + */ + Http411?: number; + /** + * http412数量 + */ + Http412?: number; + /** + * http413数量 + */ + Http413?: number; + /** + * http414数量 + */ + Http414?: number; + /** + * http415数量 + */ + Http415?: number; + /** + * http416数量 + */ + Http416?: number; + /** + * http417数量 + */ + Http417?: number; + /** + * http418数量 + */ + Http418?: number; + /** + * http421数量 + */ + Http421?: number; + /** + * http422数量 + */ + Http422?: number; + /** + * http423数量 + */ + Http423?: number; + /** + * http424数量 + */ + Http424?: number; + /** + * http425数量 + */ + Http425?: number; + /** + * http426数量 + */ + Http426?: number; + /** + * http449数量 + */ + Http449?: number; + /** + * http451数量 + */ + Http451?: number; + /** + * http500数量 + */ + Http500?: number; + /** + * http501数量 + */ + Http501?: number; + /** + * http502数量 + */ + Http502?: number; + /** + * http503数量 + */ + Http503?: number; + /** + * http504数量 + */ + Http504?: number; + /** + * http505数量 + */ + Http505?: number; + /** + * http506数量 + */ + Http506?: number; + /** + * http507数量 + */ + Http507?: number; + /** + * http509数量 + */ + Http509?: number; + /** + * http510数量 + */ + Http510?: number; + }; + }[]; +} + +/** + * GetUcdnDomainInfoList - 获取域名基本信息 + */ +export interface GetUcdnDomainInfoListRequest { + /** + * 分页的大小,不填默认每页20个 + */ + PageSize?: number; + /** + * 返回第几页,不填默认是第1页 + */ + PageIndex?: number; +} + +/** + * GetUcdnDomainInfoList - 获取域名基本信息 + */ +export interface GetUcdnDomainInfoListResponse { + /** + * 账户下域名总个数 + */ + TotalCount: number; + /** + * 域名基本信息 + */ + DomainInfoList: { + /** + * 域名 + */ + Domain: string; + /** + * 域名的资源id + */ + DomainId: string; + }[]; +} + +/** + * GetUcdnDomainLog - 获取加速域名原始日志 + */ +export interface GetUcdnDomainLogRequest { + /** + * 域名ID,创建加速域名时生成。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; + /** + * 查询粒度 0=default(没有粒度) 1=按小时 2=按天 + */ + Type?: number; +} + +/** + * GetUcdnDomainLog - 获取加速域名原始日志 + */ +export interface GetUcdnDomainLogResponse { + /** + * 获取日志的连接地址。具体参考下面LogSetList + */ + LogSet?: { + /** + * 域名 + */ + Domain?: string; + /** + * 域名信息列表,参考LogSetInfo + */ + Logs?: { + /** + * 日志时间UnixTime + */ + Time?: number; + /** + * 国内日志url列表 + */ + CnLog?: string[]; + /** + * 国外日志url列表 + */ + AbroadLog?: string[]; + }[]; + }[]; +} + +/** + * GetUcdnDomainOriginRequestNum - 获取域名回源请求数 + */ +export interface GetUcdnDomainOriginRequestNumRequest { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟) + */ + Type: number; + /** + * 查询的起始时间,格式为Unix Timestamp + */ + BeginTime: number; + /** + * 查询的结束时间,格式为Unix Timestamp + */ + EndTime: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; +} + +/** + * GetUcdnDomainOriginRequestNum - 获取域名回源请求数 + */ +export interface GetUcdnDomainOriginRequestNumResponse { + /** + * 请求数实例表。 + */ + RequestList?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 返回值返回指定时间区间内的cdn收到的请求次数之和 + */ + CdnRequest?: number; + }[]; +} + +/** + * GetUcdnDomainPrefetchEnable - 获取域名预取开启状态 + */ +export interface GetUcdnDomainPrefetchEnableRequest { + /** + * 域名ID,创建加速域名时生成。 + */ + DomainId: string; +} + +/** + * GetUcdnDomainPrefetchEnable - 获取域名预取开启状态 + */ +export interface GetUcdnDomainPrefetchEnableResponse { + /** + * 0表示该域名未开启预取,1表示该域名已开启预取 + */ + Enable?: number; +} + +/** + * GetUcdnDomainRequestNumV2 - 获取域名请求数 + */ +export interface GetUcdnDomainRequestNumV2Request { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟) + */ + Type: number; + /** + * 查询的起始时间,格式为Unix Timestamp + */ + BeginTime: number; + /** + * 查询的结束时间,格式为Unix Timestamp + */ + EndTime: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; +} + +/** + * GetUcdnDomainRequestNumV2 - 获取域名请求数 + */ +export interface GetUcdnDomainRequestNumV2Response { + /** + * 请求数实例表。 + */ + RequestList?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 返回值返回指定时间区间内的cdn收到的请求次数之和 + */ + CdnRequest?: number; + /** + * 返回值返回指定时间区间内的cdn回源的请求次数之和 + */ + OriginRequest?: number; + }[]; +} + +/** + * GetUcdnDomainRequestNumV3 - 获取域名请求数 + */ +export interface GetUcdnDomainRequestNumV3Request { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟) + */ + Type: number; + /** + * 查询的起始时间,格式为Unix Timestamp + */ + BeginTime: number; + /** + * 查询的结束时间,格式为Unix Timestamp + */ + EndTime: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; + /** + * 协议,http、https 不传则查所有协议的带宽 + */ + Protocol?: string; +} + +/** + * GetUcdnDomainRequestNumV3 - 获取域名请求数 + */ +export interface GetUcdnDomainRequestNumV3Response { + /** + * 请求数实例表。 + */ + RequestList?: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 返回值返回指定时间区间内的cdn收到的请求次数之和 + */ + CdnRequest?: number; + }[]; +} + +/** + * GetUcdnDomainTraffic - 获取加速域名流量使用信息 + */ +export interface GetUcdnDomainTrafficRequest { + /** + * 指定按项目查询,还是按整个账户查询 取值 top 表示按整个账户查询,取值org表示按项目查询 + */ + AccountType?: string; + /** + * 域名ID,创建加速域名时生成,n从自然数0开始。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询流量区域 cn代表国内 abroad代表海外,默认全部区域 + */ + Areacode?: string; + /** + * 查询的起始日期,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值 + */ + BeginTime?: number; + /** + * 查询的结束日期,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天 + */ + EndTime?: number; +} + +/** + * GetUcdnDomainTraffic - 获取加速域名流量使用信息 + */ +export interface GetUcdnDomainTrafficResponse { + /** + * 流量实例表,具体结构见 UcdnDomainTrafficSet + */ + TrafficSet?: { + /** + * 流量获取的时间点,格式为Unix Timestamp + */ + Time?: number; + /** + * 查询每日流量总值,单位:GB + */ + Value?: number; + }[]; +} + +/** + * GetUcdnPassBandwidth - 获取回源带宽数据(cdn回客户源站部分) + */ +export interface GetUcdnPassBandwidthRequest { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度) + */ + Type: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; +} + +/** + * GetUcdnPassBandwidth - 获取回源带宽数据(cdn回客户源站部分) + */ +export interface GetUcdnPassBandwidthResponse { + /** + * 回源带宽数据 + */ + BandwidthDetail?: { + /** + * 宽获取的时间点。格式:时间戳 + */ + Time: number; + /** + * 返回值带宽值数据。 + */ + Bandwidth: number; + }[]; +} + +/** + * GetUcdnPassBandwidthV2 - 获取回源带宽数据(cdn回客户源站部分) + */ +export interface GetUcdnPassBandwidthV2Request { + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照1分钟粒度) + */ + Type: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + */ + Areacode?: string; + /** + * 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + */ + BeginTime?: number; + /** + * 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + */ + EndTime?: number; +} + +/** + * GetUcdnPassBandwidthV2 - 获取回源带宽数据(cdn回客户源站部分) + */ +export interface GetUcdnPassBandwidthV2Response { + /** + * 回源带宽数据 + */ + BandwidthList?: { + /** + * 宽获取的时间点。格式:时间戳 + */ + Time: number; + /** + * 返回值带宽值数据。 + */ + Bandwidth: number; + }[]; +} + +/** + * GetUcdnProIspBandwidthV2 - 按省份运营商获取域名带宽数据 + */ +export interface GetUcdnProIspBandwidthV2Request { + /** + * 查询的起始日期,格式为Unix Timestamp + */ + BeginTime: number; + /** + * 查询的结束日期,格式为Unix Timestamp + */ + EndTime: number; + /** + * 时间粒度0 (按5分钟粒度)1 (按小时粒度)2(按天粒度)3(按分钟粒度) + */ + Type: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 省份代码,可以传多个,不传则查询所有省份 + */ + Province?: string[]; + /** + * 运营商代码,一次只能查询一个运营商,不传递默认取所有运营商 + */ + Isp?: string; +} + +/** + * GetUcdnProIspBandwidthV2 - 按省份运营商获取域名带宽数据 + */ +export interface GetUcdnProIspBandwidthV2Response { + /** + * 按省份的带宽流量实例表。具体参考下面BandwidthSet + */ + BandwidthSet: { + /** + * 省份代码 + */ + Province: string; + /** + * 省份带宽流量实例表 + */ + BandwidthTrafficList: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps + */ + CdnBandwidth?: number; + /** + * 对应时间粒度的流量,单位字节 + */ + Traffic?: number; + }[]; + }[]; +} + +/** + * GetUcdnProIspRequestNumV2 - 按省份运营商获取域名请求数 + */ +export interface GetUcdnProIspRequestNumV2Request { + /** + * 查询的起始日期,格式为Unix Timestamp 忽略时间部分 + */ + BeginTime: number; + /** + * 查询的结束日期,格式为Unix Timestamp 忽略时间部分 + */ + EndTime: number; + /** + * 域名id,创建域名时生成的id。默认全部域名 + */ + DomainId?: string[]; + /** + * 省份代码,可以传多个,不传则查询所有省份 + */ + Province?: string[]; + /** + * 运营商代码,一次只能查询一个运营商,不传递默认取所有运营商 + */ + Isp?: string; + /** + * 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天粒度,3表示按照一分钟粒度) + */ + Type?: number; +} + +/** + * GetUcdnProIspRequestNumV2 - 按省份运营商获取域名请求数 + */ +export interface GetUcdnProIspRequestNumV2Response { + /** + * 按省份的请求数实例表。具体参考下面RequestList + */ + RequestNumSet: { + /** + * 省份代码 + */ + Province: string; + /** + * 省份请求数实例表 ProIspRequestListV2 + */ + RequestList: { + /** + * 带宽获取的时间点。格式:时间戳 + */ + Time?: number; + /** + * 返回值返回指定时间区间内的请求数 + */ + CdnRequest?: number; + }[]; + }[]; +} + +/** + * GetUcdnTraffic - 获取流量信息 + */ +export interface GetUcdnTrafficRequest {} + +/** + * GetUcdnTraffic - 获取流量信息 + */ +export interface GetUcdnTrafficResponse { + /** + * 用户不同区域的流量信息, 具体结构参见TrafficSet部分 + */ + TrafficSet?: { + /** + * 购买流量的区域, cn: 国内; abroad: 国外 + */ + Areacode?: string; + /** + * Areacode区域内总购买流量, 单位GB + */ + TrafficTotal?: number; + /** + * Areacode区域内总剩余流量, 单位GB + */ + TrafficLeft?: number; + /** + * Areacode区域内总使用流量, 单位GB + */ + TrafficUsed?: number; + }[]; +} + +/** + * GetUcdnTrafficV2 - 获取流量信息 + */ +export interface GetUcdnTrafficV2Request {} + +/** + * GetUcdnTrafficV2 - 获取流量信息 + */ +export interface GetUcdnTrafficV2Response { + /** + * 用户不同区域的流量信息, 具体结构参见TrafficSet部分 + */ + TrafficSet?: { + /** + * 购买流量的区域, cn: 国内; abroad: 国外 + */ + Areacode?: string; + /** + * Areacode区域内总购买流量, 单位GB + */ + TrafficTotal?: number; + /** + * Areacode区域内总剩余流量, 单位GB + */ + TrafficLeft?: number; + /** + * Areacode区域内总使用流量, 单位GB + */ + TrafficUsed?: number; + }[]; +} + +/** + * PrefetchNewUcdnDomainCache - 提交预取任务 + */ +export interface PrefetchNewUcdnDomainCacheRequest { + /** + * 预热URL列表,n从自然数0开始。UrlList.n字段必须以”http://域名/”开始。如刷新文件目录a下面img.png文件, 格式为http://abc.ucloud.cn/a/img.png。请正确提交需要刷新的域名 + */ + UrlList: string[]; +} + +/** + * PrefetchNewUcdnDomainCache - 提交预取任务 + */ +export interface PrefetchNewUcdnDomainCacheResponse { + /** + * 本次提交url对应的任务id + */ + TaskId?: string; +} + +/** + * RefreshNewUcdnDomainCache - 刷新缓存 + */ +export interface RefreshNewUcdnDomainCacheRequest { + /** + * 刷新类型,file代表文件刷新,dir 代表路径刷新 + */ + Type: string; + /** + * 刷新多个URL列表时,一次最多提交30个。必须以”http://域名/”开始。目录要以”/”结尾, 如刷新目录a下所有文件,格式为:http://abc.ucloud.cn/a/;如刷新文件目录a下面img.png文件, 格式为http://abc.ucloud.cn/a/img.png。请正确提交需要刷新的域名 + */ + UrlList: string[]; +} + +/** + * RefreshNewUcdnDomainCache - 刷新缓存 + */ +export interface RefreshNewUcdnDomainCacheResponse { + /** + * 本次提交url对应的任务id + */ + TaskId?: string; +} + +/** + * SwitchUcdnChargeType - 切换账号计费方式 + */ +export interface SwitchUcdnChargeTypeRequest { + /** + * 计费方式。traffic代表按流量包计费,bandwidth按带宽付费 + */ + ChargeType: string; +} + +/** + * SwitchUcdnChargeType - 切换账号计费方式 + */ +export interface SwitchUcdnChargeTypeResponse {} diff --git a/src/services/udb/index.ts b/src/services/udb/index.ts new file mode 100644 index 0000000..f5a5897 --- /dev/null +++ b/src/services/udb/index.ts @@ -0,0 +1,3372 @@ +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 **udb** service + */ +export default class UDBClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * BackupUDBInstance - 备份UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/backup_udb_instance + */ + backupUDBInstance( + request?: BackupUDBInstanceRequest + ): Promise { + const args = { Action: 'BackupUDBInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as BackupUDBInstanceResponse + ); + } + + /** + * BackupUDBInstanceBinlog - 备份UDB指定时间段的binlog列表 + * + * See also: https://docs.ucloud.cn/api/udb-api/backup_udb_instance_binlog + */ + backupUDBInstanceBinlog( + request?: BackupUDBInstanceBinlogRequest + ): Promise { + const args = { Action: 'BackupUDBInstanceBinlog', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as BackupUDBInstanceBinlogResponse + ); + } + + /** + * BackupUDBInstanceErrorLog - 备份UDB指定时间段的errorlog + * + * See also: https://docs.ucloud.cn/api/udb-api/backup_udb_instance_error_log + */ + backupUDBInstanceErrorLog( + request?: BackupUDBInstanceErrorLogRequest + ): Promise { + const args = { Action: 'BackupUDBInstanceErrorLog', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as BackupUDBInstanceErrorLogResponse + ); + } + + /** + * BackupUDBInstanceSlowLog - 备份UDB指定时间段的slowlog分析结果 + * + * See also: https://docs.ucloud.cn/api/udb-api/backup_udb_instance_slow_log + */ + backupUDBInstanceSlowLog( + request?: BackupUDBInstanceSlowLogRequest + ): Promise { + const args = { Action: 'BackupUDBInstanceSlowLog', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as BackupUDBInstanceSlowLogResponse + ); + } + + /** + * ChangeUDBParamGroup - 修改配置文件 + * + * See also: https://docs.ucloud.cn/api/udb-api/change_udb_param_group + */ + changeUDBParamGroup( + request?: ChangeUDBParamGroupRequest + ): Promise { + const args = { Action: 'ChangeUDBParamGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ChangeUDBParamGroupResponse + ); + } + + /** + * CheckRecoverUDBInstance - 核查db是否可以使用回档功能 + * + * See also: https://docs.ucloud.cn/api/udb-api/check_recover_udb_instance + */ + checkRecoverUDBInstance( + request?: CheckRecoverUDBInstanceRequest + ): Promise { + const args = { Action: 'CheckRecoverUDBInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CheckRecoverUDBInstanceResponse + ); + } + + /** + * CheckUDBInstanceToHAAllowance - 核查db是否可以升级为高可用 + * + * See also: https://docs.ucloud.cn/api/udb-api/check_udb_instance_to_ha_allowance + */ + checkUDBInstanceToHAAllowance( + request?: CheckUDBInstanceToHAAllowanceRequest + ): Promise { + const args = { + Action: 'CheckUDBInstanceToHAAllowance', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CheckUDBInstanceToHAAllowanceResponse + ); + } + + /** + * ClearUDBLog - 清除UDB实例的log + * + * See also: https://docs.ucloud.cn/api/udb-api/clear_udb_log + */ + clearUDBLog(request?: ClearUDBLogRequest): Promise { + const args = { Action: 'ClearUDBLog', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ClearUDBLogResponse + ); + } + + /** + * CreateMongoDBReplicaSet - 一键创建DB副本集 + * + * See also: https://docs.ucloud.cn/api/udb-api/create_mongo_db_replica_set + */ + createMongoDBReplicaSet( + request?: CreateMongoDBReplicaSetRequest + ): Promise { + const args = { Action: 'CreateMongoDBReplicaSet', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateMongoDBReplicaSetResponse + ); + } + + /** + * CreateUDBInstance - 创建UDB实例(包括创建mysql master节点、mongodb primary/configsvr节点和从备份恢复实例) + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_instance + */ + createUDBInstance( + request?: CreateUDBInstanceRequest + ): Promise { + const args = { Action: 'CreateUDBInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUDBInstanceResponse + ); + } + + /** + * CreateUDBInstanceByRecovery - 创建db,将新创建的db恢复到指定db某个指定时间点 + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_instance_by_recovery + */ + createUDBInstanceByRecovery( + request?: CreateUDBInstanceByRecoveryRequest + ): Promise { + const args = { Action: 'CreateUDBInstanceByRecovery', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUDBInstanceByRecoveryResponse + ); + } + + /** + * CreateUDBParamGroup - 从已有配置文件创建新配置文件 + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_param_group + */ + createUDBParamGroup( + request?: CreateUDBParamGroupRequest + ): Promise { + const args = { Action: 'CreateUDBParamGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUDBParamGroupResponse + ); + } + + /** + * CreateUDBReplicationInstance - 创建MongoDB的副本节点(包括仲裁) + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_replication_instance + */ + createUDBReplicationInstance( + request?: CreateUDBReplicationInstanceRequest + ): Promise { + const args = { Action: 'CreateUDBReplicationInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUDBReplicationInstanceResponse + ); + } + + /** + * CreateUDBRouteInstance - 创建mongos实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_route_instance + */ + createUDBRouteInstance( + request?: CreateUDBRouteInstanceRequest + ): Promise { + const args = { Action: 'CreateUDBRouteInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUDBRouteInstanceResponse + ); + } + + /** + * CreateUDBSlave - 创建UDB实例的slave + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_slave + */ + createUDBSlave( + request?: CreateUDBSlaveRequest + ): Promise { + const args = { Action: 'CreateUDBSlave', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUDBSlaveResponse + ); + } + + /** + * DeleteUDBInstance - 删除UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/delete_udb_instance + */ + deleteUDBInstance( + request?: DeleteUDBInstanceRequest + ): Promise { + const args = { Action: 'DeleteUDBInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUDBInstanceResponse + ); + } + + /** + * DeleteUDBLogPackage - 删除UDB日志包 + * + * See also: https://docs.ucloud.cn/api/udb-api/delete_udb_log_package + */ + deleteUDBLogPackage( + request?: DeleteUDBLogPackageRequest + ): Promise { + const args = { Action: 'DeleteUDBLogPackage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUDBLogPackageResponse + ); + } + + /** + * DeleteUDBParamGroup - 删除配置参数组 + * + * See also: https://docs.ucloud.cn/api/udb-api/delete_udb_param_group + */ + deleteUDBParamGroup( + request?: DeleteUDBParamGroupRequest + ): Promise { + const args = { Action: 'DeleteUDBParamGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUDBParamGroupResponse + ); + } + + /** + * DescribeUDBBackup - 列表UDB实例备份信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_backup + */ + describeUDBBackup( + request?: DescribeUDBBackupRequest + ): Promise { + const args = { Action: 'DescribeUDBBackup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDBBackupResponse + ); + } + + /** + * DescribeUDBBackupBlacklist - 获取UDB实例的备份黑名单 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_backup_blacklist + */ + describeUDBBackupBlacklist( + request?: DescribeUDBBackupBlacklistRequest + ): Promise { + const args = { Action: 'DescribeUDBBackupBlacklist', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDBBackupBlacklistResponse + ); + } + + /** + * DescribeUDBBinlogBackupURL - 获取UDB的Binlog备份地址 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_binlog_backup_url + */ + describeUDBBinlogBackupURL( + request?: DescribeUDBBinlogBackupURLRequest + ): Promise { + const args = { Action: 'DescribeUDBBinlogBackupURL', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDBBinlogBackupURLResponse + ); + } + + /** + * DescribeUDBInstance - 获取UDB实例信息,支持两类操作:(1)指定DBId用于获取该db的信息;(2)指定ClassType、Offset、Limit用于列表操作,查询某一个类型db。 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance + */ + describeUDBInstance( + request?: DescribeUDBInstanceRequest + ): Promise { + const args = { Action: 'DescribeUDBInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDBInstanceResponse + ); + } + + /** + * DescribeUDBInstanceBackupState - 获取UDB实例备份状态 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_backup_state + */ + describeUDBInstanceBackupState( + request?: DescribeUDBInstanceBackupStateRequest + ): Promise { + const args = { + Action: 'DescribeUDBInstanceBackupState', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDBInstanceBackupStateResponse + ); + } + + /** + * DescribeUDBInstanceBackupURL - 获取UDB备份下载地址 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_backup_url + */ + describeUDBInstanceBackupURL( + request?: DescribeUDBInstanceBackupURLRequest + ): Promise { + const args = { Action: 'DescribeUDBInstanceBackupURL', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDBInstanceBackupURLResponse + ); + } + + /** + * DescribeUDBInstanceBinlog - 获取UDB指定时间段的binlog列表 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_binlog + */ + describeUDBInstanceBinlog( + request?: DescribeUDBInstanceBinlogRequest + ): Promise { + const args = { Action: 'DescribeUDBInstanceBinlog', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDBInstanceBinlogResponse + ); + } + + /** + * DescribeUDBInstanceBinlogBackupState - 获取udb实例备份状态 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_binlog_backup_state + */ + describeUDBInstanceBinlogBackupState( + request?: DescribeUDBInstanceBinlogBackupStateRequest + ): Promise { + const args = { + Action: 'DescribeUDBInstanceBinlogBackupState', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDBInstanceBinlogBackupStateResponse + ); + } + + /** + * DescribeUDBInstanceLog - 查询某一段时间内UDB的错误日志或慢查询日志 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_log + */ + describeUDBInstanceLog( + request?: DescribeUDBInstanceLogRequest + ): Promise { + const args = { Action: 'DescribeUDBInstanceLog', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDBInstanceLogResponse + ); + } + + /** + * DescribeUDBInstancePrice - 获取UDB实例价格信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_price + */ + describeUDBInstancePrice( + request?: DescribeUDBInstancePriceRequest + ): Promise { + const args = { Action: 'DescribeUDBInstancePrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDBInstancePriceResponse + ); + } + + /** + * DescribeUDBInstanceState - 获取UDB实例状态 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_state + */ + describeUDBInstanceState( + request?: DescribeUDBInstanceStateRequest + ): Promise { + const args = { Action: 'DescribeUDBInstanceState', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDBInstanceStateResponse + ); + } + + /** + * DescribeUDBInstanceUpgradePrice - 获取UDB实例升降级价格信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_instance_upgrade_price + */ + describeUDBInstanceUpgradePrice( + request?: DescribeUDBInstanceUpgradePriceRequest + ): Promise { + const args = { + Action: 'DescribeUDBInstanceUpgradePrice', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDBInstanceUpgradePriceResponse + ); + } + + /** + * DescribeUDBLogBackupURL - 获取UDB的slowlog备份地址 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_log_backup_url + */ + describeUDBLogBackupURL( + request?: DescribeUDBLogBackupURLRequest + ): Promise { + const args = { Action: 'DescribeUDBLogBackupURL', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDBLogBackupURLResponse + ); + } + + /** + * DescribeUDBLogPackage - 列表UDB实例binlog或slowlog或errorlog备份信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_log_package + */ + describeUDBLogPackage( + request?: DescribeUDBLogPackageRequest + ): Promise { + const args = { Action: 'DescribeUDBLogPackage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDBLogPackageResponse + ); + } + + /** + * DescribeUDBParamGroup - 获取参数组详细参数信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_param_group + */ + describeUDBParamGroup( + request?: DescribeUDBParamGroupRequest + ): Promise { + const args = { Action: 'DescribeUDBParamGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDBParamGroupResponse + ); + } + + /** + * DescribeUDBSplittingInfo - 描述读写分离功能的详细信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_splitting_info + */ + describeUDBSplittingInfo( + request?: DescribeUDBSplittingInfoRequest + ): Promise { + const args = { Action: 'DescribeUDBSplittingInfo', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDBSplittingInfoResponse + ); + } + + /** + * DescribeUDBType - 获取UDB支持的类型信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_type + */ + describeUDBType( + request?: DescribeUDBTypeRequest + ): Promise { + const args = { Action: 'DescribeUDBType', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDBTypeResponse + ); + } + + /** + * DisableUDBRWSplitting - 关闭DB的读写分离功能 + * + * See also: https://docs.ucloud.cn/api/udb-api/disable_udb_rw_splitting + */ + disableUDBRWSplitting( + request?: DisableUDBRWSplittingRequest + ): Promise { + const args = { Action: 'DisableUDBRWSplitting', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DisableUDBRWSplittingResponse + ); + } + + /** + * EditUDBBackupBlacklist - 编辑UDB实例的备份黑名单 + * + * See also: https://docs.ucloud.cn/api/udb-api/edit_udb_backup_blacklist + */ + editUDBBackupBlacklist( + request?: EditUDBBackupBlacklistRequest + ): Promise { + const args = { Action: 'EditUDBBackupBlacklist', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as EditUDBBackupBlacklistResponse + ); + } + + /** + * EnableUDBRWSplitting - 开启DB的读写分离功能 + * + * See also: https://docs.ucloud.cn/api/udb-api/enable_udb_rw_splitting + */ + enableUDBRWSplitting( + request?: EnableUDBRWSplittingRequest + ): Promise { + const args = { Action: 'EnableUDBRWSplitting', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as EnableUDBRWSplittingResponse + ); + } + + /** + * ExtractUDBParamGroup - 获取配置文件内容 + * + * See also: https://docs.ucloud.cn/api/udb-api/extract_udb_param_group + */ + extractUDBParamGroup( + request?: ExtractUDBParamGroupRequest + ): Promise { + const args = { Action: 'ExtractUDBParamGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ExtractUDBParamGroupResponse + ); + } + + /** + * FetchUDBInstanceEarliestRecoverTime - 获取UDB最早可回档的时间点 + * + * See also: https://docs.ucloud.cn/api/udb-api/fetch_udb_instance_earliest_recover_time + */ + fetchUDBInstanceEarliestRecoverTime( + request?: FetchUDBInstanceEarliestRecoverTimeRequest + ): Promise { + const args = { + Action: 'FetchUDBInstanceEarliestRecoverTime', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as FetchUDBInstanceEarliestRecoverTimeResponse + ); + } + + /** + * ModifyUDBInstanceName - 重命名UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/modify_udb_instance_name + */ + modifyUDBInstanceName( + request?: ModifyUDBInstanceNameRequest + ): Promise { + const args = { Action: 'ModifyUDBInstanceName', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyUDBInstanceNameResponse + ); + } + + /** + * ModifyUDBInstancePassword - 修改DB实例的管理员密码 + * + * See also: https://docs.ucloud.cn/api/udb-api/modify_udb_instance_password + */ + modifyUDBInstancePassword( + request?: ModifyUDBInstancePasswordRequest + ): Promise { + const args = { Action: 'ModifyUDBInstancePassword', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyUDBInstancePasswordResponse + ); + } + + /** + * PromoteUDBInstanceToHA - 普通db升级为高可用(只针对mysql5.5及以上版本) + * + * See also: https://docs.ucloud.cn/api/udb-api/promote_udb_instance_to_ha + */ + promoteUDBInstanceToHA( + request?: PromoteUDBInstanceToHARequest + ): Promise { + const args = { Action: 'PromoteUDBInstanceToHA', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as PromoteUDBInstanceToHAResponse + ); + } + + /** + * PromoteUDBSlave - 从库提升为独立库 + * + * See also: https://docs.ucloud.cn/api/udb-api/promote_udb_slave + */ + promoteUDBSlave( + request?: PromoteUDBSlaveRequest + ): Promise { + const args = { Action: 'PromoteUDBSlave', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as PromoteUDBSlaveResponse + ); + } + + /** + * ResizeUDBInstance - 修改(升级和降级)UDB实例的配置,包括内存和磁盘的配置,对于内存升级无需关闭实例,其他场景需要事先关闭实例。两套参数可以配置升降机:1.配置UseSSD和SSDType 2.配置InstanceType,不需要配置InstanceMode。这两套第二套参数的优先级更高 + * + * See also: https://docs.ucloud.cn/api/udb-api/resize_udb_instance + */ + resizeUDBInstance( + request?: ResizeUDBInstanceRequest + ): Promise { + const args = { Action: 'ResizeUDBInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ResizeUDBInstanceResponse + ); + } + + /** + * RestartRWSplitting - 读写分离中间件重启,对应docker重启,但是ip不变 + * + * See also: https://docs.ucloud.cn/api/udb-api/restart_rw_splitting + */ + restartRWSplitting( + request?: RestartRWSplittingRequest + ): Promise { + const args = { Action: 'RestartRWSplitting', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RestartRWSplittingResponse + ); + } + + /** + * RestartUDBInstance - 重启UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/restart_udb_instance + */ + restartUDBInstance( + request?: RestartUDBInstanceRequest + ): Promise { + const args = { Action: 'RestartUDBInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RestartUDBInstanceResponse + ); + } + + /** + * SetUDBRWSplitting - 设置读写分离的模式 + * + * See also: https://docs.ucloud.cn/api/udb-api/set_udb_rw_splitting + */ + setUDBRWSplitting( + request?: SetUDBRWSplittingRequest + ): Promise { + const args = { Action: 'SetUDBRWSplitting', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as SetUDBRWSplittingResponse + ); + } + + /** + * StartUDBInstance - 启动UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/start_udb_instance + */ + startUDBInstance( + request?: StartUDBInstanceRequest + ): Promise { + const args = { Action: 'StartUDBInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as StartUDBInstanceResponse + ); + } + + /** + * StopUDBInstance - 关闭UDB实例 + * + * See also: https://docs.ucloud.cn/api/udb-api/stop_udb_instance + */ + stopUDBInstance( + request?: StopUDBInstanceRequest + ): Promise { + const args = { Action: 'StopUDBInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as StopUDBInstanceResponse + ); + } + + /** + * SwitchUDBHAToSentinel - UDB高可用实例从HAProxy版本升级为Sentinel版本(不带HAProxy)升级耗时30-70秒 + * + * See also: https://docs.ucloud.cn/api/udb-api/switch_udb_ha_to_sentinel + */ + switchUDBHAToSentinel( + request?: SwitchUDBHAToSentinelRequest + ): Promise { + const args = { Action: 'SwitchUDBHAToSentinel', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as SwitchUDBHAToSentinelResponse + ); + } + + /** + * SwitchUDBInstanceToHA - 普通UDB切换为高可用,原db状态为WaitForSwitch时,调用改api + * + * See also: https://docs.ucloud.cn/api/udb-api/switch_udb_instance_to_ha + */ + switchUDBInstanceToHA( + request?: SwitchUDBInstanceToHARequest + ): Promise { + const args = { Action: 'SwitchUDBInstanceToHA', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as SwitchUDBInstanceToHAResponse + ); + } + + /** + * UpdateUDBInstanceBackupStrategy - 修改UDB自动备份策略 + * + * See also: https://docs.ucloud.cn/api/udb-api/update_udb_instance_backup_strategy + */ + updateUDBInstanceBackupStrategy( + request?: UpdateUDBInstanceBackupStrategyRequest + ): Promise { + const args = { + Action: 'UpdateUDBInstanceBackupStrategy', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateUDBInstanceBackupStrategyResponse + ); + } + + /** + * UpdateUDBInstanceSlaveBackupSwitch - 开启或者关闭UDB从库备份 + * + * See also: https://docs.ucloud.cn/api/udb-api/update_udb_instance_slave_backup_switch + */ + updateUDBInstanceSlaveBackupSwitch( + request?: UpdateUDBInstanceSlaveBackupSwitchRequest + ): Promise { + const args = { + Action: 'UpdateUDBInstanceSlaveBackupSwitch', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateUDBInstanceSlaveBackupSwitchResponse + ); + } + + /** + * UpdateUDBParamGroup - 更新UDB配置参数项 + * + * See also: https://docs.ucloud.cn/api/udb-api/update_udb_param_group + */ + updateUDBParamGroup( + request?: UpdateUDBParamGroupRequest + ): Promise { + const args = { Action: 'UpdateUDBParamGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateUDBParamGroupResponse + ); + } + + /** + * UploadUDBParamGroup - 导入UDB配置 + * + * See also: https://docs.ucloud.cn/api/udb-api/upload_udb_param_group + */ + uploadUDBParamGroup( + request?: UploadUDBParamGroupRequest + ): Promise { + const args = { Action: 'UploadUDBParamGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UploadUDBParamGroupResponse + ); + } +} + +/** + * BackupUDBInstance - 备份UDB实例 + */ +export interface BackupUDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 备份名称 + */ + BackupName: string; + /** + * 是否使用黑名单备份,默认false + */ + UseBlacklist?: boolean; + /** + * 使用的备份方式。(快照备份即物理备份。注意只有SSD版本的mysql实例支持设置为snapshot) + */ + BackupMethod?: string; + /** + * 备份黑名单列表,以 ; 分隔。注意:只有逻辑备份下备份黑名单才生效,快照备份备份黑名单下无效 + */ + Blacklist?: string; + /** + * true表示逻辑备份时是使用 --force 参数,false表示不使用 --force 参数。物理备份此参数无效。 + */ + ForceBackup?: boolean; +} + +/** + * BackupUDBInstance - 备份UDB实例 + */ +export interface BackupUDBInstanceResponse {} + +/** + * BackupUDBInstanceBinlog - 备份UDB指定时间段的binlog列表 + */ +export interface BackupUDBInstanceBinlogRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 需要备份文件,可通过DescribeUDBInstanceBinlog获得 如果要传入多个文件名,以空格键分割,用单引号包含. + */ + BackupFile: string; + /** + * DB备份文件名称 + */ + BackupName?: string; +} + +/** + * BackupUDBInstanceBinlog - 备份UDB指定时间段的binlog列表 + */ +export interface BackupUDBInstanceBinlogResponse {} + +/** + * BackupUDBInstanceErrorLog - 备份UDB指定时间段的errorlog + */ +export interface BackupUDBInstanceErrorLogRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 备份名称 + */ + BackupName: string; +} + +/** + * BackupUDBInstanceErrorLog - 备份UDB指定时间段的errorlog + */ +export interface BackupUDBInstanceErrorLogResponse {} + +/** + * BackupUDBInstanceSlowLog - 备份UDB指定时间段的slowlog分析结果 + */ +export interface BackupUDBInstanceSlowLogRequest { + /** + * DB实例Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 过滤条件:起始时间(时间戳) + */ + BeginTime: number; + /** + * 过滤条件:结束时间(时间戳) + */ + EndTime: number; + /** + * 备份文件名称 + */ + BackupName: string; +} + +/** + * BackupUDBInstanceSlowLog - 备份UDB指定时间段的slowlog分析结果 + */ +export interface BackupUDBInstanceSlowLogResponse {} + +/** + * ChangeUDBParamGroup - 修改配置文件 + */ +export interface ChangeUDBParamGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id + */ + DBId: string; + /** + * 参数组Id + */ + GroupId: string; +} + +/** + * ChangeUDBParamGroup - 修改配置文件 + */ +export interface ChangeUDBParamGroupResponse {} + +/** + * CheckRecoverUDBInstance - 核查db是否可以使用回档功能 + */ +export interface CheckRecoverUDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 源实例的Id + */ + SrcDBId: string; +} + +/** + * CheckRecoverUDBInstance - 核查db是否可以使用回档功能 + */ +export interface CheckRecoverUDBInstanceResponse { + /** + * 核查成功返回值为可以回档到的最近时刻,核查失败不返回 + */ + LastestTime?: number; +} + +/** + * CheckUDBInstanceToHAAllowance - 核查db是否可以升级为高可用 + */ +export interface CheckUDBInstanceToHAAllowanceRequest { + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; +} + +/** + * CheckUDBInstanceToHAAllowance - 核查db是否可以升级为高可用 + */ +export interface CheckUDBInstanceToHAAllowanceResponse { + /** + * Yes ,No ,Yes即可以升级,No为不可以升级 + */ + Allowance?: string; +} + +/** + * ClearUDBLog - 清除UDB实例的log + */ +export interface ClearUDBLogRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例的id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 日志类型,10-error(暂不支持)、20-slow(暂不支持 )、30-binlog + */ + LogType: number; + /** + * 删除时间点(至少前一天)之前log,采用时间戳(秒),默认当 前时间点前一天 + */ + BeforeTime?: number; +} + +/** + * ClearUDBLog - 清除UDB实例的log + */ +export interface ClearUDBLogResponse {} + +/** + * CreateMongoDBReplicaSet - 一键创建DB副本集 + */ +export interface CreateMongoDBReplicaSetRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * PrimaryDB实例名称,至少6位 + */ + Name: string; + /** + * 管理员密码 + */ + AdminPassword: string; + /** + * DB类型id对应的字符串形式(例如:mongodb-2.6)注意:当前仅支持mongodb + */ + DBTypeId: string; + /** + * 磁盘空间(GB), 暂时支持20G - 3000G + */ + DiskSpace: number; + /** + * DB实例使用的配置参数组id + */ + ParamGroupId: number; + /** + * 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M + */ + MemoryLimit: number; + /** + * 端口号 + */ + Port: number; + /** + * Year, Month, Dynamic,Trial,默认: Month + */ + ChargeType?: string; + /** + * 购买时长(N个月),默认值1个月。如果为0,代表购买到月底。 + */ + Quantity?: number; + /** + * 管理员帐户名,默认root + */ + AdminUser?: string; + /** + * 备份策略,每周备份数量,默认7次 + */ + BackupCount?: number; + /** + * 备份策略,备份开始时间,单位小时计,默认1点 + */ + BackupTime?: number; + /** + * 备份策略,备份时间间隔,单位小时计,默认24小时 + */ + BackupDuration?: number; + /** + * 是否使用SSD,默认为true + */ + UseSSD?: boolean; + /** + * SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必选 + */ + SSDType?: string; + /** + * cpu核数 + */ + CPU?: number; + /** + * UDB数据库机型 + */ + InstanceType?: string; + /** + * 子网ID + */ + SubnetId?: string; + /** + * VPC的ID + */ + VPCId?: string; + /** + * 所属分片集群的ID + */ + ClusterId?: string; + /** + * CouponId.0 代表第一个代金券id,对于传入多个代金券id,后面为 CouponId.1, CouponId.2 以此类推 + */ + CouponId?: string[]; +} + +/** + * CreateMongoDBReplicaSet - 一键创建DB副本集 + */ +export interface CreateMongoDBReplicaSetResponse { + /** + * 返回所有副本集成员的Id + */ + DBIds?: string[]; +} + +/** + * CreateUDBInstance - 创建UDB实例(包括创建mysql master节点、mongodb primary/configsvr节点和从备份恢复实例) + */ +export interface CreateUDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 实例名称,至少6位 + */ + Name: string; + /** + * 管理员密码 + */ + AdminPassword: string; + /** + * DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6,14:postgresql-10.4 + */ + DBTypeId: string; + /** + * 端口号,mysql默认3306,mongodb默认27017,postgresql默认5432 + */ + Port: number; + /** + * 磁盘空间(GB), 暂时支持20G - 32T + */ + DiskSpace: number; + /** + * DB实例使用的配置参数组id + */ + ParamGroupId: number; + /** + * 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + */ + MemoryLimit: number; + /** + * Year, Month, Dynamic,Trial,默认: Month + */ + ChargeType?: string; + /** + * 购买时长,默认值1 + */ + Quantity?: number; + /** + * 管理员帐户名,默认root + */ + AdminUser?: string; + /** + * 备份策略,每周备份数量,默认7次 + */ + BackupCount?: number; + /** + * 备份策略,备份开始时间,单位小时计,默认1点 + */ + BackupTime?: number; + /** + * 备份策略,备份时间间隔,单位小时计,默认24小时 + */ + BackupDuration?: number; + /** + * 备份id,如果指定,则表明从备份恢复实例 + */ + BackupId?: number; + /** + * 是否使用SSD,默认为true。目前主要可用区、海外机房、新机房只提供SSD资源,非SSD资源不再提供。 + */ + UseSSD?: boolean; + /** + * SSD类型,可选值为"SATA"、“NVMe”,如果UseSSD为true ,则必选 + */ + SSDType?: string; + /** + * UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + */ + InstanceMode?: string; + /** + * 专区ID信息(如果这个参数存在这说明是在专区中创建DB) + */ + UDBCId?: string; + /** + * cpu核数 + */ + CPU?: number; + /** + * 跨可用区高可用备库所在可用区,参见 [可用区列表](../summary/regionlist.html) + */ + BackupZone?: string; + /** + * 子网ID + */ + SubnetId?: string; + /** + * VPC的ID + */ + VPCId?: string; + /** + * 是否开启异步高可用,默认不填,可置为true + */ + DisableSemisync?: boolean; + /** + * 当DB类型(DBTypeId)为mongodb时,需要指定mongo的角色,可选值为configsrv (配置节点),shardsrv (数据节点) + */ + ClusterRole?: string; + /** + * 高可用架构:1) haproxy(默认): 当前仅支持mysql。2) sentinel: 基于vip和哨兵节点的架构,当前支持mysql和pg。 + */ + HAArch?: string; + /** + * 实例所在的业务组名称 + */ + Tag?: string; + /** + * 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + */ + EnableIpV6?: boolean; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * CreateUDBInstance - 创建UDB实例(包括创建mysql master节点、mongodb primary/configsvr节点和从备份恢复实例) + */ +export interface CreateUDBInstanceResponse { + /** + * BD实例id + */ + DBId?: string; +} + +/** + * CreateUDBInstanceByRecovery - 创建db,将新创建的db恢复到指定db某个指定时间点 + */ +export interface CreateUDBInstanceByRecoveryRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例名称,至少6位 + */ + Name: string; + /** + * 源实例的Id + */ + SrcDBId: string; + /** + * 恢复到某个时间点的时间戳(UTC时间格式,默认单位秒) + */ + RecoveryTime: number; + /** + * Year, Month, Dynamic,Trial,默认: Dynamic + */ + ChargeType?: string; + /** + * 购买时长,默认值1 + */ + Quantity?: number; + /** + * 指定是否是否使用SSD,默认使用主库的配置 + */ + UseSSD?: boolean; + /** + * 专区的Id + */ + UDBCId?: string; + /** + * 子网ID + */ + SubnetId?: string; + /** + * VPC的ID + */ + VPCId?: string; + /** + * 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + */ + EnableIpV6?: boolean; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * CreateUDBInstanceByRecovery - 创建db,将新创建的db恢复到指定db某个指定时间点 + */ +export interface CreateUDBInstanceByRecoveryResponse { + /** + * db实例id + */ + DBId?: string; +} + +/** + * CreateUDBParamGroup - 从已有配置文件创建新配置文件 + */ +export interface CreateUDBParamGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 新配置参数组名称 + */ + GroupName: string; + /** + * 参数组描述 + */ + Description: string; + /** + * 源参数组id + */ + SrcGroupId: number; + /** + * DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6 + */ + DBTypeId: string; + /** + * 是否是地域级别的配置文件,默认是false + */ + RegionFlag?: boolean; +} + +/** + * CreateUDBParamGroup - 从已有配置文件创建新配置文件 + */ +export interface CreateUDBParamGroupResponse { + /** + * 新配置参数组id + */ + GroupId?: number; +} + +/** + * CreateUDBReplicationInstance - 创建MongoDB的副本节点(包括仲裁) + */ +export interface CreateUDBReplicationInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * primary节点的DBId,该值可以通过DescribeUDBInstance获取 + */ + SrcId: string; + /** + * 实例名称,至少6位 + */ + Name: string; + /** + * 端口号,默认27017,取值范围3306至65535。 + */ + Port?: number; + /** + * 是否是仲裁节点,默认false,仲裁节点按最小机型创建 + */ + IsArbiter?: boolean; + /** + * 是否使用SSD,默认 为 true + */ + UseSSD?: boolean; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * CreateUDBReplicationInstance - 创建MongoDB的副本节点(包括仲裁) + */ +export interface CreateUDBReplicationInstanceResponse { + /** + * 创建从节点的DBId + */ + DBId?: string; +} + +/** + * CreateUDBRouteInstance - 创建mongos实例 + */ +export interface CreateUDBRouteInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB类型id,mongodb按版本细分有1:mongodb-2.4,2:mongodb-2.6,3:mongodb-3.0,4:mongodb-3.2 + */ + DBTypeId: string; + /** + * 实例名称,至少6位 + */ + Name: string; + /** + * 端口号,mongodb默认27017 + */ + Port: number; + /** + * DB实例使用的配置参数组id + */ + ParamGroupId: number; + /** + * 内存限制(MB),目前支持以下几档 600M/1500M/3000M /6000M/15000M/30000M + */ + MemoryLimit: number; + /** + * 磁盘空间(GB), 暂时支持20G - 500G + */ + DiskSpace: number; + /** + * 配置服务器的dbid,允许一个或者三个。 + */ + ConfigsvrId: string[]; + /** + * Year, Month, Dynamic,Trial,默认: Month + */ + ChargeType?: string; + /** + * 购买时长,默认值1 + */ + Quantity?: number; + /** + * 是否使用SSD,默认为ture + */ + UseSSD?: boolean; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * CreateUDBRouteInstance - 创建mongos实例 + */ +export interface CreateUDBRouteInstanceResponse { + /** + * db实例id + */ + DBId?: string; +} + +/** + * CreateUDBSlave - 创建UDB实例的slave + */ +export interface CreateUDBSlaveRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * master实例的DBId,该值可以通过DescribeUDBInstance获取 + */ + SrcId: string; + /** + * 实例名称,至少6位 + */ + Name: string; + /** + * 端口号 + */ + Port?: number; + /** + * 是否使用SSD,默认为true + */ + UseSSD?: boolean; + /** + * SSD类型,可选值为"SATA"、"PCI-E"、“NVMe”,如果UseSSD为true ,则必选 + */ + SSDType?: string; + /** + * 是否锁主库,默认为true + */ + IsLock?: boolean; + /** + * UDB实例部署模式,可选值如下:Normal: 普通单点实例HA: 高可用部署实例 + */ + InstanceMode?: string; + /** + * 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + */ + MemoryLimit?: number; + /** + * 磁盘空间(GB), 暂时支持20G - 3000G(API支持,前端暂时只开放内存定制) + */ + DiskSpace?: number; + /** + * UDB实例类型:Normal、SATA_SSD、NVMe_SSD + */ + InstanceType?: string; + /** + * 子网ID(如果不传用默认子网) + */ + SubnetId?: string; + /** + * VPCID(如果不传用默认的VPC) + */ + VPCId?: string; + /** + * Year, Month, Dynamic,Trial,默认和主库保持一致 + */ + ChargeType?: string; + /** + * 购买时长,默认默认和主库保持一致 + */ + Quantity?: number; + /** + * DB实例使用的配置参数组id,默认和主库保持一致 + */ + ParamGroupId?: number; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * CreateUDBSlave - 创建UDB实例的slave + */ +export interface CreateUDBSlaveResponse { + /** + * 创建slave的DBId + */ + DBId?: string; +} + +/** + * DeleteUDBInstance - 删除UDB实例 + */ +export interface DeleteUDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例的id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 专区ID + */ + UDBCId?: string; +} + +/** + * DeleteUDBInstance - 删除UDB实例 + */ +export interface DeleteUDBInstanceResponse {} + +/** + * DeleteUDBLogPackage - 删除UDB日志包 + */ +export interface DeleteUDBLogPackageRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 日志包id,可通过DescribeUDBLogPackage获得 + */ + BackupId: number; + /** + * 跨可用区高可用备库所在可用区 + */ + BackupZone?: string; +} + +/** + * DeleteUDBLogPackage - 删除UDB日志包 + */ +export interface DeleteUDBLogPackageResponse {} + +/** + * DeleteUDBParamGroup - 删除配置参数组 + */ +export interface DeleteUDBParamGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 参数组id,可通过DescribeUDBParamGroup获取 + */ + GroupId: number; + /** + * 是否属于地域级别 + */ + RegionFlag?: boolean; +} + +/** + * DeleteUDBParamGroup - 删除配置参数组 + */ +export interface DeleteUDBParamGroupResponse {} + +/** + * DescribeUDBBackup - 列表UDB实例备份信息 + */ +export interface DescribeUDBBackupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 分页显示的起始偏移,列表操作则指定 + */ + Offset: number; + /** + * 分页显示的条目数,列表操作则指定 + */ + Limit: number; + /** + * DB实例Id,如果指定,则只获取该db的备份信息 该值可以通过DescribeUDBInstance获取 + */ + DBId?: string; + /** + * 备份类型,取值为0或1,0表示自动,1表示手动 + */ + BackupType?: number; + /** + * 过滤条件:起始时间(Unix时间戳) + */ + BeginTime?: number; + /** + * 过滤条件:结束时间(Unix时间戳) + */ + EndTime?: number; +} + +/** + * DescribeUDBBackup - 列表UDB实例备份信息 + */ +export interface DescribeUDBBackupResponse { + /** + * 备份信息 参照UDBBackupSet + */ + DataSet?: { + /** + * 备份id + */ + BackupId?: number; + /** + * 备份名称 + */ + BackupName?: string; + /** + * 备份时间(Unix时间戳) + */ + BackupTime?: number; + /** + * 备份文件大小(字节) + */ + BackupSize?: number; + /** + * 备份类型,取值为0或1,0表示自动,1表示手动 + */ + BackupType?: number; + /** + * 备份状态 Backuping // 备份中 Success // 备份成功 Failed // 备份失败 Expired // 备份过期 + */ + State?: string; + /** + * dbid + */ + DBId?: string; + /** + * 对应的db名称 + */ + DBName?: string; + /** + * 备份所在可用区 + */ + Zone?: string; + /** + * 跨机房高可用备库所在可用区 + */ + BackupZone?: string; + /** + * 备份完成时间(Unix时间戳) + */ + BackupEndTime?: number; + }[]; + /** + * 满足条件备份总数,如果指定dbid,则是该db备份总数 + */ + TotalCount?: number; +} + +/** + * DescribeUDBBackupBlacklist - 获取UDB实例的备份黑名单 + */ +export interface DescribeUDBBackupBlacklistRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; +} + +/** + * DescribeUDBBackupBlacklist - 获取UDB实例的备份黑名单 + */ +export interface DescribeUDBBackupBlacklistResponse { + /** + * DB的黑名单列表, db.%为指定库 dbname.tablename为指定表 + */ + Blacklist?: string; +} + +/** + * DescribeUDBBinlogBackupURL - 获取UDB的Binlog备份地址 + */ +export interface DescribeUDBBinlogBackupURLRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id + */ + DBId: string; + /** + * DB实例binlog备份ID,可以从DescribeUDBLogPackage结果当中获得 + */ + BackupId: number; +} + +/** + * DescribeUDBBinlogBackupURL - 获取UDB的Binlog备份地址 + */ +export interface DescribeUDBBinlogBackupURLResponse { + /** + * DB实例备份文件的公网地址 + */ + BackupPath?: string; + /** + * DB实例备份文件的内网地址 + */ + InnerBackupPath?: string; +} + +/** + * DescribeUDBInstance - 获取UDB实例信息,支持两类操作:(1)指定DBId用于获取该db的信息;(2)指定ClassType、Offset、Limit用于列表操作,查询某一个类型db。 + */ +export interface DescribeUDBInstanceRequest { + /** + * 可用区,不填时默认全部可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB种类,如果是列表操作,则需要指定,不区分大小写,其取值如下:mysql: SQL;mongo: NOSQL;postgresql: postgresql + */ + ClassType?: string; + /** + * 分页显示起始偏移位置,列表操作时必填 + */ + Offset?: number; + /** + * 分页显示数量,列表操作时必填 + */ + Limit?: number; + /** + * DB实例id,如果指定则获取单个db实例的描述,否则为列表操作。 指定DBId时无需填写ClassType、Offset、Limit + */ + DBId?: string; + /** + * 是否查看专区里面DB + */ + IsInUDBC?: boolean; + /** + * IsInUDBC为True,UDBCId为空,说明查看整个可用区的专区的db,如果UDBId不为空则只查看此专区下面的db + */ + UDBCId?: string; + /** + * 当只获取这个特定DBId的信息时,如果有该选项,那么把这个DBId实例的所有从库信息一起拉取并返回 + */ + IncludeSlaves?: boolean; +} + +/** + * DescribeUDBInstance - 获取UDB实例信息,支持两类操作:(1)指定DBId用于获取该db的信息;(2)指定ClassType、Offset、Limit用于列表操作,查询某一个类型db。 + */ +export interface DescribeUDBInstanceResponse { + /** + * DB实例信息列表 UDBInstanceSet + */ + DataSet?: { + /** + * DB实例所在可用区 + */ + Zone?: string; + /** + * 当DB类型为mongodb时,返回该实例所在集群中的角色,包括:mongos、configsrv_sccc、configsrv_csrs、shardsrv_datanode、shardsrv_arbiter,其中congfigsrv分为sccc和csrs两种模式,shardsrv分为datanode和arbiter两种模式 + */ + ClusterRole?: string; + /** + * DB实例id + */ + DBId?: string; + /** + * 实例名称,至少6位 + */ + Name?: string; + /** + * DB类型id,mysql/mongodb按版本细分各有一个id 目前id的取值范围为[1,7],数值对应的版本如下: 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6, 7:percona-5.6 + */ + DBTypeId?: string; + /** + * DB实例使用的配置参数组id + */ + ParamGroupId?: number; + /** + * 管理员帐户名,默认root + */ + AdminUser?: string; + /** + * DB实例虚ip + */ + VirtualIP?: string; + /** + * DB实例虚ip的mac地址 + */ + VirtualIPMac?: string; + /** + * VPC的ID + */ + VPCId?: string; + /** + * 子网ID + */ + SubnetId?: string; + /** + * UDB数据库机型 + */ + InstanceType?: string; + /** + * UDB数据库机型ID + */ + InstanceTypeId?: number; + /** + * 获取资源其他信息 + */ + Tag?: string; + /** + * 端口号,mysql默认3306,mongodb默认27017 + */ + Port?: number; + /** + * 对mysql的slave而言是master的DBId,对master则为空, 对mongodb则是副本集id + */ + SrcDBId?: string; + /** + * 备份策略,不可修改,备份文件保留的数量,默认7次 + */ + BackupCount?: number; + /** + * 备份策略,不可修改,开始时间,单位小时计,默认3点 + */ + BackupBeginTime?: number; + /** + * 备份策略,一天内备份时间间隔,单位小时,默认24小时 + */ + BackupDuration?: number; + /** + * 备份策略,备份黑名单,mongodb则不适用 + */ + BackupBlacklist?: string; + /** + * DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + */ + State?: string; + /** + * DB实例创建时间,采用UTC计时时间戳 + */ + CreateTime?: number; + /** + * DB实例修改时间,采用UTC计时时间戳 + */ + ModifyTime?: number; + /** + * DB实例过期时间,采用UTC计时时间戳 + */ + ExpiredTime?: number; + /** + * Year, Month, Dynamic,Trial,默认: Dynamic + */ + ChargeType?: string; + /** + * 内存限制(MB),默认根据配置机型 + */ + MemoryLimit?: number; + /** + * 磁盘空间(GB), 默认根据配置机型 + */ + DiskSpace?: number; + /** + * 是否使用SSD + */ + UseSSD?: boolean; + /** + * SSD类型,SATA/PCI-E/NVMe + */ + SSDType?: string; + /** + * DB实例角色,mysql区分master/slave,mongodb多种角色 + */ + Role?: string; + /** + * DB实例磁盘已使用空间,单位GB + */ + DiskUsedSize?: number; + /** + * DB实例数据文件大小,单位GB + */ + DataFileSize?: number; + /** + * DB实例系统文件大小,单位GB + */ + SystemFileSize?: number; + /** + * DB实例日志文件大小,单位GB + */ + LogFileSize?: number; + /** + * 备份日期标记位。共7位,每一位为一周中一天的备份情况 0表示关闭当天备份,1表示打开当天备份。最右边的一位 为星期天的备份开关,其余从右到左依次为星期一到星期 六的备份配置开关,每周必须至少设置两天备份。 例如:1100000 表示打开星期六和星期五的自动备份功能 + */ + BackupDate?: string; + /** + * UDB实例模式类型, 可选值如下: “Normal”: 普通版UDB实例 “HA”: 高可用版UDB实例 + */ + InstanceMode?: string; + /** + * 如果在需要返回从库的场景下,返回该DB实例的所有从库DB实例信息列表。列表中每一个元素的内容同UDBSlaveInstanceSet 。如果这个DB实例没有从库的情况下,此时返回一个空的列表 + */ + DataSet?: { + /** + * 可用区 + */ + Zone?: string; + /** + * DB实例id + */ + DBId?: string; + /** + * 实例名称,至少6位 + */ + Name?: string; + /** + * DB类型id,mysql/mongodb按版本细分各有一个id 目前id的取值范围为[1,7],数值对应的版本如下: 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6, 7:percona-5.6 + */ + DBTypeId?: string; + /** + * DB实例使用的配置参数组id + */ + ParamGroupId?: number; + /** + * 管理员帐户名,默认root + */ + AdminUser?: string; + /** + * DB实例虚ip + */ + VirtualIP?: string; + /** + * DB实例虚ip的mac地址 + */ + VirtualIPMac?: string; + /** + * 端口号,mysql默认3306,mongodb默认27017 + */ + Port?: number; + /** + * 对mysql的slave而言是master的DBId,对master则为空, 对mongodb则是副本集id + */ + SrcDBId?: string; + /** + * 备份策略,不可修改,备份文件保留的数量,默认7次 + */ + BackupCount?: number; + /** + * 备份策略,不可修改,开始时间,单位小时计,默认3点 + */ + BackupBeginTime?: number; + /** + * 备份策略,一天内备份时间间隔,单位小时,默认24小时 + */ + BackupDuration?: number; + /** + * 备份策略,备份黑名单,mongodb则不适用 + */ + BackupBlacklist?: string; + /** + * DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + */ + State?: string; + /** + * DB实例创建时间,采用UTC计时时间戳 + */ + CreateTime?: number; + /** + * DB实例修改时间,采用UTC计时时间戳 + */ + ModifyTime?: number; + /** + * DB实例过期时间,采用UTC计时时间戳 + */ + ExpiredTime?: number; + /** + * Year, Month, Dynamic,Trial,默认: Dynamic + */ + ChargeType?: string; + /** + * 内存限制(MB),默认根据配置机型 + */ + MemoryLimit?: number; + /** + * 磁盘空间(GB), 默认根据配置机型 + */ + DiskSpace?: number; + /** + * 是否使用SSD + */ + UseSSD?: boolean; + /** + * SSD类型,SATA/PCI-E + */ + SSDType?: string; + /** + * DB实例角色,mysql区分master/slave,mongodb多种角色 + */ + Role?: string; + /** + * DB实例磁盘已使用空间,单位GB + */ + DiskUsedSize?: number; + /** + * DB实例数据文件大小,单位GB + */ + DataFileSize?: number; + /** + * DB实例系统文件大小,单位GB + */ + SystemFileSize?: number; + /** + * DB实例日志文件大小,单位GB + */ + LogFileSize?: number; + /** + * 备份日期标记位。共7位,每一位为一周中一天的备份情况 0表示关闭当天备份,1表示打开当天备份。最右边的一位 为星期天的备份开关,其余从右到左依次为星期一到星期 六的备份配置开关,每周必须至少设置两天备份。 例如:1100000 表示打开星期六和星期五的自动备份功能 + */ + BackupDate?: string; + /** + * UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例;"HA": 高可用版UDB实例 + */ + InstanceMode?: string; + /** + * 当DB类型为mongodb时,返回该实例所在集群中的角色,包括:mongos、configsrv_sccc、configsrv_csrs、shardsrv_datanode、shardsrv_arbiter,其中congfigsrv分为sccc和csrs两种模式,shardsrv分为datanode和arbiter两种模式 + */ + ClusterRole?: string; + /** + * 子网ID + */ + SubnetId?: string; + /** + * VPC的ID + */ + VPCId?: string; + /** + * UDB数据库机型 + */ + InstanceType?: string; + /** + * UDB数据库机型ID + */ + InstanceTypeId?: number; + /** + * 获取资源其他信息 + */ + Tag?: string; + /** + * 获取该实例的IPv6地址 + */ + IPv6Address?: string; + }[]; + /** + * 跨可用区高可用备库所在可用区 + */ + BackupZone?: string; + /** + * 该实例的ipv6地址 + */ + IPv6Address?: string; + /** + * 用户转存备份到自己的UFILE配置, 结构参考UFileDataSet + */ + UserUFileData?: { + /** + * Ufile的令牌tokenid + */ + TokenID?: string; + /** + * bucket名称 + */ + Bucket?: string; + }; + }[]; + /** + * 用户db组的数量,对于 mysql: 主从结对数量,没有slave,则只有master mongodb: 副本集数量 + */ + TotalCount?: number; +} + +/** + * DescribeUDBInstanceBackupState - 获取UDB实例备份状态 + */ +export interface DescribeUDBInstanceBackupStateRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 备份记录ID + */ + BackupId: number; + /** + * 跨可用区高可用备库所在可用区,参见[可用区列表] + */ + BackupZone?: string; +} + +/** + * DescribeUDBInstanceBackupState - 获取UDB实例备份状态 + */ +export interface DescribeUDBInstanceBackupStateResponse { + /** + * 备份状态 0 Backuping // 备份中 1 Success // 备份成功 2 Failed // 备份失败 3 Expired // 备份过期 + */ + State?: string; +} + +/** + * DescribeUDBInstanceBackupURL - 获取UDB备份下载地址 + */ +export interface DescribeUDBInstanceBackupURLRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id,该值可通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * DB实例备份ID,该值可以通过DescribeUDBBackup获取 + */ + BackupId: number; +} + +/** + * DescribeUDBInstanceBackupURL - 获取UDB备份下载地址 + */ +export interface DescribeUDBInstanceBackupURLResponse { + /** + * DB实例备份文件公网的地址 + */ + BackupPath?: string; + /** + * DB实例备份文件内网的地址 + */ + InnerBackupPath?: string; +} + +/** + * DescribeUDBInstanceBinlog - 获取UDB指定时间段的binlog列表 + */ +export interface DescribeUDBInstanceBinlogRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id + */ + DBId: string; + /** + * 过滤条件:起始时间(时间戳) + */ + BeginTime: number; + /** + * 过滤条件:结束时间(时间戳) + */ + EndTime: number; +} + +/** + * DescribeUDBInstanceBinlog - 获取UDB指定时间段的binlog列表 + */ +export interface DescribeUDBInstanceBinlogResponse { + /** + * 获取的Binlog信息列表 UDBInstanceBinlogSet + */ + DataSet?: { + /** + * Binlog文件名 + */ + Name?: string; + /** + * Binlog文件大小 + */ + Size?: number; + /** + * Binlog文件生成时间(时间戳) + */ + BeginTime?: number; + /** + * Binlog文件结束时间(时间戳) + */ + EndTime?: number; + }[]; +} + +/** + * DescribeUDBInstanceBinlogBackupState - 获取udb实例备份状态 + */ +export interface DescribeUDBInstanceBinlogBackupStateRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 备份记录ID + */ + BackupId: number; + /** + * 跨可用区高可用备库所在可用区 + */ + BackupZone?: string; +} + +/** + * DescribeUDBInstanceBinlogBackupState - 获取udb实例备份状态 + */ +export interface DescribeUDBInstanceBinlogBackupStateResponse { + /** + * 备份状态 0 Backuping // 备份中 1 Success // 备份成功 2 Failed // 备份失败 3 Expired // 备份过期 + */ + State?: string; +} + +/** + * DescribeUDBInstanceLog - 查询某一段时间内UDB的错误日志或慢查询日志 + */ +export interface DescribeUDBInstanceLogRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例ID + */ + DBId: string; + /** + * 查询的日志开始的时间戳(Unix Timestamp)。对于实时查询,这个参数应该是上次轮询请求时的时间戳,后台会返回从该值到当前时间的日志内容。 + */ + BeginTime: number; + /** + * 查询日志的结束时间戳(Unix Timestamp),对于实时查询不传该值,与BeginTime的差值不超过24小时:(EndTime-BeginTime) < 24*60*60 + */ + EndTime: number; + /** + * 查询日志的类型 + */ + LogType: string; +} + +/** + * DescribeUDBInstanceLog - 查询某一段时间内UDB的错误日志或慢查询日志 + */ +export interface DescribeUDBInstanceLogResponse { + /** + * 查询到的日志内容,一段纯文本 + */ + Log?: string; + /** + * 此次查询到的日志的下一个时间,用于下一次轮询时的BeginTime参数;如果日志查询结束则返回为空,前端结束查询 + */ + NextTime?: string; +} + +/** + * DescribeUDBInstancePrice - 获取UDB实例价格信息 + */ +export interface DescribeUDBInstancePriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 内存限制(MB),单位为MB.目前支持:1000-96000 + */ + MemoryLimit: number; + /** + * 磁盘空间(GB),暂时支持20(GB) - 3000(GB), 输入不带单位 + */ + DiskSpace: number; + /** + * UDB实例的DB版本字符串 + */ + DBTypeId: string; + /** + * 购买DB实例数量,最大数量为10台, 默认为1台 + */ + Count?: number; + /** + * Year,按年付费; Month,按月付费 Dynamic,按需付费(需开启权限) Trial,试用(需开启权限)默认为月付 + */ + ChargeType?: string; + /** + * DB购买多少个"计费时间单位",默认值为1。比如:买2个月,Quantity就是2。如果计费单位是“按月”,并且Quantity为0,表示“购买到月底” + */ + Quantity?: number; + /** + * 是否使用SSD,只能填true或false,默认为false + */ + UseSSD?: string; + /** + * SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必填 + */ + SSDType?: string; + /** + * 实例的部署类型。可选值为:Normal: 普通单点实例,Slave: 从库实例,HA: 高可用部署实例,默认是Normal + */ + InstanceMode?: string; +} + +/** + * DescribeUDBInstancePrice - 获取UDB实例价格信息 + */ +export interface DescribeUDBInstancePriceResponse { + /** + * 价格 参照UDBInstancePriceSet + */ + DataSet?: { + /** + * Year, Month, Dynamic,Trial + */ + ChargeType?: string; + /** + * 价格,单位为分 + */ + Price?: number; + }[]; +} + +/** + * DescribeUDBInstanceState - 获取UDB实例状态 + */ +export interface DescribeUDBInstanceStateRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; +} + +/** + * DescribeUDBInstanceState - 获取UDB实例状态 + */ +export interface DescribeUDBInstanceStateResponse { + /** + * DB状态标记 Init:初始化中;Fail:安装失败; Starting:启动中; Running : 运行 ;Shutdown:关闭中; Shutoff :已关闭; Delete:已删除; Upgrading:升级中; Promoting: 提升为独库进行中; Recovering: 恢复中; Recover fail:恢复失败。 + */ + State?: string; +} + +/** + * DescribeUDBInstanceUpgradePrice - 获取UDB实例升降级价格信息 + */ +export interface DescribeUDBInstanceUpgradePriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的Id + */ + DBId: string; + /** + * 内存限制(MB) + */ + MemoryLimit: number; + /** + * 磁盘空间(GB), 暂时支持20G - 500G + */ + DiskSpace: number; + /** + * 是否使用SSD,默认为false + */ + UseSSD?: boolean; + /** + * SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必选 + */ + SSDType?: string; +} + +/** + * DescribeUDBInstanceUpgradePrice - 获取UDB实例升降级价格信息 + */ +export interface DescribeUDBInstanceUpgradePriceResponse { + /** + * 价格,单位为分 + */ + Price?: number; +} + +/** + * DescribeUDBLogBackupURL - 获取UDB的slowlog备份地址 + */ +export interface DescribeUDBLogBackupURLRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * DB实例Id + */ + DBId: string; + /** + * DB实例备份ID + */ + BackupId: number; +} + +/** + * DescribeUDBLogBackupURL - 获取UDB的slowlog备份地址 + */ +export interface DescribeUDBLogBackupURLResponse { + /** + * 备份外网URL + */ + BackupPath?: string; + /** + * 备份用户网URL + */ + UsernetPath?: string; +} + +/** + * DescribeUDBLogPackage - 列表UDB实例binlog或slowlog或errorlog备份信息 + */ +export interface DescribeUDBLogPackageRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 分页显示的起始偏移,列表操作则指定 + */ + Offset: number; + /** + * 分页显示的条目数,列表操作则指定 + */ + Limit: number; + /** + * 需要列出的备份文件类型,每种文件的值如下 2 : BINLOG\_BACKUP 3 : SLOW\_QUERY\_BACKUP 4 : ERRORLOG\_BACKUP + */ + Type?: number; + /** + * Types作为Type的补充,支持多值传入,可以获取多个类型的日志记录,如:Types.0=2&Types.1=3 + */ + Types?: number[]; + /** + * DB实例Id,如果指定,则只获取该db的备份信息 + */ + DBId?: string; + /** + * 过滤条件:起始时间(时间戳) + */ + BeginTime?: number; + /** + * 过滤条件:结束时间(时间戳) + */ + EndTime?: number; +} + +/** + * DescribeUDBLogPackage - 列表UDB实例binlog或slowlog或errorlog备份信息 + */ +export interface DescribeUDBLogPackageResponse { + /** + * 备份信息 参见LogPackageDataSet + */ + DataSet?: { + /** + * 备份id + */ + BackupId?: number; + /** + * 备份名称 + */ + BackupName?: string; + /** + * 备份时间 + */ + BackupTime?: number; + /** + * 备份文件大小 + */ + BackupSize?: number; + /** + * 备份类型,包括2-binlog备份,3-slowlog备份 + */ + BackupType?: number; + /** + * 备份状态 Backuping // 备份中 Success // 备份成功 Failed // 备份失败 Expired // 备份过期 + */ + State?: string; + /** + * dbid + */ + DBId?: string; + /** + * 对应的db名称 + */ + DBName?: string; + /** + * 所在可用区 + */ + Zone?: string; + /** + * 跨可用区高可用备库所在可用区 + */ + BackupZone?: string; + }[]; + /** + * 备份总数,如果指定dbid,则是该db备份总数 + */ + TotalCount?: number; +} + +/** + * DescribeUDBParamGroup - 获取参数组详细参数信息 + */ +export interface DescribeUDBParamGroupRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 分页显示的起始偏移,列表操作则指定 + */ + Offset?: number; + /** + * 分页显示的条目数,列表操作则指定 + */ + Limit?: number; + /** + * 参数组id,如果指定则获取描述,否则是列表操作,需要 指定Offset/Limit + */ + GroupId?: number; + /** + * 是否选取专区中配置 + */ + IsInUDBC?: boolean; + /** + * 当请求没有填写Zone时,如果指定为true,表示只拉取跨可用区的相关配置文件,否则,拉取所有机房的配置文件(包括每个单可用区和跨可用区) + */ + RegionFlag?: boolean; + /** + * 如果未指定GroupId,则可选是否选取特定DB类型的配置(sql, nosql, postgresql, sqlserver) + */ + ClassType?: string; +} + +/** + * DescribeUDBParamGroup - 获取参数组详细参数信息 + */ +export interface DescribeUDBParamGroupResponse { + /** + * 参数组列表 参照UDBParamGroupSet + */ + DataSet?: { + /** + * 参数组id + */ + GroupId?: number; + /** + * 参数组名称 + */ + GroupName?: string; + /** + * DB类型id,mysql/mongodb按版本细分各有一个id 目前id的取值范围为[1,7],数值对应的版本如下 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6 7:percona-5.6 + */ + DBTypeId?: string; + /** + * 参数组描述 + */ + Description?: string; + /** + * 参数组是否可修改 + */ + Modifiable?: boolean; + /** + * 参数的键值对表 UDBParamMemberSet + */ + ParamMember?: { + /** + * 参数名称 + */ + Key?: string; + /** + * 参数值 + */ + Value?: string; + /** + * 参数值应用类型,取值范围为{0,10,20,30},各值 代表意义为 0-unknown、10-int、20-string、 30-bool + */ + ValueType?: number; + /** + * 允许的值(根据参数类型,用分隔符表示) + */ + AllowedVal?: string; + /** + * 参数值应用类型,取值范围为{0,10,20},各值代表 意义为0-unknown、10-static、20-dynamic + */ + ApplyType?: number; + /** + * 是否可更改,默认为false + */ + Modifiable?: boolean; + /** + * 允许值的格式类型,取值范围为{0,10,20},意义分 别为PVFT_UNKOWN=0,PVFT_RANGE=10, PVFT_ENUM=20 + */ + FormatType?: number; + }[]; + }[]; + /** + * 参数组总数,列表操作时才会有该参数 + */ + TotalCount?: number; +} + +/** + * DescribeUDBSplittingInfo - 描述读写分离功能的详细信息 + */ +export interface DescribeUDBSplittingInfoRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * DB实例ID + */ + MasterDBId: string; +} + +/** + * DescribeUDBSplittingInfo - 描述读写分离功能的详细信息 + */ +export interface DescribeUDBSplittingInfoResponse { + /** + * 可用区 + */ + Zone?: string; + /** + * DB实例ID + */ + MasterDBId?: string; + /** + * 读写分离IP + */ + RWIP?: string; + /** + * 时间阈值 + */ + DelayThreshold?: number; + /** + * 端口号 + */ + Port?: number; + /** + * 读写分离策略 + */ + ReadModel?: string; + /** + * 数据库版本 + */ + DBTypeId?: string; + /** + * 读写分离状态 + */ + RWState?: string; + /** + * 读写分离从库信息 + */ + DataSet?: { + /** + * DB实例ID + */ + DBId?: string; + /** + * 主库/从库 + */ + Role?: string; + /** + * DBIP + */ + VirtualIP?: string; + /** + * 读写分离比重 + */ + ReadWeight?: number; + /** + * DB状态 + */ + State?: string; + }[]; +} + +/** + * DescribeUDBType - 获取UDB支持的类型信息 + */ +export interface DescribeUDBTypeRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 跨可用区高可用DB的备库所在区域,仅当该可用区支持跨可用区高可用时填入。参见 [可用区列表](../summary/regionlist.html) + */ + BackupZone?: string; + /** + * DB实例类型,如mysql,sqlserver,mongo,postgresql + */ + DBClusterType?: string; + /** + * 返回支持某种实例类型的DB类型。如果没传,则表示任何实例类型均可。normal:单点,ha:高可用,sharded_cluster:分片集群 + */ + InstanceMode?: string; + /** + * 返回支持某种磁盘类型的DB类型,如Normal、SSD、NVMe_SSD。如果没传,则表示任何磁盘类型均可。 + */ + DiskType?: string; + /** + * 返回从备份创建实例时,该版本号所支持的备份创建版本。如果没传,则表示不是从备份创建。 + */ + CompatibleWithDBType?: string; +} + +/** + * DescribeUDBType - 获取UDB支持的类型信息 + */ +export interface DescribeUDBTypeResponse { + /** + * DB类型列表 参数见 UDBTypeSet + */ + DataSet?: { + /** + * DB类型id,mysql/mongodb按版本细分各有一个id, 目前id的取值范围为[1,7],数值对应的版本如下: 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6, 7:percona-5.6 + */ + DBTypeId?: string; + }[]; +} + +/** + * DisableUDBRWSplitting - 关闭DB的读写分离功能 + */ +export interface DisableUDBRWSplittingRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * DB实例ID(master) + */ + MasterDBId: string; +} + +/** + * DisableUDBRWSplitting - 关闭DB的读写分离功能 + */ +export interface DisableUDBRWSplittingResponse {} + +/** + * EditUDBBackupBlacklist - 编辑UDB实例的备份黑名单 + */ +export interface EditUDBBackupBlacklistRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 黑名单,规范示例,指定库mysql.%;test.%; 指定表city.address; + */ + Blacklist: string; +} + +/** + * EditUDBBackupBlacklist - 编辑UDB实例的备份黑名单 + */ +export interface EditUDBBackupBlacklistResponse {} + +/** + * EnableUDBRWSplitting - 开启DB的读写分离功能 + */ +export interface EnableUDBRWSplittingRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * DB实例ID(主库) + */ + MasterDBId: string; + /** + * 备份的可用区。用于创建跨可用区读写分离的一个节点,跨机房的读写分离必须有这个参数 + */ + BackupZone?: string; +} + +/** + * EnableUDBRWSplitting - 开启DB的读写分离功能 + */ +export interface EnableUDBRWSplittingResponse { + /** + * DB实例ID(主库) + */ + MasterDBId?: string; + /** + * 读写分离访问IP + */ + RWIp?: string; +} + +/** + * ExtractUDBParamGroup - 获取配置文件内容 + */ +export interface ExtractUDBParamGroupRequest { + /** + * 可用区。如果RegionFlag=false,必须传,反之,可不传。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 配置id + */ + GroupId: number; + /** + * 是否跨可用区,RegionFlag为true时表示跨可用区配置文件。如果RegionFlag=true,Zone可以不传,否则Zone必须传。 + */ + RegionFlag?: boolean; +} + +/** + * ExtractUDBParamGroup - 获取配置文件内容 + */ +export interface ExtractUDBParamGroupResponse { + /** + * 配置文件内容 + */ + Content: string; +} + +/** + * FetchUDBInstanceEarliestRecoverTime - 获取UDB最早可回档的时间点 + */ +export interface FetchUDBInstanceEarliestRecoverTimeRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * DB实例Id + */ + DBId: string; +} + +/** + * FetchUDBInstanceEarliestRecoverTime - 获取UDB最早可回档的时间点 + */ +export interface FetchUDBInstanceEarliestRecoverTimeResponse { + /** + * 获取最早可回档时间点 + */ + EarliestTime?: number; +} + +/** + * ModifyUDBInstanceName - 重命名UDB实例 + */ +export interface ModifyUDBInstanceNameRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 实例的新名字, 长度要求为6~63位 + */ + Name: string; +} + +/** + * ModifyUDBInstanceName - 重命名UDB实例 + */ +export interface ModifyUDBInstanceNameResponse {} + +/** + * ModifyUDBInstancePassword - 修改DB实例的管理员密码 + */ +export interface ModifyUDBInstancePasswordRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的ID,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 实例的新密码 + */ + Password: string; + /** + * sqlserver帐号,仅在sqlserver的情况下填该参数 + */ + AccountName?: string; +} + +/** + * ModifyUDBInstancePassword - 修改DB实例的管理员密码 + */ +export interface ModifyUDBInstancePasswordResponse {} + +/** + * PromoteUDBInstanceToHA - 普通db升级为高可用(只针对mysql5.5及以上版本) + */ +export interface PromoteUDBInstanceToHARequest { + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; +} + +/** + * PromoteUDBInstanceToHA - 普通db升级为高可用(只针对mysql5.5及以上版本) + */ +export interface PromoteUDBInstanceToHAResponse {} + +/** + * PromoteUDBSlave - 从库提升为独立库 + */ +export interface PromoteUDBSlaveRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 是否强制(如果从库落后可能会禁止提升),默认false 如果落后情况下,强制提升丢失数据 + */ + IsForce?: boolean; +} + +/** + * PromoteUDBSlave - 从库提升为独立库 + */ +export interface PromoteUDBSlaveResponse {} + +/** + * ResizeUDBInstance - 修改(升级和降级)UDB实例的配置,包括内存和磁盘的配置,对于内存升级无需关闭实例,其他场景需要事先关闭实例。两套参数可以配置升降机:1.配置UseSSD和SSDType 2.配置InstanceType,不需要配置InstanceMode。这两套第二套参数的优先级更高 + */ +export interface ResizeUDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的Id + */ + DBId: string; + /** + * 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/ 12000M/16000M/ 24000M/32000M/ 48000M/64000M/96000M/128000M/192000M/256000M/320000M。 + */ + MemoryLimit: number; + /** + * 磁盘空间(GB), 暂时支持20G-32T + */ + DiskSpace: number; + /** + * 是否使用SSD,默认为true + */ + UseSSD?: boolean; + /** + * SSD类型,可选值为"SATA"、"PCI-E"、“NVMe”,如果UseSSD为true ,则必选 + */ + SSDType?: string; + /** + * 专区的ID,如果有值表示专区中的DB配置升降级 + */ + UDBCId?: string; + /** + * UDB数据库机型: "Normal": "标准机型" , "SATA_SSD": "SSD机型" , "PCIE_SSD": "SSD高性能机型" , "Normal_Volume": "标准大容量机型", "SATA_SSD_Volume": "SSD大容量机型" , "PCIE_SSD_Volume": "SSD高性能大容量机型",“NVMe_SSD”:“快杰机型” + */ + InstanceType?: string; + /** + * UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + */ + InstanceMode?: string; + /** + * DB关闭状态下升降级,升降级后是否启动DB,默认为false + */ + StartAfterUpgrade?: boolean; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * ResizeUDBInstance - 修改(升级和降级)UDB实例的配置,包括内存和磁盘的配置,对于内存升级无需关闭实例,其他场景需要事先关闭实例。两套参数可以配置升降机:1.配置UseSSD和SSDType 2.配置InstanceType,不需要配置InstanceMode。这两套第二套参数的优先级更高 + */ +export interface ResizeUDBInstanceResponse {} + +/** + * RestartRWSplitting - 读写分离中间件重启,对应docker重启,但是ip不变 + */ +export interface RestartRWSplittingRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 待关闭读写分离中间键ProxyId + */ + MasterDBId: string; +} + +/** + * RestartRWSplitting - 读写分离中间件重启,对应docker重启,但是ip不变 + */ +export interface RestartRWSplittingResponse {} + +/** + * RestartUDBInstance - 重启UDB实例 + */ +export interface RestartUDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; +} + +/** + * RestartUDBInstance - 重启UDB实例 + */ +export interface RestartUDBInstanceResponse {} + +/** + * SetUDBRWSplitting - 设置读写分离的模式 + */ +export interface SetUDBRWSplittingRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * DB实例ID(master) + */ + MasterDBId: string; + /** + * 读写分离策略 + */ + ReadModel: string; + /** + * DBIds.0 代表UDB主节点, DBIds.1 到DBIds.n 代表1到N个从节点 + */ + DBIds: string[]; + /** + * udb主从节点的只读比例。ReadPercents.0代表主节点的只读比例,ReadPercents.1代表从节点1的读写比例, 以此类推 + */ + ReadPercents?: string[]; + /** + * 时间阙值 + */ + DelayThreshold?: number; +} + +/** + * SetUDBRWSplitting - 设置读写分离的模式 + */ +export interface SetUDBRWSplittingResponse {} + +/** + * StartUDBInstance - 启动UDB实例 + */ +export interface StartUDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; +} + +/** + * StartUDBInstance - 启动UDB实例 + */ +export interface StartUDBInstanceResponse {} + +/** + * StopUDBInstance - 关闭UDB实例 + */ +export interface StopUDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; + /** + * 是否使用强制手段关闭DB,默认是false + */ + ForceToKill?: boolean; +} + +/** + * StopUDBInstance - 关闭UDB实例 + */ +export interface StopUDBInstanceResponse {} + +/** + * SwitchUDBHAToSentinel - UDB高可用实例从HAProxy版本升级为Sentinel版本(不带HAProxy)升级耗时30-70秒 + */ +export interface SwitchUDBHAToSentinelRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDB的实例ID + */ + DBId: string; +} + +/** + * SwitchUDBHAToSentinel - UDB高可用实例从HAProxy版本升级为Sentinel版本(不带HAProxy)升级耗时30-70秒 + */ +export interface SwitchUDBHAToSentinelResponse {} + +/** + * SwitchUDBInstanceToHA - 普通UDB切换为高可用,原db状态为WaitForSwitch时,调用改api + */ +export interface SwitchUDBInstanceToHARequest { + /** + * 实例的Id,该值可以通过DescribeUDBInstance获取 + */ + DBId: string; +} + +/** + * SwitchUDBInstanceToHA - 普通UDB切换为高可用,原db状态为WaitForSwitch时,调用改api + */ +export interface SwitchUDBInstanceToHAResponse { + /** + * 切换后高可用db实例的Id + */ + DBId?: string; +} + +/** + * UpdateUDBInstanceBackupStrategy - 修改UDB自动备份策略 + */ +export interface UpdateUDBInstanceBackupStrategyRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 主节点的Id + */ + DBId: string; + /** + * 备份的整点时间,范围[0,23] + */ + BackupTime?: number; + /** + * 备份时期标记位。共7位,每一位为一周中一天的备份情况,0表示关闭当天备份,1表示打开当天备份。最右边的一位为星期天的备份开关,其余从右到左依次为星期一到星期六的备份配置开关,每周必须至少设置两天备份。例如:1100000表示打开星期六和星期五的备份功能 + */ + BackupDate?: string; + /** + * 当导出某些数据遇到问题后,是否强制导出其他剩余数据默认是false需要同时设置BackupDate字段 + */ + ForceDump?: boolean; + /** + * 选择默认的备份方式,可选 snapshot 表示使用快照/物理备份,不填或者其它任何值为默认的逻辑备份。需要同时设置BackupDate字段。(注意现在只有SSD 版本的 MySQL实例支持物理备份) + */ + BackupMethod?: string; +} + +/** + * UpdateUDBInstanceBackupStrategy - 修改UDB自动备份策略 + */ +export interface UpdateUDBInstanceBackupStrategyResponse {} + +/** + * UpdateUDBInstanceSlaveBackupSwitch - 开启或者关闭UDB从库备份 + */ +export interface UpdateUDBInstanceSlaveBackupSwitchRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 主库的Id + */ + MasterDBId: string; + /** + * 从库的备份开关,范围[0,1],0表示从库备份功能关闭,1 表示从库备份开关打开。 + */ + BackupSwitch: number; + /** + * 从库的Id,如果从库备份开关设定为打开,则必须赋值。 + */ + SlaveDBId?: string; +} + +/** + * UpdateUDBInstanceSlaveBackupSwitch - 开启或者关闭UDB从库备份 + */ +export interface UpdateUDBInstanceSlaveBackupSwitchResponse {} + +/** + * UpdateUDBParamGroup - 更新UDB配置参数项 + */ +export interface UpdateUDBParamGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 配置参数组id,使用DescribeUDBParamGroup获得 + */ + GroupId: number; + /** + * 参数名称(与Value配合使用) + */ + Key?: string; + /** + * 参数值(与Key配合使用) + */ + Value?: string; + /** + * 配置文件的名字,不传时认为不修改名字,传了则不能为空 + */ + Name?: string; + /** + * 配置文件的描述,不传时认为不修改 + */ + Description?: string; + /** + * 该配置文件是否是地域级别配置文件,默认是false + */ + RegionFlag?: boolean; +} + +/** + * UpdateUDBParamGroup - 更新UDB配置参数项 + */ +export interface UpdateUDBParamGroupResponse {} + +/** + * UploadUDBParamGroup - 导入UDB配置 + */ +export interface UploadUDBParamGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * DB类型id,DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6 + */ + DBTypeId: string; + /** + * 配置参数组名称 + */ + GroupName: string; + /** + * 参数组描述 + */ + Description: string; + /** + * 配置内容,导入的配置内容采用base64编码 + */ + Content: string; + /** + * 该配置文件是否是地域级别配置文件,默认是false + */ + RegionFlag?: boolean; +} + +/** + * UploadUDBParamGroup - 导入UDB配置 + */ +export interface UploadUDBParamGroupResponse { + /** + * 配置参数组id + */ + GroupId?: number; +} diff --git a/src/services/uddb/index.ts b/src/services/uddb/index.ts new file mode 100644 index 0000000..6f83776 --- /dev/null +++ b/src/services/uddb/index.ts @@ -0,0 +1,892 @@ +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 **uddb** service + */ +export default class UDDBClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * ChangeUDDBInstanceName - 修改分布式数据库中间件名称 + * + * See also: https://docs.ucloud.cn/api/uddb-api/change_uddb_instance_name + */ + changeUDDBInstanceName( + request?: ChangeUDDBInstanceNameRequest + ): Promise { + const args = { Action: 'ChangeUDDBInstanceName', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ChangeUDDBInstanceNameResponse + ); + } + + /** + * ChangeUDDBSlaveCount - 改变分布式数据库数据节点的只读实例个数 +每一个UDDB的数据节点负责处理所有的写入请求。与此同时,每一个数据节点可以配置若干个该节点的只读实例。当主节点的数据写入完毕后,只读实例把这次的写入操作进行更新,从而和数据节点保持一致。 +只读实例可以使得数据由多份复制,在数据节点和只读实例之间,可以做请求的读写分离, 也就是说, 主节点写入数据之后, 数据的读操作可以由数据只读实例进行分担, 这样减少主节点的压力, 增加性能 +当改变了数据节点的只读实例个数之后,对于现有的和以后的每一个数据节点都采用这个配置。如果UDDB实例有现有的数据节点, 那么它会根据新配置的参数,自动创建或删除数据节点的只读实例 +如下状态的UDDB实例可以进行这个操作: +Running: 系统正常运行中 +当请求返回成功之后,UDDB实例的状态变成"ChangingSlaveCount"; 如果返回失败, UDDB实例状态保持不变 当UDDB更改数据分区的只读实例个数成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果更改过程中出现异常, 状态变成"Abnormal"(异常运行中)或者"Error"(运行错误) + * + * See also: https://docs.ucloud.cn/api/uddb-api/change_uddb_slave_count + */ + changeUDDBSlaveCount( + request?: ChangeUDDBSlaveCountRequest + ): Promise { + const args = { Action: 'ChangeUDDBSlaveCount', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ChangeUDDBSlaveCountResponse + ); + } + + /** + * CreateUDDBInstance - 创建创建分布式数据库UDDB实例, 简称UDDB实例。 + * + * See also: https://docs.ucloud.cn/api/uddb-api/create_uddb_instance + */ + createUDDBInstance( + request?: CreateUDDBInstanceRequest + ): Promise { + const args = { Action: 'CreateUDDBInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUDDBInstanceResponse + ); + } + + /** + * DeleteUDDBInstance - 删除UDDB实例。 +如下状态的UDDB实例可以进行这个操作: +InitFail: 初始化失败 +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例就已经被删除, 列表上看不到对应的UDDB实例 + * + * See also: https://docs.ucloud.cn/api/uddb-api/delete_uddb_instance + */ + deleteUDDBInstance( + request?: DeleteUDDBInstanceRequest + ): Promise { + const args = { Action: 'DeleteUDDBInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUDDBInstanceResponse + ); + } + + /** + * DescribeUDDBInstance - 获取分布式数据库UDDB的详细信息 + * + * See also: https://docs.ucloud.cn/api/uddb-api/describe_uddb_instance + */ + describeUDDBInstance( + request?: DescribeUDDBInstanceRequest + ): Promise { + const args = { Action: 'DescribeUDDBInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDDBInstanceResponse + ); + } + + /** + * DescribeUDDBInstancePrice - 获取分布式数据库UDDB价格 + * + * See also: https://docs.ucloud.cn/api/uddb-api/describe_uddb_instance_price + */ + describeUDDBInstancePrice( + request?: DescribeUDDBInstancePriceRequest + ): Promise { + const args = { Action: 'DescribeUDDBInstancePrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDDBInstancePriceResponse + ); + } + + /** + * DescribeUDDBInstanceUpgradePrice - 升级UDDB时,获取升级后的价格 + * + * See also: https://docs.ucloud.cn/api/uddb-api/describe_uddb_instance_upgrade_price + */ + describeUDDBInstanceUpgradePrice( + request?: DescribeUDDBInstanceUpgradePriceRequest + ): Promise { + const args = { + Action: 'DescribeUDDBInstanceUpgradePrice', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDDBInstanceUpgradePriceResponse + ); + } + + /** + * RestartUDDBInstance - 重启UDDB实例,开始提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Running: 正常运行中 +Abnormal: 异常运行中 +当请求返回成功之后,UDDB实例的状态变成"Starting"(启动中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在重启过程中, 当UDDB实例启动成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果启动过程中出现异常, 状态变成"Abnormal"(异常运行中), 或者"Shutoff"(已关闭 + * + * See also: https://docs.ucloud.cn/api/uddb-api/restart_uddb_instance + */ + restartUDDBInstance( + request?: RestartUDDBInstanceRequest + ): Promise { + const args = { Action: 'RestartUDDBInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RestartUDDBInstanceResponse + ); + } + + /** + * StartUDDBInstance - 启动UDDB实例,开始提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例的状态变成"Starting"(启动中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在启动过程中, 当UDDB实例启动成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果启动过程中出现异常, 状态变成"Abnormal"(异常运行中), 或者"Shutoff"(已关闭) + * + * See also: https://docs.ucloud.cn/api/uddb-api/start_uddb_instance + */ + startUDDBInstance( + request?: StartUDDBInstanceRequest + ): Promise { + const args = { Action: 'StartUDDBInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as StartUDDBInstanceResponse + ); + } + + /** + * StopUDDBInstance - 关闭UDDB实例,停止提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Running: 正常运行中 +Abnormal: 异常运行中 +当请求返回成功之后,UDDB实例的状态变成"Shutdown"(关闭中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在关闭过程中, 当UDDB实例关闭成功之后, UDDB实例的状态变成"Shutoff"(已关闭); 如果关闭过程中出现异常, 根据UDDB实例的情况, 状态变成"Abnormal"(异常运行中), 或者"Running"(正常运行中) + * + * See also: https://docs.ucloud.cn/api/uddb-api/stop_uddb_instance + */ + stopUDDBInstance( + request?: StopUDDBInstanceRequest + ): Promise { + const args = { Action: 'StopUDDBInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as StopUDDBInstanceResponse + ); + } + + /** + * UpgradeUDDBDataNode - 升降级分布式数据库数据节点的配置, 提高/降低数据节点的数据容量和内存 + +所有数据节点以及其所挂载的只读实例的配置都受到影响 + +升降级数据节点的配置之后之后, 会按照数据节点新的磁盘和内存大小重新计费 + +如下状态的数据节点实例可以进行这个操作: + +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例的状态变成"UpgradingDataNode",相关数据节点的状态变成"Upgrading"; 如果返回失败, UDDB实例状态保持不变 当UDDB实例升级结束之后, UDDB实例的状态变成"Shutoff" + * + * See also: https://docs.ucloud.cn/api/uddb-api/upgrade_uddb_data_node + */ + upgradeUDDBDataNode( + request?: UpgradeUDDBDataNodeRequest + ): Promise { + const args = { Action: 'UpgradeUDDBDataNode', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpgradeUDDBDataNodeResponse + ); + } + + /** + * UpgradeUDDBInstance - 升降级分布式数据库中间件的配置, 提高/降低请求处理的并发性 + +修改请求处理节点个数之后, 按照所有请求处理节点的总内存容量和CPU核数重新计费 + +如下状态的UDDB实例可以进行这个操作: + +Running: 系统正常运行中 +当请求返回成功之后,UDDB实例的状态变成"UpgradingUDDB"; 如果返回失败, UDDB实例状态保持不变 当UDDB实例升级成功之后, UDDB实例的状态变成"Running"; 如果更改过程中出现异常, 状态变成"Abnormal", 或者"Error" + * + * See also: https://docs.ucloud.cn/api/uddb-api/upgrade_uddb_instance + */ + upgradeUDDBInstance( + request?: UpgradeUDDBInstanceRequest + ): Promise { + const args = { Action: 'UpgradeUDDBInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpgradeUDDBInstanceResponse + ); + } +} + +/** + * ChangeUDDBInstanceName - 修改分布式数据库中间件名称 + */ +export interface ChangeUDDBInstanceNameRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB实例Id + */ + UDDBId: string; + /** + * 名称 + */ + NewName: string; +} + +/** + * ChangeUDDBInstanceName - 修改分布式数据库中间件名称 + */ +export interface ChangeUDDBInstanceNameResponse {} + +/** + * ChangeUDDBSlaveCount - 改变分布式数据库数据节点的只读实例个数 +每一个UDDB的数据节点负责处理所有的写入请求。与此同时,每一个数据节点可以配置若干个该节点的只读实例。当主节点的数据写入完毕后,只读实例把这次的写入操作进行更新,从而和数据节点保持一致。 +只读实例可以使得数据由多份复制,在数据节点和只读实例之间,可以做请求的读写分离, 也就是说, 主节点写入数据之后, 数据的读操作可以由数据只读实例进行分担, 这样减少主节点的压力, 增加性能 +当改变了数据节点的只读实例个数之后,对于现有的和以后的每一个数据节点都采用这个配置。如果UDDB实例有现有的数据节点, 那么它会根据新配置的参数,自动创建或删除数据节点的只读实例 +如下状态的UDDB实例可以进行这个操作: +Running: 系统正常运行中 +当请求返回成功之后,UDDB实例的状态变成"ChangingSlaveCount"; 如果返回失败, UDDB实例状态保持不变 当UDDB更改数据分区的只读实例个数成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果更改过程中出现异常, 状态变成"Abnormal"(异常运行中)或者"Error"(运行错误) + */ +export interface ChangeUDDBSlaveCountRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB资源id + */ + UDDBId: string; + /** + * 每个数据节点的只读实例个数, 取值必须>=0 + */ + SlaveCount: string; +} + +/** + * ChangeUDDBSlaveCount - 改变分布式数据库数据节点的只读实例个数 +每一个UDDB的数据节点负责处理所有的写入请求。与此同时,每一个数据节点可以配置若干个该节点的只读实例。当主节点的数据写入完毕后,只读实例把这次的写入操作进行更新,从而和数据节点保持一致。 +只读实例可以使得数据由多份复制,在数据节点和只读实例之间,可以做请求的读写分离, 也就是说, 主节点写入数据之后, 数据的读操作可以由数据只读实例进行分担, 这样减少主节点的压力, 增加性能 +当改变了数据节点的只读实例个数之后,对于现有的和以后的每一个数据节点都采用这个配置。如果UDDB实例有现有的数据节点, 那么它会根据新配置的参数,自动创建或删除数据节点的只读实例 +如下状态的UDDB实例可以进行这个操作: +Running: 系统正常运行中 +当请求返回成功之后,UDDB实例的状态变成"ChangingSlaveCount"; 如果返回失败, UDDB实例状态保持不变 当UDDB更改数据分区的只读实例个数成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果更改过程中出现异常, 状态变成"Abnormal"(异常运行中)或者"Error"(运行错误) + */ +export interface ChangeUDDBSlaveCountResponse {} + +/** + * CreateUDDBInstance - 创建创建分布式数据库UDDB实例, 简称UDDB实例。 + */ +export interface CreateUDDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB的数据库版本,支持版本如下:mysql-5.6 mysql-5.7. 如果不填,则默认为mysql-5.6 + */ + DBTypeId: string; + /** + * 实例名称,至少6位 + */ + Name: string; + /** + * 管理员密码, 密码需要使用base64加密 + */ + AdminPassword: string; + /** + * UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5W FellFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w; EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + */ + RouterVersion: string; + /** + * 其他版本:该参数可不填;专享版:物理机台数 + */ + RouterNodeNum: number; + /** + * 初始的数据节点个数 取值必须>0. + */ + DataNodeCount: number; + /** + * 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值. + */ + DataNodeMemory: number; + /** + * 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + */ + DataNodeDiskSpace: number; + /** + * 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + */ + InstanceMode?: string; + /** + * 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + */ + InstanceType?: string; + /** + * 付费类型,可选值如下:Year: 按年付费 Month: 按月付费 Dynamic: 按需付费(单位: 小时) Trial: 免费试用 默认值为: Dynamic + */ + ChargeType?: string; + /** + * 购买时长,默认值1 + */ + Quantity?: number; + /** + * 管理员帐户名,默认root + */ + AdminUser?: string; + /** + * 端口号,mysql默认端口为3306 + */ + Port?: number; + /** + * 每个数据节点的只读实例个数, 取值必须>=0. 默认取值为0. + */ + DataNodeSlaveCount?: number; + /** + * VPC的ID + */ + VPCId?: string; + /** + * 子网ID + */ + SubnetId?: string; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * CreateUDDBInstance - 创建创建分布式数据库UDDB实例, 简称UDDB实例。 + */ +export interface CreateUDDBInstanceResponse { + /** + * UDDB实例ID + */ + UDDBId?: string; +} + +/** + * DeleteUDDBInstance - 删除UDDB实例。 +如下状态的UDDB实例可以进行这个操作: +InitFail: 初始化失败 +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例就已经被删除, 列表上看不到对应的UDDB实例 + */ +export interface DeleteUDDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB实例ID + */ + UDDBId: string; +} + +/** + * DeleteUDDBInstance - 删除UDDB实例。 +如下状态的UDDB实例可以进行这个操作: +InitFail: 初始化失败 +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例就已经被删除, 列表上看不到对应的UDDB实例 + */ +export interface DeleteUDDBInstanceResponse {} + +/** + * DescribeUDDBInstance - 获取分布式数据库UDDB的详细信息 + */ +export interface DescribeUDDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB实例ID + */ + UDDBId: string; +} + +/** + * DescribeUDDBInstance - 获取分布式数据库UDDB的详细信息 + */ +export interface DescribeUDDBInstanceResponse { + /** + * UDDB实例信息列表, 参见DataSetUDDB项定义 + */ + DataSet?: { + /** + * UDDB实例对应的可用区 + */ + Zone?: string; + /** + * UDDB实例ID + */ + UDDBId?: string; + /** + * UDDB实例名称 + */ + Name?: string; + /** + * UDDB的数据库版本 + */ + DBTypeId?: string; + /** + * 管理员帐户名,默认root + */ + AdminUser?: string; + /** + * UDDB实例访问的虚IP + */ + VirtualIP?: string; + /** + * UDDB实例访问的端口号 + */ + Port?: number; + /** + * UDDB状态, 状态列表如下: Init: 初始化中 InitFail: 初始化失败 Starting: 启动中 Running: 系统正常运行中 Abnormal: 系统运行中, 有异常, 还能提供服务 Error: 系统运行中, 但不能正常提供服务 Shutdown: 关闭中 Shutoff: 已关闭 Deleted: 已删除 UpgradingUDDB: 升降级UDDB配置中 UpgradingDataNode: 升降级UDDB节点配置中 ChangingSlaveCount: 改变只读实例数量中 ScalingOutUDDB: 水平扩展中 + */ + State?: string; + /** + * UDDB实例创建时间,采用UTC计时时间戳 + */ + CreateTime?: number; + /** + * UDDB实例过期时间,采用UTC计时时间戳 + */ + ExpiredTime?: number; + /** + * 付费类型,可选值如下: Year: 按年付费 Month: 按月付费 Dynamic: 按需付费(单位: 小时) Trial: 免费试用 + */ + ChargeType?: string; + /** + * UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5W FellFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w; EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + */ + RouterVersion?: string; + /** + * 各版本下的节点个数。体验版: 固定为2节点; 畅享版:固定为4节点(后续可通过管理API调整);专享版:物理机台数 + */ + RouterNodeNum?: number; + /** + * 参考QPS。 免费版: 15000; 畅享版: 30000 - 100000 (根据节点数而定); 专享版: 节点数 * 10w qps + */ + RefQps?: number; + /** + * 数据节点个数 + */ + DataNodeCount?: number; + /** + * 数据节点的内存配置, 单位:MB + */ + DataNodeMemory?: number; + /** + * 数据节点的磁盘大小配置. 单位: GB + */ + DataNodeDiskSpace?: number; + /** + * 每个数据节点的只读实例个数. + */ + DataNodeSlaveCount?: number; + /** + * UDDB实例的数据节点的信息列表 + */ + DataNodeList?: { + /** + * 数据节点ID + */ + Id?: string; + /** + * 数据节点的内存配置, 单位:MB + */ + Memory?: number; + /** + * 数据节点的磁盘大小配置. 单位: GB + */ + DiskSpace?: number; + /** + * 数据节点的只读实例个数. + */ + SlaveCount?: number; + /** + * 数据分片状态, 状态列表如下: Init: 初始化中 Fail: 安装失败 Starting: 启动中 Running: 系统正常运行中 Shutdown: 关闭中 Shutoff: 已关闭 Deleted: 已删除 Upgrading: 系统升级中 + */ + State?: string; + /** + * 只读实例信息列表 + */ + SlaveInfos?: { + /** + * 只读实例ID + */ + Id?: string; + /** + * 对应数据节点的ID + */ + DataNodeId?: string; + /** + * 只读实例状态, 状态列表如下: Init: 初始化中 Fail: 安装失败 Starting: 启动中 Running: 系统正常运行中 Shutdown: 关闭中 Shutoff: 已关闭 Deleted: 已删除 Upgrading: 系统升级中 + */ + State?: string; + }[]; + /** + * 最近一次数据迁移任务id + */ + LastTransTaskId?: string; + /** + * 节点的创建时间 + */ + CreateTime?: string; + }[]; + /** + * 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + */ + InstanceMode?: string; + /** + * 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + */ + InstanceType?: string; + }[]; +} + +/** + * DescribeUDDBInstancePrice - 获取分布式数据库UDDB价格 + */ +export interface DescribeUDDBInstancePriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5WFeelFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w;EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + */ + RouterVersion: string; + /** + * 其他版本:该参数可不填;专享版:物理机节点个数。一台物理机有2个节点 + */ + RouterNodeNum: number; + /** + * 初始的数据节点个数 取值必须>0. + */ + DataNodeCount: number; + /** + * 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值. + */ + DataNodeMemory: string; + /** + * 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + */ + DataNodeDiskSpace: number; + /** + * 付费类型,可选值如下: Year: 按年付费 Month: 按月付费 Dynamic: 按需付费(单位: 小时) Trial: 免费试用 默认值为: Dynamic + */ + ChargeType?: string; + /** + * 购买时长,默认值1 + */ + Quantity?: number; + /** + * 每个数据节点的只读实例个数, 取值必须>=0. 默认取值为0. + */ + DataNodeSlaveCount?: number; + /** + * 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + */ + InstanceMode?: string; + /** + * 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + */ + InstanceType?: string; +} + +/** + * DescribeUDDBInstancePrice - 获取分布式数据库UDDB价格 + */ +export interface DescribeUDDBInstancePriceResponse { + /** + * 价格明细, 参考PriceDetailInfo对象定义 + */ + PriceInfo?: { + /** + * 中间件路由节点费用 + */ + MiddlewarePrice?: number; + /** + * 存储节点费用 + */ + DataNodePrice?: number; + /** + * 只读实例费用 + */ + DataNodeSlavePrice?: number; + }; +} + +/** + * DescribeUDDBInstanceUpgradePrice - 升级UDDB时,获取升级后的价格 + */ +export interface DescribeUDDBInstanceUpgradePriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB实例ID + */ + UDDBId: string; + /** + * UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5WFeelFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w;EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + */ + RouterVersion: string; + /** + * 其他版本:该参数可不填;专享版:物理机节点的个数。一台物理机有2个节点 + */ + RouterNodeNum: number; + /** + * 新的数据节点个数 取值必须>0. + */ + DataNodeCount?: number; + /** + * 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值. + */ + DataNodeMemory?: number; + /** + * 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + */ + DataNodeDiskSpace?: number; + /** + * 每个数据节点的只读实例个数, 取值必须>=0. + */ + DataNodeSlaveCount?: number; + /** + * 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + */ + InstanceMode?: string; + /** + * 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + */ + InstanceType?: string; +} + +/** + * DescribeUDDBInstanceUpgradePrice - 升级UDDB时,获取升级后的价格 + */ +export interface DescribeUDDBInstanceUpgradePriceResponse { + /** + * 价格明细, 参考PriceInfo对象定义 + */ + PriceInfo?: { + /** + * 中间件路由节点费用 + */ + MiddlewarePrice?: number; + /** + * 存储节点费用 + */ + DataNodePrice?: number; + /** + * 只读实例费用 + */ + DataNodeSlavePrice?: number; + }; +} + +/** + * RestartUDDBInstance - 重启UDDB实例,开始提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Running: 正常运行中 +Abnormal: 异常运行中 +当请求返回成功之后,UDDB实例的状态变成"Starting"(启动中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在重启过程中, 当UDDB实例启动成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果启动过程中出现异常, 状态变成"Abnormal"(异常运行中), 或者"Shutoff"(已关闭 + */ +export interface RestartUDDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB实例ID + */ + UDDBId: string; +} + +/** + * RestartUDDBInstance - 重启UDDB实例,开始提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Running: 正常运行中 +Abnormal: 异常运行中 +当请求返回成功之后,UDDB实例的状态变成"Starting"(启动中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在重启过程中, 当UDDB实例启动成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果启动过程中出现异常, 状态变成"Abnormal"(异常运行中), 或者"Shutoff"(已关闭 + */ +export interface RestartUDDBInstanceResponse {} + +/** + * StartUDDBInstance - 启动UDDB实例,开始提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例的状态变成"Starting"(启动中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在启动过程中, 当UDDB实例启动成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果启动过程中出现异常, 状态变成"Abnormal"(异常运行中), 或者"Shutoff"(已关闭) + */ +export interface StartUDDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB实例ID + */ + UDDBId: string; +} + +/** + * StartUDDBInstance - 启动UDDB实例,开始提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例的状态变成"Starting"(启动中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在启动过程中, 当UDDB实例启动成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果启动过程中出现异常, 状态变成"Abnormal"(异常运行中), 或者"Shutoff"(已关闭) + */ +export interface StartUDDBInstanceResponse {} + +/** + * StopUDDBInstance - 关闭UDDB实例,停止提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Running: 正常运行中 +Abnormal: 异常运行中 +当请求返回成功之后,UDDB实例的状态变成"Shutdown"(关闭中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在关闭过程中, 当UDDB实例关闭成功之后, UDDB实例的状态变成"Shutoff"(已关闭); 如果关闭过程中出现异常, 根据UDDB实例的情况, 状态变成"Abnormal"(异常运行中), 或者"Running"(正常运行中) + */ +export interface StopUDDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDDB实例ID + */ + UDDBId: string; +} + +/** + * StopUDDBInstance - 关闭UDDB实例,停止提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Running: 正常运行中 +Abnormal: 异常运行中 +当请求返回成功之后,UDDB实例的状态变成"Shutdown"(关闭中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在关闭过程中, 当UDDB实例关闭成功之后, UDDB实例的状态变成"Shutoff"(已关闭); 如果关闭过程中出现异常, 根据UDDB实例的情况, 状态变成"Abnormal"(异常运行中), 或者"Running"(正常运行中) + */ +export interface StopUDDBInstanceResponse {} + +/** + * UpgradeUDDBDataNode - 升降级分布式数据库数据节点的配置, 提高/降低数据节点的数据容量和内存 + +所有数据节点以及其所挂载的只读实例的配置都受到影响 + +升降级数据节点的配置之后之后, 会按照数据节点新的磁盘和内存大小重新计费 + +如下状态的数据节点实例可以进行这个操作: + +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例的状态变成"UpgradingDataNode",相关数据节点的状态变成"Upgrading"; 如果返回失败, UDDB实例状态保持不变 当UDDB实例升级结束之后, UDDB实例的状态变成"Shutoff" + */ +export interface UpgradeUDDBDataNodeRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * UDDB实例ID + */ + UDDBId: string; + /** + * 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值 + */ + DataNodeMemory: number; + /** + * 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + */ + DataNodeDiskSpace: number; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * UpgradeUDDBDataNode - 升降级分布式数据库数据节点的配置, 提高/降低数据节点的数据容量和内存 + +所有数据节点以及其所挂载的只读实例的配置都受到影响 + +升降级数据节点的配置之后之后, 会按照数据节点新的磁盘和内存大小重新计费 + +如下状态的数据节点实例可以进行这个操作: + +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例的状态变成"UpgradingDataNode",相关数据节点的状态变成"Upgrading"; 如果返回失败, UDDB实例状态保持不变 当UDDB实例升级结束之后, UDDB实例的状态变成"Shutoff" + */ +export interface UpgradeUDDBDataNodeResponse {} + +/** + * UpgradeUDDBInstance - 升降级分布式数据库中间件的配置, 提高/降低请求处理的并发性 + +修改请求处理节点个数之后, 按照所有请求处理节点的总内存容量和CPU核数重新计费 + +如下状态的UDDB实例可以进行这个操作: + +Running: 系统正常运行中 +当请求返回成功之后,UDDB实例的状态变成"UpgradingUDDB"; 如果返回失败, UDDB实例状态保持不变 当UDDB实例升级成功之后, UDDB实例的状态变成"Running"; 如果更改过程中出现异常, 状态变成"Abnormal", 或者"Error" + */ +export interface UpgradeUDDBInstanceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * UDDB实例ID + */ + UDDBId: string; + /** + * UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5W FellFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w; EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + */ + RouterVersion: string; + /** + * 其他版本:该参数可不填;专享版:物理机台数 + */ + RouterNodeNum: number; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * UpgradeUDDBInstance - 升降级分布式数据库中间件的配置, 提高/降低请求处理的并发性 + +修改请求处理节点个数之后, 按照所有请求处理节点的总内存容量和CPU核数重新计费 + +如下状态的UDDB实例可以进行这个操作: + +Running: 系统正常运行中 +当请求返回成功之后,UDDB实例的状态变成"UpgradingUDDB"; 如果返回失败, UDDB实例状态保持不变 当UDDB实例升级成功之后, UDDB实例的状态变成"Running"; 如果更改过程中出现异常, 状态变成"Abnormal", 或者"Error" + */ +export interface UpgradeUDDBInstanceResponse {} diff --git a/src/services/udisk/index.ts b/src/services/udisk/index.ts new file mode 100644 index 0000000..1bf8a77 --- /dev/null +++ b/src/services/udisk/index.ts @@ -0,0 +1,1434 @@ +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 **udisk** service + */ +export default class UDiskClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * AttachUDisk - 将一个可用的UDisk挂载到某台主机上,当UDisk挂载成功后,还需要在主机内部进行文件系统操作 + * + * See also: https://docs.ucloud.cn/api/udisk-api/attach_udisk + */ + attachUDisk(request?: AttachUDiskRequest): Promise { + const args = { Action: 'AttachUDisk', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AttachUDiskResponse + ); + } + + /** + * CloneUDisk - 从UDisk创建UDisk克隆 + * + * See also: https://docs.ucloud.cn/api/udisk-api/clone_udisk + */ + cloneUDisk(request?: CloneUDiskRequest): Promise { + const args = { Action: 'CloneUDisk', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CloneUDiskResponse + ); + } + + /** + * CloneUDiskSnapshot - 从快照创建UDisk克隆 + * + * See also: https://docs.ucloud.cn/api/udisk-api/clone_udisk_snapshot + */ + cloneUDiskSnapshot( + request?: CloneUDiskSnapshotRequest + ): Promise { + const args = { Action: 'CloneUDiskSnapshot', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CloneUDiskSnapshotResponse + ); + } + + /** + * CloneUDiskUDataArk - 从数据方舟的备份创建UDisk + * + * See also: https://docs.ucloud.cn/api/udisk-api/clone_udisk_udataark + */ + cloneUDiskUDataArk( + request?: CloneUDiskUDataArkRequest + ): Promise { + const args = { Action: 'CloneUDiskUDataArk', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CloneUDiskUDataArkResponse + ); + } + + /** + * CreateAttachUDisk - 创建并挂载UDisk磁盘 + * + * See also: https://docs.ucloud.cn/api/udisk-api/create_attach_udisk + */ + createAttachUDisk( + request?: CreateAttachUDiskRequest + ): Promise { + const args = { Action: 'CreateAttachUDisk', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateAttachUDiskResponse + ); + } + + /** + * CreateUDisk - 创建UDisk磁盘 + * + * See also: https://docs.ucloud.cn/api/udisk-api/create_udisk + */ + createUDisk(request?: CreateUDiskRequest): Promise { + const args = { Action: 'CreateUDisk', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUDiskResponse + ); + } + + /** + * CreateUDiskSnapshot - 创建snapshot快照 + * + * See also: https://docs.ucloud.cn/api/udisk-api/create_udisk_snapshot + */ + createUDiskSnapshot( + request?: CreateUDiskSnapshotRequest + ): Promise { + const args = { Action: 'CreateUDiskSnapshot', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUDiskSnapshotResponse + ); + } + + /** + * DeleteUDisk - 删除UDisk + * + * See also: https://docs.ucloud.cn/api/udisk-api/delete_udisk + */ + deleteUDisk(request?: DeleteUDiskRequest): Promise { + const args = { Action: 'DeleteUDisk', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUDiskResponse + ); + } + + /** + * DeleteUDiskSnapshot - 删除Snapshot + * + * See also: https://docs.ucloud.cn/api/udisk-api/delete_udisk_snapshot + */ + deleteUDiskSnapshot( + request?: DeleteUDiskSnapshotRequest + ): Promise { + const args = { Action: 'DeleteUDiskSnapshot', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUDiskSnapshotResponse + ); + } + + /** + * DescribeRecycleUDisk - 拉取回收站中云硬盘列表 + * + * See also: https://docs.ucloud.cn/api/udisk-api/describe_recycle_udisk + */ + describeRecycleUDisk( + request?: DescribeRecycleUDiskRequest + ): Promise { + const args = { Action: 'DescribeRecycleUDisk', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeRecycleUDiskResponse + ); + } + + /** + * DescribeUDisk - 获取UDisk实例 + * + * See also: https://docs.ucloud.cn/api/udisk-api/describe_udisk + */ + describeUDisk( + request?: DescribeUDiskRequest + ): Promise { + const args = { Action: 'DescribeUDisk', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDiskResponse + ); + } + + /** + * DescribeUDiskPrice - 获取UDisk实例价格信息 + * + * See also: https://docs.ucloud.cn/api/udisk-api/describe_udisk_price + */ + describeUDiskPrice( + request?: DescribeUDiskPriceRequest + ): Promise { + const args = { Action: 'DescribeUDiskPrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDiskPriceResponse + ); + } + + /** + * DescribeUDiskSnapshot - 获取UDisk快照 + * + * See also: https://docs.ucloud.cn/api/udisk-api/describe_udisk_snapshot + */ + describeUDiskSnapshot( + request?: DescribeUDiskSnapshotRequest + ): Promise { + const args = { Action: 'DescribeUDiskSnapshot', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDiskSnapshotResponse + ); + } + + /** + * DescribeUDiskUpgradePrice - 获取UDisk升级价格信息 + * + * See also: https://docs.ucloud.cn/api/udisk-api/describe_udisk_upgrade_price + */ + describeUDiskUpgradePrice( + request?: DescribeUDiskUpgradePriceRequest + ): Promise { + const args = { Action: 'DescribeUDiskUpgradePrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDiskUpgradePriceResponse + ); + } + + /** + * DetachUDisk - 卸载某个已经挂载在指定UHost实例上的UDisk + * + * See also: https://docs.ucloud.cn/api/udisk-api/detach_udisk + */ + detachUDisk(request?: DetachUDiskRequest): Promise { + const args = { Action: 'DetachUDisk', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DetachUDiskResponse + ); + } + + /** + * RecoverUDisk - 从回收站中恢复云硬盘 + * + * See also: https://docs.ucloud.cn/api/udisk-api/recover_udisk + */ + recoverUDisk(request?: RecoverUDiskRequest): Promise { + const args = { Action: 'RecoverUDisk', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RecoverUDiskResponse + ); + } + + /** + * RenameUDisk - 重命名UDisk + * + * See also: https://docs.ucloud.cn/api/udisk-api/rename_udisk + */ + renameUDisk(request?: RenameUDiskRequest): Promise { + const args = { Action: 'RenameUDisk', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RenameUDiskResponse + ); + } + + /** + * ResizeUDisk - 调整UDisk容量 + * + * See also: https://docs.ucloud.cn/api/udisk-api/resize_udisk + */ + resizeUDisk(request?: ResizeUDiskRequest): Promise { + const args = { Action: 'ResizeUDisk', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ResizeUDiskResponse + ); + } + + /** + * RestoreUDisk - 从备份恢复数据至UDisk + * + * See also: https://docs.ucloud.cn/api/udisk-api/restore_udisk + */ + restoreUDisk(request?: RestoreUDiskRequest): Promise { + const args = { Action: 'RestoreUDisk', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RestoreUDiskResponse + ); + } + + /** + * SetUDiskUDataArkMode - 设置UDisk数据方舟的状态 + * + * See also: https://docs.ucloud.cn/api/udisk-api/set_udisk_udataark_mode + */ + setUDiskUDataArkMode( + request?: SetUDiskUDataArkModeRequest + ): Promise { + const args = { Action: 'SetUDiskUDataArkMode', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as SetUDiskUDataArkModeResponse + ); + } +} + +/** + * AttachUDisk - 将一个可用的UDisk挂载到某台主机上,当UDisk挂载成功后,还需要在主机内部进行文件系统操作 + */ +export interface AttachUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 需要挂载的UDisk实例ID. + */ + UDiskId: string; + /** + * UHost实例ID。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】 + */ + UHostId?: string; + /** + * 是否允许多点挂载(Yes: 允许多点挂载, No: 不允许多点挂载, 不填默认Yes ) + */ + MultiAttach?: string; + /** + * Host实例ID + */ + HostId?: string; +} + +/** + * AttachUDisk - 将一个可用的UDisk挂载到某台主机上,当UDisk挂载成功后,还需要在主机内部进行文件系统操作 + */ +export interface AttachUDiskResponse { + /** + * 挂载的UHost实例ID。【即将废弃,建议使用HostId】 + */ + UHostId?: string; + /** + * 挂载的UDisk实例ID + */ + UDiskId?: string; + /** + * 挂载的设备名称 + */ + DeviceName?: string; + /** + * 挂载的Host实例ID + */ + HostId?: string; +} + +/** + * CloneUDisk - 从UDisk创建UDisk克隆 + */ +export interface CloneUDiskRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 实例名称 + */ + Name: string; + /** + * 克隆父Disk的Id + */ + SourceId: string; + /** + * 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + */ + UDataArkMode?: string; + /** + * 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + */ + SnapshotService?: string; + /** + * 购买时长 默认: 1 + */ + Quantity?: number; + /** + * Disk注释 + */ + Comment?: string; + /** + * Year , Month, Dynamic,Postpay,Trial 默认: Month + */ + ChargeType?: string; + /** + * 业务组 默认:Default + */ + Tag?: string; + /** + * RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。 + */ + RdmaClusterId?: string; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * CloneUDisk - 从UDisk创建UDisk克隆 + */ +export interface CloneUDiskResponse { + /** + * 创建UDisk Id + */ + UDiskId?: string[]; +} + +/** + * CloneUDiskSnapshot - 从快照创建UDisk克隆 + */ +export interface CloneUDiskSnapshotRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 实例名称 + */ + Name: string; + /** + * 克隆父Snapshot的Id + */ + SourceId: string; + /** + * 购买UDisk大小,单位:GB,范围[1~8000]。(UDisk大小设定对本地盘快照有效,对云盘快照无效) + */ + Size?: number; + /** + * Disk注释 + */ + Comment?: string; + /** + * Year , Month, Dynamic,Postpay 默认: Dynamic + */ + ChargeType?: string; + /** + * 购买时长 默认: 1 + */ + Quantity?: number; + /** + * 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + */ + UDataArkMode?: string; + /** + * 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + */ + SnapshotService?: string; + /** + * 业务组 默认:Default + */ + Tag?: string; + /** + * RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。 + */ + RdmaClusterId?: string; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * CloneUDiskSnapshot - 从快照创建UDisk克隆 + */ +export interface CloneUDiskSnapshotResponse { + /** + * 创建UDisk Id + */ + UDiskId?: string[]; +} + +/** + * CloneUDiskUDataArk - 从数据方舟的备份创建UDisk + */ +export interface CloneUDiskUDataArkRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 实例名称 + */ + Name: string; + /** + * 需要克隆的源盘id + */ + UDiskId: string; + /** + * 指定从方舟克隆的备份时间点 + */ + SnapshotTime: number; + /** + * Disk注释 + */ + Comment?: string; + /** + * Year , Month, Dynamic,Postpay 默认: Dynamic + */ + ChargeType?: string; + /** + * 购买时长 默认: 1 + */ + Quantity?: number; + /** + * 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + */ + UDataArkMode?: string; + /** + * 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + */ + SnapshotService?: string; + /** + * 购买UDisk大小,单位:GB,范围[1~8000]。(UDisk大小设定对本地盘备份有效,对云盘备份无效) + */ + Size?: number; + /** + * 业务组 默认:Default + */ + Tag?: string; + /** + * RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。 + */ + RdmaClusterId?: string; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * CloneUDiskUDataArk - 从数据方舟的备份创建UDisk + */ +export interface CloneUDiskUDataArkResponse { + /** + * 创建UDisk Id + */ + UDiskId: string[]; +} + +/** + * CreateAttachUDisk - 创建并挂载UDisk磁盘 + */ +export interface CreateAttachUDiskRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000];高效数据盘:范围[1~32000]。 + */ + Size: number; + /** + * 实例名称 + */ + Name: string; + /** + * UHost实例ID。当创建云盘类型为RSSDDataDisk时,根据传入的UHostId,创建与虚机在同一PodId下的云盘。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】 + */ + UHostId?: string; + /** + * Year , Month, Dynamic, Postpay, Trial 。 Size小于等于2000时,默认为Dynamic;Size大于2000时,默认为Month。 + */ + ChargeType?: string; + /** + * 购买时长 默认: 1 + */ + Quantity?: number; + /** + * 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + */ + UDataArkMode?: string; + /** + * 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + */ + SnapshotService?: string; + /** + * 业务组 默认:Default + */ + Tag?: string; + /** + * UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),默认值(DataDisk) + */ + DiskType?: string; + /** + * 是否加密。Yes:加密,No:不加密,默认值(No) + */ + UKmsMode?: string; + /** + * 加密需要的cmk id,UKmsMode为Yes时,必填 + */ + CmkId?: string; + /** + * 是否允许多点挂载(Yes: 允许多点挂载, No: 不允许多点挂载, 不填默认Yes ) + */ + MultiAttach?: string; + /** + * Host实例ID。当创建云盘类型为RSSDDataDisk时,根据传入的HostId,创建与虚机在同一PodId下的云盘。 + */ + HostId?: string; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * CreateAttachUDisk - 创建并挂载UDisk磁盘 + */ +export interface CreateAttachUDiskResponse { + /** + * 挂载的UDisk实例ID + */ + UDiskId?: string; + /** + * 挂载的UHost实例ID。【即将废弃,建议使用HostId】 + */ + UHostId?: string; + /** + * 挂载的Host实例ID + */ + HostId?: string; + /** + * 挂载设备名称 + */ + DeviceName?: string; +} + +/** + * CreateUDisk - 创建UDisk磁盘 + */ +export interface CreateUDiskRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000];高效数据盘:范围[1~32000]。 + */ + Size: number; + /** + * 实例名称 + */ + Name: string; + /** + * Year , Month, Dynamic, Postpay, Trial 。默认为Dynamic。 + */ + ChargeType?: string; + /** + * 购买时长 默认: 1 + */ + Quantity?: number; + /** + * 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + */ + UDataArkMode?: string; + /** + * 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + */ + SnapshotService?: string; + /** + * 业务组 默认:Default + */ + Tag?: string; + /** + * UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),默认值(DataDisk) + */ + DiskType?: string; + /** + * 是否加密。Yes:加密,No:不加密,默认值(No) + */ + UKmsMode?: string; + /** + * 加密需要的cmk id,UKmsMode为Yes时,必填 + */ + CmkId?: string; + /** + * RDMA集群id。DiskType为RSSDDataDisk可填,指定云盘创建到对应的RDMA集群。 + */ + RdmaClusterId?: string; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * CreateUDisk - 创建UDisk磁盘 + */ +export interface CreateUDiskResponse { + /** + * UDisk实例Id + */ + UDiskId?: string[]; +} + +/** + * CreateUDiskSnapshot - 创建snapshot快照 + */ +export interface CreateUDiskSnapshotRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 快照的UDisk的Id + */ + UDiskId: string; + /** + * 快照名称 + */ + Name: string; + /** + * 购买时长 默认: 1 (已废弃) + */ + Quantity?: number; + /** + * Year , Month, Dynamic 默认: Dynamic (已废弃) + */ + ChargeType?: string; + /** + * 快照描述 + */ + Comment?: string; +} + +/** + * CreateUDiskSnapshot - 创建snapshot快照 + */ +export interface CreateUDiskSnapshotResponse { + /** + * 快照Id + */ + SnapshotId: string[]; +} + +/** + * DeleteUDisk - 删除UDisk + */ +export interface DeleteUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 要删除的UDisk的Id + */ + UDiskId: string; +} + +/** + * DeleteUDisk - 删除UDisk + */ +export interface DeleteUDiskResponse {} + +/** + * DeleteUDiskSnapshot - 删除Snapshot + */ +export interface DeleteUDiskSnapshotRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 快照Id(填写后不能填写UDisk Id) + */ + SnapshotId?: string; + /** + * UDisk Id,删除该盘所创建出来的所有快照(填写后不能填写SnapshotId) + */ + UDiskId?: string; +} + +/** + * DeleteUDiskSnapshot - 删除Snapshot + */ +export interface DeleteUDiskSnapshotResponse {} + +/** + * DescribeRecycleUDisk - 拉取回收站中云硬盘列表 + */ +export interface DescribeRecycleUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 返回数据长度, 默认为20 + */ + Limit?: number; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; +} + +/** + * DescribeRecycleUDisk - 拉取回收站中云硬盘列表 + */ +export interface DescribeRecycleUDiskResponse { + /** + * 磁盘数量 + */ + TotalCount: number; + /** + * 回收站磁盘列表 + */ + DataSet?: { + /** + * 磁盘id + */ + UDiskId: string; + /** + * 创建时间 + */ + CreateTime: number; + /** + * 过期时间 + */ + ExpiredTime: number; + /** + * 销毁倒计时 + */ + CountdownTime: number; + /** + * 磁盘名称 + */ + Name: string; + /** + * 磁盘容量 + */ + Size: number; + /** + * 业务组 + */ + Tag?: string; + /** + * 可用区 + */ + Zone: string; + }[]; +} + +/** + * DescribeUDisk - 获取UDisk实例 + */ +export interface DescribeUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * UDisk Id(留空返回全部) + */ + UDiskId?: string; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 返回数据长度, 默认为20 + */ + Limit?: number; + /** + * ProtocolVersion字段为1时,需结合IsBoot确定具体磁盘类型:普通数据盘:DiskType:"CLOUD_NORMAL",IsBoot:"False";普通系统盘:DiskType:"CLOUD_NORMAL",IsBoot:"True";SSD数据盘:DiskType:"CLOUD_SSD",IsBoot:"False";SSD系统盘:DiskType:"CLOUD_SSD",IsBoot:"True";RSSD数据盘:DiskType:"CLOUD_RSSD",IsBoot:"False";为空拉取所有。ProtocolVersion字段为0或没有该字段时,可设为以下几个值:普通数据盘:DataDisk;普通系统盘:SystemDisk;SSD数据盘:SSDDataDisk;SSD系统盘:SSDSystemDisk;RSSD数据盘:RSSDDataDisk;为空拉取所有。 + */ + DiskType?: string; + /** + * 请求协议版本,建议升级为1,为1时DiskType与UHost磁盘类型定义一致;默认为0 + */ + ProtocolVersion?: number; + /** + * ProtocolVersion字段为1且DiskType不为空时,必须设置,设置规则请参照DiskType;ProtocolVersion字段为1且DiskType为空时,该字段无效。ProtocolVersion字段为0或没有该字段时,该字段无效。 + */ + IsBoot?: string; + /** + * 是否忽略计费信息。Yes:忽略,No:不忽略,默认值(No)。(如不关心账单信息,建议选填“Yes”,可降低请求延时) + */ + IgnoreUBillInfo?: string; + /** + * 根据传入的UHostIdForAttachment,筛选出虚机在同一PodId下的云盘【本字段即将废弃,建议使用HostIdForAttachment】 + */ + UHostIdForAttachment?: string; + /** + * 根据传入的HostIdForAttachment,筛选出虚机在同一PodId下的云盘 + */ + HostIdForAttachment?: string; + /** + * 宿主产品类型,可筛选挂载在该类型宿主上的云盘。可选值:uhost, uphost。为空拉取所有。(当HostIdForAttachment字段不为空时,该字段可以不填,若HostIdForAttachment与该字段宿主类型冲突,则以HostIdForAttachment字段为准。) + */ + HostProduct?: string; +} + +/** + * DescribeUDisk - 获取UDisk实例 + */ +export interface DescribeUDiskResponse { + /** + * JSON 格式的UDisk数据列表, 每项参数可见下面 UDiskDataSet + */ + DataSet?: { + /** + * 可用区 + */ + Zone?: string; + /** + * UDisk实例Id + */ + UDiskId?: string; + /** + * 实例名称 + */ + Name?: string; + /** + * 容量单位GB + */ + Size?: number; + /** + * 状态:Available(可用),Attaching(挂载中), InUse(已挂载), Detaching(卸载中), Initializating(分配中), Failed(创建失败),Cloning(克隆中),Restoring(恢复中),RestoreFailed(恢复失败), + */ + Status?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 过期时间 + */ + ExpiredTime?: number; + /** + * 挂载的UHost的Id。【即将废弃,建议使用HostId】 + */ + UHostId?: string; + /** + * 挂载的UHost的Name。【即将废弃,建议使用HostName】 + */ + UHostName?: string; + /** + * 挂载的UHost的IP。【即将废弃,建议使用HostIP】 + */ + UHostIP?: string; + /** + * 挂载的Host的Id + */ + HostId?: string; + /** + * 挂载的Host的Name + */ + HostName?: string; + /** + * 挂载的Host的IP + */ + HostIP?: string; + /** + * 挂载的设备名称 + */ + DeviceName?: string; + /** + * Year,Month,Dynamic,Trial,Postpay + */ + ChargeType?: string; + /** + * 业务组名称 + */ + Tag?: string; + /** + * 资源是否过期,过期:"Yes", 未过期:"No" + */ + IsExpire?: string; + /** + * 是否支持数据方舟,支持:"2.0", 不支持:"1.0" + */ + Version?: string; + /** + * 是否开启数据方舟,开启:"Yes", 不支持:"No" + */ + UDataArkMode?: string; + /** + * 该盘快照个数 + */ + SnapshotCount?: number; + /** + * 该盘快照上限 + */ + SnapshotLimit?: number; + /** + * 请求中的ProtocolVersion字段为1时,需结合IsBoot确定具体磁盘类型:普通数据盘:DiskType:"CLOUD_NORMAL",IsBoot:"False"; 普通系统盘:DiskType:"CLOUD_NORMAL",IsBoot:"True";SSD数据盘:DiskType:"CLOUD_SSD",IsBoot:"False";SSD系统盘:DiskType:"CLOUD_SSD",IsBoot:"True";RSSD数据盘:DiskType:"CLOUD_RSSD",IsBoot:"False"。请求中的ProtocolVersion字段为0或没有该字段时,云硬盘类型参照如下:普通数据盘:DataDisk;普通系统盘:SystemDisk;SSD数据盘:SSDDataDisk;SSD系统盘:SSDSystemDisk;RSSD数据盘:RSSDDataDisk。 + */ + DiskType?: string; + /** + * 是否支持克隆,1支持 ,0不支持 + */ + CloneEnable?: number; + /** + * 是否支持快照,1支持 ,0不支持 + */ + SnapEnable?: number; + /** + * 是否支持开启方舟,1支持 ,0不支持 + */ + ArkSwitchEnable?: number; + /** + * 是否是加密盘,是:"Yes", 否:"No" + */ + UKmsMode?: string; + /** + * 该盘的cmk id + */ + CmkId?: string; + /** + * 该盘的密文密钥 + */ + DataKey?: string; + /** + * 该盘cmk的状态, Enabled(正常),Disabled(失效),Deleted(删除),NoCmkId(非加密盘) + */ + CmkIdStatus?: string; + /** + * cmk id 别名 + */ + CmkIdAlias?: string; + /** + * 是否是系统盘,是:"True", 否:"False" + */ + IsBoot?: string; + /** + * 该盘的备份方式。快照服务:"SnapshotService";数据方舟:"UDataArk";无备份方式:"" + */ + BackupMode?: string; + /** + * RDMA集群id,仅RSSD返回该值;其他类型云盘返回""。当云盘的此值与快杰云主机的RdmaClusterId相同时,RSSD可以挂载到这台云主机。 + */ + RdmaClusterId?: string; + }[]; + /** + * 根据过滤条件得到的总数 + */ + TotalCount?: number; +} + +/** + * DescribeUDiskPrice - 获取UDisk实例价格信息 + */ +export interface DescribeUDiskPriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];普通系统盘:范围[1~8000];SSD系统盘:范围[1~4000];RSSD数据盘:范围[1~32000];RSSD系统盘:范围[1~4000];高效数据盘:范围[1~32000];高效系统盘:范围[1~500]。 + */ + Size: number; + /** + * Year , Month, Dynamic,Postpay,Trial 默认: Month + */ + ChargeType?: string; + /** + * 购买UDisk的时长,默认值为1 + */ + Quantity?: number; + /** + * 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + */ + UDataArkMode?: string; + /** + * 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + */ + SnapshotService?: string; + /** + * UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),SystemDisk(普通系统盘),SSDSystemDisk(SSD系统盘),RSSDSystemDisk(RSSD系统盘),EfficiencySystemDisk(高效系统盘),默认值(DataDisk) + */ + DiskType?: string; + /** + * 是否将快照服务(数据方舟),云硬盘放入一张订单, 是:"Yes",否:"No",默认是"No" + */ + IsTotalPrice?: string; + /** + * 云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + MachineType?: string; +} + +/** + * DescribeUDiskPrice - 获取UDisk实例价格信息 + */ +export interface DescribeUDiskPriceResponse { + /** + * 价格参数列表,具体说明见 UDiskPriceDataSet + */ + DataSet?: { + /** + * Year, Month, Dynamic,Trial + */ + ChargeType?: string; + /** + * 实际价格 (单位: 分) + */ + Price?: number; + /** + * "UDataArk","SnapshotService","UDisk","Total" + */ + ChargeName?: string; + /** + * 用户折后价(对应计费CustomPrice) + */ + OriginalPrice?: number; + /** + * 原价(对应计费OriginalPrice) + */ + ListPrice?: number; + }[]; +} + +/** + * DescribeUDiskSnapshot - 获取UDisk快照 + */ +export interface DescribeUDiskSnapshotRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 返回数据长度, 默认为20 + */ + Limit?: number; + /** + * UDiskId,返回该盘所做快照.(必须同时传Zone) + */ + UDiskId?: string; + /** + * 快照id,SnapshotId , UDiskId 同时传SnapshotId优先 + */ + SnapshotId?: string; +} + +/** + * DescribeUDiskSnapshot - 获取UDisk快照 + */ +export interface DescribeUDiskSnapshotResponse { + /** + * JSON 格式的Snapshot列表, 详细参见 UDiskSnapshotSet + */ + DataSet?: { + /** + * 可用区 + */ + Zone: string; + /** + * 快照Id + */ + SnapshotId: string; + /** + * 快照名称 + */ + Name: string; + /** + * 快照的源UDisk的Id + */ + UDiskId: string; + /** + * 快照的源UDisk的Name + */ + UDiskName: string; + /** + * 创建时间 + */ + CreateTime: number; + /** + * 容量单位GB + */ + Size: number; + /** + * 快照状态,Normal:正常,Failed:失败,Creating:制作中 + */ + Status: string; + /** + * 磁盘类型,0:数据盘,1:系统盘 + */ + DiskType: number; + /** + * 过期时间 + */ + ExpiredTime?: number; + /** + * 快照描述 + */ + Comment?: string; + /** + * 对应磁盘是否处于可用状态 + */ + IsUDiskAvailable?: boolean; + /** + * 快照版本 + */ + Version?: string; + /** + * 对应磁盘制作快照时所挂载的主机 + */ + UHostId?: string; + /** + * 是否是加密盘快照,是:"Yes", 否:"No" + */ + UKmsMode?: string; + /** + * 该快照的cmk id + */ + CmkId?: string; + /** + * 该快照的密文密钥 + */ + DataKey?: string; + /** + * 该快照cmk的状态, Enabled(正常),Disabled(失效),Deleted(删除),NoCmkId(非加密盘) + */ + CmkIdStatus?: string; + /** + * cmk id 别名 + */ + CmkIdAlias?: string; + }[]; + /** + * 根据过滤条件得到的总数 + */ + TotalCount?: number; +} + +/** + * DescribeUDiskUpgradePrice - 获取UDisk升级价格信息 + */ +export interface DescribeUDiskUpgradePriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];普通系统盘:范围[1~8000];SSD系统盘:范围[1~4000];RSSD数据盘:范围[1~32000];RSSD系统盘:范围[1~4000];高效数据盘:范围[1~32000];高效系统盘:范围[1~500]。 + */ + Size: number; + /** + * 升级目标UDisk ID + */ + SourceId: string; + /** + * 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + */ + UDataArkMode?: string; + /** + * 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + */ + SnapshotService?: string; + /** + * 【已废弃】UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),SystemDisk(普通系统盘),SSDSystemDisk(SSD系统盘),RSSDSystemDisk(RSSD系统盘),EfficiencySystemDisk(高效系统盘),默认值(DataDisk) + */ + DiskType?: string; + /** + * 【已废弃】云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + MachineType?: string; +} + +/** + * DescribeUDiskUpgradePrice - 获取UDisk升级价格信息 + */ +export interface DescribeUDiskUpgradePriceResponse { + /** + * 价格 + */ + Price?: number; + /** + * 用户折后价 (对应计费CustomPrice) + */ + OriginalPrice?: number; +} + +/** + * DetachUDisk - 卸载某个已经挂载在指定UHost实例上的UDisk + */ +export interface DetachUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 需要卸载的UDisk实例ID + */ + UDiskId: string; + /** + * UHost实例ID。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】 + */ + UHostId?: string; + /** + * Host实例ID + */ + HostId?: string; +} + +/** + * DetachUDisk - 卸载某个已经挂载在指定UHost实例上的UDisk + */ +export interface DetachUDiskResponse { + /** + * 卸载的UHost实例ID。【即将废弃,建议使用HostId】 + */ + UHostId?: string; + /** + * 卸载的UDisk实例ID + */ + UDiskId?: string; + /** + * 卸载的Host实例ID + */ + HostId?: string; +} + +/** + * RecoverUDisk - 从回收站中恢复云硬盘 + */ +export interface RecoverUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 云硬盘资源ID + */ + UDiskId: string; + /** + * Year , Month, Dynamic 默认: Dynamic + */ + ChargeType?: string; + /** + * 购买时长 默认: 1 + */ + Quantity?: number; +} + +/** + * RecoverUDisk - 从回收站中恢复云硬盘 + */ +export interface RecoverUDiskResponse {} + +/** + * RenameUDisk - 重命名UDisk + */ +export interface RenameUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 重命名的UDisk的Id + */ + UDiskId: string; + /** + * 重命名UDisk的name + */ + UDiskName: string; +} + +/** + * RenameUDisk - 重命名UDisk + */ +export interface RenameUDiskResponse {} + +/** + * ResizeUDisk - 调整UDisk容量 + */ +export interface ResizeUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UDisk Id + */ + UDiskId: string; + /** + * 调整后大小, 单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000]。 + */ + Size: number; + /** + * 云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + MachineType?: string; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * ResizeUDisk - 调整UDisk容量 + */ +export interface ResizeUDiskResponse {} + +/** + * RestoreUDisk - 从备份恢复数据至UDisk + */ +export interface RestoreUDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 需要恢复的盘ID + */ + UDiskId: string; + /** + * 从指定的快照恢复 + */ + SnapshotId?: string; + /** + * 指定从方舟恢复的备份时间点 + */ + SnapshotTime?: number; +} + +/** + * RestoreUDisk - 从备份恢复数据至UDisk + */ +export interface RestoreUDiskResponse {} + +/** + * SetUDiskUDataArkMode - 设置UDisk数据方舟的状态 + */ +export interface SetUDiskUDataArkModeRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 需要设置数据方舟的UDisk的Id + */ + UDiskId: string; + /** + * 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + */ + UDataArkMode?: string; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * SetUDiskUDataArkMode - 设置UDisk数据方舟的状态 + */ +export interface SetUDiskUDataArkModeResponse {} diff --git a/src/services/udpn/index.ts b/src/services/udpn/index.ts new file mode 100644 index 0000000..836d490 --- /dev/null +++ b/src/services/udpn/index.ts @@ -0,0 +1,352 @@ +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 **udpn** service + */ +export default class UDPNClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * AllocateUDPN - 分配一条 UDPN 专线 + * + * See also: https://docs.ucloud.cn/api/udpn-api/allocate_udpn + */ + allocateUDPN(request?: AllocateUDPNRequest): Promise { + const args = { Action: 'AllocateUDPN', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AllocateUDPNResponse + ); + } + + /** + * DescribeUDPN - 描述 UDPN + * + * See also: https://docs.ucloud.cn/api/udpn-api/describe_udpn + */ + describeUDPN(request?: DescribeUDPNRequest): Promise { + const args = { Action: 'DescribeUDPN', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDPNResponse + ); + } + + /** + * GetUDPNLineList - 获取当前支持的专线线路列表 + * + * See also: https://docs.ucloud.cn/api/udpn-api/get_udpn_line_list + */ + getUDPNLineList( + request?: GetUDPNLineListRequest + ): Promise { + const args = { Action: 'GetUDPNLineList', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUDPNLineListResponse + ); + } + + /** + * GetUDPNPrice - 获取 UDPN 价格 + * + * See also: https://docs.ucloud.cn/api/udpn-api/get_udpn_price + */ + getUDPNPrice(request?: GetUDPNPriceRequest): Promise { + const args = { Action: 'GetUDPNPrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUDPNPriceResponse + ); + } + + /** + * GetUDPNUpgradePrice - 获取专线升级价格 + * + * See also: https://docs.ucloud.cn/api/udpn-api/get_udpn_upgrade_price + */ + getUDPNUpgradePrice( + request?: GetUDPNUpgradePriceRequest + ): Promise { + const args = { Action: 'GetUDPNUpgradePrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUDPNUpgradePriceResponse + ); + } + + /** + * ModifyUDPNBandwidth - 修改带宽值 + * + * See also: https://docs.ucloud.cn/api/udpn-api/modify_udpn_bandwidth + */ + modifyUDPNBandwidth( + request?: ModifyUDPNBandwidthRequest + ): Promise { + const args = { Action: 'ModifyUDPNBandwidth', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyUDPNBandwidthResponse + ); + } + + /** + * ReleaseUDPN - 释放 UDPN + * + * See also: https://docs.ucloud.cn/api/udpn-api/release_udpn + */ + releaseUDPN(request?: ReleaseUDPNRequest): Promise { + const args = { Action: 'ReleaseUDPN', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ReleaseUDPNResponse + ); + } +} + +/** + * AllocateUDPN - 分配一条 UDPN 专线 + */ +export interface AllocateUDPNRequest { + /** + * 专线可用区1,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-ca, 华盛顿:us-ws, 东京:jpn-tky + */ + Peer1: string; + /** + * 专线可用区2,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-ca, 华盛顿:us-ws, 东京:jpn-tky + */ + Peer2: string; + /** + * 带宽 + */ + Bandwidth: number; + /** + * 计费类型,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费 + */ + ChargeType?: string; + /** + * 计费时长,默认 1 + */ + Quantity?: number; + /** + * 计费模式. 枚举值:"Traffic", 流量计费模式; 否则 带宽计费模式; + */ + PayMode?: string; + /** + * 代金劵 + */ + CouponId?: string; +} + +/** + * AllocateUDPN - 分配一条 UDPN 专线 + */ +export interface AllocateUDPNResponse { + /** + * 资源名称 + */ + UDPNId: string; +} + +/** + * DescribeUDPN - 描述 UDPN + */ +export interface DescribeUDPNRequest { + /** + * 申请到的 UDPN 资源 ID。若为空,则查询该用户在机房所有的专线信息。非默认项目资源,需填写ProjectId + */ + UDPNId?: string; + /** + * 列表起始位置偏移量,默认为 0 + */ + Offset?: number; + /** + * 返回数据长度,默认为 20 + */ + Limit?: number; +} + +/** + * DescribeUDPN - 描述 UDPN + */ +export interface DescribeUDPNResponse { + /** + * 查询到的总数量 + */ + TotalCount: number; + /** + * UDPN详情 + */ + DataSet?: { + /** + * UDPN 资源短 ID + */ + UDPNId: string; + /** + * 可用区域 1 + */ + Peer1: string; + /** + * 可用区域 2 + */ + Peer2: string; + /** + * 计费类型 + */ + ChargeType: string; + /** + * 带宽 + */ + Bandwidth: number; + /** + * unix 时间戳 创建时间 + */ + CreateTime: number; + /** + * unix 时间戳 到期时间 + */ + ExpireTime: number; + }[]; +} + +/** + * GetUDPNLineList - 获取当前支持的专线线路列表 + */ +export interface GetUDPNLineListRequest {} + +/** + * GetUDPNLineList - 获取当前支持的专线线路列表 + */ +export interface GetUDPNLineListResponse { + /** + * DataSet中的元素个数 + */ + TotalCount: number; + /** + * 当前支持的专线线路详细信息,详见UDPNLineSet + */ + DataSet: { + /** + * 支持UDPN的地域之一,北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 华盛顿:us-ws, 洛杉矶:us-la, 东京:jpn-tky + */ + LocalRegion: string; + /** + * 支持UDPN的地域之一,北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 华盛顿:us-ws, 洛杉矶:us-la, 东京:jpn-tky + */ + RemoteRegion: string; + /** + * 线路带宽上限,单位 M + */ + BandwidthUpperLimit: number; + }[]; +} + +/** + * GetUDPNPrice - 获取 UDPN 价格 + */ +export interface GetUDPNPriceRequest { + /** + * 专线可用区1,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-la, 华盛顿:us-ws, 东京:jpn-tky + */ + Peer1: string; + /** + * 专线可用区2,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-la, 华盛顿:us-ws, 东京:jpn-tky + */ + Peer2: string; + /** + * 带宽信息 + */ + Bandwidth: number; + /** + * 计费类型 + */ + ChargeType?: string; + /** + * 购买时长 + */ + Quantity?: number; + /** + * PayMode,枚举值,Bandwidth:带宽;Traffic:流量 默认不填写:带宽 + */ + PayMode?: string; +} + +/** + * GetUDPNPrice - 获取 UDPN 价格 + */ +export interface GetUDPNPriceResponse { + /** + * 资源有效期 unix 时间戳 + */ + PurchaseValue: number; + /** + * 专线价格 + */ + Price: number; +} + +/** + * GetUDPNUpgradePrice - 获取专线升级价格 + */ +export interface GetUDPNUpgradePriceRequest { + /** + * 专线带宽资源 Id + */ + UDPNId: string; + /** + * 带宽 + */ + Bandwidth: number; +} + +/** + * GetUDPNUpgradePrice - 获取专线升级价格 + */ +export interface GetUDPNUpgradePriceResponse { + /** + * 升级后的价格 + */ + Price: number; +} + +/** + * ModifyUDPNBandwidth - 修改带宽值 + */ +export interface ModifyUDPNBandwidthRequest { + /** + * UDPN Id + */ + UDPNId: string; + /** + * 调整后专线带宽, 单位为Mbps,取值范围为大于等于2且小于等于1000([2-1000])的整数 + */ + Bandwidth: number; + /** + * 代金劵 ID + */ + CouponId?: string; +} + +/** + * ModifyUDPNBandwidth - 修改带宽值 + */ +export interface ModifyUDPNBandwidthResponse {} + +/** + * ReleaseUDPN - 释放 UDPN + */ +export interface ReleaseUDPNRequest { + /** + * UDPN 资源 Id + */ + UDPNId: string; +} + +/** + * ReleaseUDPN - 释放 UDPN + */ +export interface ReleaseUDPNResponse {} diff --git a/src/services/uec/index.ts b/src/services/uec/index.ts new file mode 100644 index 0000000..18b6a38 --- /dev/null +++ b/src/services/uec/index.ts @@ -0,0 +1,2818 @@ +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 **uec** service + */ +export default class UECClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * BindUEcFirewall - 绑定防火墙,应用防火墙规则 + * + * See also: https://docs.ucloud.cn/api/uec-api/bind_u_ec_firewall + */ + bindUEcFirewall( + request?: BindUEcFirewallRequest + ): Promise { + const args = { Action: 'BindUEcFirewall', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as BindUEcFirewallResponse + ); + } + + /** + * CreateUEcFirewall - 创建外网防火墙 + * + * See also: https://docs.ucloud.cn/api/uec-api/create_u_ec_firewall + */ + createUEcFirewall( + request?: CreateUEcFirewallRequest + ): Promise { + const args = { Action: 'CreateUEcFirewall', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUEcFirewallResponse + ); + } + + /** + * CreateUEcHolder - 创建容器组 + * + * See also: https://docs.ucloud.cn/api/uec-api/create_u_ec_holder + */ + createUEcHolder( + request?: CreateUEcHolderRequest + ): Promise { + const args = { Action: 'CreateUEcHolder', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUEcHolderResponse + ); + } + + /** + * CreateUEcSubnet - 创建子网 + * + * See also: https://docs.ucloud.cn/api/uec-api/create_u_ec_subnet + */ + createUEcSubnet( + request?: CreateUEcSubnetRequest + ): Promise { + const args = { Action: 'CreateUEcSubnet', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUEcSubnetResponse + ); + } + + /** + * CreateUEcVHost - 创建虚拟机v2.0 + * + * See also: https://docs.ucloud.cn/api/uec-api/create_u_ec_v_host + */ + createUEcVHost( + request?: CreateUEcVHostRequest + ): Promise { + const args = { Action: 'CreateUEcVHost', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUEcVHostResponse + ); + } + + /** + * DeleteUEcCustomImage - 删除UEDN客户自定义镜像 + * + * See also: https://docs.ucloud.cn/api/uec-api/delete_u_ec_custom_image + */ + deleteUEcCustomImage( + request?: DeleteUEcCustomImageRequest + ): Promise { + const args = { Action: 'DeleteUEcCustomImage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUEcCustomImageResponse + ); + } + + /** + * DeleteUEcHolder - 删除容器组 + * + * See also: https://docs.ucloud.cn/api/uec-api/delete_u_ec_holder + */ + deleteUEcHolder( + request?: DeleteUEcHolderRequest + ): Promise { + const args = { Action: 'DeleteUEcHolder', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUEcHolderResponse + ); + } + + /** + * DeleteUEcSubnet - 删除子网 + * + * See also: https://docs.ucloud.cn/api/uec-api/delete_u_ec_subnet + */ + deleteUEcSubnet( + request?: DeleteUEcSubnetRequest + ): Promise { + const args = { Action: 'DeleteUEcSubnet', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUEcSubnetResponse + ); + } + + /** + * DeleteUEcVHost - 删除vhost虚拟机 v2.0 + * + * See also: https://docs.ucloud.cn/api/uec-api/delete_u_ec_v_host + */ + deleteUEcVHost( + request?: DeleteUEcVHostRequest + ): Promise { + const args = { Action: 'DeleteUEcVHost', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUEcVHostResponse + ); + } + + /** + * DescribeUEcFirewall - 获取防火墙信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_firewall + */ + describeUEcFirewall( + request?: DescribeUEcFirewallRequest + ): Promise { + const args = { Action: 'DescribeUEcFirewall', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUEcFirewallResponse + ); + } + + /** + * DescribeUEcFirewallResource - 防火墙绑定的资源列表 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_firewall_resource + */ + describeUEcFirewallResource( + request?: DescribeUEcFirewallResourceRequest + ): Promise { + const args = { Action: 'DescribeUEcFirewallResource', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUEcFirewallResourceResponse + ); + } + + /** + * DescribeUEcHolder - 获得容器组信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_holder + */ + describeUEcHolder( + request?: DescribeUEcHolderRequest + ): Promise { + const args = { Action: 'DescribeUEcHolder', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUEcHolderResponse + ); + } + + /** + * DescribeUEcHolderIDC - 获取容器组机房信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_holder_idc + */ + describeUEcHolderIDC( + request?: DescribeUEcHolderIDCRequest + ): Promise { + const args = { Action: 'DescribeUEcHolderIDC', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUEcHolderIDCResponse + ); + } + + /** + * DescribeUEcIDC - 获取IDC机房列表 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_idc + */ + describeUEcIDC( + request?: DescribeUEcIDCRequest + ): Promise { + const args = { Action: 'DescribeUEcIDC', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUEcIDCResponse + ); + } + + /** + * DescribeUEcSubnet - 获取子网列表 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_subnet + */ + describeUEcSubnet( + request?: DescribeUEcSubnetRequest + ): Promise { + const args = { Action: 'DescribeUEcSubnet', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUEcSubnetResponse + ); + } + + /** + * DescribeUEcVHost - 获取虚拟机列表 2.0 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_v_host + */ + describeUEcVHost( + request?: DescribeUEcVHostRequest + ): Promise { + const args = { Action: 'DescribeUEcVHost', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUEcVHostResponse + ); + } + + /** + * DescribeUEcVHostISP - 获取虚拟机运营商信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/describe_u_ec_v_host_isp + */ + describeUEcVHostISP( + request?: DescribeUEcVHostISPRequest + ): Promise { + const args = { Action: 'DescribeUEcVHostISP', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUEcVHostISPResponse + ); + } + + /** + * GetUEcHolderLog - 获取单个容器日志 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_holder_log + */ + getUEcHolderLog( + request?: GetUEcHolderLogRequest + ): Promise { + const args = { Action: 'GetUEcHolderLog', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUEcHolderLogResponse + ); + } + + /** + * GetUEcHolderMetrics - 获取容器(CPU利用率,带宽,内存)数据 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_holder_metrics + */ + getUEcHolderMetrics( + request?: GetUEcHolderMetricsRequest + ): Promise { + const args = { Action: 'GetUEcHolderMetrics', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUEcHolderMetricsResponse + ); + } + + /** + * GetUEcIDCCutInfo - 获取机房割接信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_idc_cut_info + */ + getUEcIDCCutInfo( + request?: GetUEcIDCCutInfoRequest + ): Promise { + const args = { Action: 'GetUEcIDCCutInfo', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUEcIDCCutInfoResponse + ); + } + + /** + * GetUEcIDCVHostData - 获取机房虚拟机监控数据 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_idcv_host_data + */ + getUEcIDCVHostData( + request?: GetUEcIDCVHostDataRequest + ): Promise { + const args = { Action: 'GetUEcIDCVHostData', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUEcIDCVHostDataResponse + ); + } + + /** + * GetUEcImage - uec2.0 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_image + */ + getUEcImage(request?: GetUEcImageRequest): Promise { + const args = { Action: 'GetUEcImage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUEcImageResponse + ); + } + + /** + * GetUEcPodPrice - 获得容器组价格 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_pod_price + */ + getUEcPodPrice( + request?: GetUEcPodPriceRequest + ): Promise { + const args = { Action: 'GetUEcPodPrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUEcPodPriceResponse + ); + } + + /** + * GetUEcUpgradePrice - 获取虚拟机调整差价 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_upgrade_price + */ + getUEcUpgradePrice( + request?: GetUEcUpgradePriceRequest + ): Promise { + const args = { Action: 'GetUEcUpgradePrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUEcUpgradePriceResponse + ); + } + + /** + * GetUEcVHostData - 获取虚拟机监控数据 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_v_host_data + */ + getUEcVHostData( + request?: GetUEcVHostDataRequest + ): Promise { + const args = { Action: 'GetUEcVHostData', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUEcVHostDataResponse + ); + } + + /** + * GetUEcVHostPrice - 获取虚拟机价格 + * + * See also: https://docs.ucloud.cn/api/uec-api/get_u_ec_v_host_price + */ + getUEcVHostPrice( + request?: GetUEcVHostPriceRequest + ): Promise { + const args = { Action: 'GetUEcVHostPrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUEcVHostPriceResponse + ); + } + + /** + * ImportUEcCustomImage - 导入自定义镜像 + * + * See also: https://docs.ucloud.cn/api/uec-api/import_u_ec_custom_image + */ + importUEcCustomImage( + request?: ImportUEcCustomImageRequest + ): Promise { + const args = { Action: 'ImportUEcCustomImage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ImportUEcCustomImageResponse + ); + } + + /** + * LoginUEcDocker - 登录容器 + * + * See also: https://docs.ucloud.cn/api/uec-api/login_u_ec_docker + */ + loginUEcDocker( + request?: LoginUEcDockerRequest + ): Promise { + const args = { Action: 'LoginUEcDocker', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as LoginUEcDockerResponse + ); + } + + /** + * ModifyUEcBandwidth - 修改节点带宽限制 + * + * See also: https://docs.ucloud.cn/api/uec-api/modify_u_ec_bandwidth + */ + modifyUEcBandwidth( + request?: ModifyUEcBandwidthRequest + ): Promise { + const args = { Action: 'ModifyUEcBandwidth', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyUEcBandwidthResponse + ); + } + + /** + * ModifyUEcHolderName - 修改容器组名称 + * + * See also: https://docs.ucloud.cn/api/uec-api/modify_u_ec_holder_name + */ + modifyUEcHolderName( + request?: ModifyUEcHolderNameRequest + ): Promise { + const args = { Action: 'ModifyUEcHolderName', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyUEcHolderNameResponse + ); + } + + /** + * ModifyUEcImageName - 修改镜像名称 + * + * See also: https://docs.ucloud.cn/api/uec-api/modify_u_ec_image_name + */ + modifyUEcImageName( + request?: ModifyUEcImageNameRequest + ): Promise { + const args = { Action: 'ModifyUEcImageName', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyUEcImageNameResponse + ); + } + + /** + * PoweroffUEcVHost - 虚拟机断电 + * + * See also: https://docs.ucloud.cn/api/uec-api/poweroff_u_ec_v_host + */ + poweroffUEcVHost( + request?: PoweroffUEcVHostRequest + ): Promise { + const args = { Action: 'PoweroffUEcVHost', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as PoweroffUEcVHostResponse + ); + } + + /** + * ReinstallUEcVHost - 虚拟机重装系统 + * + * See also: https://docs.ucloud.cn/api/uec-api/reinstall_u_ec_v_host + */ + reinstallUEcVHost( + request?: ReinstallUEcVHostRequest + ): Promise { + const args = { Action: 'ReinstallUEcVHost', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ReinstallUEcVHostResponse + ); + } + + /** + * RestartUEcHolder - 重启容器组 + * + * See also: https://docs.ucloud.cn/api/uec-api/restart_u_ec_holder + */ + restartUEcHolder( + request?: RestartUEcHolderRequest + ): Promise { + const args = { Action: 'RestartUEcHolder', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RestartUEcHolderResponse + ); + } + + /** + * RestartUEcVHost - 重启虚拟机v2.0 + * + * See also: https://docs.ucloud.cn/api/uec-api/restart_u_ec_v_host + */ + restartUEcVHost( + request?: RestartUEcVHostRequest + ): Promise { + const args = { Action: 'RestartUEcVHost', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RestartUEcVHostResponse + ); + } + + /** + * StartUEcVHost - 启动UEC虚拟机 + * + * See also: https://docs.ucloud.cn/api/uec-api/start_u_ec_v_host + */ + startUEcVHost( + request?: StartUEcVHostRequest + ): Promise { + const args = { Action: 'StartUEcVHost', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as StartUEcVHostResponse + ); + } + + /** + * StopUEcVHost - 停止UEC虚拟机 + * + * See also: https://docs.ucloud.cn/api/uec-api/stop_u_ec_v_host + */ + stopUEcVHost(request?: StopUEcVHostRequest): Promise { + const args = { Action: 'StopUEcVHost', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as StopUEcVHostResponse + ); + } + + /** + * UnBindUEcFirewall - 解绑防火墙 + * + * See also: https://docs.ucloud.cn/api/uec-api/un_bind_u_ec_firewall + */ + unBindUEcFirewall( + request?: UnBindUEcFirewallRequest + ): Promise { + const args = { Action: 'UnBindUEcFirewall', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UnBindUEcFirewallResponse + ); + } + + /** + * UpdateUEcFirewall - 更新防火墙信息,新增和删除规则 + * + * See also: https://docs.ucloud.cn/api/uec-api/update_u_ec_firewall + */ + updateUEcFirewall( + request?: UpdateUEcFirewallRequest + ): Promise { + const args = { Action: 'UpdateUEcFirewall', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateUEcFirewallResponse + ); + } + + /** + * UpdateUEcFirewallAttribute - 更新防火墙名称及描述 + * + * See also: https://docs.ucloud.cn/api/uec-api/update_u_ec_firewall_attribute + */ + updateUEcFirewallAttribute( + request?: UpdateUEcFirewallAttributeRequest + ): Promise { + const args = { Action: 'UpdateUEcFirewallAttribute', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateUEcFirewallAttributeResponse + ); + } + + /** + * UpdateUEcSubnet - 更新子网信息 + * + * See also: https://docs.ucloud.cn/api/uec-api/update_u_ec_subnet + */ + updateUEcSubnet( + request?: UpdateUEcSubnetRequest + ): Promise { + const args = { Action: 'UpdateUEcSubnet', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateUEcSubnetResponse + ); + } +} + +/** + * BindUEcFirewall - 绑定防火墙,应用防火墙规则 + */ +export interface BindUEcFirewallRequest { + /** + * 防火墙Id + */ + FirewallId: string; + /** + * 虚拟机资源Id或容器组资源id + */ + ResourceId: string; +} + +/** + * BindUEcFirewall - 绑定防火墙,应用防火墙规则 + */ +export interface BindUEcFirewallResponse {} + +/** + * CreateUEcFirewall - 创建外网防火墙 + */ +export interface CreateUEcFirewallRequest { + /** + * 防火墙名称 + */ + Name: string; + /** + * + */ + Rule?: { + /** + * 协议,可选值:TCP,UDP,ICMP + */ + ProtocolType: string; + /** + * 端口,范围用"-"符号分隔,如:1-65535 + */ + Port: string; + /** + * 源ip + */ + SrcIp: string; + /** + * ACCEPT(接受)和DROP(拒绝) + */ + Action: string; + /** + * 优先级:HIGH(高),MEDIUM(中),LOW(低) + */ + Priority: string; + /** + * 备注 + */ + Remark?: string; + }[]; + /** + * 描述 + */ + Remark?: string; +} + +/** + * CreateUEcFirewall - 创建外网防火墙 + */ +export interface CreateUEcFirewallResponse { + /** + * 防火墙Id + */ + FirewallId: string; +} + +/** + * CreateUEcHolder - 创建容器组 + */ +export interface CreateUEcHolderRequest { + /** + * 机房id + */ + IdcId: string; + /** + * 容器组Cpu总核数 + */ + CpuCore: number; + /** + * 容器组总内存,单位MB + */ + MemSize: number; + /** + * 子网ID + */ + SubnetId: string; + /** + * 容器组名称(默认default) + */ + Name?: string; + /** + * 机型(normal-标准型,hf-高性能型,默认normal) + */ + ProductType?: string; + /** + * 重启策略(0总是,1失败是,2永不,默认0) + */ + RestartStrategy?: number; + /** + * 绑定外网ip(yes-绑定,no-不绑定,默认no) + */ + ElasticIp?: string; + /** + * 外网绑定的带宽(单位M,默认0,只有当ElasticIp为yes时,默认1) + */ + Bandwidth?: number; + /** + * 防火墙ID + */ + FirewallId?: string; + /** + * 付费方式(2按月、3按年。默认2,默认月付) + */ + ChargeType?: number; + /** + * 月数或者年数(默认值:1,当为按月计费时,0表示计费到月底,默认值为0) + */ + ChargeQuantity?: number; + /** + * + */ + Pack?: { + /** + * 容器名称 + */ + Name?: string; + /** + * 容器Cpu核数 + */ + CpuCore?: number; + /** + * 容器内存,单位MB + */ + MemSize?: number; + /** + * 容器镜像名称 + */ + ImageName?: string; + /** + * 容器工作目录 + */ + WorkDir?: string; + /** + * 开启容器的命令 + */ + Cmd?: string; + /** + * 容器参数(多个用;隔开) + */ + Args?: string; + /** + * 容器环境变量(多个用;隔开,如:key1:value1;key2:value2) + */ + Environment?: string; + /** + * 容器配置字典(多个用;隔开,如:/data1:resId1;/data2:resId2) + */ + ConfigDict?: string; + }[]; + /** + * + */ + Image?: { + /** + * 镜像用户名和密码(如镜像名:密码) + */ + Message?: string; + /** + * 镜像仓库地址 + */ + StoreAddress?: string; + }[]; + /** + * + */ + Storage?: { + /** + * 存储卷挂载路径 + */ + Path?: string; + /** + * 存储卷资源id + */ + ResourceId?: string; + }[]; +} + +/** + * CreateUEcHolder - 创建容器组 + */ +export interface CreateUEcHolderResponse { + /** + * 容器组资源id + */ + ResourceId?: string; +} + +/** + * CreateUEcSubnet - 创建子网 + */ +export interface CreateUEcSubnetRequest { + /** + * 机房ID + */ + IdcId: string; + /** + * 子网cidr + */ + CIDR: string; + /** + * 子网名称 + */ + SubnetName?: string; + /** + * 备注 + */ + Comment?: string; +} + +/** + * CreateUEcSubnet - 创建子网 + */ +export interface CreateUEcSubnetResponse { + /** + * 子网ID + */ + SubnetId: string; +} + +/** + * CreateUEcVHost - 创建虚拟机v2.0 + */ +export interface CreateUEcVHostRequest { + /** + * 机房id + */ + IdcId: string; + /** + * cpu核心数 + */ + CpuCore: number; + /** + * 内存大小,单位GB + */ + MemSize: number; + /** + * 数据盘大小,单位GB + */ + DiskSize: number; + /** + * 镜像ID + */ + ImageId: string; + /** + * 节点带宽限制,单位Mbs + */ + NetLimit: number; + /** + * 节点名称 + */ + NodeName?: string; + /** + * 系统盘大小,单位GB, 默认20GB + */ + SysDiskSize?: number; + /** + * 账户名,默认root + */ + AccountName?: string; + /** + * 密码 + */ + PassWord?: string; + /** + * 创建节点数量,默认1 + */ + NodeCount?: number; + /** + * 付费方式,1按时,2按月,3按年,默认2 + */ + ChargeType?: number; + /** + * 月数或者年数,0计费到月底, 默认0 + */ + ChargeQuantity?: number; + /** + * 子网ID + */ + SubnetId?: string; + /** + * 产品类型:normal(标准型),hf(高频型) + */ + ProductType?: string; + /** + * 外网防护墙规则组,默认 + */ + FirewallId?: string; + /** + * 运营商(1-电信,2-联通,4移动) + */ + Isp?: number[]; + /** + * (已废弃)是否需要外网ip(yes-是,no-否) + */ + IsNeedOuterIp?: string; +} + +/** + * CreateUEcVHost - 创建虚拟机v2.0 + */ +export interface CreateUEcVHostResponse { + /** + * 节点id(详情参考NodeList) + */ + NodeList: { + /** + * 虚拟机资源id + */ + NodeId?: string; + }[]; +} + +/** + * DeleteUEcCustomImage - 删除UEDN客户自定义镜像 + */ +export interface DeleteUEcCustomImageRequest { + /** + * 镜像ID + */ + ImageId: string; + /** + * 机房ID,带机房ID表示只删除指定机房镜像 + */ + IdcId?: string; +} + +/** + * DeleteUEcCustomImage - 删除UEDN客户自定义镜像 + */ +export interface DeleteUEcCustomImageResponse { + /** + * 镜像ID + */ + ImageId: number; +} + +/** + * DeleteUEcHolder - 删除容器组 + */ +export interface DeleteUEcHolderRequest { + /** + * 容器组资源id,n为0,1,2... + */ + HolderId: string[]; +} + +/** + * DeleteUEcHolder - 删除容器组 + */ +export interface DeleteUEcHolderResponse {} + +/** + * DeleteUEcSubnet - 删除子网 + */ +export interface DeleteUEcSubnetRequest { + /** + * 子网ID + */ + SubnetId: string; +} + +/** + * DeleteUEcSubnet - 删除子网 + */ +export interface DeleteUEcSubnetResponse {} + +/** + * DeleteUEcVHost - 删除vhost虚拟机 v2.0 + */ +export interface DeleteUEcVHostRequest { + /** + * 节点id + */ + NodeId: string[]; +} + +/** + * DeleteUEcVHost - 删除vhost虚拟机 v2.0 + */ +export interface DeleteUEcVHostResponse {} + +/** + * DescribeUEcFirewall - 获取防火墙信息 + */ +export interface DescribeUEcFirewallRequest { + /** + * 防火墙ID,默认为返回所有防火墙 + */ + FirewallId?: string; + /** + * 绑定防火墙组的虚拟机资源ID + */ + ResourceId?: string; + /** + * 返回数据长度,默认为20 + */ + Limit?: number; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; +} + +/** + * DescribeUEcFirewall - 获取防火墙信息 + */ +export interface DescribeUEcFirewallResponse { + /** + * 防火墙组详细信息,参见 FirewallInfo + */ + FirewallSet?: { + /** + * 防火墙Id + */ + FirewallId: string; + /** + * 防火墙名称 + */ + Name: string; + /** + * 创建时间 + */ + CreateTime: number; + /** + * 防火墙规则组,详情参见RuleInfo + */ + Rule: { + /** + * 协议,可选值:TCP,UDP,ICMP + */ + ProtocolType: string; + /** + * 端口,范围用"-"符号分隔,如:1-65535 + */ + Port: string; + /** + * 源ip + */ + SrcIp: string; + /** + * ACCEPT(接受)和DROP(拒绝) + */ + Action: string; + /** + * 优先级:HIGH(高),MEDIUM(中),LOW(低) + */ + Priority: string; + /** + * 备注 + */ + Remark: string; + }[]; + /** + * 防火墙绑定资源数量 + */ + ResourceCount: number; + /** + * 防火墙组类型,枚举值为: "user defined", 用户自定义防火墙; "recommend web", 默认Web防火墙; "recommend non web", 默认非Web防火墙 + */ + Type: string; + /** + * 描述 + */ + Remark?: string; + }[]; + /** + * 满足条件的节点总数 + */ + TotalCount?: number; +} + +/** + * DescribeUEcFirewallResource - 防火墙绑定的资源列表 + */ +export interface DescribeUEcFirewallResourceRequest { + /** + * 防火墙Id + */ + FirewallId: string; +} + +/** + * DescribeUEcFirewallResource - 防火墙绑定的资源列表 + */ +export interface DescribeUEcFirewallResourceResponse { + /** + * 资源列表,详情参见ResourceInfo + */ + ResourceSet: { + /** + * 资源Id + */ + ResourceId: string; + /** + * 节点公网Ip列表 + */ + PublicIpList: string[]; + /** + * 节点名称 + */ + Name: string; + /** + * 节点状态,1部署中,2待启动,3启动中,4运行中,5正在停止,6已停止,7正在更新,8正在重启,9正在删除, 10已经删除,11异常 + */ + State: number; + /** + * 节点备注 + */ + Remark?: string; + }[]; + /** + * 资源总数 + */ + TotalCount: number; +} + +/** + * DescribeUEcHolder - 获得容器组信息 + */ +export interface DescribeUEcHolderRequest { + /** + * 容器组资源id + */ + HolderId?: string[]; + /** + * 返回数据长度,默认为20,非负整数 + */ + Limit?: number; + /** + * 列表起始位置偏移量,默认为0。非负整数 + */ + Offset?: number; +} + +/** + * DescribeUEcHolder - 获得容器组信息 + */ +export interface DescribeUEcHolderResponse { + /** + * 容器组列表(详情参考HolderList) + */ + HolderList: { + /** + * 容器组资源id + */ + ResourceId?: string; + /** + * 容器组名称 + */ + HolderName?: string; + /** + * 容器组子网id + */ + SubnetId?: string; + /** + * 容器组内网ip + */ + InnerIp?: string; + /** + * 容器组外网ip集合(详情参考IpList) + */ + IpList?: { + /** + * 外网ip + */ + Ip?: string; + /** + * 运营商 + */ + Isp?: string; + }[]; + /** + * 容器组运行状态0:初始化;1:拉取镜像;2:启动中;3:运行中;4:错误;5:正在重启;6:正在删除;7:已经删除;8:容器运行错误;9:启动失败;99:异常 + */ + State?: number; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 过期时间 + */ + ExpireTime?: number; + /** + * 线路类型(运营商类型: 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通) + */ + Type?: number; + /** + * 机房id + */ + IdcId?: string; + /** + * 机房名称 + */ + OcName?: string; + /** + * 省份名称 + */ + Province?: string; + /** + * 城市名称 + */ + City?: string; + /** + * 0:总是;1:失败是;2:永不 + */ + RestartStrategy?: number; + /** + * 容器数量 + */ + DockerCount?: number; + /** + * 容器信息(详情参考DockerInfo) + */ + DockerInfo?: { + /** + * CPU核数(/核)精度0.1核 + */ + CpuCores?: number; + /** + * 内存大小(Gi) + */ + MemSize?: number; + /** + * 容器名称 + */ + Name?: string; + /** + * 容器状态,0:初始化;1:拉取镜像;2:拉取镜像失败;3:启动中;4:运行中;5:正在停止;6:已停止;7:已删除;8:镜像拉取成功;9:启动失败;99:异常 + */ + State?: number; + /** + * 镜像名称 + */ + ImageName?: string; + /** + * 工作目录 + */ + WorkDir?: string; + /** + * 命令 + */ + Command?: string; + /** + * 参数 + */ + Args?: string; + /** + * 环境变量(详情参考EnvList) + */ + EnvList?: { + /** + * 环境变量key值 + */ + Key?: string; + /** + * 环境变量Value值 + */ + Value?: string; + }[]; + /** + * 容器配置字典(详情参考CfgDictList) + */ + CfgDictList?: { + /** + * 名称 + */ + Name?: string; + /** + * 挂载路径 + */ + MountPath?: string; + /** + * 资源id + */ + ResourceId?: string; + }[]; + }[]; + /** + * 机器类型(normal通用型,hf高性能型) + */ + ProductType?: string; + /** + * 外网绑定的带宽 + */ + NetLimit?: number; + /** + * 外网防火墙id + */ + FirewallId?: string; + /** + * 存储卷信息(详情参考StorVolumeInfo) + */ + StorVolumeInfo?: { + /** + * 名称 + */ + Name?: string; + /** + * 资源id + */ + ResourceId?: string; + /** + * 挂载点 + */ + MountPoint?: string; + /** + * 容量(单位GB) + */ + DiskSize?: number; + }[]; + /** + * 存储卷数量 + */ + StorVolumeCount?: number; + /** + * 容器组镜像密钥列表(详情参考ImageList) + */ + ImageList?: { + /** + * 仓库地址 + */ + StoreAddr?: string; + /** + * 用户名称 + */ + UserName?: string; + /** + * 镜像密钥 + */ + ImageKey?: string; + }[]; + }[]; + /** + * 满足条件的容器组总数 + */ + TotalCount: number; +} + +/** + * DescribeUEcHolderIDC - 获取容器组机房信息 + */ +export interface DescribeUEcHolderIDCRequest { + /** + * 容器组Cpu核数 + */ + Cpu: number; + /** + * 容器组内存大小(单位MB) + */ + Memory: number; + /** + * Idc机房id。默认全部机房 + */ + IdcId?: string[]; + /** + * 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + */ + Type?: number; + /** + * 产品类型,normal标准型,hf高性能型 + */ + ProductType?: string; +} + +/** + * DescribeUEcHolderIDC - 获取容器组机房信息 + */ +export interface DescribeUEcHolderIDCResponse { + /** + * 机房列表,具体参考下面IdcInfo + */ + IdcList: { + /** + * 机房ID + */ + IdcId?: string; + /** + * 机房名称 + */ + Name?: string; + /** + * 运营商 + */ + Isp?: string; + /** + * 省份 + */ + Province?: string; + /** + * 城市 + */ + City?: string; + /** + * 运营商类型:0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + */ + Type?: number; + /** + * 机房可创建节点最大数量 + */ + MaxNodeCnt?: number; + }[]; +} + +/** + * DescribeUEcIDC - 获取IDC机房列表 + */ +export interface DescribeUEcIDCRequest { + /** + * 节点cpu核数 + */ + Cpu: number; + /** + * 节点内存大小, 单位GB + */ + Memory: number; + /** + * Idc机房id。默认全部机房 + */ + IdcId?: string[]; + /** + * 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + */ + Type?: number; + /** + * 产品类型:normal(通用型),hf(高主频型) + */ + ProductType?: string; +} + +/** + * DescribeUEcIDC - 获取IDC机房列表 + */ +export interface DescribeUEcIDCResponse { + /** + * 获取的机房信息,具体参考下面IdcInfo + */ + IdcList?: { + /** + * 机房ID + */ + IdcId?: string; + /** + * 机房名称 + */ + Name?: string; + /** + * 运营商 + */ + Isp?: string; + /** + * 省份 + */ + Province?: string; + /** + * 城市 + */ + City?: string; + /** + * 运营商类型:0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + */ + Type?: number; + /** + * 机房可创建节点最大数量 + */ + MaxNodeCnt?: number; + }[]; +} + +/** + * DescribeUEcSubnet - 获取子网列表 + */ +export interface DescribeUEcSubnetRequest { + /** + * 机房ID + */ + IdcId?: string; + /** + * 子网ID + */ + SubnetId?: string; +} + +/** + * DescribeUEcSubnet - 获取子网列表 + */ +export interface DescribeUEcSubnetResponse { + /** + * 子网信息列表 + */ + SubnetList?: { + /** + * 子网ID + */ + SubnetId: string; + /** + * 子网名称 + */ + SubnetName: string; + /** + * 机房ID + */ + IdcId: string; + /** + * 子网cidr + */ + CIDR: string; + /** + * 创建时间 + */ + CreateTime: number; + /** + * 备注 + */ + Comment: string; + /** + * 总ip数 + */ + TotalIpCnt: number; + /** + * 可用ip数 + */ + AvailableIPCnt: number; + }[]; +} + +/** + * DescribeUEcVHost - 获取虚拟机列表 2.0 + */ +export interface DescribeUEcVHostRequest { + /** + * Idc机房id。默认全部机房 + */ + IdcId?: string[]; + /** + * 节点id,创建节点时生成的id。默认全部节点 + */ + NodeId?: string[]; + /** + * 数据偏移量,默认0,非负整数 + */ + Offset?: number; + /** + * 返回数据长度, 默认20,非负整数 + */ + Limit?: number; +} + +/** + * DescribeUEcVHost - 获取虚拟机列表 2.0 + */ +export interface DescribeUEcVHostResponse { + /** + * 满足条件的节点总数 + */ + TotalCount?: number; + /** + * 节点列表 + */ + NodeList?: { + /** + * 节点名称 + */ + NodeName?: string; + /** + * 节点ID + */ + NodeId?: string; + /** + * Cpu核数 + */ + CoreNum?: number; + /** + * 节点内存大小,单位GB + */ + MemSize?: number; + /** + * 系统盘大小, 单位GB + */ + SysDiskSize?: number; + /** + * 数据盘大小, 单位GB + */ + DiskSize?: number; + /** + * 节点状态,1部署中,2待启动,3启动中,4运行中,5正在停止,6已停止,7正在更新,8正在重启,9正在删除, 10已经删除,11异常 + */ + State?: number; + /** + * 节点带宽限制, 单位Mbs + */ + NetLimit?: number; + /** + * 机房ID + */ + IdcId?: string; + /** + * 机房名称 + */ + OcName?: string; + /** + * 省份 + */ + Province?: string; + /** + * 城市 + */ + City?: string; + /** + * 运营商类型: 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + */ + Type?: number; + /** + * 付费类型:1按时, 2按月,3按年 + */ + ChargeType?: number; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 过期时间 + */ + ExpiredTime?: number; + /** + * 镜像名称 + */ + ImageName?: string; + /** + * 外网ip集合(详情参考NodeIpList) + */ + NodeIpList?: { + /** + * 外网ip + */ + Ip?: string; + /** + * 运营商 + */ + Isp?: string; + /** + * 运营商名称 + */ + IspName?: string; + }[]; + /** + * 防火墙Id + */ + FirewallId?: string; + /** + * 机器类型 + */ + ProductType?: string; + }[]; +} + +/** + * DescribeUEcVHostISP - 获取虚拟机运营商信息 + */ +export interface DescribeUEcVHostISPRequest { + /** + * 运营商名称 + */ + IspName?: string; + /** + * 省份 + */ + Province?: string; + /** + * 城市 + */ + City?: string; +} + +/** + * DescribeUEcVHostISP - 获取虚拟机运营商信息 + */ +export interface DescribeUEcVHostISPResponse { + /** + * 节点运营商列表 + */ + NodeIspList: { + /** + * 省份 + */ + Province?: string; + /** + * 城市 + */ + City?: string; + /** + * 线路类型 + */ + LineType?: string; + /** + * 机房运营商名称 + */ + IspName?: string; + /** + * 机房名称 + */ + IdcName?: string; + }[]; +} + +/** + * GetUEcHolderLog - 获取单个容器日志 + */ +export interface GetUEcHolderLogRequest { + /** + * 容器名称 + */ + PackName: string; + /** + * 容器组资源id + */ + ResourceId: string; +} + +/** + * GetUEcHolderLog - 获取单个容器日志 + */ +export interface GetUEcHolderLogResponse { + /** + * 返回的日志数据 + */ + Data?: string; +} + +/** + * GetUEcHolderMetrics - 获取容器(CPU利用率,带宽,内存)数据 + */ +export interface GetUEcHolderMetricsRequest { + /** + * 容器名称 + */ + PackName: string; + /** + * n为0 CPU利用率, 1内存使用率, 2网卡出带宽, 3网卡入带宽, 4网卡出包数, 5网卡入包数 + */ + Type: string[]; + /** + * 容器组资源id + */ + ResourceId: string; + /** + * 开始时间 + */ + StartTime?: number; + /** + * 结束时间 + */ + EndTime?: number; +} + +/** + * GetUEcHolderMetrics - 获取容器(CPU利用率,带宽,内存)数据 + */ +export interface GetUEcHolderMetricsResponse { + /** + * 获得的监控数据(详情参考MetricisDataSet) + */ + DataSets: { + /** + * cpu利用率(详情参考MonitorInfo) + */ + CPUUtilization?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 内存使用率(详情参考MonitorInfo) + */ + MemUtilization?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡出包数(详情参考MonitorInfo) + */ + NetPacketOut?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡入包数(详情参考MonitorInfo) + */ + NetPacketIn?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡出带宽(详情参考MonitorInfo) + */ + NICOut?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡入带宽(详情参考MonitorInfo) + */ + NICIn?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + }; +} + +/** + * GetUEcIDCCutInfo - 获取机房割接信息 + */ +export interface GetUEcIDCCutInfoRequest {} + +/** + * GetUEcIDCCutInfo - 获取机房割接信息 + */ +export interface GetUEcIDCCutInfoResponse { + /** + * 机房割接信息 + */ + IDCCutInfo: { + /** + * 机房名称 + */ + IDCName?: string; + /** + * 省份 + */ + Province?: string; + /** + * 城市 + */ + City?: string; + /** + * 割接开始时间 + */ + StartTime?: number; + /** + * 割接结束时间 + */ + EndTime?: number; + /** + * 割接类型(中断、抖动、断电) + */ + CutType?: string; + /** + * 受影响的资源信息列表 + */ + ResourceSet?: { + /** + * 节点id + */ + NodeId?: string; + /** + * 机器外网ip集合 + */ + OuterIps?: string[]; + }[]; + }[]; + /** + * 满足条件的机房总数 + */ + TotalCount?: number; +} + +/** + * GetUEcIDCVHostData - 获取机房虚拟机监控数据 + */ +export interface GetUEcIDCVHostDataRequest { + /** + * 节点资源id;n为0,1,2... + */ + NodeId: string[]; + /** + * 监控数据类型;n为0,1,2,3,4...,9 + */ + Type: string[]; + /** + * 开始时间戳 + */ + BeginTime?: number; + /** + * 结束时间戳 + */ + EndTime?: number; +} + +/** + * GetUEcIDCVHostData - 获取机房虚拟机监控数据 + */ +export interface GetUEcIDCVHostDataResponse { + /** + * 监控数据集合 + */ + DataSets: { + /** + * cpu使用率 + */ + CPUUtilization?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 内存使用率 + */ + MemUtilization?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡出带宽 + */ + NICOut?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡入带宽 + */ + NICIn?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡出包量 + */ + NetPacketOut?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡入包量 + */ + NetPacketIn?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 磁盘读取量 + */ + IORead?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 磁盘写入量 + */ + IOWrite?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 磁盘读取次数 + */ + DiskReadOps?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 磁盘写入次数 + */ + DiskWriteOps?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + }; +} + +/** + * GetUEcImage - uec2.0 + */ +export interface GetUEcImageRequest { + /** + * 镜像类型:1标准镜像,2行业镜像,3自定义镜像 + */ + ImageType?: string; + /** + * 数据偏移量,默认0,非负整数 + */ + Offset?: number; + /** + * 返回数据长度, 默认20,非负整数 + */ + Limit?: number; +} + +/** + * GetUEcImage - uec2.0 + */ +export interface GetUEcImageResponse { + /** + * 获取的镜像信息,具体参考下面ImageInfo + */ + ImageList?: { + /** + * 镜像ID + */ + ImageId?: string; + /** + * 镜像名称 + */ + ImageName?: string; + /** + * 镜像类型:1标准镜像,2行业镜像,3自定义镜像 + */ + ImageType?: number; + /** + * 系统类型:unix, windows + */ + OcType?: string; + /** + * 镜像描述 + */ + ImageDesc?: string; + /** + * 镜像状态:镜像状态 1可用,2不可用 + */ + State?: number; + /** + * 镜像大小,单位GB + */ + ImageSize?: number; + /** + * 镜像创建时间戳 + */ + CreateTime?: number; + /** + * 部署详情列表 + */ + DeployInfoList?: { + /** + * 机房ID + */ + IdcId?: string; + /** + * 镜像状态 1-可用, 2-不可用, 3-获取中, 4-转换中, 5-部署中 + */ + State?: number; + }[]; + }[]; + /** + * 镜像总数 + */ + TotalCount?: number; +} + +/** + * GetUEcPodPrice - 获得容器组价格 + */ +export interface GetUEcPodPriceRequest { + /** + * 机房id + */ + IdcId: string; + /** + * 容器组总Cpu核心数 + */ + CpuCore?: number; + /** + * 容器组总内存大小(单位M) + */ + MemSize?: number; + /** + * 支付类型(2按月,3按年,默认2) + */ + ChargeType?: number; + /** + * 月数或年数(默认值:1,当支付类型为按月时,默认值为0) + */ + ChargeQuantity?: number; + /** + * 产品类型(normal:标准型,hf:高性能型,默认:normal) + */ + ProductType?: string; + /** + * 是否绑定外网IP(yes:是,no:否,默认:no) + */ + ElasticIp?: string; + /** + * 绑定的带宽,默认0,当绑定外网IP时默认1(单位M) + */ + Bandwidth?: number; +} + +/** + * GetUEcPodPrice - 获得容器组价格 + */ +export interface GetUEcPodPriceResponse { + /** + * 容器组价格 + */ + HolderPrice: number; + /** + * IP和带宽价格 + */ + IpPrice: number; +} + +/** + * GetUEcUpgradePrice - 获取虚拟机调整差价 + */ +export interface GetUEcUpgradePriceRequest { + /** + * 虚拟机资源ID + */ + NodeId: string; + /** + * cpu核心数 + */ + CpuCore?: number; + /** + * 内存大小,单位GB + */ + MemSize?: number; + /** + * 系统盘大小,单位GB + */ + SysDiskSize?: number; + /** + * 数据盘大小,单位GB + */ + DiskSize?: number; + /** + * 节点带宽限制,单位Mbs + */ + NetLimit?: number; +} + +/** + * GetUEcUpgradePrice - 获取虚拟机调整差价 + */ +export interface GetUEcUpgradePriceResponse { + /** + * 规格调整差价 + */ + Price?: number; +} + +/** + * GetUEcVHostData - 获取虚拟机监控数据 + */ +export interface GetUEcVHostDataRequest { + /** + * 节点id + */ + NodeId: string; + /** + * 0CPU使用率, 1内存使用率, 2 网卡出流量, 3网卡入流量, 4网卡出包量, 5网卡入包量, 6磁盘读流量, 7磁盘写流量, 8磁盘读次数, 9磁盘写次数 + */ + Type: number[]; + /** + * 查询起始时间 + */ + BeginTime?: number; + /** + * 查询结束时间 + */ + EndTime?: number; +} + +/** + * GetUEcVHostData - 获取虚拟机监控数据 + */ +export interface GetUEcVHostDataResponse { + /** + * 带宽数据实例集合 + */ + DataSets?: { + /** + * cpu使用率 + */ + CPUUtilization?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 内存使用率 + */ + MemUtilization?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡出带宽 + */ + NICOut?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡入带宽 + */ + NICIn?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡出包量 + */ + NetPacketOut?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 网卡入包量 + */ + NetPacketIn?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 磁盘读取量 + */ + IORead?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 磁盘写入量 + */ + IOWrite?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 磁盘读取次数 + */ + DiskReadOps?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + /** + * 磁盘写入次数 + */ + DiskWriteOps?: { + /** + * 时间戳 + */ + TimeStamp: number; + /** + * 值 + */ + Value: number; + }[]; + }; +} + +/** + * GetUEcVHostPrice - 获取虚拟机价格 + */ +export interface GetUEcVHostPriceRequest { + /** + * 机房Id + */ + IdcId: string; + /** + * 节点数量,默认1 + */ + NodeCount?: number; + /** + * CPU核数 + */ + CpuCore?: number; + /** + * 内存大小,单位GB + */ + MemSize?: number; + /** + * 系统盘大小,单位GB + */ + SysDiskSize?: number; + /** + * 数据盘大小,单位GB + */ + DiskSize?: number; + /** + * 网络带宽限速,单位Mbs + */ + NetLimit?: number; + /** + * 付费方式,1按时,2按月,3按年,默认2 + */ + ChargeType?: number; + /** + * 月数或者年数,0计费到月底, 默认0 + */ + ChargeQuantity?: number; + /** + * 产品类型:normal(标准型),hf(高频型),默认normal + */ + ProductType?: string; + /** + * 外网IP的数量,默认1 + */ + IpCount?: number; +} + +/** + * GetUEcVHostPrice - 获取虚拟机价格 + */ +export interface GetUEcVHostPriceResponse { + /** + * 节点价格 + */ + NodePrice?: number; + /** + * Ip和带宽价格 + */ + IpPrice?: number; +} + +/** + * ImportUEcCustomImage - 导入自定义镜像 + */ +export interface ImportUEcCustomImageRequest { + /** + * 镜像需要导入机房,默认分发到所有机房 + */ + IdcId?: string[]; + /** + * 镜像Id,不传参表示新导入镜像,传参表示已有镜像分发到指定机房 + */ + ImageId?: string; + /** + * 镜像名称,不带镜像ID时必填 + */ + ImageName?: string; + /** + * UFile镜像文件下载地址,不带镜像ID时必填 + */ + UFileUrl?: string; + /** + * 操作系统平台,linux、windows(当前版本暂不支持windows),不带镜像ID时必填 + */ + OsType?: string; + /** + * 镜像格式,可选RAW、qcow2, 不带镜像ID时必填 + */ + Format?: string; + /** + * 镜像描述 + */ + ImageDesc?: string; +} + +/** + * ImportUEcCustomImage - 导入自定义镜像 + */ +export interface ImportUEcCustomImageResponse { + /** + * 镜像Id + */ + ImageId: string; +} + +/** + * LoginUEcDocker - 登录容器 + */ +export interface LoginUEcDockerRequest { + /** + * 容器组资源id + */ + ResourceId: string; + /** + * 容器名称 + */ + Name: string; +} + +/** + * LoginUEcDocker - 登录容器 + */ +export interface LoginUEcDockerResponse { + /** + * 返回的token + */ + SessionId: string; + /** + * 登录地址 + */ + Link?: string; + /** + * 登录端口 + */ + LinkPort?: number; +} + +/** + * ModifyUEcBandwidth - 修改节点带宽限制 + */ +export interface ModifyUEcBandwidthRequest { + /** + * 节点Id + */ + NodeId: string; + /** + * 节点带宽限制,单位Mbs + */ + NetLimit: string; +} + +/** + * ModifyUEcBandwidth - 修改节点带宽限制 + */ +export interface ModifyUEcBandwidthResponse {} + +/** + * ModifyUEcHolderName - 修改容器组名称 + */ +export interface ModifyUEcHolderNameRequest { + /** + * 容器组资源id + */ + ResourceId: string; + /** + * 容器组名称 + */ + Name: string; +} + +/** + * ModifyUEcHolderName - 修改容器组名称 + */ +export interface ModifyUEcHolderNameResponse {} + +/** + * ModifyUEcImageName - 修改镜像名称 + */ +export interface ModifyUEcImageNameRequest { + /** + * 镜像ID + */ + ImageId: string; + /** + * 镜像名称 + */ + ImageName: string; + /** + * 镜像描述 + */ + ImageDesc?: string; +} + +/** + * ModifyUEcImageName - 修改镜像名称 + */ +export interface ModifyUEcImageNameResponse {} + +/** + * PoweroffUEcVHost - 虚拟机断电 + */ +export interface PoweroffUEcVHostRequest { + /** + * 虚拟机资源ID + */ + NodeId: string[]; +} + +/** + * PoweroffUEcVHost - 虚拟机断电 + */ +export interface PoweroffUEcVHostResponse {} + +/** + * ReinstallUEcVHost - 虚拟机重装系统 + */ +export interface ReinstallUEcVHostRequest { + /** + * 虚拟机资源ID + */ + NodeId: string; + /** + * 镜像ID + */ + ImageId: string; + /** + * 是否保留数据盘数据, 0-不保留,1-保留,默认为1 + */ + KeepData?: number; + /** + * 节点密码 + */ + Password?: string; + /** + * 系统盘大小,单位GB + */ + SysDiskSize?: number; +} + +/** + * ReinstallUEcVHost - 虚拟机重装系统 + */ +export interface ReinstallUEcVHostResponse {} + +/** + * RestartUEcHolder - 重启容器组 + */ +export interface RestartUEcHolderRequest { + /** + * 容器组资源id,n为0,1,2... + */ + ResourceId: string[]; +} + +/** + * RestartUEcHolder - 重启容器组 + */ +export interface RestartUEcHolderResponse {} + +/** + * RestartUEcVHost - 重启虚拟机v2.0 + */ +export interface RestartUEcVHostRequest { + /** + * 节点id + */ + NodeId: string[]; +} + +/** + * RestartUEcVHost - 重启虚拟机v2.0 + */ +export interface RestartUEcVHostResponse {} + +/** + * StartUEcVHost - 启动UEC虚拟机 + */ +export interface StartUEcVHostRequest { + /** + * 虚拟机资源ID + */ + NodeId: string[]; +} + +/** + * StartUEcVHost - 启动UEC虚拟机 + */ +export interface StartUEcVHostResponse {} + +/** + * StopUEcVHost - 停止UEC虚拟机 + */ +export interface StopUEcVHostRequest { + /** + * 虚拟机资源ID + */ + NodeId: string[]; +} + +/** + * StopUEcVHost - 停止UEC虚拟机 + */ +export interface StopUEcVHostResponse {} + +/** + * UnBindUEcFirewall - 解绑防火墙 + */ +export interface UnBindUEcFirewallRequest { + /** + * 防火墙Id + */ + FirewallId: string; + /** + * 节点Id或容器组资源id + */ + ResourceId: string; +} + +/** + * UnBindUEcFirewall - 解绑防火墙 + */ +export interface UnBindUEcFirewallResponse {} + +/** + * UpdateUEcFirewall - 更新防火墙信息,新增和删除规则 + */ +export interface UpdateUEcFirewallRequest { + /** + * 防火墙Id + */ + FirewallId: string; + /** + * + */ + Rule?: { + /** + * 协议,可选值:TCP,UDP,ICMP + */ + ProtocolType: string; + /** + * 端口,范围用"-"符号分隔,如:1-65535 + */ + Port: string; + /** + * 源ip + */ + SrcIp: string; + /** + * ACCEPT(接受)和DROP(拒绝) + */ + Action: string; + /** + * 优先级:HIGH(高),MEDIUM(中),LOW(低) + */ + Priority: string; + /** + * 备注 + */ + Remark: string; + }[]; +} + +/** + * UpdateUEcFirewall - 更新防火墙信息,新增和删除规则 + */ +export interface UpdateUEcFirewallResponse {} + +/** + * UpdateUEcFirewallAttribute - 更新防火墙名称及描述 + */ +export interface UpdateUEcFirewallAttributeRequest { + /** + * 防火墙Id + */ + FirewallId: string; + /** + * 防火墙名称 + */ + Name?: string; + /** + * 描述 + */ + Remark?: string; +} + +/** + * UpdateUEcFirewallAttribute - 更新防火墙名称及描述 + */ +export interface UpdateUEcFirewallAttributeResponse {} + +/** + * UpdateUEcSubnet - 更新子网信息 + */ +export interface UpdateUEcSubnetRequest { + /** + * 子网ID + */ + SubnetId: string; + /** + * 子网名称 + */ + SubnetName?: string; + /** + * 备注 + */ + Comment?: string; +} + +/** + * UpdateUEcSubnet - 更新子网信息 + */ +export interface UpdateUEcSubnetResponse {} diff --git a/src/services/ufile/index.ts b/src/services/ufile/index.ts new file mode 100644 index 0000000..9445d2b --- /dev/null +++ b/src/services/ufile/index.ts @@ -0,0 +1,700 @@ +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 **ufile** service + */ +export default class UFileClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * CreateBucket - 创建Bucket + * + * See also: https://docs.ucloud.cn/api/ufile-api/create_bucket + */ + createBucket(request?: CreateBucketRequest): Promise { + const args = { Action: 'CreateBucket', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateBucketResponse + ); + } + + /** + * CreateUFileToken - 创建US3令牌 + * + * See also: https://docs.ucloud.cn/api/ufile-api/create_ufile_token + */ + createUFileToken( + request?: CreateUFileTokenRequest + ): Promise { + const args = { Action: 'CreateUFileToken', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUFileTokenResponse + ); + } + + /** + * DeleteBucket - 删除Bucket + * + * See also: https://docs.ucloud.cn/api/ufile-api/delete_bucket + */ + deleteBucket(request?: DeleteBucketRequest): Promise { + const args = { Action: 'DeleteBucket', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteBucketResponse + ); + } + + /** + * DeleteUFileToken - 删除令牌 + * + * See also: https://docs.ucloud.cn/api/ufile-api/delete_ufile_token + */ + deleteUFileToken( + request?: DeleteUFileTokenRequest + ): Promise { + const args = { Action: 'DeleteUFileToken', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUFileTokenResponse + ); + } + + /** + * DescribeBucket - 获取Bucket的描述信息 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_bucket + */ + describeBucket( + request?: DescribeBucketRequest + ): Promise { + const args = { Action: 'DescribeBucket', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeBucketResponse + ); + } + + /** + * DescribeUFileToken - 获取令牌信息 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_token + */ + describeUFileToken( + request?: DescribeUFileTokenRequest + ): Promise { + const args = { Action: 'DescribeUFileToken', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUFileTokenResponse + ); + } + + /** + * GetUFileQuota - 查看配额状态 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_quota + */ + getUFileQuota( + request?: GetUFileQuotaRequest + ): Promise { + const args = { Action: 'GetUFileQuota', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUFileQuotaResponse + ); + } + + /** + * GetUFileQuotaInfo - 获取配额信息 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_quota_info + */ + getUFileQuotaInfo( + request?: GetUFileQuotaInfoRequest + ): Promise { + const args = { Action: 'GetUFileQuotaInfo', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUFileQuotaInfoResponse + ); + } + + /** + * GetUFileQuotaPrice - 根据US3的购买配额,查询需要支付的价格。 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_quota_price + */ + getUFileQuotaPrice( + request?: GetUFileQuotaPriceRequest + ): Promise { + const args = { Action: 'GetUFileQuotaPrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUFileQuotaPriceResponse + ); + } + + /** + * GetUFileReport - 查看配额使用报表 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_report + */ + getUFileReport( + request?: GetUFileReportRequest + ): Promise { + const args = { Action: 'GetUFileReport', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUFileReportResponse + ); + } + + /** + * SetUFileReferer - 设置对象存储防盗链 + * + * See also: https://docs.ucloud.cn/api/ufile-api/set_ufile_referer + */ + setUFileReferer( + request?: SetUFileRefererRequest + ): Promise { + const args = { Action: 'SetUFileReferer', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as SetUFileRefererResponse + ); + } + + /** + * UpdateBucket - 更改Bucket的属性 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_bucket + */ + updateBucket(request?: UpdateBucketRequest): Promise { + const args = { Action: 'UpdateBucket', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateBucketResponse + ); + } + + /** + * UpdateUFileToken - 更新令牌的操作权限,可操作key的前缀,可操作bucket和令牌超时时间点 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_ufile_token + */ + updateUFileToken( + request?: UpdateUFileTokenRequest + ): Promise { + const args = { Action: 'UpdateUFileToken', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateUFileTokenResponse + ); + } +} + +/** + * CreateBucket - 创建Bucket + */ +export interface CreateBucketRequest { + /** + * 待创建Bucket的名称,具有全局唯一性 + */ + BucketName: string; + /** + * Bucket访问类型,public或private; 默认为private + */ + Type?: string; +} + +/** + * CreateBucket - 创建Bucket + */ +export interface CreateBucketResponse { + /** + * 已创建Bucket的名称 + */ + BucketName?: string; + /** + * 已创建Bucket的ID + */ + BucketId?: string; +} + +/** + * CreateUFileToken - 创建US3令牌 + */ +export interface CreateUFileTokenRequest { + /** + * 令牌名称 + */ + TokenName: string; + /** + * 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ]。默认TOKEN_ALLOW_NONE + */ + AllowedOps?: string[]; + /** + * 令牌允许操作的key前缀,默认*表示全部 + */ + AllowedPrefixes?: string[]; + /** + * 令牌允许操作的bucket,默认*表示全部 + */ + AllowedBuckets?: string[]; + /** + * Unix 时间戳,精确到秒,为令牌过期时间点。默认过期时间为一天(即当前Unix时间戳+86400);注意:过期时间不能超过 4102416000 + */ + ExpireTime?: number; +} + +/** + * CreateUFileToken - 创建US3令牌 + */ +export interface CreateUFileTokenResponse { + /** + * 创建令牌的token_id + */ + TokenId?: string; +} + +/** + * DeleteBucket - 删除Bucket + */ +export interface DeleteBucketRequest { + /** + * 待删除Bucket的名称 + */ + BucketName: string; +} + +/** + * DeleteBucket - 删除Bucket + */ +export interface DeleteBucketResponse { + /** + * Bucket的名称 + */ + BucketName?: string; + /** + * Bucket的ID + */ + BucketId?: string; +} + +/** + * DeleteUFileToken - 删除令牌 + */ +export interface DeleteUFileTokenRequest { + /** + * 令牌ID + */ + TokenId: string; +} + +/** + * DeleteUFileToken - 删除令牌 + */ +export interface DeleteUFileTokenResponse {} + +/** + * DescribeBucket - 获取Bucket的描述信息 + */ +export interface DescribeBucketRequest { + /** + * 待获取Bucket的名称,若不提供,则获取所有Bucket + */ + BucketName?: string; + /** + * 获取所有Bucket列表的偏移数目,默认为0 + */ + Offset?: number; + /** + * 获取所有Bucket列表的限制数目,默认为20 + */ + Limit?: number; +} + +/** + * DescribeBucket - 获取Bucket的描述信息 + */ +export interface DescribeBucketResponse { + /** + * Bucket的描述信息 参数见 UFileBucketSet + */ + DataSet?: { + /** + * Bucket所属地域 + */ + Region?: string; + /** + * Bucket名称 + */ + BucketName?: string; + /** + * Bucket的ID + */ + BucketId?: string; + /** + * Bucket的域名集合 参数见 UFileDomainSet + */ + Domain?: { + /** + * 源站域名 + */ + Src?: string[]; + /** + * UCDN加速域名 + */ + Cdn?: string[]; + /** + * 用户自定义源站域名 + */ + CustomSrc?: string[]; + /** + * 用户自定义CDN加速域名 + */ + CustomCdn?: string[]; + }; + /** + * 与Bucket关联的CND加速域名的ID列表 + */ + CdnDomainId?: string[]; + /** + * Bucket访问类型 + */ + Type?: string; + /** + * Bucket的创建时间 + */ + CreateTime?: number; + /** + * Bucket的修改时间 + */ + ModifyTime?: number; + /** + * Bucket所属业务, general或vod或udb general: 普通业务; vod: 视频云业务; udb: 云数据库业务 + */ + Biz?: string; + /** + * 所属业务组 + */ + Tag?: string; + /** + * 是否存在自定义域名。0不存在,1存在,2错误 + */ + HasUserDomain?: number; + }[]; +} + +/** + * DescribeUFileToken - 获取令牌信息 + */ +export interface DescribeUFileTokenRequest { + /** + * 令牌ID,只返回指定ID信息,否则拉取所有令牌 + */ + TokenId?: string; + /** + * 令牌名称,只返回指定令牌名称信息,否则拉取所有令牌 + */ + TokenName?: string; + /** + * 0表示显示部分token信息;不传递和其他情况表示显示全部token信息 + */ + Display?: number; +} + +/** + * DescribeUFileToken - 获取令牌信息 + */ +export interface DescribeUFileTokenResponse { + /** + * 令牌描述信息 + */ + DataSet: { + /** + * 令牌ID + */ + TokenId: string; + /** + * 令牌名称 + */ + TokenName: string; + /** + * 令牌公钥 + */ + PublicKey: string; + /** + * 令牌私钥 + */ + PrivateKey: string; + /** + * 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ] + */ + AllowedOps: string[]; + /** + * 令牌允许操作的key前缀 + */ + AllowedPrefixes: string[]; + /** + * 令牌允许操作的bucket + */ + AllowedBuckets: string[]; + /** + * 令牌的超时时间点 + */ + ExpireTime: number; + /** + * 创建时间 + */ + CreateTime: number; + /** + * 修改时间 + */ + ModifyTime: number; + /** + * 所属地区 + */ + Region: string; + }[]; +} + +/** + * GetUFileQuota - 查看配额状态 + */ +export interface GetUFileQuotaRequest { + /** + * 配额类型,取值为storage-volume, download-traffic或request-count + */ + QuotaType: string; +} + +/** + * GetUFileQuota - 查看配额状态 + */ +export interface GetUFileQuotaResponse { + /** + * 剩余的配额数值 + */ + LeftQuota?: number; +} + +/** + * GetUFileQuotaInfo - 获取配额信息 + */ +export interface GetUFileQuotaInfoRequest { + /** + * 配额类型,取值为storage-volume, download-traffic或request-count + */ + QuotaType: string[]; +} + +/** + * GetUFileQuotaInfo - 获取配额信息 + */ +export interface GetUFileQuotaInfoResponse { + /** + * 配额信息数据集 + */ + DataSet?: { + /** + * 可用地域 + */ + Region?: string; + /** + * 是否欠费:1表示欠费;0表示未欠费 + */ + Owe?: number; + /** + * 剩余存储容量 + */ + Storage?: { + /** + * 配额剩余量 + */ + Left?: number; + }; + /** + * 剩余下载流量 + */ + DownloadFlow?: { + /** + * 配额剩余量 + */ + Left?: number; + }; + /** + * 剩余请求次数 + */ + RequestCnt?: { + /** + * 配额剩余量 + */ + Left?: number; + }; + }[]; +} + +/** + * GetUFileQuotaPrice - 根据US3的购买配额,查询需要支付的价格。 + */ +export interface GetUFileQuotaPriceRequest { + /** + * 存储容量,单位: GB*天,范围: [0, 30 000 000],步长:100GB*天 + */ + StorageVolume?: number; + /** + * 下载流量,单位: GB,范围: [0, 60 000],步长:1GB + */ + DownloadTraffic?: number; + /** + * 请求次数,单位:万次,范围:[0, 1 000 000],步长:1万次 + */ + RequestCount?: number; +} + +/** + * GetUFileQuotaPrice - 根据US3的购买配额,查询需要支付的价格。 + */ +export interface GetUFileQuotaPriceResponse { + /** + * 待支付价格,单位:分 + */ + Price?: number; +} + +/** + * GetUFileReport - 查看配额使用报表 + */ +export interface GetUFileReportRequest { + /** + * 查询开始时间 + */ + StartTime: number; + /** + * 查询结束时间 + */ + EndTime: number; +} + +/** + * GetUFileReport - 查看配额使用报表 + */ +export interface GetUFileReportResponse { + /** + * 报表内容 参数见 UFileReportSet + */ + DataSet?: { + /** + * 配额消费时间,unix时间戳,精确到日期 + */ + Time?: number; + /** + * 配额消费当日使用的存储容量,单位:GB*天 + */ + StorageVolume?: number; + /** + * 配额消费当日使用的下载流量,单位:GB + */ + DownloadTraffic?: number; + /** + * 配额消费当日使用的请求次数,单位:万次 + */ + RequestCount?: number; + }[]; +} + +/** + * SetUFileReferer - 设置对象存储防盗链 + */ +export interface SetUFileRefererRequest { + /** + * 存储空间名称 + */ + BucketName: string; + /** + * 开启关闭referer防盗链;关闭防盗链会清空防盗链参数设置,开启防盗链必须指定 RefererType、Referers;开启:on, 关闭:off; + */ + RefererStatus: string; + /** + * RefererType为白名单时,RefererAllowNull为false代表不允许空referer访问,为true代表允许空referer访问;此参数默认为 true; + */ + RefererAllowNull?: boolean; + /** + * 防盗链Referer类型,支持两种类型,黑名单和白名单; 1黑名单,2白名单;RefererStatus为"on"时此参数必填; + */ + RefererType?: number; + /** + * 防盗链Referer规则,支持正则表达式(不支持符号';') + */ + Referers?: string[]; +} + +/** + * SetUFileReferer - 设置对象存储防盗链 + */ +export interface SetUFileRefererResponse {} + +/** + * UpdateBucket - 更改Bucket的属性 + */ +export interface UpdateBucketRequest { + /** + * 待修改Bucket的名称 + */ + BucketName: string; + /** + * Bucket访问类型;public或private + */ + Type: string; +} + +/** + * UpdateBucket - 更改Bucket的属性 + */ +export interface UpdateBucketResponse { + /** + * Bucket的名称 + */ + BucketName?: string; + /** + * Bucket的ID + */ + BucketId?: string; +} + +/** + * UpdateUFileToken - 更新令牌的操作权限,可操作key的前缀,可操作bucket和令牌超时时间点 + */ +export interface UpdateUFileTokenRequest { + /** + * 令牌ID + */ + TokenId: string; + /** + * 令牌名称 + */ + TokenName?: string; + /** + * 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ] + */ + AllowedOps?: string[]; + /** + * 令牌允许操作的key前缀 + */ + AllowedPrefixes?: string[]; + /** + * 令牌允许操作的bucket + */ + AllowedBuckets?: string[]; + /** + * 令牌的超时时间点(时间戳);注意:过期时间不能超过 4102416000 + */ + ExpireTime?: number; +} + +/** + * UpdateUFileToken - 更新令牌的操作权限,可操作key的前缀,可操作bucket和令牌超时时间点 + */ +export interface UpdateUFileTokenResponse {} diff --git a/src/services/ufs/index.ts b/src/services/ufs/index.ts new file mode 100644 index 0000000..60ef44d --- /dev/null +++ b/src/services/ufs/index.ts @@ -0,0 +1,254 @@ +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 **ufs** service + */ +export default class UFSClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * CreateUFSVolume - 创建文件系统 + * + * See also: https://docs.ucloud.cn/api/ufs-api/create_ufs_volume + */ + createUFSVolume( + request?: CreateUFSVolumeRequest + ): Promise { + const args = { Action: 'CreateUFSVolume', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUFSVolumeResponse + ); + } + + /** + * DescribeUFSVolume2 - 获取文件系统列表 + * + * See also: https://docs.ucloud.cn/api/ufs-api/describe_ufs_volume2 + */ + describeUFSVolume2( + request?: DescribeUFSVolume2Request + ): Promise { + const args = { Action: 'DescribeUFSVolume2', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUFSVolume2Response + ); + } + + /** + * ExtendUFSVolume - 文件系统扩容 + * + * See also: https://docs.ucloud.cn/api/ufs-api/extend_ufs_volume + */ + extendUFSVolume( + request?: ExtendUFSVolumeRequest + ): Promise { + const args = { Action: 'ExtendUFSVolume', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ExtendUFSVolumeResponse + ); + } + + /** + * RemoveUFSVolume - 删除UFS文件系统 + * + * See also: https://docs.ucloud.cn/api/ufs-api/remove_ufs_volume + */ + removeUFSVolume( + request?: RemoveUFSVolumeRequest + ): Promise { + const args = { Action: 'RemoveUFSVolume', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RemoveUFSVolumeResponse + ); + } +} + +/** + * CreateUFSVolume - 创建文件系统 + */ +export interface CreateUFSVolumeRequest { + /** + * 文件系统大小,单位为GB,最大不超过20T,香港容量型必须为100的整数倍,Size最小为500GB,北京,上海,广州的容量型必须为1024的整数倍,Size最小为1024GB。性能型文件系统Size最小为100GB + */ + Size: number; + /** + * 文件系统存储类型,枚举值,Basic表示容量型,Advanced表示性能型 + */ + StorageType: string; + /** + * 文件系统协议,枚举值,NFSv3表示NFS V3协议,NFSv4表示NFS V4协议 + */ + ProtocolType: string; + /** + * 文件系统名称 + */ + VolumeName?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 文件系统所属业务组 + */ + Tag?: string; + /** + * 计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限); Trial,试用(需开启权限) 默认为Dynamic + */ + ChargeType?: string; + /** + * 购买时长 默认: 1 + */ + Quantity?: number; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * CreateUFSVolume - 创建文件系统 + */ +export interface CreateUFSVolumeResponse { + /** + * 文件系统名称 + */ + VolumeName: string; + /** + * 文件系统ID + */ + VolumeId: string; + /** + * 文件系统挂载点状态 + */ + VolumeStatus: string; +} + +/** + * DescribeUFSVolume2 - 获取文件系统列表 + */ +export interface DescribeUFSVolume2Request { + /** + * 文件系统ID + */ + VolumeId?: string; + /** + * 文件列表起始 + */ + Offset?: number; + /** + * 文件列表长度 + */ + Limit?: number; +} + +/** + * DescribeUFSVolume2 - 获取文件系统列表 + */ +export interface DescribeUFSVolume2Response { + /** + * 文件系统总数 + */ + TotalCount: number; + /** + * 文件系统详细信息列表 + */ + DataSet: { + /** + * 文件系统名称 + */ + VolumeName: string; + /** + * 文件系统ID + */ + VolumeId: string; + /** + * 当前文件系统已创建的挂载点数目 + */ + TotalMountPointNum: number; + /** + * 文件系统允许创建的最大挂载点数目 + */ + MaxMountPointNum: number; + /** + * 文件系统存储类型,枚举值,Basic表示容量型,Advanced表示性能型 + */ + StorageType: string; + /** + * 文件系统协议,枚举值,NFSv3表示NFS V3协议,NFSv4表示NFS V4协议 + */ + ProtocolType: string; + /** + * 文件系统备注信息 + */ + Remark?: string; + /** + * 文件系统所属业务组 + */ + Tag?: string; + /** + * 文件系统创建时间(unix时间戳) + */ + CreateTime?: number; + /** + * 文件系统过期时间(unix时间戳) + */ + ExpiredTime?: number; + /** + * 文件系统大小,单位GB + */ + Size?: number; + /** + * 文件系统当前使用容量,单位GB + */ + UsedSize?: number; + /** + * 是否过期 + */ + IsExpired?: string; + }[]; +} + +/** + * ExtendUFSVolume - 文件系统扩容 + */ +export interface ExtendUFSVolumeRequest { + /** + * 文件系统ID + */ + VolumeId: string; + /** + * 文件系统大小,单位为GB,最大不超过20T,香港容量型必须为100的整数倍,Size最小为500GB,北京,上海,广州的容量型必须为1024的整数倍,Size最小为1024GB。性能型文件系统Size最小为100GB + */ + Size: number; +} + +/** + * ExtendUFSVolume - 文件系统扩容 + */ +export interface ExtendUFSVolumeResponse {} + +/** + * RemoveUFSVolume - 删除UFS文件系统 + */ +export interface RemoveUFSVolumeRequest { + /** + * 文件系统ID + */ + VolumeId: string; +} + +/** + * RemoveUFSVolume - 删除UFS文件系统 + */ +export interface RemoveUFSVolumeResponse {} diff --git a/src/services/uhost/index.ts b/src/services/uhost/index.ts new file mode 100644 index 0000000..487ecfa --- /dev/null +++ b/src/services/uhost/index.ts @@ -0,0 +1,2351 @@ +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 **uhost** service + */ +export default class UHostClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * CopyCustomImage - 复制自制镜像 + * + * See also: https://docs.ucloud.cn/api/uhost-api/copy_custom_image + */ + copyCustomImage( + request?: CopyCustomImageRequest + ): Promise { + const args = { Action: 'CopyCustomImage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CopyCustomImageResponse + ); + } + + /** + * CreateCustomImage - 从指定UHost实例,生成自定义镜像。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/create_custom_image + */ + createCustomImage( + request?: CreateCustomImageRequest + ): Promise { + const args = { Action: 'CreateCustomImage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateCustomImageResponse + ); + } + + /** + * CreateIsolationGroup - 创建硬件隔离组,组内机器严格隔离在不同宿主机上。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/create_isolation_group + */ + createIsolationGroup( + request?: CreateIsolationGroupRequest + ): Promise { + const args = { Action: 'CreateIsolationGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateIsolationGroupResponse + ); + } + + /** + * CreateUHostInstance - 创建UHost实例。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/create_uhost_instance + */ + createUHostInstance( + request?: CreateUHostInstanceRequest + ): Promise { + const args = { Action: 'CreateUHostInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUHostInstanceResponse + ); + } + + /** + * CreateUHostKeyPair - 创建主机密钥对信息 + * + * See also: https://docs.ucloud.cn/api/uhost-api/create_uhost_key_pair + */ + createUHostKeyPair( + request?: CreateUHostKeyPairRequest + ): Promise { + const args = { Action: 'CreateUHostKeyPair', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUHostKeyPairResponse + ); + } + + /** + * DeleteIsolationGroup - 删除硬件隔离组。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/delete_isolation_group + */ + deleteIsolationGroup( + request?: DeleteIsolationGroupRequest + ): Promise { + const args = { Action: 'DeleteIsolationGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteIsolationGroupResponse + ); + } + + /** + * DeleteUHostKeyPairs - 删除一对或者多对密钥对。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/delete_uhost_key_pairs + */ + deleteUHostKeyPairs( + request?: DeleteUHostKeyPairsRequest + ): Promise { + const args = { Action: 'DeleteUHostKeyPairs', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUHostKeyPairsResponse + ); + } + + /** + * DescribeImage - 获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/describe_image + */ + describeImage( + request?: DescribeImageRequest + ): Promise { + const args = { Action: 'DescribeImage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeImageResponse + ); + } + + /** + * DescribeIsolationGroup - 查询硬件隔离组列表。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/describe_isolation_group + */ + describeIsolationGroup( + request?: DescribeIsolationGroupRequest + ): Promise { + const args = { Action: 'DescribeIsolationGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeIsolationGroupResponse + ); + } + + /** + * DescribeUHostInstance - 获取主机或主机列表信息,并可根据数据中心,主机ID等参数进行过滤。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/describe_uhost_instance + */ + describeUHostInstance( + request?: DescribeUHostInstanceRequest + ): Promise { + const args = { Action: 'DescribeUHostInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUHostInstanceResponse + ); + } + + /** + * DescribeUHostKeyPairs - 查询一个或多个密钥对。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/describe_uhost_key_pairs + */ + describeUHostKeyPairs( + request?: DescribeUHostKeyPairsRequest + ): Promise { + const args = { Action: 'DescribeUHostKeyPairs', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUHostKeyPairsResponse + ); + } + + /** + * DescribeUHostTags - 获取指定数据中心的业务组列表。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/describe_uhost_tags + */ + describeUHostTags( + request?: DescribeUHostTagsRequest + ): Promise { + const args = { Action: 'DescribeUHostTags', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUHostTagsResponse + ); + } + + /** + * GetAttachedDiskUpgradePrice - 获取挂载磁盘的升级价格 + * + * See also: https://docs.ucloud.cn/api/uhost-api/get_attached_disk_upgrade_price + */ + getAttachedDiskUpgradePrice( + request?: GetAttachedDiskUpgradePriceRequest + ): Promise { + const args = { Action: 'GetAttachedDiskUpgradePrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetAttachedDiskUpgradePriceResponse + ); + } + + /** + * GetUHostInstancePrice - 根据UHost实例配置,获取UHost实例的价格。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/get_uhost_instance_price + */ + getUHostInstancePrice( + request?: GetUHostInstancePriceRequest + ): Promise { + const args = { Action: 'GetUHostInstancePrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUHostInstancePriceResponse + ); + } + + /** + * GetUHostInstanceVncInfo - 获取指定UHost实例的管理VNC配置详细信息。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/get_uhost_instance_vnc_info + */ + getUHostInstanceVncInfo( + request?: GetUHostInstanceVncInfoRequest + ): Promise { + const args = { Action: 'GetUHostInstanceVncInfo', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUHostInstanceVncInfoResponse + ); + } + + /** + * GetUHostUpgradePrice - 获取UHost实例升级配置的价格。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/get_uhost_upgrade_price + */ + getUHostUpgradePrice( + request?: GetUHostUpgradePriceRequest + ): Promise { + const args = { Action: 'GetUHostUpgradePrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUHostUpgradePriceResponse + ); + } + + /** + * ImportCustomImage - 把UFile的镜像文件导入到UHost,生成自定义镜像 + * + * See also: https://docs.ucloud.cn/api/uhost-api/import_custom_image + */ + importCustomImage( + request?: ImportCustomImageRequest + ): Promise { + const args = { Action: 'ImportCustomImage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ImportCustomImageResponse + ); + } + + /** + * ImportUHostKeyPairs - 导入密钥对后,仅保管公钥部分,需自行妥善保存密钥对的私钥部分。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/import_uhost_key_pairs + */ + importUHostKeyPairs( + request?: ImportUHostKeyPairsRequest + ): Promise { + const args = { Action: 'ImportUHostKeyPairs', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ImportUHostKeyPairsResponse + ); + } + + /** + * LeaveIsolationGroup - 移除硬件隔离组中的主机 + * + * See also: https://docs.ucloud.cn/api/uhost-api/leave_isolation_group + */ + leaveIsolationGroup( + request?: LeaveIsolationGroupRequest + ): Promise { + const args = { Action: 'LeaveIsolationGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as LeaveIsolationGroupResponse + ); + } + + /** + * ModifyUHostIP - 修改云主机内网 IP 地址 + * + * See also: https://docs.ucloud.cn/api/uhost-api/modify_uhost_ip + */ + modifyUHostIP( + request?: ModifyUHostIPRequest + ): Promise { + const args = { Action: 'ModifyUHostIP', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyUHostIPResponse + ); + } + + /** + * ModifyUHostInstanceName - 修改指定UHost实例名称,需要给出数据中心,UHostId,及新的实例名称。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/modify_uhost_instance_name + */ + modifyUHostInstanceName( + request?: ModifyUHostInstanceNameRequest + ): Promise { + const args = { Action: 'ModifyUHostInstanceName', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyUHostInstanceNameResponse + ); + } + + /** + * ModifyUHostInstanceRemark - 修改指定UHost实例备注信息。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/modify_uhost_instance_remark + */ + modifyUHostInstanceRemark( + request?: ModifyUHostInstanceRemarkRequest + ): Promise { + const args = { Action: 'ModifyUHostInstanceRemark', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyUHostInstanceRemarkResponse + ); + } + + /** + * ModifyUHostInstanceTag - 修改指定UHost实例业务组标识。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/modify_uhost_instance_tag + */ + modifyUHostInstanceTag( + request?: ModifyUHostInstanceTagRequest + ): Promise { + const args = { Action: 'ModifyUHostInstanceTag', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyUHostInstanceTagResponse + ); + } + + /** + * PoweroffUHostInstance - 直接关闭UHost实例电源,无需等待实例正常关闭。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/poweroff_uhost_instance + */ + poweroffUHostInstance( + request?: PoweroffUHostInstanceRequest + ): Promise { + const args = { Action: 'PoweroffUHostInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as PoweroffUHostInstanceResponse + ); + } + + /** + * RebootUHostInstance - 重新启动UHost实例,需要指定数据中心及UHostID两个参数的值。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/reboot_uhost_instance + */ + rebootUHostInstance( + request?: RebootUHostInstanceRequest + ): Promise { + const args = { Action: 'RebootUHostInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RebootUHostInstanceResponse + ); + } + + /** + * ReinstallUHostInstance - 重新安装指定UHost实例的操作系统 + * + * See also: https://docs.ucloud.cn/api/uhost-api/reinstall_uhost_instance + */ + reinstallUHostInstance( + request?: ReinstallUHostInstanceRequest + ): Promise { + const args = { Action: 'ReinstallUHostInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ReinstallUHostInstanceResponse + ); + } + + /** + * ResetUHostInstancePassword - 重置UHost实例的管理员密码。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/reset_uhost_instance_password + */ + resetUHostInstancePassword( + request?: ResetUHostInstancePasswordRequest + ): Promise { + const args = { Action: 'ResetUHostInstancePassword', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ResetUHostInstancePasswordResponse + ); + } + + /** + * ResizeAttachedDisk - 修改挂载的磁盘大小,包含系统盘和数据盘 + * + * See also: https://docs.ucloud.cn/api/uhost-api/resize_attached_disk + */ + resizeAttachedDisk( + request?: ResizeAttachedDiskRequest + ): Promise { + const args = { Action: 'ResizeAttachedDisk', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ResizeAttachedDiskResponse + ); + } + + /** + * ResizeUHostInstance - 修改指定UHost实例的资源配置,如CPU核心数,内存容量大小,网络增强等。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/resize_uhost_instance + */ + resizeUHostInstance( + request?: ResizeUHostInstanceRequest + ): Promise { + const args = { Action: 'ResizeUHostInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ResizeUHostInstanceResponse + ); + } + + /** + * StartUHostInstance - 启动处于关闭状态的UHost实例,需要指定数据中心及UHostID两个参数的值。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/start_uhost_instance + */ + startUHostInstance( + request?: StartUHostInstanceRequest + ): Promise { + const args = { Action: 'StartUHostInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as StartUHostInstanceResponse + ); + } + + /** + * StopUHostInstance - 指停止处于运行状态的UHost实例,需指定数据中心及UhostID。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/stop_uhost_instance + */ + stopUHostInstance( + request?: StopUHostInstanceRequest + ): Promise { + const args = { Action: 'StopUHostInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as StopUHostInstanceResponse + ); + } + + /** + * TerminateCustomImage - 删除用户自定义镜像 + * + * See also: https://docs.ucloud.cn/api/uhost-api/terminate_custom_image + */ + terminateCustomImage( + request?: TerminateCustomImageRequest + ): Promise { + const args = { Action: 'TerminateCustomImage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as TerminateCustomImageResponse + ); + } + + /** + * TerminateUHostInstance - 删除指定数据中心的UHost实例。 + * + * See also: https://docs.ucloud.cn/api/uhost-api/terminate_uhost_instance + */ + terminateUHostInstance( + request?: TerminateUHostInstanceRequest + ): Promise { + const args = { Action: 'TerminateUHostInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as TerminateUHostInstanceResponse + ); + } + + /** + * UpgradeToArkUHostInstance - 普通升级为方舟机型 + * + * See also: https://docs.ucloud.cn/api/uhost-api/upgrade_to_ark_uhost_instance + */ + upgradeToArkUHostInstance( + request?: UpgradeToArkUHostInstanceRequest + ): Promise { + const args = { Action: 'UpgradeToArkUHostInstance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpgradeToArkUHostInstanceResponse + ); + } +} + +/** + * CopyCustomImage - 复制自制镜像 + */ +export interface CopyCustomImageRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 源镜像Id, 参见 DescribeImage + */ + SourceImageId: string; + /** + * 目标项目Id, 参见 GetProjectList + */ + TargetProjectId: string; + /** + * 目标地域,不跨地域不用填 + */ + TargetRegion?: string; + /** + * 目标镜像名称 + */ + TargetImageName?: string; + /** + * 目标镜像描述 + */ + TargetImageDescription?: string; +} + +/** + * CopyCustomImage - 复制自制镜像 + */ +export interface CopyCustomImageResponse { + /** + * 目标镜像Id + */ + TargetImageId?: string; +} + +/** + * CreateCustomImage - 从指定UHost实例,生成自定义镜像。 + */ +export interface CreateCustomImageRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * 镜像名称 + */ + ImageName: string; + /** + * 镜像描述 + */ + ImageDescription?: string; +} + +/** + * CreateCustomImage - 从指定UHost实例,生成自定义镜像。 + */ +export interface CreateCustomImageResponse { + /** + * 镜像Id + */ + ImageId?: string; +} + +/** + * CreateIsolationGroup - 创建硬件隔离组,组内机器严格隔离在不同宿主机上。 + */ +export interface CreateIsolationGroupRequest { + /** + * 硬件隔离组名称。请遵照[[api:uhost-api:specification|字段规范]]设定隔离组名称。 + */ + GroupName: string; + /** + * 备注。请遵照[[api:uhost-api:specification|字段规范]]设定隔离组备注。 + */ + Remark?: string; +} + +/** + * CreateIsolationGroup - 创建硬件隔离组,组内机器严格隔离在不同宿主机上。 + */ +export interface CreateIsolationGroupResponse { + /** + * 硬件隔离组id + */ + GroupId: string; +} + +/** + * CreateUHostInstance - 创建UHost实例。 + */ +export interface CreateUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 镜像ID。 请通过 [DescribeImage](describe_image.html)获取 + */ + ImageId: string; + /** + * + */ + Disks?: { + /** + * 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + */ + IsBoot: string; + /** + * 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + */ + Type: string; + /** + * 磁盘大小,单位GB,必须是10GB的整数倍。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + */ + Size: number; + /** + * 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT(SNAPSHOT模式目前仅在上海C支持),快照 \\当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]],默认值:NONE + */ + BackupType?: string; + /** + * 【功能仅部分可用区开放,详询技术支持】磁盘是否加密。加密:true, 不加密: false加密必须传入对应的的KmsKeyId,默认值false + */ + Encrypted?: boolean; + /** + * 【功能仅部分可用区开放,详询技术支持】kms key id。选择加密盘时必填。 + */ + KmsKeyId?: string; + /** + * 云盘代金券id。不适用于系统盘/本地盘。请通过DescribeCoupon接口查询,或登录用户中心查看 + */ + CouponId?: string; + /** + * 磁盘id,只有云盘系统盘可以有此参数,且该系统盘id必须已经存在 + */ + Id?: string; + }[]; + /** + * 主机登陆模式。密码(默认选项): Password,密钥:KeyPair。 + */ + LoginMode: string; + /** + * UHost密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64UGFzc3dvcmQx。 + */ + Password?: string; + /** + * UHost实例名称。默认:UHost。请遵照[[api:uhost-api:specification|字段规范]]设定实例名称。 + */ + Name?: string; + /** + * 业务组。默认:Default(Default即为未分组)。请遵照[[api:uhost-api:specification|字段规范]]设定业务组。 + */ + Tag?: string; + /** + * 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\Preemptive计费为抢占式实例 \\ 默认为月付 + */ + ChargeType?: string; + /** + * 购买时长。默认:值 1。按小时购买(Dynamic/Postpay)时无需此参数。 月付时,此参数传0,代表购买至月末。 + */ + Quantity?: number; + /** + * 【建议后续不再使用】云主机机型(V1.0),在本字段和字段MachineType中,仅需要其中1个字段即可。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + UHostType?: string; + /** + * 虚拟CPU核数。可选参数:1-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。 + */ + CPU?: number; + /** + * 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192 + */ + Memory?: number; + /** + * GPU类型,枚举值["K80", "P40", "V100", "T4", "T4S","2080Ti","2080Ti-4C","1080Ti"],MachineType为G时必填 + */ + GpuType?: string; + /** + * GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + */ + GPU?: number; + /** + * + */ + VirtualGpu?: { + /** + * 虚拟 GPU 类型,枚举值["vGPU_T4","vGPU_P40","vGPU_V100"] + */ + GpuType?: string; + /** + * 虚拟 GPU 核数,默认 1。注:当前暂时只支持1颗。 + */ + GPU?: number; + }; + /** + * 网络增强特性。枚举值:Normal(默认),不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0(仅支持部分可用区,请参考控制台) + */ + NetCapability?: string; + /** + * 热升级特性。True为开启,False为未开启,默认False。 + */ + HotplugFeature?: boolean; + /** + * VPC ID。默认为当前地域的默认VPC。 + */ + VPCId?: string; + /** + * 子网 ID。默认为当前地域的默认子网。 + */ + SubnetId?: string; + /** + * 【数组】创建云主机时指定内网IP。若不传值,则随机分配当前子网下的IP。调用方式举例:PrivateIp.0=x.x.x.x。当前只支持一个内网IP。 + */ + PrivateIp?: string[]; + /** + * 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + */ + SecurityGroupId?: string; + /** + * 硬件隔离组id。可通过DescribeIsolationGroup获取。 + */ + IsolationGroup?: string; + /** + * 告警模板id,如果传了告警模板id,且告警模板id正确,则绑定告警模板。绑定告警模板失败只会在后台有日志,不会影响创建主机流程,也不会在前端报错。 + */ + AlarmTemplateId?: number; + /** + * 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + MachineType?: string; + /** + * 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto"。 + */ + MinimalCpuPlatform?: string; + /** + * 本次最大创建主机数量,取值范围是[1,100],默认值为1。 + */ + MaxCount?: number; + /** + * + */ + NetworkInterface?: { + /** + * + */ + EIP?: { + /** + * 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式必须指定0M带宽, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] + */ + Bandwidth?: number; + /** + * 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + */ + PayMode?: string; + /** + * 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + */ + ShareBandwidthId?: string; + /** + * + */ + GlobalSSH?: { + /** + * 填写支持SSH访问IP的地区名称,如“洛杉矶”,“新加坡”,“香港”,“东京”,“华盛顿”,“法兰克福”。Area和AreaCode两者必填其中之一。 + */ + Area?: string; + /** + * SSH端口,1-65535且不能使用80,443端口 + */ + Port?: number; + /** + * GlobalSSH的地区编码,格式为区域航空港国际通用代码。Area和AreaCode两者必填其中之一。 + */ + AreaCode?: string; + }; + /** + * 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + */ + OperatorName?: string; + /** + * 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + */ + CouponId?: string; + }; + /** + * + */ + IPv6?: { + /** + * 第N块网卡中IPv6对应的共享带宽id,默认不带外网 + */ + ShareBandwidthId?: string; + /** + * 第N个网卡对应的IPv6地址,默认不分配IPv6,“Auto”自动分配,不为空的其他字符串为实际要分配的IPv6地址 + */ + Address?: string; + }; + /** + * 申请并绑定一个教育网EIP。True为申请并绑定,False为不会申请绑定,默认False。当前只支持具有HPC特性的机型。 + */ + CreateCernetIp?: boolean; + }[]; + /** + * 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码 + */ + UserData?: string; + /** + * 数据盘是否需要自动分区挂载。当镜像支持“Cloud-init”Feature时可填写此字段。取值 >“On” 自动挂载(默认值)> “Off” 不自动挂载。 + */ + AutoDataDiskInit?: string; + /** + * + */ + Volumes?: { + /** + * 存储文件卷类型,当前仅支持[CLOUD_FSX]。 + */ + Type?: string; + /** + * 存储文件卷,当前只用于数据卷,且限于 Windows,默认为 fase。 + */ + IsBoot?: string; + /** + * 存储文件卷大小,单位GB,必须是10GB的整数倍,至少 100GB。 + */ + Size?: number; + /** + * 已有存储文件卷ID,设置了,对应的 Size 可以为 0 GB。 + */ + VolumeId?: string; + /** + * 存储文件卷代金券id。不适用于系统盘/本地盘。请通过DescribeCoupon接口查询,或登录用户中心查看 + */ + CouponId?: string; + }[]; + /** + * KeypairId 密钥对ID,LoginMode为KeyPair时此项必须 + */ + KeyPairId?: string; + /** + * 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 + */ + CouponId?: string; +} + +/** + * CreateUHostInstance - 创建UHost实例。 + */ +export interface CreateUHostInstanceResponse { + /** + * UHost实例Id集合 + */ + UHostIds?: string[]; + /** + * 【批量创建不会返回】IP信息 + */ + IPs?: string[]; +} + +/** + * CreateUHostKeyPair - 创建主机密钥对信息 + */ +export interface CreateUHostKeyPairRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 密钥对名称。 由字母,数字,符号组成,长度为1-63位。 + */ + KeyPairName: string; +} + +/** + * CreateUHostKeyPair - 创建主机密钥对信息 + */ +export interface CreateUHostKeyPairResponse { + /** + * 密钥信息 + */ + KeyPair: { + /** + * 项目ID。 + */ + ProjectId?: string; + /** + * 密钥对ID。 + */ + KeyPairId?: string; + /** + * 密钥对名称。 长度为1~63个英文或中文字符。 + */ + KeyPairName?: string; + /** + * 密钥对指纹。md5(ProjectId|KeyPairId|PublicKey) + */ + KeyPairFingerPrint?: string; + /** + * 密钥对的私钥内容。只有创建接口才会返回。 + */ + PrivateKeyBody?: string; + /** + * 密钥对的创建时间,格式为Unix Timestamp。 + */ + CreateTime?: number; + }; +} + +/** + * DeleteIsolationGroup - 删除硬件隔离组。 + */ +export interface DeleteIsolationGroupRequest { + /** + * 硬件隔离组id + */ + GroupId: string; +} + +/** + * DeleteIsolationGroup - 删除硬件隔离组。 + */ +export interface DeleteIsolationGroupResponse { + /** + * 硬件隔离组id + */ + GroupId: string; +} + +/** + * DeleteUHostKeyPairs - 删除一对或者多对密钥对。 + */ +export interface DeleteUHostKeyPairsRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 密钥对ID,最多支持 100 对。 + */ + KeyPairIds: string[]; +} + +/** + * DeleteUHostKeyPairs - 删除一对或者多对密钥对。 + */ +export interface DeleteUHostKeyPairsResponse {} + +/** + * DescribeImage - 获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。 + */ +export interface DescribeImageRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 镜像类型。标准镜像:Base,镜像市场:Business, 自定义镜像:Custom,默认返回所有类型 + */ + ImageType?: string; + /** + * 操作系统类型:Linux, Windows 默认返回所有类型 + */ + OsType?: string; + /** + * 镜像Id + */ + ImageId?: string; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; + /** + * 返回数据长度,默认为20 + */ + Limit?: number; + /** + * 是否返回价格:1返回,0不返回;默认不返回 + */ + PriceSet?: number; +} + +/** + * DescribeImage - 获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。 + */ +export interface DescribeImageResponse { + /** + * 满足条件的镜像总数 + */ + TotalCount?: number; + /** + * 镜像列表详见 UHostImageSet + */ + ImageSet?: { + /** + * 可用区,参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 镜像ID + */ + ImageId?: string; + /** + * 镜像名称 + */ + ImageName?: string; + /** + * 操作系统类型:Linux,Windows + */ + OsType?: string; + /** + * 操作系统名称 + */ + OsName?: string; + /** + * 镜像类型 标准镜像:Base, 行业镜像:Business,自定义镜像:Custom + */ + ImageType?: string; + /** + * 特殊状态标识, 目前包含NetEnhnced(网络增强1.0), NetEnhanced_Ultra](网络增强2.0), HotPlug(热升级), CloudInit, IPv6 + */ + Features?: string[]; + /** + * 行业镜像类型(仅行业镜像将返回这个值) + */ + FuncType?: string; + /** + * 集成软件名称(仅行业镜像将返回这个值) + */ + IntegratedSoftware?: string; + /** + * 供应商(仅行业镜像将返回这个值) + */ + Vendor?: string; + /** + * 介绍链接(仅行业镜像将返回这个值) + */ + Links?: string; + /** + * 镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable + */ + State?: string; + /** + * 镜像描述 + */ + ImageDescription?: string; + /** + * 创建时间,格式为Unix时间戳 + */ + CreateTime?: number; + /** + * 镜像大小 + */ + ImageSize?: number; + /** + * 默认值为空'''。当CentOS 7.3/7.4/7.5等镜像会标记为“Broadwell” + */ + MinimalCPU?: string; + }[]; +} + +/** + * DescribeIsolationGroup - 查询硬件隔离组列表。 + */ +export interface DescribeIsolationGroupRequest { + /** + * 待查的硬件隔离组id + */ + GroupId?: string; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; + /** + * 返回数据长度,默认为20,最大100 + */ + Limit?: number; +} + +/** + * DescribeIsolationGroup - 查询硬件隔离组列表。 + */ +export interface DescribeIsolationGroupResponse { + /** + * 硬件隔离组集合。参见数据结构IsolationGroup。 + */ + IsolationGroupSet?: { + /** + * 硬件隔离组名称 + */ + GroupName?: string; + /** + * 硬件隔离组id + */ + GroupId?: string; + /** + * 每个可用区中的机器数量。参见数据结构SpreadInfo。 + */ + SpreadInfoSet?: { + /** + * 可用区信息 + */ + Zone?: string; + /** + * 当前地域所有可用区中硬件隔离组中云主机的数量,不超过7。 + */ + UHostCount?: number; + }[]; + /** + * 备注 + */ + Remark?: string; + }[]; + /** + * 硬件隔离组总数 + */ + TotalCount?: number; +} + +/** + * DescribeUHostInstance - 获取主机或主机列表信息,并可根据数据中心,主机ID等参数进行过滤。 + */ +export interface DescribeUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 【数组】UHost主机的资源ID,例如UHostIds.0代表希望获取信息 的主机1,UHostIds.1代表主机2。 如果不传入,则返回当前Region 所有符合条件的UHost实例。 + */ + UHostIds?: string[]; + /** + * 要查询的业务组名称 + */ + Tag?: string; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; + /** + * 返回数据长度,默认为20,最大100 + */ + Limit?: number; + /** + * 硬件隔离组id。通过硬件隔离组筛选主机。 + */ + IsolationGroup?: string; + /** + * vpc id。通过VPC筛选主机。北京一地域无效。 + */ + VPCId?: string; + /** + * 子网id。通过子网筛选主机。北京一地域无效。 + */ + SubnetId?: string; + /** + * 要挂载的云盘id,过滤返回能被UDiskId挂载的云主机。目前主要针对rssd云盘使用 + */ + UDiskIdForAttachment?: string; +} + +/** + * DescribeUHostInstance - 获取主机或主机列表信息,并可根据数据中心,主机ID等参数进行过滤。 + */ +export interface DescribeUHostInstanceResponse { + /** + * UHostInstance总数 + */ + TotalCount: number; + /** + * 云主机实例列表,每项参数可见下面 UHostInstanceSet + */ + UHostSet: { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * true:有ipv6特性;false,没有ipv6特性 + */ + IPv6Feature?: boolean; + /** + * UHost实例ID + */ + UHostId?: string; + /** + * 【建议不再使用】云主机机型(旧)。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + UHostType?: string; + /** + * 云主机机型(新)。参考[[api:uhost-api:uhost_type#主机概念20版本|云主机机型说明]]。 + */ + MachineType?: string; + /** + * 云主机CPU平台。参考[[api:uhost-api:uhost_type#主机概念20版本|云主机机型说明]]。 + */ + CpuPlatform?: string; + /** + * 【建议不再使用】主机磁盘类型。 枚举值为:\\ > LocalDisk,本地磁盘; \\ > UDisk 云盘。\\只要有一块磁盘为本地盘,即返回LocalDisk。 + */ + StorageType?: string; + /** + * 【建议不再使用】主机的系统盘ID。 + */ + ImageId?: string; + /** + * 基础镜像ID(指当前自定义镜像的来源镜像) + */ + BasicImageId?: string; + /** + * 基础镜像名称(指当前自定义镜像的来源镜像) + */ + BasicImageName?: string; + /** + * 业务组名称 + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; + /** + * UHost实例名称 + */ + Name?: string; + /** + * 实例状态,枚举值:\\ >初始化: Initializing; \\ >启动中: Starting; \\> 运行中: Running; \\> 关机中: Stopping; \\ >关机: Stopped \\ >安装失败: Install Fail; \\ >重启中: Rebooting; \\ > 未知(空字符串,获取状态超时或出错):"" + */ + State?: string; + /** + * 创建时间,格式为Unix时间戳 + */ + CreateTime?: number; + /** + * 计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限);Preemptive 为抢占式实例; + */ + ChargeType?: string; + /** + * 到期时间,格式为Unix时间戳 + */ + ExpireTime?: number; + /** + * 虚拟CPU核数,单位: 个 + */ + CPU?: number; + /** + * 内存大小,单位: MB + */ + Memory?: number; + /** + * 是否自动续费,自动续费:“Yes”,不自动续费:“No” + */ + AutoRenew?: string; + /** + * 磁盘信息见 UHostDiskSet + */ + DiskSet?: { + /** + * 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + */ + DiskType: string; + /** + * 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + */ + IsBoot: string; + /** + * "true": 加密盘 "false":非加密盘 + */ + Encrypted?: string; + /** + * 【建议不再使用】磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk + */ + Type?: string; + /** + * 磁盘ID + */ + DiskId?: string; + /** + * UDisk名字(仅当磁盘是UDisk时返回) + */ + Name?: string; + /** + * 磁盘盘符 + */ + Drive?: string; + /** + * 磁盘大小,单位: GB + */ + Size?: number; + /** + * 备份方案。若开通了数据方舟,则为DATAARK + */ + BackupType?: string; + }[]; + /** + * 详细信息见 UHostIPSet + */ + IPSet?: { + /** + * IPv4/IPv6; + */ + IPMode: string; + /** + * 内网 Private 类型下,表示是否为默认网卡。true: 是默认网卡;其他值:不是。 + */ + Default?: string; + /** + * 内网 Private 类型下,当前网卡的Mac。 + */ + Mac?: string; + /** + * 当前EIP的权重。权重最大的为当前的出口IP。 + */ + Weight?: number; + /** + * 国际: Internation,BGP: Bgp,内网: Private + */ + Type?: string; + /** + * 外网IP资源ID 。(内网IP无对应的资源ID) + */ + IPId?: string; + /** + * IP地址 + */ + IP?: string; + /** + * IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) + */ + Bandwidth?: number; + /** + * IP地址对应的VPC ID。(北京一不支持,字段返回为空) + */ + VPCId?: string; + /** + * IP地址对应的子网 ID。(北京一不支持,字段返回为空) + */ + SubnetId?: string; + /** + * 弹性网卡为默认网卡时,返回对应的 ID 值 + */ + NetworkInterfaceId?: string; + }[]; + /** + * 网络增强。Normal: 无;Super: 网络增强1.0; Ultra: 网络增强2.0 + */ + NetCapability?: string; + /** + * 【建议不再使用】网络状态。 连接:Connected, 断开:NotConnected + */ + NetworkState?: string; + /** + * 【建议不再使用】数据方舟模式。枚举值:\\ > Yes: 开启方舟; \\ > no,未开启方舟 + */ + TimemachineFeature?: string; + /** + * true: 开启热升级; false,未开启热升级 + */ + HotplugFeature?: boolean; + /** + * 【建议不再使用】仅北京A的云主机会返回此字段。基础网络模式:Default;子网模式:Private + */ + SubnetType?: string; + /** + * 创建主机的最初来源镜像的操作系统名称(若直接通过基础镜像创建,此处返回和BasicImageName一致) + */ + OsName?: string; + /** + * 操作系统类别。返回"Linux"或者"Windows" + */ + OsType?: string; + /** + * 【建议不再使用】主机系列:N2,表示系列2;N1,表示系列1 + */ + HostType?: string; + /** + * 主机的生命周期类型。目前仅支持Normal:普通; + */ + LifeCycle?: string; + /** + * GPU个数 + */ + GPU?: number; + /** + * 系统盘状态 Normal表示初始化完成;Initializing表示在初始化。仍在初始化的系统盘无法制作镜像。 + */ + BootDiskState?: string; + /** + * 总的数据盘存储空间。 + */ + TotalDiskSpace?: number; + /** + * 隔离组id,不在隔离组则返回"" + */ + IsolationGroup?: string; + /** + * true,支持cloutinit方式初始化;false,不支持 + */ + CloudInitFeature?: boolean; + /** + * RDMA集群id,仅快杰云主机返回该值;其他类型云主机返回""。当云主机的此值与RSSD云盘的RdmaClusterId相同时,RSSD可以挂载到这台云主机。 + */ + RdmaClusterId?: string; + /** + * 仅抢占式实例返回,LowSpeed为低速模式,PowerOff为关机模式 + */ + RestrictMode?: string; + /** + * true: 开启 hpc 系列功能;false: 未开启 + */ + HpcFeature?: boolean; + /** + * 密钥信息见 UHostKeyPair + */ + KeyPair?: { + /** + * 密钥对ID + */ + KeyPairId?: string; + /** + * 主机密钥对状态,Normal 正常,Deleted 删除 + */ + KeyPairState?: string; + }; + }[]; +} + +/** + * DescribeUHostKeyPairs - 查询一个或多个密钥对。 + */ +export interface DescribeUHostKeyPairsRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 密钥对名称。 + */ + KeyPairName?: string; + /** + * 密钥对的指纹。 + */ + KeyPairFingerPrint?: string; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; + /** + * 返回数据长度,默认为20,最大100 + */ + Limit?: number; +} + +/** + * DescribeUHostKeyPairs - 查询一个或多个密钥对。 + */ +export interface DescribeUHostKeyPairsResponse { + /** + * 密钥对信息集合 + */ + KeyPairs: { + /** + * 项目ID。 + */ + ProjectId?: string; + /** + * 密钥对ID。 + */ + KeyPairId?: string; + /** + * 密钥对名称。 长度为1~63个英文或中文字符。 + */ + KeyPairName?: string; + /** + * 密钥对指纹。md5(ProjectId|KeyPairId|PublicKey) + */ + KeyPairFingerPrint?: string; + /** + * 密钥对的私钥内容。只有创建接口才会返回。 + */ + PrivateKeyBody?: string; + /** + * 密钥对的创建时间,格式为Unix Timestamp。 + */ + CreateTime?: number; + }[]; + /** + * 密钥对总数 + */ + TotalCount: number; +} + +/** + * DescribeUHostTags - 获取指定数据中心的业务组列表。 + */ +export interface DescribeUHostTagsRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; +} + +/** + * DescribeUHostTags - 获取指定数据中心的业务组列表。 + */ +export interface DescribeUHostTagsResponse { + /** + * 已有主机的业务组总数 + */ + TotalCount?: number; + /** + * 业务组集合见 UHostTagSet + */ + TagSet?: { + /** + * 业务组名称 + */ + Tag?: string; + /** + * 该业务组中包含的主机个数 + */ + TotalCount?: number; + /** + * 可用区 + */ + Zone?: string; + }[]; +} + +/** + * GetAttachedDiskUpgradePrice - 获取挂载磁盘的升级价格 + */ +export interface GetAttachedDiskUpgradePriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 磁盘大小,单位GB,步长为10。取值范围需大于当前磁盘大小,最大值请参考[[api:uhost-api:disk_type|磁盘类型]]。 + */ + DiskSpace: number; + /** + * 磁盘ID。参见 [DescribeUHostInstance](describe_uhost_instance.html)返回值中的DiskSet。 + */ + DiskId: string; + /** + * UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。 + */ + UHostId: string; + /** + * 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\> SNAPSHOT(SNAPSHOT模式目前仅在上海C支持),快照 \\ 当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]]。默认值为当前的备份模式。 + */ + BackupMode?: string; +} + +/** + * GetAttachedDiskUpgradePrice - 获取挂载磁盘的升级价格 + */ +export interface GetAttachedDiskUpgradePriceResponse { + /** + * 升级差价。精度为小数点后2位。 + */ + Price?: number; +} + +/** + * GetUHostInstancePrice - 根据UHost实例配置,获取UHost实例的价格。 + */ +export interface GetUHostInstancePriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * CPU核数。可选参数:1-64。可选范围参照控制台。默认值: 4 + */ + CPU: number; + /** + * 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参照好控制台)。默认值:8192 + */ + Memory: number; + /** + * 购买台数,范围[1,5] + */ + Count: number; + /** + * + */ + Disks?: { + /** + * 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + */ + IsBoot: string; + /** + * 磁盘大小,单位GB。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + */ + Size: number; + /** + * 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + */ + Type: string; + /** + * 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT,快照\\ 当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]] + */ + BackupType?: string; + }[]; + /** + * 镜像Id,可通过 [DescribeImage](describe_image.html) 获取镜像ID, 如果镜像ID不传,系统盘大小必传 + */ + ImageId?: string; + /** + * GPU卡核心数。仅GPU机型支持此字段。 + */ + GPU?: number; + /** + * 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时付费 // >Preemptive 抢占式实例 \\ 如果不传某个枚举值,默认返回年付、月付、时付的价格组合集。 + */ + ChargeType?: string; + /** + * 网络增强。枚举值:Normal,不开启; Super,开启网络增强1.0。 默认值为Normal。 + */ + NetCapability?: string; + /** + * 【待废弃】云主机机型(V1版本概念)。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + UHostType?: string; + /** + * 云主机机型(V2版本概念)。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + MachineType?: string; + /** + * GPU类型,枚举值["K80", "P40", "V100", "T4","T4S","2080Ti","2080Ti-4C","1080Ti"] + */ + GpuType?: string; + /** + * 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + */ + Quantity?: number; + /** + * 取值"Intel" "Amd",默认值“Intel” + */ + CpuPlatform?: string; + /** + * + */ + Volumes?: { + /** + * 存储文件卷类型,当前仅支持[CLOUD_FSX]。请参考[[api:uhost-api:volume_type|卷类型]]。 + */ + Type?: string; + /** + * 存储文件卷大小,单位GB,必须是10GB的整数倍,至少 100GB。 + */ + Size?: number; + /** + * 存储文件卷,当前只用于数据卷,且限于 Windows,默认为 fase。 + */ + IsBoot?: string; + }[]; + /** + * + */ + VirtualGpu?: { + /** + * 虚拟 GPU 类型,枚举值["vGPU_T4","vGPU_P40","vGPU_V100"] + */ + GpuType?: string; + /** + * 虚拟 GPU 核数,默认 1。注:当前暂时只支持1颗。 + */ + GPU?: number; + }; +} + +/** + * GetUHostInstancePrice - 根据UHost实例配置,获取UHost实例的价格。 + */ +export interface GetUHostInstancePriceResponse { + /** + * 价格列表 UHostPriceSet + */ + PriceSet?: { + /** + * 计费类型。Year,Month,Dynamic + */ + ChargeType: string; + /** + * 价格,单位: 元,保留小数点后两位有效数字 + */ + Price: number; + /** + * 限时优惠的折前原价(即列表价乘以商务折扣后的单价)。 + */ + OriginalPrice: number; + /** + * 产品列表价。 + */ + ListPrice?: number; + }[]; +} + +/** + * GetUHostInstanceVncInfo - 获取指定UHost实例的管理VNC配置详细信息。 + */ +export interface GetUHostInstanceVncInfoRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](./describe_uhost_instance.html) + */ + UHostId: string; +} + +/** + * GetUHostInstanceVncInfo - 获取指定UHost实例的管理VNC配置详细信息。 + */ +export interface GetUHostInstanceVncInfoResponse { + /** + * UHost实例ID + */ + UHostId?: string; + /** + * Vnc登录IP + */ + VncIP?: string; + /** + * Vnc登录端口 + */ + VncPort?: number; + /** + * Vnc 登录密码 + */ + VncPassword?: string; +} + +/** + * GetUHostUpgradePrice - 获取UHost实例升级配置的价格。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ +export interface GetUHostUpgradePriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。 + */ + UHostId: string; + /** + * 虚拟CPU核数。可选参数:1-64(可选范围参考控制台)。默认值为当前实例的CPU核数。 + */ + CPU?: number; + /** + * 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值为当前实例的内存大小。 + */ + Memory?: number; + /** + * 网卡升降级(1,表示升级,2表示降级,0表示不变) + */ + NetCapValue?: number; +} + +/** + * GetUHostUpgradePrice - 获取UHost实例升级配置的价格。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ +export interface GetUHostUpgradePriceResponse { + /** + * 规格调整差价。精确到小数点后2位。 + */ + Price?: number; + /** + * 限时优惠的折前原价 + */ + OriginalPrice?: number; +} + +/** + * ImportCustomImage - 把UFile的镜像文件导入到UHost,生成自定义镜像 + */ +export interface ImportCustomImageRequest { + /** + * 镜像名称 + */ + ImageName: string; + /** + * UFile私有空间地址 + */ + UFileUrl: string; + /** + * 操作系统平台,比如CentOS、Ubuntu、Windows、RedHat等,请参考控制台的镜像版本;若导入控制台上没有的操作系统,参数为Other + */ + OsType: string; + /** + * 操作系统详细版本,请参考控制台的镜像版本;OsType为Other时,输入参数为Other + */ + OsName: string; + /** + * 镜像格式,可选RAW、VHD、VMDK、qcow2 + */ + Format: string; + /** + * 是否授权。必须填true + */ + Auth: boolean; + /** + * 镜像描述 + */ + ImageDescription?: string; +} + +/** + * ImportCustomImage - 把UFile的镜像文件导入到UHost,生成自定义镜像 + */ +export interface ImportCustomImageResponse { + /** + * 镜像Id + */ + ImageId?: string; +} + +/** + * ImportUHostKeyPairs - 导入密钥对后,仅保管公钥部分,需自行妥善保存密钥对的私钥部分。 + */ +export interface ImportUHostKeyPairsRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 密钥对名称。由字母,数字,符号组成,长度为1-63位。 + */ + KeyPairName: string; + /** + * 密钥对的公钥内容。 + */ + PublicKeyBody: string; +} + +/** + * ImportUHostKeyPairs - 导入密钥对后,仅保管公钥部分,需自行妥善保存密钥对的私钥部分。 + */ +export interface ImportUHostKeyPairsResponse { + /** + * 密钥对名称 + */ + KeyPairName: string; + /** + * 密钥对标识 + */ + KeyPairId?: string; + /** + * 密钥对指纹。根据RFC4716定义的公钥指纹格式,采用MD5信息摘要算法。算法处理的具体信息格式:`ProjectIdKeyPairId|PublicKeyBody`。 + */ + KeyPairFingerPrint?: string; +} + +/** + * LeaveIsolationGroup - 移除硬件隔离组中的主机 + */ +export interface LeaveIsolationGroupRequest { + /** + * 可用区信息 + */ + Zone?: string; + /** + * 硬件隔离组id + */ + GroupId: string; + /** + * 主机id + */ + UHostId: string; +} + +/** + * LeaveIsolationGroup - 移除硬件隔离组中的主机 + */ +export interface LeaveIsolationGroupResponse { + /** + * 主机id + */ + UHostId: string; +} + +/** + * ModifyUHostIP - 修改云主机内网 IP 地址 + */ +export interface ModifyUHostIPRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 需要修改为的 IP 地址。新的IP地址和旧IP地址必须属于统一子网,且和主机内部的配置文件一致。 + */ + PresentIpAddress: string; + /** + * 指定云主机 ID。 + */ + UHostId: string; + /** + * 所需修改的原 IP 地址 ,当云主机只有一个IP地址时,此参数不必填写。 + */ + PreviousIpAddress?: string; +} + +/** + * ModifyUHostIP - 修改云主机内网 IP 地址 + */ +export interface ModifyUHostIPResponse { + /** + * 目标云主机 ID + */ + UHostId?: string; +} + +/** + * ModifyUHostInstanceName - 修改指定UHost实例名称,需要给出数据中心,UHostId,及新的实例名称。 + */ +export interface ModifyUHostInstanceNameRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * UHost实例名称 + */ + Name?: string; +} + +/** + * ModifyUHostInstanceName - 修改指定UHost实例名称,需要给出数据中心,UHostId,及新的实例名称。 + */ +export interface ModifyUHostInstanceNameResponse { + /** + * UHost实例ID + */ + UHostId?: string; +} + +/** + * ModifyUHostInstanceRemark - 修改指定UHost实例备注信息。 + */ +export interface ModifyUHostInstanceRemarkRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * 备注 + */ + Remark?: string; +} + +/** + * ModifyUHostInstanceRemark - 修改指定UHost实例备注信息。 + */ +export interface ModifyUHostInstanceRemarkResponse { + /** + * UHost实例ID + */ + UHostId?: string; +} + +/** + * ModifyUHostInstanceTag - 修改指定UHost实例业务组标识。 + */ +export interface ModifyUHostInstanceTagRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * 业务组名称 + */ + Tag?: string; +} + +/** + * ModifyUHostInstanceTag - 修改指定UHost实例业务组标识。 + */ +export interface ModifyUHostInstanceTagResponse { + /** + * UHost实例ID + */ + UHostId?: string; +} + +/** + * PoweroffUHostInstance - 直接关闭UHost实例电源,无需等待实例正常关闭。 + */ +export interface PoweroffUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](./describe_uhost_instance.html) + */ + UHostId: string; +} + +/** + * PoweroffUHostInstance - 直接关闭UHost实例电源,无需等待实例正常关闭。 + */ +export interface PoweroffUHostInstanceResponse { + /** + * UHost的实例ID + */ + UHostId?: string; +} + +/** + * RebootUHostInstance - 重新启动UHost实例,需要指定数据中心及UHostID两个参数的值。 + */ +export interface RebootUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * 加密盘密码 + */ + DiskPassword?: string; +} + +/** + * RebootUHostInstance - 重新启动UHost实例,需要指定数据中心及UHostID两个参数的值。 + */ +export interface RebootUHostInstanceResponse { + /** + * UHost实例ID + */ + UHostId?: string; +} + +/** + * ReinstallUHostInstance - 重新安装指定UHost实例的操作系统 + */ +export interface ReinstallUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例资源ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * 如果重装UHost实例时LoginMode为Password,则必须填写,如果LoginMode为KeyPair,不需要填写 (密码格式使用BASE64编码;举例如下:# echo -n Password1 | base64UGFzc3dvcmQx。) + */ + Password?: string; + /** + * 镜像Id,默认使用原镜像 参见 [DescribeImage](describe_image.html) + */ + ImageId?: string; + /** + * 是否保留数据盘,保留:Yes,不报留:No, 默认:Yes;如果是从Windows重装为Linux或反之,则无法保留数据盘(该参数目前仅对本地数据盘起作用) + */ + ReserveDisk?: string; + /** + * 系统盘大小。 单位:GB, 范围[20,100], 步长:10 + */ + BootDiskSpace?: number; + /** + * cloudinit初始化使用。注意:1、总数据量大小不超多16K 2、使用base64编码 + */ + UserData?: string; + /** + * 数据盘是否需要自动分区挂载。当镜像支持Cloud-init Feature时可填写此字段。取值“On”(默认值), “Off” + */ + AutoDataDiskInit?: string; + /** + * 主机登陆模式。密码(默认选项): Password,密钥 KeyPair。 + */ + LoginMode?: string; + /** + * KeypairId 密钥对ID,LoginMode为KeyPair时此项必须。 + */ + KeyPairId?: string; +} + +/** + * ReinstallUHostInstance - 重新安装指定UHost实例的操作系统 + */ +export interface ReinstallUHostInstanceResponse { + /** + * UHost实例资源ID + */ + UHostId?: string; +} + +/** + * ResetUHostInstancePassword - 重置UHost实例的管理员密码。 + */ +export interface ResetUHostInstancePasswordRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID + */ + UHostId: string; + /** + * UHost新密码(密码格式使用BASE64编码) + */ + Password: string; +} + +/** + * ResetUHostInstancePassword - 重置UHost实例的管理员密码。 + */ +export interface ResetUHostInstancePasswordResponse { + /** + * UHost实例ID + */ + UHostId?: string; +} + +/** + * ResizeAttachedDisk - 修改挂载的磁盘大小,包含系统盘和数据盘 + */ +export interface ResizeAttachedDiskRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。 + */ + UHostId: string; + /** + * 磁盘大小,单位GB,步长为10。取值范围需大于当前磁盘大小,最大值请参考[[api:uhost-api:disk_type|磁盘类型]]。 + */ + DiskSpace: number; + /** + * 磁盘ID。参见 [DescribeUHostInstance](describe_uhost_instance.html)返回值中的DiskSet。 + */ + DiskId: string; + /** + * 用于测试磁盘是否支持在线扩容。DryRun=true,不会执行实际操作,只会返回操作的预期结果。DryRun = false ,正常执行扩容操作。 + */ + DryRun?: boolean; +} + +/** + * ResizeAttachedDisk - 修改挂载的磁盘大小,包含系统盘和数据盘 + */ +export interface ResizeAttachedDiskResponse { + /** + * 改配成功的磁盘id + */ + DiskId?: string; + /** + * 扩容后的状态。NeedRestart = true,必须关闭后启动实例才能使用扩容的磁盘空间。NeedRestart = false,磁盘扩容后无需重启操作。 + */ + NeedRestart?: boolean; +} + +/** + * ResizeUHostInstance - 修改指定UHost实例的资源配置,如CPU核心数,内存容量大小,网络增强等。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ +export interface ResizeUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * 虚拟CPU核数。可选参数:1-240(可选范围与UHostType相关)。默认值为当前实例的CPU核数 + */ + CPU?: number; + /** + * 内存大小。单位:MB。范围 :[1024, 1966080],取值为1024的倍数(可选范围与UHostType相关)。默认值为当前实例的内存大小。 + */ + Memory?: number; + /** + * 网卡升降级(1,表示升级,2表示降级,0表示不变) + */ + NetCapValue?: number; +} + +/** + * ResizeUHostInstance - 修改指定UHost实例的资源配置,如CPU核心数,内存容量大小,网络增强等。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ +export interface ResizeUHostInstanceResponse { + /** + * UHost实例ID + */ + UHostId?: string; +} + +/** + * StartUHostInstance - 启动处于关闭状态的UHost实例,需要指定数据中心及UHostID两个参数的值。 + */ +export interface StartUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * 加密盘密码 + */ + DiskPassword?: string; +} + +/** + * StartUHostInstance - 启动处于关闭状态的UHost实例,需要指定数据中心及UHostID两个参数的值。 + */ +export interface StartUHostInstanceResponse { + /** + * UHost实例ID + */ + UHostId?: string; +} + +/** + * StopUHostInstance - 指停止处于运行状态的UHost实例,需指定数据中心及UhostID。 + */ +export interface StopUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; +} + +/** + * StopUHostInstance - 指停止处于运行状态的UHost实例,需指定数据中心及UhostID。 + */ +export interface StopUHostInstanceResponse { + /** + * UHost实例ID + */ + UHostId?: string; +} + +/** + * TerminateCustomImage - 删除用户自定义镜像 + */ +export interface TerminateCustomImageRequest { + /** + * 自制镜像ID 参见 [DescribeImage](describe_image.html) + */ + ImageId: string; +} + +/** + * TerminateCustomImage - 删除用户自定义镜像 + */ +export interface TerminateCustomImageResponse { + /** + * 自制镜像Id + */ + ImageId?: string; +} + +/** + * TerminateUHostInstance - 删除指定数据中心的UHost实例。 + */ +export interface TerminateUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * UHost资源Id 参见 [DescribeUHostInstance](describe_uhost_instance.html) + */ + UHostId: string; + /** + * 删除主机时是否释放绑定的EIP。默认为false。 + */ + ReleaseEIP?: boolean; + /** + * 删除主机时是否同时删除挂载的数据盘。默认为false。 + */ + ReleaseUDisk?: boolean; +} + +/** + * TerminateUHostInstance - 删除指定数据中心的UHost实例。 + */ +export interface TerminateUHostInstanceResponse { + /** + * 用于判断主机删除时是否进入回收站。放入回收站:"Yes", 彻底删除:“No”。 + */ + InRecycle: string; + /** + * UHost 实例 Id + */ + UHostId?: string; +} + +/** + * UpgradeToArkUHostInstance - 普通升级为方舟机型 + */ +export interface UpgradeToArkUHostInstanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * UHost主机的资源ID,例如UHostIds.0代表希望升级的主机1,UHostIds.1代表主机2。 + */ + UHostIds: string[]; + /** + * 代金券ID 请参考DescribeCoupon接口 + */ + CouponId?: string; +} + +/** + * UpgradeToArkUHostInstance - 普通升级为方舟机型 + */ +export interface UpgradeToArkUHostInstanceResponse { + /** + * UHost主机的资源ID数组 + */ + UHostSet?: string[]; +} diff --git a/src/services/uk8s/index.ts b/src/services/uk8s/index.ts new file mode 100644 index 0000000..64685df --- /dev/null +++ b/src/services/uk8s/index.ts @@ -0,0 +1,882 @@ +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 **uk8s** service + */ +export default class UK8SClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * AddUK8SExistingUHost - 将预先创建好的云主机加入到UK8S集群,需要注意的是,该云主机依然会执行重装系统的操作。 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/add_uk8s_existing_uhost + */ + addUK8SExistingUHost( + request?: AddUK8SExistingUHostRequest + ): Promise { + const args = { Action: 'AddUK8SExistingUHost', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AddUK8SExistingUHostResponse + ); + } + + /** + * AddUK8SPHostNode - 为UK8S集群添加一台或多台物理云主机类型的节点。 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/add_uk8s_phost_node + */ + addUK8SPHostNode( + request?: AddUK8SPHostNodeRequest + ): Promise { + const args = { Action: 'AddUK8SPHostNode', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AddUK8SPHostNodeResponse + ); + } + + /** + * AddUK8SUHostNode - 为UK8S集群添加一台Node节点,机型类型为云主机 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/add_uk8s_uhost_node + */ + addUK8SUHostNode( + request?: AddUK8SUHostNodeRequest + ): Promise { + const args = { Action: 'AddUK8SUHostNode', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AddUK8SUHostNodeResponse + ); + } + + /** + * CreateUK8SClusterV2 - 创建UK8S集群 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/create_uk8s_cluster_v2 + */ + createUK8SClusterV2( + request?: CreateUK8SClusterV2Request + ): Promise { + const args = { Action: 'CreateUK8SClusterV2', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUK8SClusterV2Response + ); + } + + /** + * DelUK8SCluster - 删除UK8S集群 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/del_uk8s_cluster + */ + delUK8SCluster( + request?: DelUK8SClusterRequest + ): Promise { + const args = { Action: 'DelUK8SCluster', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DelUK8SClusterResponse + ); + } + + /** + * DelUK8SClusterNodeV2 - 删除集群中的Node节点,删除前务必先将其中的Pod驱逐。 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/del_uk8s_cluster_node_v2 + */ + delUK8SClusterNodeV2( + request?: DelUK8SClusterNodeV2Request + ): Promise { + const args = { Action: 'DelUK8SClusterNodeV2', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DelUK8SClusterNodeV2Response + ); + } + + /** + * DescribeUK8SImage - 获取UK8S支持的Node节点操作系统,可基于该操作系统制定自定义镜像 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/describe_uk8s_image + */ + describeUK8SImage( + request?: DescribeUK8SImageRequest + ): Promise { + const args = { Action: 'DescribeUK8SImage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUK8SImageResponse + ); + } + + /** + * ListUK8SClusterNodeV2 - 获取UK8S集群节点信息 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/list_uk8s_cluster_node_v2 + */ + listUK8SClusterNodeV2( + request?: ListUK8SClusterNodeV2Request + ): Promise { + const args = { Action: 'ListUK8SClusterNodeV2', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ListUK8SClusterNodeV2Response + ); + } + + /** + * ListUK8SClusterV2 - 获取UK8S集群列表信息 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/list_uk8s_cluster_v2 + */ + listUK8SClusterV2( + request?: ListUK8SClusterV2Request + ): Promise { + const args = { Action: 'ListUK8SClusterV2', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ListUK8SClusterV2Response + ); + } +} + +/** + * AddUK8SExistingUHost - 将预先创建好的云主机加入到UK8S集群,需要注意的是,该云主机依然会执行重装系统的操作。 + */ +export interface AddUK8SExistingUHostRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 + */ + Password: string; + /** + * UK8S集群ID。 可从UK8S控制台获取。 + */ + ClusterId: string; + /** + * 云主机Id,为了保证节点正常运行,该主机配置不得低于2C4G。 + */ + UHostId: string; + /** + * 默认110,生产环境建议小于等于110。 + */ + MaxPods?: number; + /** + * Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + */ + Labels?: string; + /** + * 该云主机所属子网Id。 + */ + SubnetId?: string; + /** + * 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。 + */ + ImageId?: string; + /** + * 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用 + */ + DisableSchedule?: boolean; + /** + * 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + */ + UserData?: string; + /** + * 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + */ + InitScript?: string; +} + +/** + * AddUK8SExistingUHost - 将预先创建好的云主机加入到UK8S集群,需要注意的是,该云主机依然会执行重装系统的操作。 + */ +export interface AddUK8SExistingUHostResponse {} + +/** + * AddUK8SPHostNode - 为UK8S集群添加一台或多台物理云主机类型的节点。 + */ +export interface AddUK8SPHostNodeRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UK8S集群ID。 可从UK8S控制台获取。 + */ + ClusterId: string; + /** + * 最大创建Node节点数量,取值范围是[1,10]。 + */ + Count: number; + /** + * Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 + */ + Password: string; + /** + * 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ 默认为月付 + */ + ChargeType: string; + /** + * 购买时长。默认: 1。月付时,此参数传0,代表了购买至月末。 + */ + Quantity?: number; + /** + * Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + */ + Labels?: string; + /** + * 默认110,生产环境建议小于等于110。 + */ + MaxPods?: number; + /** + * 物理机类型,默认为:db-2(基础型-SAS-V3) + */ + Type?: string; + /** + * Raid配置,默认Raid10 支持:Raid0、Raid1、Raid5、Raid10,NoRaid + */ + Raid?: string; + /** + * 网络环境,可选千兆:1G ,万兆:10G, 默认1G。 + */ + NIC?: string; + /** + * 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + */ + SubnetId?: string; + /** + * 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。 + */ + ImageId?: string; + /** + * 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用 + */ + DisableSchedule?: boolean; + /** + * 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行。 + */ + InitScript?: string; +} + +/** + * AddUK8SPHostNode - 为UK8S集群添加一台或多台物理云主机类型的节点。 + */ +export interface AddUK8SPHostNodeResponse {} + +/** + * AddUK8SUHostNode - 为UK8S集群添加一台Node节点,机型类型为云主机 + */ +export interface AddUK8SUHostNodeRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UK8S集群ID。 可从UK8S控制台获取。 + */ + ClusterId: string; + /** + * 虚拟CPU核数。可选参数:2-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。 + */ + CPU: number; + /** + * 最大创建Node节点数量,取值范围是[1,10]。 + */ + Count: number; + /** + * Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 + */ + Password: string; + /** + * 内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192 + */ + Mem: number; + /** + * 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ 默认为月付 + */ + ChargeType: string; + /** + * 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + */ + BootDiskType?: string; + /** + * 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + */ + DataDiskType?: string; + /** + * 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] + */ + DataDiskSize?: string; + /** + * 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + */ + Quantity?: number; + /** + * 云主机机型。枚举值["N", "C", "G", "O", "OS"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + */ + MachineType?: string; + /** + * 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" + */ + MinmalCpuPlatform?: string; + /** + * GPU类型,枚举值["K80", "P40", "V100",],MachineType为G时必填 + */ + GpuType?: string; + /** + * GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + */ + GPU?: number; + /** + * Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + */ + Labels?: string; + /** + * 默认110,生产环境建议小于等于110。 + */ + MaxPods?: number; + /** + * 硬件隔离组id。可通过DescribeIsolationGroup获取。 + */ + IsolationGroup?: string; + /** + * 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。 + */ + ImageId?: string; + /** + * 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + */ + SubnetId?: string; + /** + * 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用 + */ + DisableSchedule?: boolean; + /** + * 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + */ + UserData?: string; + /** + * 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + */ + InitScript?: string; +} + +/** + * AddUK8SUHostNode - 为UK8S集群添加一台Node节点,机型类型为云主机 + */ +export interface AddUK8SUHostNodeResponse { + /** + * Node实例Id集合 + */ + NodeIds?: string[]; +} + +/** + * CreateUK8SClusterV2 - 创建UK8S集群 + */ +export interface CreateUK8SClusterV2Request { + /** + * 集群Node及Pod所属VPC + */ + VPCId: string; + /** + * 集群Node及Pod所属子网 + */ + SubnetId: string; + /** + * Service 网段,用于分配ClusterIP,如172.17.0.0/16。该网段不能与集群所属VPC网段重叠。 + */ + ServiceCIDR: string; + /** + * 集群名称 + */ + ClusterName: string; + /** + * 集群节点密码,包括Master和Node。密码需包含最少一个大写字母,请使用base64进行编码,举例如下:# echo -n Password1 | base64 + */ + Password: string; + /** + * + */ + Master?: { + /** + * Master节点所属可用区,需要设置 Master.0.Zone、 Master.1.Zone、Master.2.Zone 三个 Master 节点的可用区。 三个节点可部署在不同可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + }[]; + /** + * Master节点的云主机机型(V2.0),如["N", "C", "O", "OS"],具体请参照云主机机型。 + */ + MasterMachineType: string; + /** + * Master节点的虚拟CPU核数。可选参数:2-64(具体机型与CPU的对应关系参照控制台)。 + */ + MasterCPU: number; + /** + * Master节点的内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。 + */ + MasterMem: number; + /** + * + */ + Nodes?: { + /** + * 一组Nodes节点所属可用区,可创建多组Nodes节点,如一组是CPU Nodes节点,另一组是GPU Nodes节点。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 一组Nodes节点云主机机型,如["N", "C", "O", "OS"],具体请参照云主机机型。 + */ + MachineType: string; + /** + * 一组Node节点的虚拟CPU核数。单位:核,范围:[2, 64],可选范围参考控制台。 + */ + CPU: number; + /** + * 一组Node节点的内存大小。单位:MB,范围 :[4096, 262144],取值为1024的倍数,可选范围参考控制台。 + */ + Mem: number; + /** + * 一组Node节点的数量,范围:[1,10]。 + */ + Count: number; + /** + * 一组Node节点的隔离组Id,归属于同一隔离组的虚拟机节点将落在不同的物理机上,单个隔离组最多只能容纳8个节点。参见DescribeIsolationGroup。 + */ + IsolationGroup?: string; + /** + * Node节点上可运行最大节点数,默认为110。 + */ + MaxPods?: number; + /** + * Node节点标签,形式为key=value,多组Labels用”,“隔开,最多支持五组。 + */ + Labels?: string; + /** + * 一组Node节点的系统盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + */ + BootDiskType?: string; + /** + * 一组Node节点的数据盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + */ + DataDiskType?: string; + /** + * Node节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + */ + MinmalCpuPlatform?: string; + /** + * 一组Node节点的GPU类型,枚举值["K80", "P40", "V100"],最新值参考Console。 + */ + GpuType?: string; + /** + * 一组Node节点的GPU卡核心数,仅GPU机型支持此字段。 + */ + GPU?: number; + /** + * 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] + */ + DataDiskSize?: number; + }[]; + /** + * Master节点系统盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + */ + MasterBootDiskType?: string; + /** + * Master节点数据盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + */ + MasterDataDiskType?: string; + /** + * Master节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + */ + MasterMinmalCpuPlatform?: string; + /** + * Master节点的数据盘大小,单位GB,默认为0。范围 :[20, 1000] + */ + MasterDataDiskSize?: number; + /** + * 集群所有节点的付费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限),默认按月。 + */ + ChargeType?: string; + /** + * k8s集群的版本,版本信息请参考UK8S集群创建页,不指定的话默认为当前支持的最高版本。 + */ + K8sVersion?: string; + /** + * 购买时长。默认为1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + */ + Quantity?: number; + /** + * 是否允许外网访问apiserver,开启:Yes 不开启:No。默认为No。 + */ + ExternalApiServer?: string; + /** + * 【无效,已删除】当前将自动为Master节点创建隔离组,确保Master节点归属于不同物理机。 + */ + MasterIsolationGroup?: string; + /** + * + */ + KubeProxy?: { + /** + * 集群kube-proxy模式。支持iptables和ipvs,默认为iptables。 + */ + Mode?: string; + }; + /** + * Master节点和Node节点的镜像 ID,不填则随机选择可用的基础镜像。支持用户自定义镜像。 + */ + ImageId?: string; + /** + * 用户自定义数据。注意:1、总数据量大小不超多16K;2、使用base64编码。 + */ + UserData?: string; + /** + * 用户自定义脚本,与UserData不同,自定义脚本将在集群安装完毕后执行。注意:1、总数据量大小不超多16K;2、使用base64编码。 + */ + InitScript?: string; +} + +/** + * CreateUK8SClusterV2 - 创建UK8S集群 + */ +export interface CreateUK8SClusterV2Response { + /** + * 集群ID + */ + ClusterId: string; +} + +/** + * DelUK8SCluster - 删除UK8S集群 + */ +export interface DelUK8SClusterRequest { + /** + * 集群id + */ + ClusterId: string; + /** + * 是否删除节点挂载的数据盘。枚举值[true:删除,false: 不删除],默认不删除 + */ + ReleaseUDisk?: boolean; +} + +/** + * DelUK8SCluster - 删除UK8S集群 + */ +export interface DelUK8SClusterResponse {} + +/** + * DelUK8SClusterNodeV2 - 删除集群中的Node节点,删除前务必先将其中的Pod驱逐。 + */ +export interface DelUK8SClusterNodeV2Request { + /** + * UK8S集群ID。 可从UK8S控制台获取。 + */ + ClusterId: string; + /** + * Node在UK8S处的唯一标示,如uk8s-reewqe5-sdasadsda。**非云主机或物理云主机资源Id** + */ + NodeId: string; + /** + * 删除节点时是否释放数据盘。 枚举值[true:释放,false: 不释放],默认为true。 + */ + ReleaseDataUDisk?: boolean; +} + +/** + * DelUK8SClusterNodeV2 - 删除集群中的Node节点,删除前务必先将其中的Pod驱逐。 + */ +export interface DelUK8SClusterNodeV2Response {} + +/** + * DescribeUK8SImage - 获取UK8S支持的Node节点操作系统,可基于该操作系统制定自定义镜像 + */ +export interface DescribeUK8SImageRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; +} + +/** + * DescribeUK8SImage - 获取UK8S支持的Node节点操作系统,可基于该操作系统制定自定义镜像 + */ +export interface DescribeUK8SImageResponse { + /** + * 虚拟机可用镜像集合, 详见ImageInfo 数组 + */ + ImageSet?: { + /** + * 可用区 Id + */ + ZoneId: number; + /** + * 镜像 Id + */ + ImageId: string; + /** + * 镜像名称 + */ + ImageName: string; + /** + * 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。 + */ + NotSupportGPU: boolean; + }[]; + /** + * 物理机可用镜像集合, 详见ImageInfo 数组 + */ + PHostImageSet?: { + /** + * 可用区 Id + */ + ZoneId: number; + /** + * 镜像 Id + */ + ImageId: string; + /** + * 镜像名称 + */ + ImageName: string; + /** + * 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。 + */ + NotSupportGPU: boolean; + }[]; +} + +/** + * ListUK8SClusterNodeV2 - 获取UK8S集群节点信息 + */ +export interface ListUK8SClusterNodeV2Request { + /** + * UK8S集群ID + */ + ClusterId: string; +} + +/** + * ListUK8SClusterNodeV2 - 获取UK8S集群节点信息 + */ +export interface ListUK8SClusterNodeV2Response { + /** + * 节点详细信息,见NodeInfoV2。 + */ + NodeSet: { + /** + * Node所在可用区 + */ + Zone: string; + /** + * NodeId,Node在UK8S处的唯一标示,如uk8s-reewqe5-sdasadsda + */ + NodeId: string; + /** + * node角色,枚举值为master、node + */ + NodeRole: string; + /** + * Node的状态 + */ + NodeStatus: string; + /** + * Node节点的资源类型,枚举值为UHost或UPHost。 + */ + InstanceType: string; + /** + * 资源名称,初始值等于NodeId,用户可在UHost或UPHost处修改。 + */ + InstanceName: string; + /** + * 资源ID,如uhost-xxxx,或uphost-xxxxx。 + */ + InstanceId: string; + /** + * 机型类别,分别对应Uhost的MachineType或PHost的PHostType。 + */ + MachineType: string; + /** + * Node节点的操作系统类别,如Linux或Windows。 + */ + OsType: string; + /** + * Node节点的镜像名称。 + */ + OsName: string; + /** + * Node节点CPU核数,单位: 个。 + */ + CPU: number; + /** + * 内存大小,单位: MB。 + */ + Memory: number; + /** + * 节点IP信息,详细信息见 UHostIPSet。 + */ + IPSet: { + /** + * 国际: Internation,BGP: Bgp,内网: Private + */ + Type?: string; + /** + * IP资源ID (内网IP无对应的资源ID) + */ + IPId?: string; + /** + * IP地址 + */ + IP?: string; + /** + * IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) + */ + Bandwidth?: number; + /** + * 是否默认的弹性网卡的信息。true: 是默认弹性网卡;其他值:不是。 + */ + Default?: string; + /** + * IP地址对应的VPC ID + */ + VPCId?: string; + /** + * IP地址对应的子网 ID + */ + SubnetId?: string; + /** + * Mac地址 + */ + Mac?: string; + }[]; + /** + * 节点创建时间 + */ + CreateTime: number; + /** + * 节点计费到期时间 + */ + ExpireTime: number; + /** + * 节点所属伸缩组ID,非伸缩组创建出来的节点,伸缩组ID为Default。 + */ + AsgId: string; + /** + * 是否允许Pod调度到该节点,枚举值为true或false。 + */ + Unschedulable: boolean; + /** + * kubeproxy信息,详细信息见KubeProxy。 + */ + KubeProxy: { + /** + * KubeProxy模式,枚举值为[ipvs,iptables] + */ + Mode?: string; + }; + /** + * 加节点时判断是否没有资源,如果返回NORESOURCE则代表没有资源了 + */ + NodeLogInfo: string; + /** + * 节点的GPU颗数。 + */ + GPU?: number; + }[]; + /** + * 满足条件的节点数量,包括Master。 + */ + TotalCount: number; +} + +/** + * ListUK8SClusterV2 - 获取UK8S集群列表信息 + */ +export interface ListUK8SClusterV2Request { + /** + * 列表起始位置偏移量,默认为0。 + */ + Offset?: number; + /** + * 返回数据长度,默认为20。 + */ + Limit?: number; + /** + * UK8S集群ID + */ + ClusterId?: string; +} + +/** + * ListUK8SClusterV2 - 获取UK8S集群列表信息 + */ +export interface ListUK8SClusterV2Response { + /** + * 满足条件的集群数量 + */ + ClusterCount: number; + /** + * 集群信息,具体参考ClusterSet + */ + ClusterSet?: { + /** + * 资源名字 + */ + ClusterName: string; + /** + * 集群ID + */ + ClusterId: string; + /** + * 所属VPC + */ + VPCId: string; + /** + * 所属子网 + */ + SubnetId: string; + /** + * Pod网段 + */ + PodCIDR: string; + /** + * 服务网段 + */ + ServiceCIDR: string; + /** + * Master 节点数量 + */ + MasterCount: number; + /** + * 集群apiserver地址 + */ + ApiServer: string; + /** + * 集群版本 + */ + K8sVersion: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * Node节点数量 + */ + NodeCount?: number; + /** + * 集群外部apiserver地址 + */ + ExternalApiServer?: string; + /** + * 状态 + */ + Status?: string; + }[]; +} diff --git a/src/services/ulb/index.ts b/src/services/ulb/index.ts new file mode 100644 index 0000000..0cf8182 --- /dev/null +++ b/src/services/ulb/index.ts @@ -0,0 +1,1772 @@ +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 **ulb** service + */ +export default class ULBClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * AllocateBackend - 添加ULB后端资源实例 + * + * See also: https://docs.ucloud.cn/api/ulb-api/allocate_backend + */ + allocateBackend( + request?: AllocateBackendRequest + ): Promise { + const args = { Action: 'AllocateBackend', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AllocateBackendResponse + ); + } + + /** + * BindSSL - 将SSL证书绑定到VServer + * + * See also: https://docs.ucloud.cn/api/ulb-api/bind_ssl + */ + bindSSL(request?: BindSSLRequest): Promise { + const args = { Action: 'BindSSL', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as BindSSLResponse + ); + } + + /** + * CreatePolicy - 创建VServer内容转发策略 + * + * See also: https://docs.ucloud.cn/api/ulb-api/create_policy + */ + createPolicy(request?: CreatePolicyRequest): Promise { + const args = { Action: 'CreatePolicy', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreatePolicyResponse + ); + } + + /** + * CreateSSL - 创建SSL证书,可以把整个 Pem 证书内容传过来,或者把证书、私钥、CA证书分别传过来 + * + * See also: https://docs.ucloud.cn/api/ulb-api/create_ssl + */ + createSSL(request?: CreateSSLRequest): Promise { + const args = { Action: 'CreateSSL', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateSSLResponse + ); + } + + /** + * CreateULB - 创建负载均衡实例,可以选择内网或者外网 + * + * See also: https://docs.ucloud.cn/api/ulb-api/create_ulb + */ + createULB(request?: CreateULBRequest): Promise { + const args = { Action: 'CreateULB', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateULBResponse + ); + } + + /** + * CreateVServer - 创建VServer实例,定义监听的协议和端口以及负载均衡算法 + * + * See also: https://docs.ucloud.cn/api/ulb-api/create_vserver + */ + createVServer( + request?: CreateVServerRequest + ): Promise { + const args = { Action: 'CreateVServer', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateVServerResponse + ); + } + + /** + * DeletePolicy - 删除内容转发策略 + * + * See also: https://docs.ucloud.cn/api/ulb-api/delete_policy + */ + deletePolicy(request?: DeletePolicyRequest): Promise { + const args = { Action: 'DeletePolicy', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeletePolicyResponse + ); + } + + /** + * DeleteSSL - 删除SSL证书 + * + * See also: https://docs.ucloud.cn/api/ulb-api/delete_ssl + */ + deleteSSL(request?: DeleteSSLRequest): Promise { + const args = { Action: 'DeleteSSL', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteSSLResponse + ); + } + + /** + * DeleteULB - 删除负载均衡实例 + * + * See also: https://docs.ucloud.cn/api/ulb-api/delete_ulb + */ + deleteULB(request?: DeleteULBRequest): Promise { + const args = { Action: 'DeleteULB', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteULBResponse + ); + } + + /** + * DeleteVServer - 删除VServer实例 + * + * See also: https://docs.ucloud.cn/api/ulb-api/delete_vserver + */ + deleteVServer( + request?: DeleteVServerRequest + ): Promise { + const args = { Action: 'DeleteVServer', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteVServerResponse + ); + } + + /** + * DescribeSSL - 获取SSL证书信息 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_ssl + */ + describeSSL(request?: DescribeSSLRequest): Promise { + const args = { Action: 'DescribeSSL', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeSSLResponse + ); + } + + /** + * DescribeULB - 获取ULB详细信息 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_ulb + */ + describeULB(request?: DescribeULBRequest): Promise { + const args = { Action: 'DescribeULB', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeULBResponse + ); + } + + /** + * DescribeULBSimple - 获取ULB信息 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_ulb_simple + */ + describeULBSimple( + request?: DescribeULBSimpleRequest + ): Promise { + const args = { Action: 'DescribeULBSimple', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeULBSimpleResponse + ); + } + + /** + * DescribeVServer - 获取ULB下的VServer的详细信息 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_vserver + */ + describeVServer( + request?: DescribeVServerRequest + ): Promise { + const args = { Action: 'DescribeVServer', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeVServerResponse + ); + } + + /** + * ReleaseBackend - 从VServer释放后端资源实例 + * + * See also: https://docs.ucloud.cn/api/ulb-api/release_backend + */ + releaseBackend( + request?: ReleaseBackendRequest + ): Promise { + const args = { Action: 'ReleaseBackend', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ReleaseBackendResponse + ); + } + + /** + * UnbindSSL - 从VServer解绑SSL证书 + * + * See also: https://docs.ucloud.cn/api/ulb-api/unbind_ssl + */ + unbindSSL(request?: UnbindSSLRequest): Promise { + const args = { Action: 'UnbindSSL', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UnbindSSLResponse + ); + } + + /** + * UpdateBackendAttribute - 更新ULB后端资源实例(服务节点)属性 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_backend_attribute + */ + updateBackendAttribute( + request?: UpdateBackendAttributeRequest + ): Promise { + const args = { Action: 'UpdateBackendAttribute', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateBackendAttributeResponse + ); + } + + /** + * UpdatePolicy - 更新内容转发规则,包括转发规则后的服务节点 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_policy + */ + updatePolicy(request?: UpdatePolicyRequest): Promise { + const args = { Action: 'UpdatePolicy', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdatePolicyResponse + ); + } + + /** + * UpdateULBAttribute - 更新ULB名字业务组备注等属性字段 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_ulb_attribute + */ + updateULBAttribute( + request?: UpdateULBAttributeRequest + ): Promise { + const args = { Action: 'UpdateULBAttribute', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateULBAttributeResponse + ); + } + + /** + * UpdateVServerAttribute - 更新VServer实例属性 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_vserver_attribute + */ + updateVServerAttribute( + request?: UpdateVServerAttributeRequest + ): Promise { + const args = { Action: 'UpdateVServerAttribute', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateVServerAttributeResponse + ); + } +} + +/** + * AllocateBackend - 添加ULB后端资源实例 + */ +export interface AllocateBackendRequest { + /** + * 负载均衡实例的ID + */ + ULBId: string; + /** + * VServer实例的ID + */ + VServerId: string; + /** + * 所添加的后端资源的类型,枚举值:UHost -> 云主机;UNI -> 虚拟网卡;UPM -> 物理云主机; UDHost -> 私有专区主机;UDocker -> 容器;UHybrid->混合云主机;CUBE->Cube;默认值为UHost。报文转发模式不支持UDocker、UHybrid、CUBE + */ + ResourceType: string; + /** + * 所添加的后端资源的资源ID + */ + ResourceId: string; + /** + * 所添加的后端服务器的资源实例IP,当ResourceType 为 UHybrid 时有效,且必填 + */ + ResourceIP?: string; + /** + * 所添加的后端服务器所在的vpc,当ResourceType 为 UHybrid 时有效,且必填 + */ + VPCId?: string; + /** + * 所添加的后端服务器所在的子网,当ResourceType 为 UHybrid 时有效,且必填 + */ + SubnetId?: string; + /** + * 所添加的后端资源服务端口,取值范围[1-65535],默认80 + */ + Port?: number; + /** + * 所添加的后端RS权重(在加权轮询算法下有效),取值范围[0-100],默认为1 + */ + Weight?: number; + /** + * 后端实例状态开关,枚举值: 1:启用; 0:禁用 默认为启用 + */ + Enabled?: number; + /** + * rs是否为backup,默认为00:普通rs1:backup的rs + */ + IsBackup?: number; +} + +/** + * AllocateBackend - 添加ULB后端资源实例 + */ +export interface AllocateBackendResponse { + /** + * 所添加的后端资源在ULB中的对象ID,(为ULB系统中使用,与资源自身ID无关),可用于 UpdateBackendAttribute/UpdateBackendAttributeBatch/ReleaseBackend + */ + BackendId?: string; +} + +/** + * BindSSL - 将SSL证书绑定到VServer + */ +export interface BindSSLRequest { + /** + * 所绑定ULB实例ID + */ + ULBId: string; + /** + * 所绑定VServer实例ID + */ + VServerId: string; + /** + * SSL证书的Id + */ + SSLId: string; +} + +/** + * BindSSL - 将SSL证书绑定到VServer + */ +export interface BindSSLResponse {} + +/** + * CreatePolicy - 创建VServer内容转发策略 + */ +export interface CreatePolicyRequest { + /** + * 需要添加内容转发策略的负载均衡实例ID + */ + ULBId: string; + /** + * 需要添加内容转发策略的VServer实例ID + */ + VServerId: string; + /** + * 内容转发策略应用的后端资源实例的ID,来源于 AllocateBackend 返回的 BackendId + */ + BackendId: string[]; + /** + * 内容转发匹配字段 + */ + Match: string; + /** + * 内容转发匹配字段的类型 + */ + Type?: string; + /** + * 策略优先级,1-9999 + */ + PolicyPriority?: number; +} + +/** + * CreatePolicy - 创建VServer内容转发策略 + */ +export interface CreatePolicyResponse { + /** + * 内容转发策略ID + */ + PolicyId?: string; +} + +/** + * CreateSSL - 创建SSL证书,可以把整个 Pem 证书内容传过来,或者把证书、私钥、CA证书分别传过来 + */ +export interface CreateSSLRequest { + /** + * SSL证书的名字,默认值为空 + */ + SSLName: string; + /** + * 所添加的SSL证书类型,目前只支持Pem格式 + */ + SSLType?: string; + /** + * SSL证书的完整内容,包括用户证书、加密证书的私钥、CA证书 + */ + SSLContent?: string; + /** + * 用户的证书 + */ + UserCert?: string; + /** + * 加密证书的私钥 + */ + PrivateKey?: string; + /** + * CA证书 + */ + CaCert?: string; +} + +/** + * CreateSSL - 创建SSL证书,可以把整个 Pem 证书内容传过来,或者把证书、私钥、CA证书分别传过来 + */ +export interface CreateSSLResponse { + /** + * SSL证书的Id + */ + SSLId?: string; +} + +/** + * CreateULB - 创建负载均衡实例,可以选择内网或者外网 + */ +export interface CreateULBRequest { + /** + * 负载均衡的名字,默认值为“ULB” + */ + ULBName?: string; + /** + * 业务组 + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 创建的ULB是否为外网模式,默认即为外网模式 + */ + OuterMode?: string; + /** + * 创建的ULB是否为内网模式 + */ + InnerMode?: string; + /** + * 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按时付费 + */ + ChargeType?: string; + /** + * ULB所在的VPC的ID, 如果不传则使用默认的VPC + */ + VPCId?: string; + /** + * 内网ULB 所属的子网ID,如果不传则使用默认的子网 + */ + SubnetId?: string; + /** + * ULB 所属的业务组ID,如果不传则使用默认的业务组 + */ + BusinessId?: string; + /** + * 防火墙ID,如果不传,则默认不绑定防火墙 + */ + FirewallId?: string; + /** + * ULB 监听器类型,枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发。默认为RequestProxy + */ + ListenType?: string; +} + +/** + * CreateULB - 创建负载均衡实例,可以选择内网或者外网 + */ +export interface CreateULBResponse { + /** + * 负载均衡实例的Id + */ + ULBId?: string; + /** + * IPv6地址Id + */ + IPv6AddressId?: string; +} + +/** + * CreateVServer - 创建VServer实例,定义监听的协议和端口以及负载均衡算法 + */ +export interface CreateVServerRequest { + /** + * 负载均衡实例ID + */ + ULBId: string; + /** + * VServer实例名称,默认为"VServer" + */ + VServerName?: string; + /** + * 监听器类型,枚举值,RequestProxy ,请求代理;PacketsTransmit ,报文转发。默认为RequestProxy + */ + ListenType?: string; + /** + * VServer实例的协议,请求代理模式下有 HTTP、HTTPS、TCP,报文转发下有 TCP,UDP。默认为“HTTP" + */ + Protocol?: string; + /** + * VServer后端端口,取值范围[1-65535];默认值为80 + */ + FrontendPort?: number; + /** + * VServer负载均衡模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口); WeightRoundrobin -> 加权轮询; Leastconn -> 最小连接数;Backup ->主备模式。ConsistentHash,SourcePort,ConsistentHashPort 只在报文转发中使用;Leastconn只在请求代理中使用;Roundrobin、Source和WeightRoundrobin,Backup在请求代理和报文转发中使用。默认为:"Roundrobin" + */ + Method?: string; + /** + * VServer会话保持方式,默认关闭会话保持。枚举值:None -> 关闭;ServerInsert -> 自动生成KEY;UserDefined -> 用户自定义KEY。 + */ + PersistenceType?: string; + /** + * 根据PersistenceType确认; None和ServerInsert: 此字段无意义; UserDefined:此字段传入自定义会话保持String + */ + PersistenceInfo?: string; + /** + * ListenType为RequestProxy时表示空闲连接的回收时间,单位:秒,取值范围:时(0,86400],默认值为60;ListenType为PacketsTransmit时表示连接保持的时间,单位:秒,取值范围:[60,900],0 表示禁用连接保持 + */ + ClientTimeout?: number; + /** + * 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测;Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path;报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize,默认值为Ping + */ + MonitorType?: string; + /** + * 根据MonitorType确认; 当MonitorType为Path时,此字段有意义,代表HTTP检查域名 + */ + Domain?: string; + /** + * 根据MonitorType确认; 当MonitorType为Path时,此字段有意义,代表HTTP检查路径 + */ + Path?: string; + /** + * 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + */ + RequestMsg?: string; + /** + * 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + */ + ResponseMsg?: string; +} + +/** + * CreateVServer - 创建VServer实例,定义监听的协议和端口以及负载均衡算法 + */ +export interface CreateVServerResponse { + /** + * VServer实例的Id + */ + VServerId?: string; +} + +/** + * DeletePolicy - 删除内容转发策略 + */ +export interface DeletePolicyRequest { + /** + * 内容转发策略ID + */ + PolicyId: string; + /** + * VServer 资源ID + */ + VServerId?: string; +} + +/** + * DeletePolicy - 删除内容转发策略 + */ +export interface DeletePolicyResponse {} + +/** + * DeleteSSL - 删除SSL证书 + */ +export interface DeleteSSLRequest { + /** + * SSL证书的ID + */ + SSLId: string; +} + +/** + * DeleteSSL - 删除SSL证书 + */ +export interface DeleteSSLResponse {} + +/** + * DeleteULB - 删除负载均衡实例 + */ +export interface DeleteULBRequest { + /** + * 负载均衡实例的ID + */ + ULBId: string; + /** + * 删除ulb时是否释放绑定的EIP,false标识只解绑EIP,true表示会释放绑定的EIP,默认是false。Anycast IP 此参数无效 + */ + ReleaseEip?: boolean; +} + +/** + * DeleteULB - 删除负载均衡实例 + */ +export interface DeleteULBResponse {} + +/** + * DeleteVServer - 删除VServer实例 + */ +export interface DeleteVServerRequest { + /** + * 负载均衡实例的ID + */ + ULBId: string; + /** + * VServer实例的ID + */ + VServerId: string; +} + +/** + * DeleteVServer - 删除VServer实例 + */ +export interface DeleteVServerResponse {} + +/** + * DescribeSSL - 获取SSL证书信息 + */ +export interface DescribeSSLRequest { + /** + * SSL证书的Id + */ + SSLId?: string; + /** + * 数据分页值,默认为20 + */ + Limit?: number; + /** + * 数据偏移量,默认值为0 + */ + Offset?: number; +} + +/** + * DescribeSSL - 获取SSL证书信息 + */ +export interface DescribeSSLResponse { + /** + * 满足条件的SSL证书总数 + */ + TotalCount?: number; + /** + * SSL证书详细信息,具体结构见 ULBSSLSet + */ + DataSet?: { + /** + * SSL证书的Id + */ + SSLId?: string; + /** + * SSL证书的名字 + */ + SSLName?: string; + /** + * SSL证书类型,暂时只有 Pem 一种类型 + */ + SSLType?: string; + /** + * SSL证书的内容 + */ + SSLContent?: string; + /** + * SSL证书的创建时间 + */ + CreateTime?: number; + /** + * SSL证书的HASH值 + */ + HashValue?: string; + /** + * SSL证书绑定到的对象 + */ + BindedTargetSet?: { + /** + * SSL证书绑定到的VServer的资源ID + */ + VServerId?: string; + /** + * 对应的VServer的名字 + */ + VServerName?: string; + /** + * VServer 所属的ULB实例的资源ID + */ + ULBId?: string; + /** + * ULB实例的名称 + */ + ULBName?: string; + }[]; + }[]; +} + +/** + * DescribeULB - 获取ULB详细信息 + */ +export interface DescribeULBRequest { + /** + * 数据偏移量,默认为0 + */ + Offset?: number; + /** + * 数据分页值,默认为20 + */ + Limit?: number; + /** + * 负载均衡实例的Id。 若指定则返回指定的负载均衡实例的信息; 若不指定则返回当前数据中心中所有的负载均衡实例的信息 + */ + ULBId?: string; + /** + * ULB所属的VPC + */ + VPCId?: string; + /** + * ULB所属的子网ID + */ + SubnetId?: string; + /** + * ULB所属的业务组ID + */ + BusinessId?: string; +} + +/** + * DescribeULB - 获取ULB详细信息 + */ +export interface DescribeULBResponse { + /** + * 满足条件的ULB总数 + */ + TotalCount?: number; + /** + * ULB列表,每项参数详见 ULBSet + */ + DataSet?: { + /** + * 负载均衡的资源ID + */ + ULBId?: string; + /** + * 负载均衡的资源名称 + */ + Name?: string; + /** + * 负载均衡的业务组名称 + */ + Tag?: string; + /** + * 负载均衡的备注 + */ + Remark?: string; + /** + * 带宽类型,枚举值为: 0,非共享带宽; 1,共享带宽 + */ + BandwidthType?: number; + /** + * 带宽 + */ + Bandwidth?: number; + /** + * ULB的创建时间,格式为Unix Timestamp + */ + CreateTime?: number; + /** + * ULB的详细信息列表,具体结构见下方 ULBIPSet + */ + IPSet?: { + /** + * 弹性IP的运营商信息,枚举值为: Bgp:BGP IP International:国际IP + */ + OperatorName?: string; + /** + * 弹性IP地址 + */ + EIP?: string; + /** + * 弹性IP的ID + */ + EIPId?: string; + /** + * 弹性IP的带宽类型,枚举值:1 表示是共享带宽,0 普通带宽类型(暂未对外开放) + */ + BandwidthType?: number; + /** + * 弹性IP的带宽值(暂未对外开放) + */ + Bandwidth?: number; + }[]; + /** + * 负载均衡实例中存在的VServer实例列表,具体结构见下方 ULBVServerSet + */ + VServerSet?: { + /** + * 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测, Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path; 报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize + */ + MonitorType: string; + /** + * 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查域名 + */ + Domain?: string; + /** + * 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查路径 + */ + Path?: string; + /** + * 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + */ + RequestMsg?: string; + /** + * 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + */ + ResponseMsg?: string; + /** + * VServer实例的Id + */ + VServerId?: string; + /** + * VServer实例的名字 + */ + VServerName?: string; + /** + * VServer实例的协议。 枚举值为:HTTP,TCP,UDP,HTTPS。 + */ + Protocol?: string; + /** + * VServer服务端口 + */ + FrontendPort?: number; + /** + * VServer负载均衡的模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口)。 + */ + Method?: string; + /** + * VServer会话保持方式。枚举值为: None -> 关闭会话保持; ServerInsert -> 自动生成; UserDefined -> 用户自定义。 + */ + PersistenceType?: string; + /** + * 根据PersistenceType确定: None或ServerInsert,此字段为空; UserDefined,此字段展示用户自定义会话string。 + */ + PersistenceInfo?: string; + /** + * 空闲连接的回收时间,单位:秒。 + */ + ClientTimeout?: number; + /** + * VServer的运行状态。枚举值: 0 -> rs全部运行正常;1 -> rs全部运行异常;2 -> rs部分运行异常。 + */ + Status?: number; + /** + * VServer绑定的SSL证书信息,具体结构见下方 ULBSSLSet。 + */ + SSLSet?: { + /** + * SSL证书的Id + */ + SSLId?: string; + /** + * SSL证书的名字 + */ + SSLName?: string; + /** + * SSL证书类型,暂时只有 Pem 一种类型 + */ + SSLType?: string; + /** + * SSL证书的内容 + */ + SSLContent?: string; + /** + * SSL证书的创建时间 + */ + CreateTime?: number; + /** + * SSL证书的HASH值 + */ + HashValue?: string; + /** + * SSL证书绑定到的对象 + */ + BindedTargetSet?: { + /** + * SSL证书绑定到的VServer的资源ID + */ + VServerId?: string; + /** + * 对应的VServer的名字 + */ + VServerName?: string; + /** + * VServer 所属的ULB实例的资源ID + */ + ULBId?: string; + /** + * ULB实例的名称 + */ + ULBName?: string; + }[]; + }[]; + /** + * 后端资源信息列表,具体结构见下方 ULBBackendSet + */ + BackendSet?: { + /** + * 后端资源实例的Id + */ + BackendId?: string; + /** + * 资源实例的类型 + */ + ResourceType?: string; + /** + * 资源实例的资源Id + */ + ResourceId?: string; + /** + * 资源实例的资源名称 + */ + ResourceName?: string; + /** + * 资源绑定的虚拟网卡实例的类型 + */ + SubResourceType?: string; + /** + * 资源绑定的虚拟网卡实例的资源Id + */ + SubResourceId?: string; + /** + * 资源绑定的虚拟网卡实例的资源名称 + */ + SubResourceName?: string; + /** + * 后端提供服务的内网IP + */ + PrivateIP?: string; + /** + * 后端提供服务的端口 + */ + Port?: number; + /** + * 后端提供服务的实例启用与否,枚举值:0 禁用 1 启用 + */ + Enabled?: number; + /** + * 后端提供服务的实例运行状态,枚举值:0健康检查健康状态 1 健康检查异常 + */ + Status?: number; + /** + * 后端提供服务的资源所在的子网的ID + */ + SubnetId?: string; + /** + * 是否为backup,只有当vserver的Backup属性为1时才会有此字段,说明:0:主rs1:备rs + */ + IsBackup?: number; + }[]; + /** + * 监听器类型,枚举值为: RequestProxy -> 请求代理;PacketsTransmit -> 报文转发 + */ + ListenType?: string; + /** + * 内容转发信息列表,具体结构见下方 ULBPolicySet + */ + PolicySet?: { + /** + * 内容转发Id,默认内容转发类型下为空。 + */ + PolicyId?: string; + /** + * 内容类型,枚举值:Custom -> 客户自定义;Default -> 默认内容转发 + */ + PolicyType?: string; + /** + * 内容转发匹配字段的类型,枚举值:Domain -> 域名;Path -> 路径; 默认内容转发类型下为空 + */ + Type?: string; + /** + * 内容转发匹配字段;默认内容转发类型下为空。 + */ + Match?: string; + /** + * 内容转发优先级,范围[1,9999],数字越大优先级越高。默认内容转发规则下为0。 + */ + PolicyPriority?: number; + /** + * 所属VServerId + */ + VServerId?: string; + /** + * 默认内容转发类型下返回当前rs总数 + */ + TotalCount?: number; + /** + * 内容转发下rs的详细信息,参考PolicyBackendSet + */ + BackendSet?: { + /** + * 所添加的后端资源在ULB中的对象ID,(为ULB系统中使用,与资源自身ID无关 + */ + BackendId?: string; + /** + * 所添加的后端资源的类型,枚举值:UHost -> 云主机;UPM -> 物理云主机; UDHost -> 私有专区主机;UDocker -> 容器;UHybrid->混合云主机;CUBE->Cube;UNI -> 虚拟网卡 + */ + ResourceType?: string; + /** + * 后端资源的实例名称 + */ + ResourceName?: string; + /** + * 如果资源绑定了弹性网卡,则展示弹性网卡的资源ID + */ + SubResourceId?: string; + /** + * 如果资源绑定了弹性网卡,则展示弹性网卡的资源名称 + */ + SubResourceName?: string; + /** + * "UNI"或者为空 + */ + SubResourceType?: string; + /** + * 后端资源的对象ID + */ + ObjectId?: string; + /** + * 所添加的后端资源服务端口 + */ + Port?: number; + /** + * 后端资源的内网IP + */ + PrivateIP?: string; + }[]; + }[]; + }[]; + /** + * ULB 的类型 + */ + ULBType?: string; + /** + * ULB ip类型,枚举值:IPv6 / IPv4 (内部测试,暂未对外开放) + */ + IPVersion?: string; + /** + * ULB 监听器类型,枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发;Comprehensive,兼容型;Pending,未定型 + */ + ListenType?: string; + /** + * ULB所在的VPC的ID + */ + VPCId?: string; + /** + * ULB 为 InnerMode 时,ULB 所属的子网ID,默认为空 + */ + SubnetId?: string; + /** + * ULB 所属的业务组ID + */ + BusinessId?: string; + /** + * ULB的内网IP,当ULBType为OuterMode时,该值为空 + */ + PrivateIP?: string; + /** + * 防火墙信息,具体结构见下方 FirewallSet + */ + FirewallSet?: { + /** + * 防火墙名称 + */ + FirewallName?: string; + /** + * 防火墙ID + */ + FirewallId?: string; + }[]; + /** + * ULB是否开启日志功能。0,关闭;1,开启 + */ + EnableLog?: number; + /** + * 日志功能相关信息,仅当EnableLog为true时会返回,具体结构见下方 LoggerSet + */ + LogSet?: { + /** + * ulb日志上传的bucket + */ + BucketName?: string; + /** + * 上传到bucket使用的token的tokenid + */ + TokenID?: string; + /** + * bucket的token名称 + */ + TokenName?: string; + }; + }[]; +} + +/** + * DescribeULBSimple - 获取ULB信息 + */ +export interface DescribeULBSimpleRequest { + /** + * 数据偏移量,默认为0 + */ + Offset?: number; + /** + * 数据分页值,默认为10000 + */ + Limit?: number; + /** + * 负载均衡实例的Id。 若指定则返回指定的负载均衡实例的信息; 若不指定则返回当前数据中心中所有的负载均衡实例的信息 + */ + ULBId?: string; + /** + * ULB所属的VPC + */ + VPCId?: string; + /** + * ULB所属的子网ID + */ + SubnetId?: string; + /** + * ULB所属的业务组ID + */ + BusinessId?: string; +} + +/** + * DescribeULBSimple - 获取ULB信息 + */ +export interface DescribeULBSimpleResponse { + /** + * 满足条件的ULB总数 + */ + TotalCount: number; + /** + * ULB列表,每项参数详见 ULBSimpleSet + */ + DataSet: { + /** + * ULB 监听器类型,枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发;Comprehensive,兼容型;Pending,未定型 + */ + ListenType: string; + /** + * ULB提供服务的IP类型。枚举值,“IPv4”,"IPv6"。默认为“IPv4” + */ + IPVersion: string; + /** + * 负载均衡的资源ID + */ + ULBId?: string; + /** + * 负载均衡的资源名称 + */ + Name?: string; + /** + * 负载均衡的业务组名称 + */ + Tag?: string; + /** + * 负载均衡的备注 + */ + Remark?: string; + /** + * ULB的创建时间,格式为Unix Timestamp + */ + CreateTime?: number; + /** + * ULB所在的VPC的ID + */ + VPCId?: string; + /** + * ULB 为 InnerMode 时,ULB 所属的子网ID + */ + SubnetId?: string; + /** + * ULB 所属的业务组ID + */ + BusinessId?: string; + /** + * ULB的内网IP,当ULBType为OuterMode时,该值为空 + */ + PrivateIP?: string; + /** + * 带宽类型,枚举值为: 0,非共享带宽; 1,共享带宽 + */ + BandwidthType?: number; + /** + * 带宽 + */ + Bandwidth?: number; + /** + * ULB的详细信息列表,具体结构见下方 ULBIPSet + */ + IPSet?: { + /** + * 弹性IP的运营商信息,枚举值为: Bgp:BGP IP International:国际IP + */ + OperatorName?: string; + /** + * 弹性IP地址 + */ + EIP?: string; + /** + * 弹性IP的ID + */ + EIPId?: string; + /** + * 弹性IP的带宽类型,枚举值:1 表示是共享带宽,0 普通带宽类型(暂未对外开放) + */ + BandwidthType?: number; + /** + * 弹性IP的带宽值(暂未对外开放) + */ + Bandwidth?: number; + }[]; + /** + * ulb下vserver数量 + */ + VServerCount?: number; + /** + * ULB 的类型(InnerMode or OuterMode) + */ + ULBType?: string; + /** + * 防火墙信息,具体结构见下方 FirewallSet + */ + FirewallSet?: { + /** + * 防火墙名称 + */ + FirewallName?: string; + /** + * 防火墙ID + */ + FirewallId?: string; + }[]; + /** + * ULB是否开启日志功能。0,关闭;1,开启 + */ + EnableLog?: number; + /** + * 日志功能相关信息,仅当EnableLog为true时会返回,具体结构见下方 LoggerSet + */ + LogSet?: { + /** + * ulb日志上传的bucket + */ + BucketName?: string; + /** + * 上传到bucket使用的token的tokenid + */ + TokenID?: string; + /** + * bucket的token名称 + */ + TokenName?: string; + }; + }[]; +} + +/** + * DescribeVServer - 获取ULB下的VServer的详细信息 + */ +export interface DescribeVServerRequest { + /** + * 负载均衡实例的Id + */ + ULBId: string; + /** + * VServer实例的Id;若指定则返回指定的VServer实例的信息; 若不指定则返回当前负载均衡实例下所有VServer的信息 + */ + VServerId?: string; + /** + * 数据分页值 + */ + Limit?: number; + /** + * 数据偏移量 + */ + Offset?: number; +} + +/** + * DescribeVServer - 获取ULB下的VServer的详细信息 + */ +export interface DescribeVServerResponse { + /** + * 满足条件的VServer总数 + */ + TotalCount?: number; + /** + * VServer列表,每项参数详见 ULBVServerSet + */ + DataSet?: { + /** + * 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测, Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path; 报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize + */ + MonitorType: string; + /** + * 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查域名 + */ + Domain?: string; + /** + * 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查路径 + */ + Path?: string; + /** + * 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + */ + RequestMsg?: string; + /** + * 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + */ + ResponseMsg?: string; + /** + * VServer实例的Id + */ + VServerId?: string; + /** + * VServer实例的名字 + */ + VServerName?: string; + /** + * VServer实例的协议。 枚举值为:HTTP,TCP,UDP,HTTPS。 + */ + Protocol?: string; + /** + * VServer服务端口 + */ + FrontendPort?: number; + /** + * VServer负载均衡的模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口)。 + */ + Method?: string; + /** + * VServer会话保持方式。枚举值为: None -> 关闭会话保持; ServerInsert -> 自动生成; UserDefined -> 用户自定义。 + */ + PersistenceType?: string; + /** + * 根据PersistenceType确定: None或ServerInsert,此字段为空; UserDefined,此字段展示用户自定义会话string。 + */ + PersistenceInfo?: string; + /** + * 空闲连接的回收时间,单位:秒。 + */ + ClientTimeout?: number; + /** + * VServer的运行状态。枚举值: 0 -> rs全部运行正常;1 -> rs全部运行异常;2 -> rs部分运行异常。 + */ + Status?: number; + /** + * VServer绑定的SSL证书信息,具体结构见下方 ULBSSLSet。 + */ + SSLSet?: { + /** + * SSL证书的Id + */ + SSLId?: string; + /** + * SSL证书的名字 + */ + SSLName?: string; + /** + * SSL证书类型,暂时只有 Pem 一种类型 + */ + SSLType?: string; + /** + * SSL证书的内容 + */ + SSLContent?: string; + /** + * SSL证书的创建时间 + */ + CreateTime?: number; + /** + * SSL证书的HASH值 + */ + HashValue?: string; + /** + * SSL证书绑定到的对象 + */ + BindedTargetSet?: { + /** + * SSL证书绑定到的VServer的资源ID + */ + VServerId?: string; + /** + * 对应的VServer的名字 + */ + VServerName?: string; + /** + * VServer 所属的ULB实例的资源ID + */ + ULBId?: string; + /** + * ULB实例的名称 + */ + ULBName?: string; + }[]; + }[]; + /** + * 后端资源信息列表,具体结构见下方 ULBBackendSet + */ + BackendSet?: { + /** + * 后端资源实例的Id + */ + BackendId?: string; + /** + * 资源实例的类型 + */ + ResourceType?: string; + /** + * 资源实例的资源Id + */ + ResourceId?: string; + /** + * 资源实例的资源名称 + */ + ResourceName?: string; + /** + * 资源绑定的虚拟网卡实例的类型 + */ + SubResourceType?: string; + /** + * 资源绑定的虚拟网卡实例的资源Id + */ + SubResourceId?: string; + /** + * 资源绑定的虚拟网卡实例的资源名称 + */ + SubResourceName?: string; + /** + * 后端提供服务的内网IP + */ + PrivateIP?: string; + /** + * 后端提供服务的端口 + */ + Port?: number; + /** + * 后端提供服务的实例启用与否,枚举值:0 禁用 1 启用 + */ + Enabled?: number; + /** + * 后端提供服务的实例运行状态,枚举值:0健康检查健康状态 1 健康检查异常 + */ + Status?: number; + /** + * 后端提供服务的资源所在的子网的ID + */ + SubnetId?: string; + /** + * 是否为backup,只有当vserver的Backup属性为1时才会有此字段,说明:0:主rs1:备rs + */ + IsBackup?: number; + }[]; + /** + * 监听器类型,枚举值为: RequestProxy -> 请求代理;PacketsTransmit -> 报文转发 + */ + ListenType?: string; + /** + * 内容转发信息列表,具体结构见下方 ULBPolicySet + */ + PolicySet?: { + /** + * 内容转发Id,默认内容转发类型下为空。 + */ + PolicyId?: string; + /** + * 内容类型,枚举值:Custom -> 客户自定义;Default -> 默认内容转发 + */ + PolicyType?: string; + /** + * 内容转发匹配字段的类型,枚举值:Domain -> 域名;Path -> 路径; 默认内容转发类型下为空 + */ + Type?: string; + /** + * 内容转发匹配字段;默认内容转发类型下为空。 + */ + Match?: string; + /** + * 内容转发优先级,范围[1,9999],数字越大优先级越高。默认内容转发规则下为0。 + */ + PolicyPriority?: number; + /** + * 所属VServerId + */ + VServerId?: string; + /** + * 默认内容转发类型下返回当前rs总数 + */ + TotalCount?: number; + /** + * 内容转发下rs的详细信息,参考PolicyBackendSet + */ + BackendSet?: { + /** + * 所添加的后端资源在ULB中的对象ID,(为ULB系统中使用,与资源自身ID无关 + */ + BackendId?: string; + /** + * 所添加的后端资源的类型,枚举值:UHost -> 云主机;UPM -> 物理云主机; UDHost -> 私有专区主机;UDocker -> 容器;UHybrid->混合云主机;CUBE->Cube;UNI -> 虚拟网卡 + */ + ResourceType?: string; + /** + * 后端资源的实例名称 + */ + ResourceName?: string; + /** + * 如果资源绑定了弹性网卡,则展示弹性网卡的资源ID + */ + SubResourceId?: string; + /** + * 如果资源绑定了弹性网卡,则展示弹性网卡的资源名称 + */ + SubResourceName?: string; + /** + * "UNI"或者为空 + */ + SubResourceType?: string; + /** + * 后端资源的对象ID + */ + ObjectId?: string; + /** + * 所添加的后端资源服务端口 + */ + Port?: number; + /** + * 后端资源的内网IP + */ + PrivateIP?: string; + }[]; + }[]; + }[]; +} + +/** + * ReleaseBackend - 从VServer释放后端资源实例 + */ +export interface ReleaseBackendRequest { + /** + * 负载均衡实例的ID + */ + ULBId: string; + /** + * 后端资源实例的ID(ULB后端ID,非资源自身ID) + */ + BackendId: string; +} + +/** + * ReleaseBackend - 从VServer释放后端资源实例 + */ +export interface ReleaseBackendResponse {} + +/** + * UnbindSSL - 从VServer解绑SSL证书 + */ +export interface UnbindSSLRequest { + /** + * 所绑定ULB实例ID + */ + ULBId: string; + /** + * 所绑定VServer实例ID + */ + VServerId: string; + /** + * SSL证书的Id + */ + SSLId: string; +} + +/** + * UnbindSSL - 从VServer解绑SSL证书 + */ +export interface UnbindSSLResponse {} + +/** + * UpdateBackendAttribute - 更新ULB后端资源实例(服务节点)属性 + */ +export interface UpdateBackendAttributeRequest { + /** + * 负载均衡资源ID + */ + ULBId: string; + /** + * 后端资源实例的ID(ULB后端ID,非资源自身ID) + */ + BackendId: string; + /** + * 后端资源服务端口,取值范围[1-65535] + */ + Port?: number; + /** + * 所添加的后端RS权重(在加权轮询算法下有效),取值范围[0-100],默认为1 + */ + Weight?: number; + /** + * 后端实例状态开关 + */ + Enabled?: number; + /** + * 是否为backup0:主rs1:备rs默认为0 + */ + IsBackup?: number; +} + +/** + * UpdateBackendAttribute - 更新ULB后端资源实例(服务节点)属性 + */ +export interface UpdateBackendAttributeResponse {} + +/** + * UpdatePolicy - 更新内容转发规则,包括转发规则后的服务节点 + */ +export interface UpdatePolicyRequest { + /** + * 需要添加内容转发策略的负载均衡实例ID + */ + ULBId: string; + /** + * 需要添加内容转发策略的VServer实例ID,只支持请求代理模式下,HTTP或HTTPS协议的VServer + */ + VServerId: string; + /** + * 内容转发匹配字段 + */ + Match: string; + /** + * 转发规则的ID,当Type为Default时,可以不传或为空 + */ + PolicyId?: string; + /** + * 内容转发策略应用的后端资源实例的ID,来源于 AllocateBackend 返回的 BackendId,不传表示更新转发节点为空 + */ + BackendId?: string[]; + /** + * 内容转发匹配字段的类型,枚举值:Domain -> 域名转发规则;Path -> 路径转发规则;Default -> 默认转发规则,不传默认值Domain + */ + Type?: string; +} + +/** + * UpdatePolicy - 更新内容转发规则,包括转发规则后的服务节点 + */ +export interface UpdatePolicyResponse {} + +/** + * UpdateULBAttribute - 更新ULB名字业务组备注等属性字段 + */ +export interface UpdateULBAttributeRequest { + /** + * ULB资源ID + */ + ULBId: string; + /** + * 名字 + */ + Name?: string; + /** + * 业务 + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; +} + +/** + * UpdateULBAttribute - 更新ULB名字业务组备注等属性字段 + */ +export interface UpdateULBAttributeResponse {} + +/** + * UpdateVServerAttribute - 更新VServer实例属性 + */ +export interface UpdateVServerAttributeRequest { + /** + * 负载均衡实例ID + */ + ULBId: string; + /** + * VServer实例ID + */ + VServerId: string; + /** + * VServer实例名称,若无此字段则不做修改 + */ + VServerName?: string; + /** + * VServer负载均衡模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口); WeightRoundrobin -> 加权轮询; Leastconn -> 最小连接数;Backup -> 主备模式。ConsistentHash,SourcePort,ConsistentHashPort 只在报文转发中使用;Leastconn只在请求代理中使用;Roundrobin、Source和WeightRoundrobin,Backup在请求代理和报文转发中使用。默认为:"Roundrobin" + */ + Method?: string; + /** + * VServer会话保持模式,若无此字段则不做修改。枚举值:None:关闭;ServerInsert:自动生成KEY;UserDefined:用户自定义KEY。 + */ + PersistenceType?: string; + /** + * 根据PersistenceType确定: None或ServerInsert, 此字段无意义; UserDefined, 则此字段传入用户自定义会话保持String. 若无此字段则不做修改 + */ + PersistenceInfo?: string; + /** + * 请求代理的VServer下表示空闲连接的回收时间,单位:秒,取值范围:时(0,86400],默认值为60;报文转发的VServer下表示回话保持的时间,单位:秒,取值范围:[60,900],0 表示禁用连接保持 + */ + ClientTimeout?: number; + /** + * 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测,Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path;报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize,默认值为Ping + */ + MonitorType?: string; + /** + * MonitorType 为 Path 时指定健康检查发送请求时HTTP HEADER 里的域名 + */ + Domain?: string; + /** + * MonitorType 为 Path 时指定健康检查发送请求时的路径,默认为 / + */ + Path?: string; + /** + * 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + */ + RequestMsg?: string; + /** + * 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + */ + ResponseMsg?: string; +} + +/** + * UpdateVServerAttribute - 更新VServer实例属性 + */ +export interface UpdateVServerAttributeResponse {} diff --git a/src/services/umem/index.ts b/src/services/umem/index.ts new file mode 100644 index 0000000..75a2c76 --- /dev/null +++ b/src/services/umem/index.ts @@ -0,0 +1,2297 @@ +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 **umem** service + */ +export default class UMemClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * CheckUDredisSpaceAllowance - 检查高性能UMem剩余资源,以及分片扩容前的资源预检查 + * + * See also: https://docs.ucloud.cn/api/umem-api/check_udredis_space_allowance + */ + checkUDredisSpaceAllowance( + request?: CheckUDredisSpaceAllowanceRequest + ): Promise { + const args = { Action: 'CheckUDredisSpaceAllowance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CheckUDredisSpaceAllowanceResponse + ); + } + + /** + * CheckURedisAllowance - 检查主备Redis的资源是否足够创建新实例,以及主备Redis的扩容资源预检查 + * + * See also: https://docs.ucloud.cn/api/umem-api/check_uredis_allowance + */ + checkURedisAllowance( + request?: CheckURedisAllowanceRequest + ): Promise { + const args = { Action: 'CheckURedisAllowance', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CheckURedisAllowanceResponse + ); + } + + /** + * CreateUMemBackup - 创建分布式redis备份 + * + * See also: https://docs.ucloud.cn/api/umem-api/create_umem_backup + */ + createUMemBackup( + request?: CreateUMemBackupRequest + ): Promise { + const args = { Action: 'CreateUMemBackup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUMemBackupResponse + ); + } + + /** + * CreateUMemSpace - 创建UMem内存空间 + * + * See also: https://docs.ucloud.cn/api/umem-api/create_umem_space + */ + createUMemSpace( + request?: CreateUMemSpaceRequest + ): Promise { + const args = { Action: 'CreateUMemSpace', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUMemSpaceResponse + ); + } + + /** + * CreateUMemcacheGroup - 创建单机Memcache + * + * See also: https://docs.ucloud.cn/api/umem-api/create_umem_cache_group + */ + createUMemcacheGroup( + request?: CreateUMemcacheGroupRequest + ): Promise { + const args = { Action: 'CreateUMemcacheGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUMemcacheGroupResponse + ); + } + + /** + * CreateURedisBackup - 创建主备Redis备份 + * + * See also: https://docs.ucloud.cn/api/umem-api/create_uredis_backup + */ + createURedisBackup( + request?: CreateURedisBackupRequest + ): Promise { + const args = { Action: 'CreateURedisBackup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateURedisBackupResponse + ); + } + + /** + * CreateURedisGroup - 创建主备redis + * + * See also: https://docs.ucloud.cn/api/umem-api/create_uredis_group + */ + createURedisGroup( + request?: CreateURedisGroupRequest + ): Promise { + const args = { Action: 'CreateURedisGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateURedisGroupResponse + ); + } + + /** + * DeleteUMemSpace - 删除UMem内存空间 + * + * See also: https://docs.ucloud.cn/api/umem-api/delete_umem_space + */ + deleteUMemSpace( + request?: DeleteUMemSpaceRequest + ): Promise { + const args = { Action: 'DeleteUMemSpace', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUMemSpaceResponse + ); + } + + /** + * DeleteUMemcacheGroup - 删除单机Memcache + * + * See also: https://docs.ucloud.cn/api/umem-api/delete_umem_cache_group + */ + deleteUMemcacheGroup( + request?: DeleteUMemcacheGroupRequest + ): Promise { + const args = { Action: 'DeleteUMemcacheGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUMemcacheGroupResponse + ); + } + + /** + * DeleteURedisGroup - 删除主备redis + * + * See also: https://docs.ucloud.cn/api/umem-api/delete_uredis_group + */ + deleteURedisGroup( + request?: DeleteURedisGroupRequest + ): Promise { + const args = { Action: 'DeleteURedisGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteURedisGroupResponse + ); + } + + /** + * DescribeUDRedisSlowlog - 查询UDRedis慢日志 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_ud_redis_slowlog + */ + describeUDRedisSlowlog( + request?: DescribeUDRedisSlowlogRequest + ): Promise { + const args = { Action: 'DescribeUDRedisSlowlog', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUDRedisSlowlogResponse + ); + } + + /** + * DescribeUMemBackup - 查询分布式redis备份 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_backup + */ + describeUMemBackup( + request?: DescribeUMemBackupRequest + ): Promise { + const args = { Action: 'DescribeUMemBackup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUMemBackupResponse + ); + } + + /** + * DescribeUMemBackupURL - 获取分布式redis 备份下载链接 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_backup_url + */ + describeUMemBackupURL( + request?: DescribeUMemBackupURLRequest + ): Promise { + const args = { Action: 'DescribeUMemBackupURL', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUMemBackupURLResponse + ); + } + + /** + * DescribeUMemBlockInfo - 拉取UDRedis分片信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_block_info + */ + describeUMemBlockInfo( + request?: DescribeUMemBlockInfoRequest + ): Promise { + const args = { Action: 'DescribeUMemBlockInfo', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUMemBlockInfoResponse + ); + } + + /** + * DescribeUMemPrice - 获取UMem实例价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_price + */ + describeUMemPrice( + request?: DescribeUMemPriceRequest + ): Promise { + const args = { Action: 'DescribeUMemPrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUMemPriceResponse + ); + } + + /** + * DescribeUMemSpace - 获取UMem内存空间列表 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_space + */ + describeUMemSpace( + request?: DescribeUMemSpaceRequest + ): Promise { + const args = { Action: 'DescribeUMemSpace', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUMemSpaceResponse + ); + } + + /** + * DescribeUMemUpgradePrice - 获取UMem升级价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_upgrade_price + */ + describeUMemUpgradePrice( + request?: DescribeUMemUpgradePriceRequest + ): Promise { + const args = { Action: 'DescribeUMemUpgradePrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUMemUpgradePriceResponse + ); + } + + /** + * DescribeUMemcacheGroup - 显示Memcache + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_cache_group + */ + describeUMemcacheGroup( + request?: DescribeUMemcacheGroupRequest + ): Promise { + const args = { Action: 'DescribeUMemcacheGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUMemcacheGroupResponse + ); + } + + /** + * DescribeUMemcachePrice - 获取umemcache组价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_cache_price + */ + describeUMemcachePrice( + request?: DescribeUMemcachePriceRequest + ): Promise { + const args = { Action: 'DescribeUMemcachePrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUMemcachePriceResponse + ); + } + + /** + * DescribeUMemcacheUpgradePrice - 获取umemcache升级价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_umem_cache_upgrade_price + */ + describeUMemcacheUpgradePrice( + request?: DescribeUMemcacheUpgradePriceRequest + ): Promise { + const args = { + Action: 'DescribeUMemcacheUpgradePrice', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUMemcacheUpgradePriceResponse + ); + } + + /** + * DescribeURedisBackup - 查询主备redis备份 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_backup + */ + describeURedisBackup( + request?: DescribeURedisBackupRequest + ): Promise { + const args = { Action: 'DescribeURedisBackup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeURedisBackupResponse + ); + } + + /** + * DescribeURedisBackupURL - 获取主备Redis备份下载链接 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_backup_url + */ + describeURedisBackupURL( + request?: DescribeURedisBackupURLRequest + ): Promise { + const args = { Action: 'DescribeURedisBackupURL', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeURedisBackupURLResponse + ); + } + + /** + * DescribeURedisConfig - 查询主备Redis所有配置文件 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_config + */ + describeURedisConfig( + request?: DescribeURedisConfigRequest + ): Promise { + const args = { Action: 'DescribeURedisConfig', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeURedisConfigResponse + ); + } + + /** + * DescribeURedisGroup - 查询主备Redis + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_group + */ + describeURedisGroup( + request?: DescribeURedisGroupRequest + ): Promise { + const args = { Action: 'DescribeURedisGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeURedisGroupResponse + ); + } + + /** + * DescribeURedisPrice - 取uredis价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_price + */ + describeURedisPrice( + request?: DescribeURedisPriceRequest + ): Promise { + const args = { Action: 'DescribeURedisPrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeURedisPriceResponse + ); + } + + /** + * DescribeURedisSlowlog - 查询URedis慢日志 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_slowlog + */ + describeURedisSlowlog( + request?: DescribeURedisSlowlogRequest + ): Promise { + const args = { Action: 'DescribeURedisSlowlog', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeURedisSlowlogResponse + ); + } + + /** + * DescribeURedisUpgradePrice - 获取uredis升级价格信息 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_upgrade_price + */ + describeURedisUpgradePrice( + request?: DescribeURedisUpgradePriceRequest + ): Promise { + const args = { Action: 'DescribeURedisUpgradePrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeURedisUpgradePriceResponse + ); + } + + /** + * DescribeURedisVersion - 获取主Redis可用版本 + * + * See also: https://docs.ucloud.cn/api/umem-api/describe_uredis_version + */ + describeURedisVersion( + request?: DescribeURedisVersionRequest + ): Promise { + const args = { Action: 'DescribeURedisVersion', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeURedisVersionResponse + ); + } + + /** + * FlushallURedisGroup - 清除主备redis数据 + * + * See also: https://docs.ucloud.cn/api/umem-api/flushall_uredis_group + */ + flushallURedisGroup( + request?: FlushallURedisGroupRequest + ): Promise { + const args = { Action: 'FlushallURedisGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as FlushallURedisGroupResponse + ); + } + + /** + * GetUMemSpaceState - 获取UMem内存空间列表 + * + * See also: https://docs.ucloud.cn/api/umem-api/get_umem_space_state + */ + getUMemSpaceState( + request?: GetUMemSpaceStateRequest + ): Promise { + const args = { Action: 'GetUMemSpaceState', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUMemSpaceStateResponse + ); + } + + /** + * ModifyUMemSpaceName - 修改UMem内存空间名称 + * + * See also: https://docs.ucloud.cn/api/umem-api/modify_umem_space_name + */ + modifyUMemSpaceName( + request?: ModifyUMemSpaceNameRequest + ): Promise { + const args = { Action: 'ModifyUMemSpaceName', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyUMemSpaceNameResponse + ); + } + + /** + * ModifyURedisGroupName - 修改主备redis名称 + * + * See also: https://docs.ucloud.cn/api/umem-api/modify_uredis_group_name + */ + modifyURedisGroupName( + request?: ModifyURedisGroupNameRequest + ): Promise { + const args = { Action: 'ModifyURedisGroupName', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyURedisGroupNameResponse + ); + } + + /** + * ModifyURedisGroupPassword - 修改主备密码/重置密码 + * + * See also: https://docs.ucloud.cn/api/umem-api/modify_uredis_group_password + */ + modifyURedisGroupPassword( + request?: ModifyURedisGroupPasswordRequest + ): Promise { + const args = { Action: 'ModifyURedisGroupPassword', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyURedisGroupPasswordResponse + ); + } + + /** + * RemoveUDRedisData - 清除udredis实例数据 + * + * See also: https://docs.ucloud.cn/api/umem-api/remove_ud_redis_data + */ + removeUDRedisData( + request?: RemoveUDRedisDataRequest + ): Promise { + const args = { Action: 'RemoveUDRedisData', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RemoveUDRedisDataResponse + ); + } + + /** + * ResizeUMemSpace - 调整内存空间容量 + * + * See also: https://docs.ucloud.cn/api/umem-api/resize_umem_space + */ + resizeUMemSpace( + request?: ResizeUMemSpaceRequest + ): Promise { + const args = { Action: 'ResizeUMemSpace', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ResizeUMemSpaceResponse + ); + } + + /** + * ResizeURedisGroup - 通过调用CheckURedisAllowance接口,检查资源情况,根据不同情形来调整主备redis容量,其中主要包括可用区资源不足无法扩容,主备所在宿主机资源不足需要迁移完成扩容(需要主从切换,会闪断及负载升高),以及直接扩容(业务无感知) + * + * See also: https://docs.ucloud.cn/api/umem-api/resize_uredis_group + */ + resizeURedisGroup( + request?: ResizeURedisGroupRequest + ): Promise { + const args = { Action: 'ResizeURedisGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ResizeURedisGroupResponse + ); + } + + /** + * RestartUMemcacheGroup - 重启单机Memcache + * + * See also: https://docs.ucloud.cn/api/umem-api/restart_umem_cache_group + */ + restartUMemcacheGroup( + request?: RestartUMemcacheGroupRequest + ): Promise { + const args = { Action: 'RestartUMemcacheGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RestartUMemcacheGroupResponse + ); + } + + /** + * RestartURedisGroup - 重启主备实例 + * + * See also: https://docs.ucloud.cn/api/umem-api/restart_uredis_group + */ + restartURedisGroup( + request?: RestartURedisGroupRequest + ): Promise { + const args = { Action: 'RestartURedisGroup', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RestartURedisGroupResponse + ); + } + + /** + * UpdateURedisBackupStrategy - URedisBackupStrategy + * + * See also: https://docs.ucloud.cn/api/umem-api/update_uredis_backup_strategy + */ + updateURedisBackupStrategy( + request?: UpdateURedisBackupStrategyRequest + ): Promise { + const args = { Action: 'UpdateURedisBackupStrategy', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateURedisBackupStrategyResponse + ); + } +} + +/** + * CheckUDredisSpaceAllowance - 检查高性能UMem剩余资源,以及分片扩容前的资源预检查 + */ +export interface CheckUDredisSpaceAllowanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 创建实例的容量大小,,扩容时的分片目标容量大小 + */ + Size: number; + /** + * 创建实例的数量,[1-10] + */ + Count: string; + /** + * 资源ID,扩缩容时的必传参数 + */ + GroupId?: string; +} + +/** + * CheckUDredisSpaceAllowance - 检查高性能UMem剩余资源,以及分片扩容前的资源预检查 + */ +export interface CheckUDredisSpaceAllowanceResponse { + /** + * 创建实例资源时,表示可创建的数量;扩容资源时,返回1表示可以扩容,0表示可用区资源不足不能扩容 + */ + Count: number; +} + +/** + * CheckURedisAllowance - 检查主备Redis的资源是否足够创建新实例,以及主备Redis的扩容资源预检查 + */ +export interface CheckURedisAllowanceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 创建实例的容量大小, 单位:GB 目前仅支持1/2/4/8/16/32六种规格;扩缩容时,表示实例的目标资源大小 + */ + Size: number; + /** + * 创建实例的数量,[1-10] + */ + Count: number; + /** + * + */ + Protocol?: string; + /** + * 是否是跨机房URedis(默认false) + */ + RegionFlag?: boolean; + /** + * 资源ID,扩容实例资源时的必传参数 + */ + GroupId?: string; +} + +/** + * CheckURedisAllowance - 检查主备Redis的资源是否足够创建新实例,以及主备Redis的扩容资源预检查 + */ +export interface CheckURedisAllowanceResponse { + /** + * 创建实例资源时,表示可创建的数量;扩容资源时,返回1表示可以扩容,0表示可用区资源不足不能扩容 + */ + Count: number; +} + +/** + * CreateUMemBackup - 创建分布式redis备份 + */ +export interface CreateUMemBackupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 资源id + */ + SpaceId: string; + /** + * 请求创建备份的名称 (范围[6-63],只能包含英文、数字以及符号-和_) + */ + BackupName: string; +} + +/** + * CreateUMemBackup - 创建分布式redis备份 + */ +export interface CreateUMemBackupResponse { + /** + * 备份Id + */ + BackupId?: string; +} + +/** + * CreateUMemSpace - 创建UMem内存空间 + */ +export interface CreateUMemSpaceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 内存大小, 单位:GB, 范围[1~1024] + */ + Size: number; + /** + * 空间名称,长度(6<=size<=63) + */ + Name: string; + /** + * 协议:memcache, redis (默认redis).注意:redis无single类型 + */ + Protocol?: string; + /** + * 空间类型:single(无热备),double(热备)(默认: double) + */ + Type?: string; + /** + * Year , Month, Dynamic, Trial 默认: Month + */ + ChargeType?: string; + /** + * 购买时长 默认: 1 + */ + Quantity?: number; + /** + * 使用的代金券id + */ + CouponId?: string; +} + +/** + * CreateUMemSpace - 创建UMem内存空间 + */ +export interface CreateUMemSpaceResponse { + /** + * 创建内存空间ID列表 + */ + SpaceId?: string; +} + +/** + * CreateUMemcacheGroup - 创建单机Memcache + */ +export interface CreateUMemcacheGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 请求创建组的名称 范围[6-60] + */ + Name: string; + /** + * 每个节点的内存大小,单位GB,默认1GB 目前仅支持1/2/4/8/16/32这几档 + */ + Size?: number; + /** + * 配置ID,目前仅支持默认配置id 默认配置id:"9a891891-c245-4b66-bce8-67e59430d67c" + */ + ConfigId?: string; + /** + * Memcache版本信息,默认为1.4.31 + */ + Version?: string; + /** + * 计费模式,Year , Month, Dynamic 默认: Month + */ + ChargeType?: string; + /** + * 购买时长,默认为1 + */ + Quantity?: number; + /** + * 业务组 默认:Default + */ + Tag?: string; + /** + * + */ + Protocol?: string; + /** + * 代金券ID + */ + CouponId?: string; +} + +/** + * CreateUMemcacheGroup - 创建单机Memcache + */ +export interface CreateUMemcacheGroupResponse { + /** + * 创建的组ID + */ + GroupId?: string; +} + +/** + * CreateURedisBackup - 创建主备Redis备份 + */ +export interface CreateURedisBackupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 资源id + */ + GroupId: string; + /** + * 请求创建组的名称 (范围[6-63],只能包含英文、数字以及符号-和_) + */ + BackupName: string; + /** + * 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + */ + SlaveZone?: string; +} + +/** + * CreateURedisBackup - 创建主备Redis备份 + */ +export interface CreateURedisBackupResponse { + /** + * 备份id + */ + BackupId: string; +} + +/** + * CreateURedisGroup - 创建主备redis + */ +export interface CreateURedisGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 请求创建组的名称 (范围[6-63],只能包含英文、数字以及符号-和_) + */ + Name: string; + /** + * 是否开启高可用,enable或disable + */ + HighAvailability: string; + /** + * 每个节点的内存大小,单位GB,默认1GB,目前仅支持1/2/4/8/16/32,六种 + */ + Size?: number; + /** + * 是否自动备份,enable或disable,默认disable + */ + AutoBackup?: string; + /** + * 自动备份开始时间,范围[0-23],默认3点 + */ + BackupTime?: number; + /** + * 配置ID,目前支持 3.0版本配置ID:"03f58ca9-b64d-4bdd-abc7-c6b9a46fd801",3.2版本配置ID:"3e45ac48-f8a2-a9q2-261d-l342dab130gf", 4.0版本配置ID:"6c9298a3-9d7f-428c-b1d0-e87ab3b8a1ea",默认版本3.0,从备份创建为必传项 + */ + ConfigId?: string; + /** + * Redis版本信息(详见DescribeURedisVersion返回结果),默认版本3.0 + */ + Version?: string; + /** + * 计费模式,Year , Month, Dynamic 默认: Month + */ + ChargeType?: string; + /** + * 购买时长,默认为1 + */ + Quantity?: number; + /** + * 业务组名称 + */ + Tag?: string; + /** + * 初始化密码,需要 base64 编码 + */ + Password?: string; + /** + * 有此项代表从备份中创建,无代表正常创建 + */ + BackupId?: string; + /** + * 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + */ + SlaveZone?: string; + /** + * Master Redis Group的ID,创建只读Slave时,必须填写 + */ + MasterGroupId?: string; + /** + * 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + */ + EnableIpV6?: boolean; + /** + * 子网ID + */ + SubnetId?: string; + /** + * VPC的ID + */ + VPCId?: string; + /** + * 代金券ID + */ + CouponId?: string; +} + +/** + * CreateURedisGroup - 创建主备redis + */ +export interface CreateURedisGroupResponse { + /** + * 创建的组ID + */ + GroupId?: string; +} + +/** + * DeleteUMemSpace - 删除UMem内存空间 + */ +export interface DeleteUMemSpaceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * UMem内存空间ID + */ + SpaceId: string; +} + +/** + * DeleteUMemSpace - 删除UMem内存空间 + */ +export interface DeleteUMemSpaceResponse {} + +/** + * DeleteUMemcacheGroup - 删除单机Memcache + */ +export interface DeleteUMemcacheGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 组ID + */ + GroupId: string; +} + +/** + * DeleteUMemcacheGroup - 删除单机Memcache + */ +export interface DeleteUMemcacheGroupResponse {} + +/** + * DeleteURedisGroup - 删除主备redis + */ +export interface DeleteURedisGroupRequest { + /** + * 组ID + */ + GroupId: string; +} + +/** + * DeleteURedisGroup - 删除主备redis + */ +export interface DeleteURedisGroupResponse {} + +/** + * DescribeUDRedisSlowlog - 查询UDRedis慢日志 + */ +export interface DescribeUDRedisSlowlogRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 实例id + */ + InstanceId: string; + /** + * 分页显示的条目数,默认为10 + */ + Limit?: number; +} + +/** + * DescribeUDRedisSlowlog - 查询UDRedis慢日志 + */ +export interface DescribeUDRedisSlowlogResponse { + /** + * 总条目数 + */ + TotalCount: number; + /** + * 条目数据 + */ + DataSet: { + /** + * 查询发生的时间 + */ + StartTime?: number; + /** + * 查询消耗的时间 + */ + SpendTime?: number; + /** + * 查询命令 + */ + Command?: string; + /** + * 分片id + */ + BlockId?: string; + }[]; +} + +/** + * DescribeUMemBackup - 查询分布式redis备份 + */ +export interface DescribeUMemBackupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 资源id + */ + SpaceId: string; + /** + * 分页显示的起始偏移, 默认值为0 + */ + Offset?: number; + /** + * 分页显示的条目数, 默认值为10 + */ + Limit?: number; +} + +/** + * DescribeUMemBackup - 查询分布式redis备份 + */ +export interface DescribeUMemBackupResponse { + /** + * 分布式redis 备份,数组的每个元素为每个分片的备份 + */ + DataSet?: { + /** + * 备份名称 + */ + BackupName: string; + /** + * 创建时间 + */ + CreateTime: number; + /** + * Starting:备份中 Done:完成 + */ + State: string; + /** + * 空间的备份ID + */ + BackupId: string; + /** + * 备份类型: auto(自动) ,manual(手动) + */ + BackupType: string; + /** + * 本次备份,分片的数量 + */ + BlockCount: number; + }[]; +} + +/** + * DescribeUMemBackupURL - 获取分布式redis 备份下载链接 + */ +export interface DescribeUMemBackupURLRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 资源id + */ + SpaceId: string; + /** + * 备份Id + */ + BackupId: string; + /** + * 分片id + */ + BlockId?: string; +} + +/** + * DescribeUMemBackupURL - 获取分布式redis 备份下载链接 + */ +export interface DescribeUMemBackupURLResponse { + /** + * 备份url,每个分片一个下载URL + */ + BackupURL: string[]; +} + +/** + * DescribeUMemBlockInfo - 拉取UDRedis分片信息 + */ +export interface DescribeUMemBlockInfoRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UMem内存资源ID + */ + SpaceId: string; + /** + * 分页显示的起始偏移, 默认值为0 + */ + Offset: number; + /** + * 分页显示的条目数, 默认值为10 + */ + Limit: number; +} + +/** + * DescribeUMemBlockInfo - 拉取UDRedis分片信息 + */ +export interface DescribeUMemBlockInfoResponse { + /** + * 分布式redis 分片信息 + */ + DataSet?: { + /** + * 分片id + */ + BlockId: string; + /** + * 分片ip + */ + BlockVip: string; + /** + * 分片端口 + */ + BlockPort: number; + /** + * 容量单位GB + */ + BlockSize: number; + /** + * 使用量单位MB + */ + BlockUsedSize: number; + /** + * 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中 SetPasswordFail //设置密码失败 + */ + BlockState: string; + /** + * 分片维护的键槽起始值 + */ + BlockSlotBegin: number; + /** + * 分片维护的键槽结束值 + */ + BlockSlotEnd: number; + }[]; +} + +/** + * DescribeUMemPrice - 获取UMem实例价格信息 + */ +export interface DescribeUMemPriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * 购买umem大小,单位:GB,范围[1~1024] + */ + Size: number; + /** + * 空间类型:single(无热备),double(热备)(默认: double) + */ + Type: string; + /** + * Year, Month, Dynamic 如果不指定,则一次性获取三种计费 + */ + ChargeType?: string; + /** + * 购买UMem的时长,默认值为1 + */ + Quantity?: number; +} + +/** + * DescribeUMemPrice - 获取UMem实例价格信息 + */ +export interface DescribeUMemPriceResponse { + /** + * 价格 参数见 UMemPriceSet + */ + DataSet?: { + /** + * Year, Month, Dynamic,Trial + */ + ChargeType?: string; + /** + * 现价 + */ + Price?: number; + /** + * 原价 + */ + OriginalPrice?: number; + }[]; +} + +/** + * DescribeUMemSpace - 获取UMem内存空间列表 + */ +export interface DescribeUMemSpaceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 返回数据长度, 默认为20 + */ + Limit?: number; + /** + * 内存空间ID (无ID,则获取所有) + */ + SpaceId?: string; + /** + * 协议类型: memcache, redis + */ + Protocol?: string; +} + +/** + * DescribeUMemSpace - 获取UMem内存空间列表 + */ +export interface DescribeUMemSpaceResponse { + /** + * JSON 格式的UMem内存空间实例列表, 详细参见 UMemSpaceSet + */ + DataSet?: { + /** + * 可用区,参见[可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * + */ + Tag: string; + /** + * 运维时间0 //0点1 //1点依次类推 + */ + RewriteTime: number; + /** + * 内存空间ID + */ + SpaceId?: string; + /** + * + */ + SubnetId?: string; + /** + * + */ + VPCId?: string; + /** + * 内存空间名称 + */ + Name?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 到期时间 + */ + ExpireTime?: number; + /** + * 空间类型:single(无热备),double(热备) + */ + Type?: string; + /** + * 协议类型: memcache, redis + */ + Protocol?: string; + /** + * 容量单位GB + */ + Size?: number; + /** + * 使用量单位MB + */ + UsedSize?: number; + /** + * Starting:创建中 Running:运行中 Fail:失败 + */ + State?: string; + /** + * Year, Month, Dynamic, Trial + */ + ChargeType?: string; + /** + * IP端口信息请参见 UMemSpaceAddressSet + */ + Address?: { + /** + * UMem实例访问IP + */ + IP?: string; + /** + * UMem实例访问Port + */ + Port?: number; + }[]; + }[]; + /** + * 根据过滤条件得到的总数 + */ + TotalCount?: number; +} + +/** + * DescribeUMemUpgradePrice - 获取UMem升级价格信息 + */ +export interface DescribeUMemUpgradePriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 购买UMem大小,单位:GB + */ + Size: number; + /** + * 空间类型:single(无热备),double(热备)(默认: double) + */ + Type: string; + /** + * 需要升级的空间的SpaceId + */ + SpaceId: string; +} + +/** + * DescribeUMemUpgradePrice - 获取UMem升级价格信息 + */ +export interface DescribeUMemUpgradePriceResponse { + /** + * 价格 + */ + Price?: number; + /** + * 原价 + */ + OriginalPrice?: number; +} + +/** + * DescribeUMemcacheGroup - 显示Memcache + */ +export interface DescribeUMemcacheGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 组的ID,如果指定则获取描述,否则为列表操 作,需指定Offset/Limit + */ + GroupId?: string; + /** + * 分页显示的起始偏移, 默认值为0 + */ + Offset?: number; + /** + * 分页显示的条目数, 默认值为20 + */ + Limit?: number; +} + +/** + * DescribeUMemcacheGroup - 显示Memcache + */ +export interface DescribeUMemcacheGroupResponse { + /** + * 组的总的节点个数 + */ + TotalCount?: number; + /** + * 组列表,参见 UMemcacheGroupSet + */ + DataSet?: { + /** + * 组ID + */ + GroupId?: string; + /** + * 组名称 + */ + Name?: string; + /** + * 节点的配置ID + */ + ConfigId?: string; + /** + * 节点的虚拟IP地址 + */ + VirtualIP?: string; + /** + * 节点分配的服务端口 + */ + Port?: number; + /** + * 容量单位GB + */ + Size?: number; + /** + * 使用量单位MB + */ + UsedSize?: number; + /** + * Memcache版本信息,默认为1.4.31 + */ + Version?: string; + /** + * 状态标记 Creating // 初始化中 CreateFail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中 + */ + State?: string; + /** + * 创建时间 (UNIX时间戳) + */ + CreateTime?: number; + /** + * 修改时间 (UNIX时间戳) + */ + ModifyTime?: number; + /** + * 过期时间 (UNIX时间戳) + */ + ExpireTime?: number; + /** + * 计费类型:Year,Month,Dynamic 默认Dynamic + */ + ChargeType?: string; + /** + * 业务组名称 + */ + Tag?: string; + }[]; +} + +/** + * DescribeUMemcachePrice - 获取umemcache组价格信息 + */ +export interface DescribeUMemcachePriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 容量大小,单位:GB 取值范围[1-32] + */ + Size: number; + /** + * 计费模式,Year, Month, Dynamic,默认: Dynamic 默认: 获取所有计费模式的价格 + */ + ChargeType?: string; + /** + * 购买umemcache的时长,默认值为1 + */ + Quantity?: number; + /** + * 空间类型:single(无热备),double(热备)(默认: double) + */ + Type?: string; +} + +/** + * DescribeUMemcachePrice - 获取umemcache组价格信息 + */ +export interface DescribeUMemcachePriceResponse { + /** + * 价格列表, 参见 UMemcachePriceSet + */ + DataSet?: { + /** + * 计费模式,Year, Month, Dynamic + */ + ChargeType?: string; + /** + * 总价格 + */ + Price?: number; + /** + * 产品列表价 + */ + ListPrice?: number; + /** + * 原价 + */ + OriginalPrice?: number; + }[]; +} + +/** + * DescribeUMemcacheUpgradePrice - 获取umemcache升级价格信息 + */ +export interface DescribeUMemcacheUpgradePriceRequest { + /** + * 购买umemcache大小,单位:GB + */ + Size: number; + /** + * 需要升级的空间的GroupId,请参考DescribeUMemcacheGroup接口 + */ + GroupId: string; +} + +/** + * DescribeUMemcacheUpgradePrice - 获取umemcache升级价格信息 + */ +export interface DescribeUMemcacheUpgradePriceResponse { + /** + * 价格,单位:元 + */ + Price?: number; +} + +/** + * DescribeURedisBackup - 查询主备redis备份 + */ +export interface DescribeURedisBackupRequest { + /** + * 分页显示的起始偏移, 默认值为0 + */ + Offset?: number; + /** + * 分页显示的条目数, 默认值为10 + */ + Limit?: number; + /** + * 组的ID + */ + GroupId?: string; +} + +/** + * DescribeURedisBackup - 查询主备redis备份 + */ +export interface DescribeURedisBackupResponse { + /** + * 用户名下总的备份个数 + */ + TotalCount?: number; + /** + * 备份列表 参见 URedisBackupSet + */ + DataSet?: { + /** + * 备份ID + */ + BackupId?: string; + /** + * 可用区,参见[可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 对应的实例ID + */ + GroupId?: string; + /** + * 组名称 + */ + GroupName?: string; + /** + * 备份的名称 + */ + BackupName?: string; + /** + * 备份时间 (UNIX时间戳) + */ + BackupTime?: number; + /** + * 备份文件大小, 以字节为单位 + */ + BackupSize?: number; + /** + * 备份类型: Manual 手动 Auto 自动 + */ + BackupType?: string; + /** + * 备份的状态: Backuping 备份中 Success 备份成功 Error 备份失败 Expired 备份过期 + */ + State?: string; + }[]; +} + +/** + * DescribeURedisBackupURL - 获取主备Redis备份下载链接 + */ +export interface DescribeURedisBackupURLRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 备份ID + */ + BackupId: string; + /** + * 是否是跨机房URedis(默认false) + */ + RegionFlag?: boolean; + /** + * 实例名称 + */ + GroupId?: string; + /** + * 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + */ + SlaveZone?: string; +} + +/** + * DescribeURedisBackupURL - 获取主备Redis备份下载链接 + */ +export interface DescribeURedisBackupURLResponse { + /** + * 备份文件公网的地址 + */ + BackupURL?: string; + /** + * 备份文件公网的地址 + */ + BackupPath?: string; +} + +/** + * DescribeURedisConfig - 查询主备Redis所有配置文件 + */ +export interface DescribeURedisConfigRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 是否是跨机房URedis(默认false) + */ + RegionFlag: boolean; + /** + * Redis版本号 + */ + Version?: string; + /** + * 配置文件ID + */ + ConfigId?: string; + /** + * 页显示的起始偏移, 默认值为0 + */ + Offset?: number; + /** + * 页显示的条目数, 默认值为10 + */ + Limit?: number; +} + +/** + * DescribeURedisConfig - 查询主备Redis所有配置文件 + */ +export interface DescribeURedisConfigResponse { + /** + * 根据过滤条件得到的总数 + */ + TotalCount?: number; + /** + * 配置文件列表 参见 URedisConfigSet + */ + DataSet?: { + /** + * Zone + */ + Zone?: string; + /** + * 配置ID + */ + ConfigId?: string; + /** + * 配置名称 + */ + Name?: string; + /** + * 配置描述 + */ + Description?: string; + /** + * 配置对应的Redis版本 + */ + Version?: string; + /** + * 置是否可以修改 + */ + IsModify?: string; + /** + * 配置所处的状态 + */ + State?: string; + /** + * 创建时间 (UNIX时间戳) + */ + CreateTime?: number; + /** + * 修改时间 (UNIX时间戳) + */ + ModifyTime?: number; + /** + * 是否是跨机房URedis(默认false) + */ + RegionFlag?: boolean; + }[]; +} + +/** + * DescribeURedisGroup - 查询主备Redis + */ +export interface DescribeURedisGroupRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 组的ID,如果指定则获取描述,否则为列表操 作,需指定Offset/Limit + */ + GroupId?: string; + /** + * 分页显示的起始偏移, 默认值为0 + */ + Offset?: number; + /** + * 分页显示的条目数, 默认值为20 + */ + Limit?: number; +} + +/** + * DescribeURedisGroup - 查询主备Redis + */ +export interface DescribeURedisGroupResponse { + /** + * 组的总的节点个数 + */ + TotalCount?: number; + /** + * 组列表 参见 URedisGroupSet + */ + DataSet?: { + /** + * 实例所在可用区,或者master redis所在可用区,参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 返回运维时间 0 //0点 1 //1点 以此类推 + */ + RewriteTime: number; + /** + * 实例类型 + */ + Role: string; + /** + * vpcid + */ + VPCId?: string; + /** + * subnetid + */ + SubnetId?: string; + /** + * 组ID + */ + GroupId?: string; + /** + * 组名称 + */ + Name?: string; + /** + * 空间类型:single(无热备),double(热备) + */ + Type?: string; + /** + * 协议 + */ + Protocol?: string; + /** + * 容量单位GB + */ + MemorySize?: number; + /** + * 组名称 + */ + GroupName?: string; + /** + * 节点的配置ID + */ + ConfigId?: string; + /** + * 节点的虚拟IP地址 + */ + VirtualIP?: string; + /** + * 节点分配的服务端口 + */ + Port?: number; + /** + * 容量单位GB + */ + Size?: number; + /** + * 使用量单位MB + */ + UsedSize?: number; + /** + * 是否需要自动备份,enable,disable + */ + AutoBackup?: string; + /** + * 组自动备份开始时间,单位小时计,范围[0-23] + */ + BackupTime?: number; + /** + * 是否开启高可用,enable,disable + */ + HighAvailability?: string; + /** + * Redis版本信息 + */ + Version?: string; + /** + * 过期时间 (UNIX时间戳) + */ + ExpireTime?: number; + /** + * 计费类型:Year,Month,Dynamic 默认Dynamic + */ + ChargeType?: string; + /** + * 状态标记 Creating // 初始化中 CreateFail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败 + */ + State?: string; + /** + * 创建时间 (UNIX时间戳) + */ + CreateTime?: number; + /** + * 修改时间 (UNIX时间戳) + */ + ModifyTime?: number; + /** + * 业务组名称 + */ + Tag?: string; + /** + * 跨机房URedis,slave redis所在可用区,参见 [可用区列表](../summary/regionlist.html) + */ + SlaveZone?: string; + }[]; +} + +/** + * DescribeURedisPrice - 取uredis价格信息 + */ +export interface DescribeURedisPriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 量大小,单位:GB 取值范围[1-32] + */ + Size: number; + /** + * 计费模式,Year, Month, Dynamic;如果不指定,则一次性获取三种计费 + */ + ChargeType?: string; + /** + * 计费模式为Dynamic时,购买的时长, 默认为1 + */ + Quantity?: number; + /** + * 是否是跨机房URedis(默认false) + */ + RegionFlag?: boolean; + /** + * 产品类型:MS_Redis(标准主备版),S_Redis(从库),默认为MS_Redis + */ + ProductType?: string; +} + +/** + * DescribeURedisPrice - 取uredis价格信息 + */ +export interface DescribeURedisPriceResponse { + /** + * 价格 参数见 UMemPriceSet + */ + DataSet?: { + /** + * 原价 + */ + OriginalPrice: number; + /** + * Year, Month, Dynamic,Trial + */ + ChargeType?: string; + /** + * 产品列表价 + */ + ListPrice?: number; + /** + * 总价格 + */ + Price?: number; + }[]; +} + +/** + * DescribeURedisSlowlog - 查询URedis慢日志 + */ +export interface DescribeURedisSlowlogRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 资源ID + */ + GroupId: string; + /** + * 分页显示的条目数,默认为10 + */ + Limit?: number; +} + +/** + * DescribeURedisSlowlog - 查询URedis慢日志 + */ +export interface DescribeURedisSlowlogResponse { + /** + * 总条目数 + */ + TotalCount: number; + /** + * 条目数据 + */ + DataSet?: { + /** + * 查询发生的时间 + */ + StartTime?: number; + /** + * 查询消耗的时间 + */ + SpendTime?: number; + /** + * 查询命令 + */ + Command?: string; + }[]; +} + +/** + * DescribeURedisUpgradePrice - 获取uredis升级价格信息 + */ +export interface DescribeURedisUpgradePriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 购买uredis大小,单位:GB,范围是[1-32] + */ + Size: number; + /** + * 要升级的空间的GroupId,请参考DescribeURedisGroup接口 + */ + GroupId: string; +} + +/** + * DescribeURedisUpgradePrice - 获取uredis升级价格信息 + */ +export interface DescribeURedisUpgradePriceResponse { + /** + * 扩容差价,单位: 元,保留小数点后两位有效数字 + */ + Price?: number; +} + +/** + * DescribeURedisVersion - 获取主Redis可用版本 + */ +export interface DescribeURedisVersionRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; +} + +/** + * DescribeURedisVersion - 获取主Redis可用版本 + */ +export interface DescribeURedisVersionResponse { + /** + * 组列表 参见 URedisVersionSet + */ + DataSet?: { + /** + * Redis版本 + */ + Version?: string; + }[]; + /** + * 总版本个数 + */ + TotalCount?: number; +} + +/** + * FlushallURedisGroup - 清除主备redis数据 + */ +export interface FlushallURedisGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 组的ID + */ + GroupId: string; + /** + * FlushDb或FlushAll + */ + FlushType: string; + /** + * 清空的db,FlushType为FlushDb,此项为必传项 + */ + DbNum?: number; + /** + * company_id + */ + TopOrganizationId?: number; + /** + * OrganizationId + */ + OrganizationId?: number; + /** + * 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + */ + SlaveZone?: string; +} + +/** + * FlushallURedisGroup - 清除主备redis数据 + */ +export interface FlushallURedisGroupResponse {} + +/** + * GetUMemSpaceState - 获取UMem内存空间列表 + */ +export interface GetUMemSpaceStateRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 内存空间ID + */ + SpaceId: string; +} + +/** + * GetUMemSpaceState - 获取UMem内存空间列表 + */ +export interface GetUMemSpaceStateResponse { + /** + * Starting:创建中 Running:运行中 Fail:失败 + */ + State?: string; +} + +/** + * ModifyUMemSpaceName - 修改UMem内存空间名称 + */ +export interface ModifyUMemSpaceNameRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * UMem内存空间ID + */ + SpaceId: string; + /** + * 新的名称,长度(6<=size<=63) + */ + Name: string; +} + +/** + * ModifyUMemSpaceName - 修改UMem内存空间名称 + */ +export interface ModifyUMemSpaceNameResponse {} + +/** + * ModifyURedisGroupName - 修改主备redis名称 + */ +export interface ModifyURedisGroupNameRequest { + /** + * 组的ID + */ + GroupId: string; + /** + * Redis组名称 (范围[6-63],只能包含英文、数字以及符号-和_) + */ + Name: string; +} + +/** + * ModifyURedisGroupName - 修改主备redis名称 + */ +export interface ModifyURedisGroupNameResponse {} + +/** + * ModifyURedisGroupPassword - 修改主备密码/重置密码 + */ +export interface ModifyURedisGroupPasswordRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 组的ID + */ + GroupId: string; + /** + * 新密码字符串,要求长度为6~36个字符,且只能包含英文、数字以及-和下划线;并且需要base64加密;如要取消密码,此值为空字符串, + */ + Password: string; +} + +/** + * ModifyURedisGroupPassword - 修改主备密码/重置密码 + */ +export interface ModifyURedisGroupPasswordResponse {} + +/** + * RemoveUDRedisData - 清除udredis实例数据 + */ +export interface RemoveUDRedisDataRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 实例id + */ + SpaceId: string; +} + +/** + * RemoveUDRedisData - 清除udredis实例数据 + */ +export interface RemoveUDRedisDataResponse {} + +/** + * ResizeUMemSpace - 调整内存空间容量 + */ +export interface ResizeUMemSpaceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * UMem 内存空间Id + */ + SpaceId: string; + /** + * 内存大小, 单位:GB (需要大于原size,<= 1024) + */ + Size: number; + /** + * 使用的代金券Id + */ + CouponId?: string; +} + +/** + * ResizeUMemSpace - 调整内存空间容量 + */ +export interface ResizeUMemSpaceResponse {} + +/** + * ResizeURedisGroup - 通过调用CheckURedisAllowance接口,检查资源情况,根据不同情形来调整主备redis容量,其中主要包括可用区资源不足无法扩容,主备所在宿主机资源不足需要迁移完成扩容(需要主从切换,会闪断及负载升高),以及直接扩容(业务无感知) + */ +export interface ResizeURedisGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 组ID + */ + GroupId: string; + /** + * 内存大小, 单位:GB (需要大于原size,且小于等于32) 目前仅支持1/2/4/8/16/32 G 六种容量规格 + */ + Size: number; + /** + * + */ + ChargeType?: string; + /** + * 空间类型:single(无热备),double(热备)(默认: double) + */ + Type?: string; + /** + * 代金券ID 请参考DescribeCoupon接口 + */ + CouponId?: number; +} + +/** + * ResizeURedisGroup - 通过调用CheckURedisAllowance接口,检查资源情况,根据不同情形来调整主备redis容量,其中主要包括可用区资源不足无法扩容,主备所在宿主机资源不足需要迁移完成扩容(需要主从切换,会闪断及负载升高),以及直接扩容(业务无感知) + */ +export interface ResizeURedisGroupResponse {} + +/** + * RestartUMemcacheGroup - 重启单机Memcache + */ +export interface RestartUMemcacheGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 组的ID + */ + GroupId: string; +} + +/** + * RestartUMemcacheGroup - 重启单机Memcache + */ +export interface RestartUMemcacheGroupResponse {} + +/** + * RestartURedisGroup - 重启主备实例 + */ +export interface RestartURedisGroupRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 资源ID + */ + GroupId: string; +} + +/** + * RestartURedisGroup - 重启主备实例 + */ +export interface RestartURedisGroupResponse {} + +/** + * UpdateURedisBackupStrategy - URedisBackupStrategy + */ +export interface UpdateURedisBackupStrategyRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 组的ID + */ + GroupId: string; + /** + * 备份时间,默认为0 + */ + BackupTime: string; + /** + * 是否打开默认备份功能。enable(打开),disable(关闭),默认enable + */ + AutoBackup?: string; + /** + * 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + */ + SlaveZone?: string; +} + +/** + * UpdateURedisBackupStrategy - URedisBackupStrategy + */ +export interface UpdateURedisBackupStrategyResponse {} diff --git a/src/services/unet/index.ts b/src/services/unet/index.ts new file mode 100644 index 0000000..a9d8499 --- /dev/null +++ b/src/services/unet/index.ts @@ -0,0 +1,1561 @@ +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 **unet** service + */ +export default class UNetClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * AllocateEIP - 根据提供信息, 申请弹性IP + * + * See also: https://docs.ucloud.cn/api/unet-api/allocate_eip + */ + allocateEIP(request?: AllocateEIPRequest): Promise { + const args = { Action: 'AllocateEIP', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AllocateEIPResponse + ); + } + + /** + * AllocateShareBandwidth - 开通共享带宽 + * + * See also: https://docs.ucloud.cn/api/unet-api/allocate_share_bandwidth + */ + allocateShareBandwidth( + request?: AllocateShareBandwidthRequest + ): Promise { + const args = { Action: 'AllocateShareBandwidth', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AllocateShareBandwidthResponse + ); + } + + /** + * AssociateEIPWithShareBandwidth - 将EIP加入共享带宽 + * + * See also: https://docs.ucloud.cn/api/unet-api/associate_eip_with_share_bandwidth + */ + associateEIPWithShareBandwidth( + request?: AssociateEIPWithShareBandwidthRequest + ): Promise { + const args = { + Action: 'AssociateEIPWithShareBandwidth', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AssociateEIPWithShareBandwidthResponse + ); + } + + /** + * BindEIP - 将尚未使用的弹性IP绑定到指定的资源 + * + * See also: https://docs.ucloud.cn/api/unet-api/bind_eip + */ + bindEIP(request?: BindEIPRequest): Promise { + const args = { Action: 'BindEIP', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as BindEIPResponse + ); + } + + /** + * CreateBandwidthPackage - 为非共享带宽模式下, 已绑定资源实例的带宽计费弹性IP附加临时带宽包 + * + * See also: https://docs.ucloud.cn/api/unet-api/create_bandwidth_package + */ + createBandwidthPackage( + request?: CreateBandwidthPackageRequest + ): Promise { + const args = { Action: 'CreateBandwidthPackage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateBandwidthPackageResponse + ); + } + + /** + * CreateFirewall - 创建防火墙 + * + * See also: https://docs.ucloud.cn/api/unet-api/create_firewall + */ + createFirewall( + request?: CreateFirewallRequest + ): Promise { + const args = { Action: 'CreateFirewall', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateFirewallResponse + ); + } + + /** + * DeleteBandwidthPackage - 删除弹性IP上已附加带宽包 + * + * See also: https://docs.ucloud.cn/api/unet-api/delete_bandwidth_package + */ + deleteBandwidthPackage( + request?: DeleteBandwidthPackageRequest + ): Promise { + const args = { Action: 'DeleteBandwidthPackage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteBandwidthPackageResponse + ); + } + + /** + * DeleteFirewall - 删除防火墙 + * + * See also: https://docs.ucloud.cn/api/unet-api/delete_firewall + */ + deleteFirewall( + request?: DeleteFirewallRequest + ): Promise { + const args = { Action: 'DeleteFirewall', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteFirewallResponse + ); + } + + /** + * DescribeBandwidthPackage - 获取某地域下的带宽包信息 + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_bandwidth_package + */ + describeBandwidthPackage( + request?: DescribeBandwidthPackageRequest + ): Promise { + const args = { Action: 'DescribeBandwidthPackage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeBandwidthPackageResponse + ); + } + + /** + * DescribeBandwidthUsage - 获取带宽用量信息 + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_bandwidth_usage + */ + describeBandwidthUsage( + request?: DescribeBandwidthUsageRequest + ): Promise { + const args = { Action: 'DescribeBandwidthUsage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeBandwidthUsageResponse + ); + } + + /** + * DescribeEIP - 获取弹性IP信息 + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_eip + */ + describeEIP(request?: DescribeEIPRequest): Promise { + const args = { Action: 'DescribeEIP', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeEIPResponse + ); + } + + /** + * DescribeFirewall - 获取防火墙组信息 + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_firewall + */ + describeFirewall( + request?: DescribeFirewallRequest + ): Promise { + const args = { Action: 'DescribeFirewall', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeFirewallResponse + ); + } + + /** + * DescribeFirewallResource - 获取防火墙组所绑定资源的外网IP + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_firewall_resource + */ + describeFirewallResource( + request?: DescribeFirewallResourceRequest + ): Promise { + const args = { Action: 'DescribeFirewallResource', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeFirewallResourceResponse + ); + } + + /** + * DescribeShareBandwidth - 获取共享带宽信息 + * + * See also: https://docs.ucloud.cn/api/unet-api/describe_share_bandwidth + */ + describeShareBandwidth( + request?: DescribeShareBandwidthRequest + ): Promise { + const args = { Action: 'DescribeShareBandwidth', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeShareBandwidthResponse + ); + } + + /** + * DisassociateEIPWithShareBandwidth - 将EIP移出共享带宽 + * + * See also: https://docs.ucloud.cn/api/unet-api/disassociate_eip_with_share_bandwidth + */ + disassociateEIPWithShareBandwidth( + request?: DisassociateEIPWithShareBandwidthRequest + ): Promise { + const args = { + Action: 'DisassociateEIPWithShareBandwidth', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DisassociateEIPWithShareBandwidthResponse + ); + } + + /** + * GetEIPPayMode - 获取弹性IP计费模式 + * + * See also: https://docs.ucloud.cn/api/unet-api/get_eip_pay_mode + */ + getEIPPayMode( + request?: GetEIPPayModeRequest + ): Promise { + const args = { Action: 'GetEIPPayMode', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetEIPPayModeResponse + ); + } + + /** + * GetEIPPrice - 获取弹性IP价格 + * + * See also: https://docs.ucloud.cn/api/unet-api/get_eip_price + */ + getEIPPrice(request?: GetEIPPriceRequest): Promise { + const args = { Action: 'GetEIPPrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetEIPPriceResponse + ); + } + + /** + * GetEIPUpgradePrice - 获取弹性IP带宽改动价格 + * + * See also: https://docs.ucloud.cn/api/unet-api/get_eip_upgrade_price + */ + getEIPUpgradePrice( + request?: GetEIPUpgradePriceRequest + ): Promise { + const args = { Action: 'GetEIPUpgradePrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetEIPUpgradePriceResponse + ); + } + + /** + * GrantFirewall - 将防火墙应用到资源上 + * + * See also: https://docs.ucloud.cn/api/unet-api/grant_firewall + */ + grantFirewall( + request?: GrantFirewallRequest + ): Promise { + const args = { Action: 'GrantFirewall', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GrantFirewallResponse + ); + } + + /** + * ModifyEIPBandwidth - 调整弹性IP的外网带宽 + * + * See also: https://docs.ucloud.cn/api/unet-api/modify_eip_bandwidth + */ + modifyEIPBandwidth( + request?: ModifyEIPBandwidthRequest + ): Promise { + const args = { Action: 'ModifyEIPBandwidth', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyEIPBandwidthResponse + ); + } + + /** + * ModifyEIPWeight - 修改弹性IP的外网出口权重 + * + * See also: https://docs.ucloud.cn/api/unet-api/modify_eip_weight + */ + modifyEIPWeight( + request?: ModifyEIPWeightRequest + ): Promise { + const args = { Action: 'ModifyEIPWeight', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyEIPWeightResponse + ); + } + + /** + * ReleaseEIP - 释放弹性IP资源, 所释放弹性IP必须为非绑定状态. + * + * See also: https://docs.ucloud.cn/api/unet-api/release_eip + */ + releaseEIP(request?: ReleaseEIPRequest): Promise { + const args = { Action: 'ReleaseEIP', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ReleaseEIPResponse + ); + } + + /** + * ReleaseShareBandwidth - 关闭共享带宽 + * + * See also: https://docs.ucloud.cn/api/unet-api/release_share_bandwidth + */ + releaseShareBandwidth( + request?: ReleaseShareBandwidthRequest + ): Promise { + const args = { Action: 'ReleaseShareBandwidth', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ReleaseShareBandwidthResponse + ); + } + + /** + * ResizeShareBandwidth - 调整共享带宽的带宽值 + * + * See also: https://docs.ucloud.cn/api/unet-api/resize_share_bandwidth + */ + resizeShareBandwidth( + request?: ResizeShareBandwidthRequest + ): Promise { + const args = { Action: 'ResizeShareBandwidth', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ResizeShareBandwidthResponse + ); + } + + /** + * SetEIPPayMode - 设置弹性IP计费模式, 切换时会涉及付费/退费. + * + * See also: https://docs.ucloud.cn/api/unet-api/set_eip_pay_mode + */ + setEIPPayMode( + request?: SetEIPPayModeRequest + ): Promise { + const args = { Action: 'SetEIPPayMode', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as SetEIPPayModeResponse + ); + } + + /** + * UnBindEIP - 将弹性IP从资源上解绑 + * + * See also: https://docs.ucloud.cn/api/unet-api/un_bind_eip + */ + unBindEIP(request?: UnBindEIPRequest): Promise { + const args = { Action: 'UnBindEIP', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UnBindEIPResponse + ); + } + + /** + * UpdateEIPAttribute - 更新弹性IP名称,业务组,备注等属性字段 + * + * See also: https://docs.ucloud.cn/api/unet-api/update_eip_attribute + */ + updateEIPAttribute( + request?: UpdateEIPAttributeRequest + ): Promise { + const args = { Action: 'UpdateEIPAttribute', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateEIPAttributeResponse + ); + } + + /** + * UpdateFirewall - 更新防火墙规则 + * + * See also: https://docs.ucloud.cn/api/unet-api/update_firewall + */ + updateFirewall( + request?: UpdateFirewallRequest + ): Promise { + const args = { Action: 'UpdateFirewall', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateFirewallResponse + ); + } + + /** + * UpdateFirewallAttribute - 更新防火墙规则 + * + * See also: https://docs.ucloud.cn/api/unet-api/update_firewall_attribute + */ + updateFirewallAttribute( + request?: UpdateFirewallAttributeRequest + ): Promise { + const args = { Action: 'UpdateFirewallAttribute', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateFirewallAttributeResponse + ); + } +} + +/** + * AllocateEIP - 根据提供信息, 申请弹性IP + */ +export interface AllocateEIPRequest { + /** + * 弹性IP线路,枚举值:国际线路, International;BGP线路:Bgp。使用BGP线路的地域:北京二、上海金融云、上海二、广州等,其他地域均使用国际线路。 + */ + OperatorName: string; + /** + * 弹性IP的外网带宽, 单位为Mbps. 共享带宽模式必须指定0M带宽, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-10000] + */ + Bandwidth: number; + /** + * 业务组名称, 默认为 "Default" + */ + Tag?: string; + /** + * 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按需付费(需开启权限); Trial, 试用(需开启权限) 默认为按月付费 + */ + ChargeType?: string; + /** + * 购买的时长, 默认: 1 + */ + Quantity?: number; + /** + * 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. 默认为 "Bandwidth".“PostAccurateBandwidth”:带宽后付费模式 + */ + PayMode?: string; + /** + * 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + */ + ShareBandwidthId?: string; + /** + * 弹性IP的名称, 默认为 "EIP" + */ + Name?: string; + /** + * 弹性IP的备注, 默认为空 + */ + Remark?: string; + /** + * 代金券ID, 默认不使用 + */ + CouponId?: string; +} + +/** + * AllocateEIP - 根据提供信息, 申请弹性IP + */ +export interface AllocateEIPResponse { + /** + * 申请到的EIP资源详情 参见 UnetAllocateEIPSet + */ + EIPSet?: { + /** + * 申请到的EIP资源ID + */ + EIPId?: string; + /** + * 申请到的IPv4地址. + */ + EIPAddr?: { + /** + * 运营商信息如: 国际: International, BGP: BGP + */ + OperatorName?: string; + /** + * IP地址 + */ + IP?: string; + }[]; + }[]; +} + +/** + * AllocateShareBandwidth - 开通共享带宽 + */ +export interface AllocateShareBandwidthRequest { + /** + * 共享带宽名字 + */ + Name: string; + /** + * 付费方式:Year 按年,Month 按月,Dynamic 按时; + */ + ChargeType: string; + /** + * 共享带宽值 + */ + ShareBandwidth: number; + /** + * 购买时长 + */ + Quantity?: number; + /** + * 共享带宽类型,IPv4或者IPv6,不传默认IPv4 + */ + IPVersion?: string; +} + +/** + * AllocateShareBandwidth - 开通共享带宽 + */ +export interface AllocateShareBandwidthResponse { + /** + * 共享带宽资源Id + */ + ShareBandwidthId?: string; +} + +/** + * AssociateEIPWithShareBandwidth - 将EIP加入共享带宽 + */ +export interface AssociateEIPWithShareBandwidthRequest { + /** + * 要加入共享带宽的EIP的资源Id + */ + EIPIds: string[]; + /** + * 共享带宽ID + */ + ShareBandwidthId: string; + /** + * 共享带宽类型,IPv4或者IPv6,不传默认IPv4 + */ + IPVersion?: string; +} + +/** + * AssociateEIPWithShareBandwidth - 将EIP加入共享带宽 + */ +export interface AssociateEIPWithShareBandwidthResponse {} + +/** + * BindEIP - 将尚未使用的弹性IP绑定到指定的资源 + */ +export interface BindEIPRequest { + /** + * 弹性IP的资源Id + */ + EIPId: string; + /** + * 弹性IP请求绑定的资源类型, 枚举值为: uhost: 云主机; ulb, 负载均衡器 upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;natgw:natgw;udb:udb;vpngw:ipsec vpn;ucdr:云灾备;dbaudit:数据库审计;uni:虚拟网卡;cube,Cube容器。如果EIP为普通带宽计费,且带宽值高于2G,则只允许绑定在快杰型云主机和ULB + */ + ResourceType: string; + /** + * 弹性IP请求绑定的资源ID + */ + ResourceId: string; +} + +/** + * BindEIP - 将尚未使用的弹性IP绑定到指定的资源 + */ +export interface BindEIPResponse {} + +/** + * CreateBandwidthPackage - 为非共享带宽模式下, 已绑定资源实例的带宽计费弹性IP附加临时带宽包 + */ +export interface CreateBandwidthPackageRequest { + /** + * 带宽大小(单位Mbps), 取值范围[2,800] (最大值受地域限制) + */ + Bandwidth: number; + /** + * 所绑定弹性IP的资源ID + */ + EIPId: string; + /** + * 带宽包有效时长, 取值范围为大于0的整数, 即该带宽包在EnableTime到 EnableTime+TimeRange时间段内生效 + */ + TimeRange: number; + /** + * 生效时间, 格式为 Unix timestamp, 默认为立即开通 + */ + EnableTime?: number; + /** + * 代金券ID + */ + CouponId?: string; +} + +/** + * CreateBandwidthPackage - 为非共享带宽模式下, 已绑定资源实例的带宽计费弹性IP附加临时带宽包 + */ +export interface CreateBandwidthPackageResponse { + /** + * 所创建带宽包的资源ID + */ + BandwidthPackageId?: string; +} + +/** + * CreateFirewall - 创建防火墙 + */ +export interface CreateFirewallRequest { + /** + * 防火墙规则,例如:TCP|22|192.168.1.1/22|DROP|LOW|禁用22端口,第一个参数代表协议:第二个参数代表端口号,第三个参数为ip,第四个参数为ACCEPT(接受)和DROP(拒绝),第五个参数优先级:HIGH(高),MEDIUM(中),LOW(低),第六个参数为该条规则的自定义备注,bj1不支持添加备注 + */ + Rule: string[]; + /** + * 防火墙名称 + */ + Name: string; + /** + * 防火墙业务组,默认为Default + */ + Tag?: string; + /** + * 防火墙描述,默认为空 + */ + Remark?: string; +} + +/** + * CreateFirewall - 创建防火墙 + */ +export interface CreateFirewallResponse { + /** + * 防火墙ID + */ + FWId?: string; +} + +/** + * DeleteBandwidthPackage - 删除弹性IP上已附加带宽包 + */ +export interface DeleteBandwidthPackageRequest { + /** + * 带宽包资源ID + */ + BandwidthPackageId: string; +} + +/** + * DeleteBandwidthPackage - 删除弹性IP上已附加带宽包 + */ +export interface DeleteBandwidthPackageResponse {} + +/** + * DeleteFirewall - 删除防火墙 + */ +export interface DeleteFirewallRequest { + /** + * 防火墙资源ID + */ + FWId: string; +} + +/** + * DeleteFirewall - 删除防火墙 + */ +export interface DeleteFirewallResponse {} + +/** + * DescribeBandwidthPackage - 获取某地域下的带宽包信息 + */ +export interface DescribeBandwidthPackageRequest { + /** + * 返回数据分页值, 取值范围为 [0,10000000] 之间的整数, 默认为20 + */ + Limit?: number; + /** + * 返回数据偏移量, 默认为0 + */ + Offset?: number; +} + +/** + * DescribeBandwidthPackage - 获取某地域下的带宽包信息 + */ +export interface DescribeBandwidthPackageResponse { + /** + * 满足条件的带宽包总数 + */ + TotalCount?: number; + /** + * 带宽包详细信息, 参见 UnetBandwidthPackageSet + */ + DataSets?: { + /** + * 带宽包的资源ID + */ + BandwidthPackageId?: string; + /** + * 生效时间, 格式为 Unix Timestamp + */ + EnableTime?: number; + /** + * 失效时间, 格式为 Unix Timestamp + */ + DisableTime?: number; + /** + * 创建时间, 格式为 Unix Timestamp + */ + CreateTime?: number; + /** + * 带宽包的临时带宽值, 单位Mbps + */ + Bandwidth?: number; + /** + * 带宽包所绑定弹性IP的资源ID + */ + EIPId?: string; + /** + * 带宽包所绑定弹性IP的详细信息,只有当EIPId对应双线IP时, EIPAddr的长度为2, 其他情况, EIPAddr长度均为1.参见 EIPAddrSet + */ + EIPAddr?: { + /** + * 运营商信息, 枚举值为: BGP: BGP; International: 国际. + */ + OperatorName?: string; + /** + * 弹性IP地址 + */ + IP?: string; + }[]; + }[]; +} + +/** + * DescribeBandwidthUsage - 获取带宽用量信息 + */ +export interface DescribeBandwidthUsageRequest { + /** + * 返回数据分页值, 取值范围为 [0,10000000] 之间的整数, 默认为20 + */ + Limit?: number; + /** + * 返回数据偏移量, 默认为0 + */ + OffSet?: number; + /** + * 弹性IP的资源Id. 如果为空, 则返回当前 Region中符合条件的所有EIP的带宽用量, n为自然数 + */ + EIPIds?: string[]; +} + +/** + * DescribeBandwidthUsage - 获取带宽用量信息 + */ +export interface DescribeBandwidthUsageResponse { + /** + * EIPSet中的元素个数 + */ + TotalCount?: number; + /** + * 单个弹性IP的带宽用量详细信息, 详见 UnetBandwidthUsageEIPSet, 如没有弹性IP资源则没有该返回值。 + */ + EIPSet?: { + /** + * 最近5分钟带宽用量, 单位Mbps + */ + CurBandwidth?: number; + /** + * 弹性IP资源ID + */ + EIPId?: string; + }[]; +} + +/** + * DescribeEIP - 获取弹性IP信息 + */ +export interface DescribeEIPRequest { + /** + * 弹性IP的资源ID如果为空, 则返回当前 Region中符合条件的的所有EIP + */ + EIPIds?: string[]; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 数据分页值, 默认为20 + */ + Limit?: number; + /** + * IP地址,支持通过ip查询,如果ip与EIP都传,会取并集查询 + */ + IPs?: string[]; +} + +/** + * DescribeEIP - 获取弹性IP信息 + */ +export interface DescribeEIPResponse { + /** + * 满足条件的弹性IP总数 + */ + TotalCount?: number; + /** + * 未绑定的弹性IP总数 + */ + UnbindCount?: number; + /** + * 满足条件的弹性IP带宽总和, 单位Mbps + */ + TotalBandwidth?: number; + /** + * 弹性IP列表, 每项参数详见 UnetEIPSet + */ + EIPSet?: { + /** + * 弹性IP的资源ID + */ + EIPId?: string; + /** + * 外网出口权重, 默认为50, 范围[0-100] + */ + Weight?: number; + /** + * 带宽模式, 枚举值为: 0: 非共享带宽模式, 1: 共享带宽模式 + */ + BandwidthType?: number; + /** + * 弹性IP的带宽, 单位为Mbps, 当BandwidthType=1时, 该处显示为共享带宽值. 当BandwidthType=0时, 该处显示这个弹性IP的带宽. + */ + Bandwidth?: number; + /** + * 弹性IP的资源绑定状态, 枚举值为: used: 已绑定, free: 未绑定, freeze: 已冻结 + */ + Status?: string; + /** + * 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按小时付费; Trial, 试用. 按小时付费和试用这两种付费模式需要开通权限. + */ + ChargeType?: string; + /** + * 弹性IP的创建时间, 格式为Unix Timestamp + */ + CreateTime?: number; + /** + * 弹性IP的到期时间, 格式为Unix Timestamp + */ + ExpireTime?: number; + /** + * 弹性IP的详细信息列表, 具体结构见下方 UnetEIPResourceSet + */ + Resource?: { + /** + * 已绑定的资源类型, 枚举值为: uhost, 云主机;natgw:NAT网关;ulb:负载均衡器;upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;vpngw:IPSec VPN;ucdr:云灾备;dbaudit:数据库审计,uni:虚拟网卡。 + */ + ResourceType?: string; + /** + * 已绑定的资源名称 + */ + ResourceName?: string; + /** + * 已绑定资源的资源ID + */ + ResourceID?: string; + /** + * 资源绑定的虚拟网卡的类型。uni,虚拟网卡。 + */ + SubResourceType?: string; + /** + * 资源绑定的虚拟网卡的名称 + */ + SubResourceName?: string; + /** + * 资源绑定的虚拟网卡的ID + */ + SubResourceId?: string; + /** + * 弹性IP的资源ID + */ + EIPId?: string; + }; + /** + * 弹性IP的详细信息列表, 具体结构见下方 UnetEIPAddrSet + */ + EIPAddr?: { + /** + * 运营商信息如: 国际: International, BGP: BGP + */ + OperatorName?: string; + /** + * IP地址 + */ + IP?: string; + }[]; + /** + * 弹性IP的名称,缺省值为 "EIP" + */ + Name?: string; + /** + * 弹性IP的业务组标识, 缺省值为 "Default" + */ + Tag?: string; + /** + * 弹性IP的备注, 缺省值为 "" + */ + Remark?: string; + /** + * 弹性IP的计费模式, 枚举值为: "Bandwidth", 带宽计费; "Traffic", 流量计费; "ShareBandwidth",共享带宽模式. 默认为 "Bandwidth". + */ + PayMode?: string; + /** + * 共享带宽信息 参见 ShareBandwidthSet + */ + ShareBandwidthSet?: { + /** + * 共享带宽带宽值 + */ + ShareBandwidth?: number; + /** + * 共享带宽的资源名称 + */ + ShareBandwidthName?: string; + /** + * 共享带宽ID + */ + ShareBandwidthId?: string; + }; + /** + * 弹性IP是否到期 + */ + Expire?: boolean; + }[]; +} + +/** + * DescribeFirewall - 获取防火墙组信息 + */ +export interface DescribeFirewallRequest { + /** + * 防火墙ID,默认为返回所有防火墙 + */ + FWId?: string; + /** + * 绑定防火墙组的资源类型,默认为全部资源类型。枚举值为:"unatgw",NAT网关; "uhost",云主机; "upm",物理云主机; "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计. + */ + ResourceType?: string; + /** + * 绑定防火墙组的资源ID + */ + ResourceId?: string; + /** + * 返回数据长度,默认为20,最大10000000 + */ + Limit?: number; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; +} + +/** + * DescribeFirewall - 获取防火墙组信息 + */ +export interface DescribeFirewallResponse { + /** + * 获取的防火墙组详细信息 参见 FirewallDataSet + */ + DataSet?: { + /** + * 防火墙ID + */ + FWId: string; + /** + * 安全组ID(即将废弃) + */ + GroupId: string; + /** + * 防火墙名称 + */ + Name?: string; + /** + * 防火墙业务组 + */ + Tag?: string; + /** + * 防火墙备注 + */ + Remark?: string; + /** + * 防火墙绑定资源数量 + */ + ResourceCount?: number; + /** + * 防火墙组创建时间,格式为Unix Timestamp + */ + CreateTime?: number; + /** + * 防火墙组类型,枚举值为: "user defined", 用户自定义防火墙; "recommend web", 默认Web防火墙; "recommend non web", 默认非Web防火墙 + */ + Type?: string; + /** + * 防火墙组中的规则列表,参见 FirewallRuleSet + */ + Rule?: { + /** + * 源地址 + */ + SrcIP?: string; + /** + * 优先级 + */ + Priority?: string; + /** + * 协议类型 + */ + ProtocolType?: string; + /** + * 目标端口 + */ + DstPort?: string; + /** + * 防火墙动作 + */ + RuleAction?: string; + /** + * 防火墙规则备注 + */ + Remark?: string; + }[]; + }[]; +} + +/** + * DescribeFirewallResource - 获取防火墙组所绑定资源的外网IP + */ +export interface DescribeFirewallResourceRequest { + /** + * 防火墙ID + */ + FWId: string; + /** + * 返回数据长度,默认为20,最大10000000 + */ + Limit?: number; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; +} + +/** + * DescribeFirewallResource - 获取防火墙组所绑定资源的外网IP + */ +export interface DescribeFirewallResourceResponse { + /** + * 资源列表,见 ResourceSet + */ + ResourceSet?: { + /** + * 可用区 + */ + Zone?: number; + /** + * 名称 + */ + Name?: string; + /** + * 内网IP + */ + PrivateIP?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 绑定该防火墙的资源id + */ + ResourceID?: string; + /** + * 绑定防火墙组的资源类型。"unatgw",NAT网关; "uhost",云主机; "upm",物理云主机; "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计. + */ + ResourceType?: string; + /** + * 状态 + */ + Status?: number; + /** + * 业务组 + */ + Tag?: string; + }[]; + /** + * 绑定资源总数 + */ + TotalCount?: number; +} + +/** + * DescribeShareBandwidth - 获取共享带宽信息 + */ +export interface DescribeShareBandwidthRequest { + /** + * 需要返回的共享带宽Id + */ + ShareBandwidthIds?: string[]; +} + +/** + * DescribeShareBandwidth - 获取共享带宽信息 + */ +export interface DescribeShareBandwidthResponse { + /** + * 共享带宽信息组 参见 UnetShareBandwidthSet + */ + DataSet?: { + /** + * 共享带宽类型 + */ + IPVersion: string; + /** + * 共享带宽值(预付费)/共享带宽峰值(后付费), 单位Mbps + */ + ShareBandwidth?: number; + /** + * 共享带宽的资源ID + */ + ShareBandwidthId?: string; + /** + * 付费方式, 预付费:Year 按年,Month 按月,Dynamic 按需;后付费:PostPay(按月) + */ + ChargeType?: string; + /** + * 创建时间, 格式为Unix Timestamp + */ + CreateTime?: number; + /** + * 过期时间, 格式为Unix Timestamp + */ + ExpireTime?: number; + /** + * EIP信息,详情见 EIPSetData + */ + EIPSet?: { + /** + * EIP带宽值 + */ + Bandwidth?: number; + /** + * EIP的IP信息,详情见EIPAddrSet + */ + EIPAddr?: { + /** + * 运营商信息, 枚举值为: BGP: BGP; International: 国际. + */ + OperatorName?: string; + /** + * 弹性IP地址 + */ + IP?: string; + }[]; + /** + * EIP资源Id + */ + EIPId?: string; + }[]; + /** + * 共享带宽名称 + */ + Name?: string; + }[]; + /** + * 符合条件的共享带宽总数,大于等于返回DataSet长度 + */ + TotalCount?: number; +} + +/** + * DisassociateEIPWithShareBandwidth - 将EIP移出共享带宽 + */ +export interface DisassociateEIPWithShareBandwidthRequest { + /** + * 共享带宽ID + */ + ShareBandwidthId: string; + /** + * 移出共享带宽后,EIP的外网带宽, 单位为Mbps. 各地域带宽范围如下: 流量计费[1-200],带宽计费[1-800] + */ + Bandwidth: number; + /** + * EIP的资源Id;默认移出该共享带宽下所有的EIP + */ + EIPIds?: string[]; + /** + * 移出共享带宽后,EIP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; 默认为 "Bandwidth". + */ + PayMode?: string; + /** + * 共享带宽类型,IPv4或者IPv6,不传默认IPv4 + */ + IPVersion?: string; +} + +/** + * DisassociateEIPWithShareBandwidth - 将EIP移出共享带宽 + */ +export interface DisassociateEIPWithShareBandwidthResponse {} + +/** + * GetEIPPayMode - 获取弹性IP计费模式 + */ +export interface GetEIPPayModeRequest { + /** + * 弹性IP的资源Id + */ + EIPId: string[]; +} + +/** + * GetEIPPayMode - 获取弹性IP计费模式 + */ +export interface GetEIPPayModeResponse { + /** + * EIP的计费模式, 参见 EIPPayModeSet + */ + EIPPayMode?: { + /** + * EIP的资源ID + */ + EIPId?: string; + /** + * EIP的计费模式. 枚举值为:Bandwidth, 带宽计费;Traffic, 流量计费; "ShareBandwidth",共享带宽模式 + */ + EIPPayMode?: string; + }[]; +} + +/** + * GetEIPPrice - 获取弹性IP价格 + */ +export interface GetEIPPriceRequest { + /** + * 弹性IP的线路如下: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International,泉州为移动单线cn-qz:ChinaMobile + */ + OperatorName: string; + /** + * 弹性IP的外网带宽, 单位为Mbps, 范围 [0-800] + */ + Bandwidth: number; + /** + * 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按时付费; 默认为获取三种价格 + */ + ChargeType?: string; + /** + * 弹性IP计费方式r. 枚举值为: Traffic, 流量计费; Bandwidth, 带宽计费; "ShareBandwidth",共享带宽模式. 默认为Bandwidth + */ + PayMode?: string; + /** + * 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末 + */ + Quantity?: number; +} + +/** + * GetEIPPrice - 获取弹性IP价格 + */ +export interface GetEIPPriceResponse { + /** + * 弹性IP价格详情 详情见 EIPPriceDetailSet + */ + PriceSet?: { + /** + * 弹性IP付费方式 + */ + ChargeType?: string; + /** + * 购买弹性IP的实际价格, 单位"元" + */ + Price?: number; + /** + * 弹性IP的原价,单位“元” + */ + OriginalPrice?: number; + /** + * 资源有效期, 以Unix Timestamp表示 + */ + PurchaseValue?: number; + }[]; +} + +/** + * GetEIPUpgradePrice - 获取弹性IP带宽改动价格 + */ +export interface GetEIPUpgradePriceRequest { + /** + * 弹性IP的资源ID + */ + EIPId: string; + /** + * 弹性IP的外网带宽, 单位为Mbps, 范围 [1-800] + */ + Bandwidth: number; +} + +/** + * GetEIPUpgradePrice - 获取弹性IP带宽改动价格 + */ +export interface GetEIPUpgradePriceResponse { + /** + * 调整带宽后的EIP价格, 单位为"元", 如需退费此处为负值 + */ + Price?: number; +} + +/** + * GrantFirewall - 将防火墙应用到资源上 + */ +export interface GrantFirewallRequest { + /** + * 防火墙资源ID + */ + FWId: string; + /** + * 绑定防火墙组的资源类型,默认为全部资源类型。枚举值为:"unatgw",NAT网关; "uhost",云主机; "upm",物理云主机; "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计. + */ + ResourceType: string; + /** + * 所应用资源ID + */ + ResourceId: string; +} + +/** + * GrantFirewall - 将防火墙应用到资源上 + */ +export interface GrantFirewallResponse {} + +/** + * ModifyEIPBandwidth - 调整弹性IP的外网带宽 + */ +export interface ModifyEIPBandwidthRequest { + /** + * 弹性IP的资源ID + */ + EIPId: string; + /** + * 弹性IP的外网带宽, 单位为Mbps. 各地域的带宽值范围如下:流量计费[1-200],带宽计费[1-800] + */ + Bandwidth: number; +} + +/** + * ModifyEIPBandwidth - 调整弹性IP的外网带宽 + */ +export interface ModifyEIPBandwidthResponse {} + +/** + * ModifyEIPWeight - 修改弹性IP的外网出口权重 + */ +export interface ModifyEIPWeightRequest { + /** + * 弹性IP的资源ID + */ + EIPId: string; + /** + * 外网出口权重, 范围[0-100] 取值为0时, 该弹性IP不会被使用. 取值为100时, 同主机下只会使用这个弹性IP,其他弹性IP不会被使用 请勿将多个绑定在同一资源的弹性IP设置为相同权重 + */ + Weight: number; +} + +/** + * ModifyEIPWeight - 修改弹性IP的外网出口权重 + */ +export interface ModifyEIPWeightResponse {} + +/** + * ReleaseEIP - 释放弹性IP资源, 所释放弹性IP必须为非绑定状态. + */ +export interface ReleaseEIPRequest { + /** + * 弹性IP的资源ID + */ + EIPId: string; +} + +/** + * ReleaseEIP - 释放弹性IP资源, 所释放弹性IP必须为非绑定状态. + */ +export interface ReleaseEIPResponse {} + +/** + * ReleaseShareBandwidth - 关闭共享带宽 + */ +export interface ReleaseShareBandwidthRequest { + /** + * 共享带宽ID + */ + ShareBandwidthId: string; + /** + * 关闭共享带宽后,各EIP恢复为的带宽值 + */ + EIPBandwidth: number; + /** + * 默认为 Bandwidth 带宽计费 + */ + PayMode?: string; +} + +/** + * ReleaseShareBandwidth - 关闭共享带宽 + */ +export interface ReleaseShareBandwidthResponse {} + +/** + * ResizeShareBandwidth - 调整共享带宽的带宽值 + */ +export interface ResizeShareBandwidthRequest { + /** + * 带宽值,单位为Mb,范围 [20-5000] (最大值受地域限制) + */ + ShareBandwidth: number; + /** + * 共享带宽的Id + */ + ShareBandwidthId: string; +} + +/** + * ResizeShareBandwidth - 调整共享带宽的带宽值 + */ +export interface ResizeShareBandwidthResponse {} + +/** + * SetEIPPayMode - 设置弹性IP计费模式, 切换时会涉及付费/退费. + */ +export interface SetEIPPayModeRequest { + /** + * 弹性IP的资源Id + */ + EIPId: string; + /** + * 计费模式. 枚举值:"Traffic", 流量计费模式; "Bandwidth", 带宽计费模式 + */ + PayMode: string; + /** + * 调整的目标带宽值, 单位Mbps. 各地域的带宽值范围如下: 流量计费[1-200],其余情况[1-800] + */ + Bandwidth: number; +} + +/** + * SetEIPPayMode - 设置弹性IP计费模式, 切换时会涉及付费/退费. + */ +export interface SetEIPPayModeResponse {} + +/** + * UnBindEIP - 将弹性IP从资源上解绑 + */ +export interface UnBindEIPRequest { + /** + * 弹性IP的资源Id + */ + EIPId: string; + /** + * 弹性IP请求解绑的资源类型, 枚举值为: uhost: 云主机; ulb, 负载均衡器 upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;natgw:NAT网关;udb:udb;vpngw:ipsec vpn;ucdr:云灾备;dbaudit:数据库审计; + */ + ResourceType: string; + /** + * 弹性IP请求解绑的资源ID + */ + ResourceId: string; +} + +/** + * UnBindEIP - 将弹性IP从资源上解绑 + */ +export interface UnBindEIPResponse {} + +/** + * UpdateEIPAttribute - 更新弹性IP名称,业务组,备注等属性字段 + */ +export interface UpdateEIPAttributeRequest { + /** + * EIP资源ID + */ + EIPId: string; + /** + * 名字(Name Tag Remark都为空则报错) + */ + Name?: string; + /** + * 业务 + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; +} + +/** + * UpdateEIPAttribute - 更新弹性IP名称,业务组,备注等属性字段 + */ +export interface UpdateEIPAttributeResponse {} + +/** + * UpdateFirewall - 更新防火墙规则 + */ +export interface UpdateFirewallRequest { + /** + * 防火墙资源ID + */ + FWId: string; + /** + * 防火墙规则,例如:TCP|22|192.168.1.1/22|DROP|LOW|禁用22端口,第一个参数代表协议:第二个参数代表端口号,第三个参数为ip,第四个参数为ACCEPT(接受)和DROP(拒绝),第五个参数优先级:HIGH(高),MEDIUM(中),LOW(低),第六个参数为该条规则的自定义备注 + */ + Rule: string[]; +} + +/** + * UpdateFirewall - 更新防火墙规则 + */ +export interface UpdateFirewallResponse { + /** + * 防火墙id + */ + FWId?: string; +} + +/** + * UpdateFirewallAttribute - 更新防火墙规则 + */ +export interface UpdateFirewallAttributeRequest { + /** + * 防火墙资源ID + */ + FWId: string; + /** + * 防火墙名称,默认为空,为空则不做修改。Name,Tag,Remark必须填写1个及以上 + */ + Name?: string; + /** + * 防火墙业务组,默认为空,为空则不做修改。Name,Tag,Remark必须填写1个及以上 + */ + Tag?: string; + /** + * 防火墙备注,默认为空,为空则不做修改。Name,Tag,Remark必须填写1个及以上 + */ + Remark?: string; +} + +/** + * UpdateFirewallAttribute - 更新防火墙规则 + */ +export interface UpdateFirewallAttributeResponse {} diff --git a/src/services/uphost/index.ts b/src/services/uphost/index.ts new file mode 100644 index 0000000..92b436c --- /dev/null +++ b/src/services/uphost/index.ts @@ -0,0 +1,1175 @@ +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 **uphost** service + */ +export default class UPHostClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * CreatePHost - 指定数据中心,根据资源使用量创建指定数量的UPHost物理云主机实例。 + * + * See also: https://docs.ucloud.cn/api/uphost-api/create_phost + */ + createPHost(request?: CreatePHostRequest): Promise { + const args = { Action: 'CreatePHost', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreatePHostResponse + ); + } + + /** + * DescribeBaremetalMachineType - 获取裸金属机型的详细描述信息 + * + * See also: https://docs.ucloud.cn/api/uphost-api/describe_baremetal_machine_type + */ + describeBaremetalMachineType( + request?: DescribeBaremetalMachineTypeRequest + ): Promise { + const args = { Action: 'DescribeBaremetalMachineType', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeBaremetalMachineTypeResponse + ); + } + + /** + * DescribePHost - 获取物理机详细信息 + * + * See also: https://docs.ucloud.cn/api/uphost-api/describe_phost + */ + describePHost( + request?: DescribePHostRequest + ): Promise { + const args = { Action: 'DescribePHost', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribePHostResponse + ); + } + + /** + * DescribePHostImage - 获取物理云主机镜像列表 + * + * See also: https://docs.ucloud.cn/api/uphost-api/describe_phost_image + */ + describePHostImage( + request?: DescribePHostImageRequest + ): Promise { + const args = { Action: 'DescribePHostImage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribePHostImageResponse + ); + } + + /** + * DescribePHostMachineType - 获取物理云机型的详细描述信息 + * + * See also: https://docs.ucloud.cn/api/uphost-api/describe_phost_machine_type + */ + describePHostMachineType( + request?: DescribePHostMachineTypeRequest + ): Promise { + const args = { Action: 'DescribePHostMachineType', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribePHostMachineTypeResponse + ); + } + + /** + * DescribePHostTags - 获取物理机tag列表(业务组) + * + * See also: https://docs.ucloud.cn/api/uphost-api/describe_phost_tags + */ + describePHostTags( + request?: DescribePHostTagsRequest + ): Promise { + const args = { Action: 'DescribePHostTags', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribePHostTagsResponse + ); + } + + /** + * GetPHostDiskUpgradePrice - 获取物理云裸金属挂载磁盘的升级价格 + * + * See also: https://docs.ucloud.cn/api/uphost-api/get_phost_disk_upgrade_price + */ + getPHostDiskUpgradePrice( + request?: GetPHostDiskUpgradePriceRequest + ): Promise { + const args = { Action: 'GetPHostDiskUpgradePrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetPHostDiskUpgradePriceResponse + ); + } + + /** + * GetPHostPrice - 获取物理机价格列表 + * + * See also: https://docs.ucloud.cn/api/uphost-api/get_phost_price + */ + getPHostPrice( + request?: GetPHostPriceRequest + ): Promise { + const args = { Action: 'GetPHostPrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetPHostPriceResponse + ); + } + + /** + * ModifyPHostInfo - 更改物理机信息 + * + * See also: https://docs.ucloud.cn/api/uphost-api/modify_phost_info + */ + modifyPHostInfo( + request?: ModifyPHostInfoRequest + ): Promise { + const args = { Action: 'ModifyPHostInfo', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyPHostInfoResponse + ); + } + + /** + * PoweroffPHost - 断电物理云主机 + * + * See also: https://docs.ucloud.cn/api/uphost-api/poweroff_phost + */ + poweroffPHost( + request?: PoweroffPHostRequest + ): Promise { + const args = { Action: 'PoweroffPHost', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as PoweroffPHostResponse + ); + } + + /** + * RebootPHost - 重启物理机 + * + * See also: https://docs.ucloud.cn/api/uphost-api/reboot_phost + */ + rebootPHost(request?: RebootPHostRequest): Promise { + const args = { Action: 'RebootPHost', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RebootPHostResponse + ); + } + + /** + * ReinstallPHost - 重装物理机操作系统 + * + * See also: https://docs.ucloud.cn/api/uphost-api/reinstall_phost + */ + reinstallPHost( + request?: ReinstallPHostRequest + ): Promise { + const args = { Action: 'ReinstallPHost', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ReinstallPHostResponse + ); + } + + /** + * ResetPHostPassword - 重置裸金属实例的管理员密码 + * + * See also: https://docs.ucloud.cn/api/uphost-api/reset_phost_password + */ + resetPHostPassword( + request?: ResetPHostPasswordRequest + ): Promise { + const args = { Action: 'ResetPHostPassword', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ResetPHostPasswordResponse + ); + } + + /** + * ResizePHostAttachedDisk - 修改裸金属物理云已经挂载的云盘容量大小 + * + * See also: https://docs.ucloud.cn/api/uphost-api/resize_phost_attached_disk + */ + resizePHostAttachedDisk( + request?: ResizePHostAttachedDiskRequest + ): Promise { + const args = { Action: 'ResizePHostAttachedDisk', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ResizePHostAttachedDiskResponse + ); + } + + /** + * StartPHost - 启动物理机 + * + * See also: https://docs.ucloud.cn/api/uphost-api/start_phost + */ + startPHost(request?: StartPHostRequest): Promise { + const args = { Action: 'StartPHost', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as StartPHostResponse + ); + } + + /** + * TerminatePHost - 删除物理云主机 + * + * See also: https://docs.ucloud.cn/api/uphost-api/terminate_phost + */ + terminatePHost( + request?: TerminatePHostRequest + ): Promise { + const args = { Action: 'TerminatePHost', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as TerminatePHostResponse + ); + } +} + +/** + * CreatePHost - 指定数据中心,根据资源使用量创建指定数量的UPHost物理云主机实例。 + */ +export interface CreatePHostRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * ImageId,可以通过接口 [DescribePHostImage](api/uphost-api/describe_phost_image.html)获取 + */ + ImageId: string; + /** + * 密码(密码需使用base64进行编码) + */ + Password: string; + /** + * 物理机类型,默认为:db-2(基础型-SAS-V3) + */ + Type?: string; + /** + * 物理机名称,默认为phost + */ + Name?: string; + /** + * 物理机备注,默认为空 + */ + Remark?: string; + /** + * 业务组,默认为default + */ + Tag?: string; + /** + * 计费模式,枚举值为:year, 按年付费; month,按月付费;默认为按月付费 + */ + ChargeType?: string; + /** + * 购买时长,1-10个月或1-10年;默认值为1。月付时,此参数传0,代表购买至月末,1代表整月。 + */ + Quantity?: string; + /** + * 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + */ + SecurityGroupId?: string; + /** + * Raid配置,默认Raid10 支持:Raid0、Raid1、Raid5、Raid10,NoRaid + */ + Raid?: string; + /** + * VPC ID,不填为默认,VPC2.0下需要填写此字段。 + */ + VPCId?: string; + /** + * 子网ID,不填为默认,VPC2.0下需要填写此字段。 + */ + SubnetId?: string; + /** + * 网络环境,可选千兆:1G ,万兆:10G, 默认1G。智能网卡可以选择25G。 + */ + Cluster?: string; + /** + * + */ + Disks?: { + /** + * 裸金属机型参数->是否是系统盘。枚举值: True,是系统盘。 False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + */ + IsBoot?: string; + /** + * 裸金属机型参数->磁盘类型:枚举值:CLOUD_RSSD + */ + Type?: string; + /** + * 裸金属机型参数->磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB,数据盘单块盘20-32000GB。 + */ + Size?: number; + /** + * 裸金属机型参数->云盘代金券id。不适用于系统盘。请通过DescribeCoupon接口查询,或登录用户中心查看 + */ + CouponId?: string; + }[]; + /** + * 指定内网ip创建 + */ + VpcIp?: string; + /** + * 代金券 + */ + CouponId?: string; +} + +/** + * CreatePHost - 指定数据中心,根据资源使用量创建指定数量的UPHost物理云主机实例。 + */ +export interface CreatePHostResponse { + /** + * PHost的资源ID数组 + */ + PHostId?: string[]; +} + +/** + * DescribeBaremetalMachineType - 获取裸金属机型的详细描述信息 + */ +export interface DescribeBaremetalMachineTypeRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 具体机型。若不填写,则返回全部机型 + */ + Type?: string; +} + +/** + * DescribeBaremetalMachineType - 获取裸金属机型的详细描述信息 + */ +export interface DescribeBaremetalMachineTypeResponse { + /** + * 机型列表,模型:PHostMachineTypeSet + */ + MachineTypes?: string; +} + +/** + * DescribePHost - 获取物理机详细信息 + */ +export interface DescribePHostRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * PHost资源ID,若为空,则返回当前Region所有PHost。 + */ + PHostId?: string[]; + /** + * 数据偏移量,默认为0 + */ + Offset?: number; + /** + * 返回数据长度,默认为20 + */ + Limit?: number; + /** + * 要挂载的云盘id,过滤返回能被UDiskId挂载的云主机。目前主要针对rssd云盘使用 + */ + UDiskIdForAttachment?: string; +} + +/** + * DescribePHost - 获取物理机详细信息 + */ +export interface DescribePHostResponse { + /** + * 满足条件的PHost总数 + */ + TotalCount?: number; + /** + * PHost资源列表,参见 PHostSet + */ + PHostSet?: { + /** + * 可用区,参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * PHost资源ID + */ + PHostId?: string; + /** + * 物理机序列号 + */ + SN?: string; + /** + * 物理云主机状态。枚举值:\\ > 初始化:Initializing; \\ > 启动中:Starting; \\ > 运行中:Running;\\ > 关机中:Stopping; \\ > 安装失败:InstallFailed; \\ > 重启中:Rebooting;\\ > 关机:Stopped; + */ + PMStatus?: string; + /** + * 物理机名称 + */ + Name?: string; + /** + * 物理机备注 + */ + Remark?: string; + /** + * 业务组 + */ + Tag?: string; + /** + * 镜像名称 + */ + ImageName?: string; + /** + * 操作系统名称 + */ + OSname?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 到期时间 + */ + ExpireTime?: number; + /** + * 计费模式,枚举值为: Year,按年付费; Month,按月付费;默认为月付 + */ + ChargeType?: string; + /** + * 电源状态,on 或 off + */ + PowerState?: string; + /** + * 物理机类型,参见DescribePHostMachineType返回值 + */ + PHostType?: string; + /** + * 内存大小,单位:MB + */ + Memory?: number; + /** + * CPU信息,见 PHostCPUSet + */ + CPUSet?: { + /** + * CPU型号 + */ + Model?: string; + /** + * CPU主频 + */ + Frequence?: number; + /** + * CPU个数 + */ + Count?: number; + /** + * CPU核数 + */ + CoreCount?: number; + }; + /** + * 磁盘信息,见 PHostDiskSet + */ + DiskSet?: { + /** + * 单盘大小,单位GB + */ + Space?: number; + /** + * 磁盘数量 + */ + Count?: number; + /** + * 磁盘属性 + */ + Type?: string; + /** + * 磁盘名称,sys/data + */ + Name?: string; + /** + * 磁盘IO性能,单位MB/s(待废弃) + */ + IOCap?: number; + /** + * 裸金属机型参数:磁盘盘符 + */ + Drive?: string; + /** + * 裸金属机型参数:磁盘ID + */ + DiskId?: string; + /** + * 裸金属机型参数:是否是启动盘。True/False + */ + IsBoot?: string; + }[]; + /** + * IP信息,见 PHostIPSet + */ + IPSet?: { + /** + * 国际: Internation, BGP: BGP, 内网: Private + */ + OperatorName?: string; + /** + * IP资源ID(内网IP无资源ID)(待废弃) + */ + IPId?: string; + /** + * IP地址, + */ + IPAddr?: string; + /** + * MAC地址 + */ + MACAddr?: string; + /** + * IP对应带宽,单位Mb,内网IP不显示带宽信息 + */ + Bandwidth?: number; + /** + * 子网ID + */ + SubnetId?: string; + /** + * VPC ID + */ + VPCId?: string; + }[]; + /** + * 网络环境。枚举值:千兆:1G ,万兆:10G + */ + Cluster?: string; + /** + * 自动续费 + */ + AutoRenew?: string; + /** + * 是否支持紧急登录 + */ + IsSupportKVM?: string; + /** + * 操作系统类型 + */ + OSType?: string; + /** + * 组件信息(暂不支持) + */ + Components?: string; + /** + * 是否支持Raid。枚举值:Yes:支持;No:不支持。 + */ + RaidSupported?: string; + /** + * 物理云产品类型,枚举值:LocalDisk=>代表传统本地盘机型, CloudDisk=>云盘裸金属机型 + */ + PhostClass?: string; + }[]; +} + +/** + * DescribePHostImage - 获取物理云主机镜像列表 + */ +export interface DescribePHostImageRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 镜像类别,枚举值,Base是基础镜像; + */ + ImageType?: string; + /** + * 镜像ID + */ + ImageId?: string[]; + /** + * 数据偏移量,默认为0 + */ + Offset?: number; + /** + * 返回数据长度,默认为20 + */ + Limit?: number; + /** + * 机器型号,只支持当前zone的展示机型 + */ + MachineType?: string; +} + +/** + * DescribePHostImage - 获取物理云主机镜像列表 + */ +export interface DescribePHostImageResponse { + /** + * 满足条件的镜像总数 + */ + TotalCount?: number; + /** + * 镜像列表 PHostImageSet + */ + ImageSet?: { + /** + * 镜像ID + */ + ImageId?: string; + /** + * 镜像名称 + */ + ImageName?: string; + /** + * 操作系统名称 + */ + OsName?: string; + /** + * 操作系统类型 + */ + OsType?: string; + /** + * 支持的机型 + */ + Support?: string[]; + /** + * 当前版本 + */ + Version?: string; + }[]; +} + +/** + * DescribePHostMachineType - 获取物理云机型的详细描述信息 + */ +export interface DescribePHostMachineTypeRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 具体机型。若不填写,则返回全部机型 + */ + Type?: string; +} + +/** + * DescribePHostMachineType - 获取物理云机型的详细描述信息 + */ +export interface DescribePHostMachineTypeResponse { + /** + * 机型列表,模型:PHostMachineTypeSet + */ + MachineTypes: { + /** + * 物理云主机机型别名,全网唯一。 + */ + Type: string; + /** + * CPU信息 + */ + CPU?: { + /** + * CPU型号 + */ + Model?: string; + /** + * CPU主频 + */ + Frequence?: number; + /** + * CPU个数 + */ + Count?: number; + /** + * CPU核数 + */ + CoreCount?: number; + }; + /** + * 内存大小,单位MB + */ + Memory?: number; + /** + * 磁盘信息 + */ + Disks?: { + /** + * 单盘大小,单位GB + */ + Space?: number; + /** + * 磁盘数量 + */ + Count?: number; + /** + * 磁盘属性 + */ + Type?: string; + /** + * 磁盘名称,sys/data + */ + Name?: string; + /** + * 磁盘IO性能,单位MB/s(待废弃) + */ + IOCap?: number; + /** + * 裸金属机型参数:磁盘盘符 + */ + Drive?: string; + /** + * 裸金属机型参数:磁盘ID + */ + DiskId?: string; + /** + * 裸金属机型参数:是否是启动盘。True/False + */ + IsBoot?: string; + }[]; + /** + * 其他组件信息 + */ + Components?: { + /** + * 组件名称 + */ + Name?: string; + /** + * 组件数量 + */ + Count?: string; + }; + /** + * 集群库存信息 + */ + Clusters?: { + /** + * 集群名。枚举值:千兆网络集群:1G;万兆网络集群:10G;智能网卡网络:25G; + */ + Name?: string; + /** + * 库存状态。枚举值:有库存:Available;无库存:SoldOut + */ + StockStatus?: string; + }[]; + /** + * 是否支持Raid。枚举值:支持:YES;不支持:NO + */ + RaidSupported?: string; + }[]; +} + +/** + * DescribePHostTags - 获取物理机tag列表(业务组) + */ +export interface DescribePHostTagsRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; +} + +/** + * DescribePHostTags - 获取物理机tag列表(业务组) + */ +export interface DescribePHostTagsResponse { + /** + * Tag的个数 + */ + TotalCount?: number; + /** + * 具体参见 PHostTagSet + */ + TagSet?: { + /** + * 业务组名称 + */ + Tag?: string; + /** + * 该业务组中包含的主机个数 + */ + TotalCount?: number; + }[]; +} + +/** + * GetPHostDiskUpgradePrice - 获取物理云裸金属挂载磁盘的升级价格 + */ +export interface GetPHostDiskUpgradePriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UPHost实例ID。 + */ + PHostId: string; + /** + * 磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB,数据盘单块盘20-32000GB。 + */ + DiskSpace: number; + /** + * 磁盘 ID。获取扩容价格必填(只能扩不能减);重装时候不需要填(根据所选盘大小决定) + */ + UDiskId?: string; + /** + * 是否重装价格获取。复用此接口。扩容只能增加云盘大小。重装不限制。枚举值:true/false + */ + ReinstallTag?: boolean; +} + +/** + * GetPHostDiskUpgradePrice - 获取物理云裸金属挂载磁盘的升级价格 + */ +export interface GetPHostDiskUpgradePriceResponse { + /** + * 升级差价。精度为小数点后2位。 + */ + Price: number; + /** + * 升价差价原价。精度为小数点后2位。 + */ + OriginalPrice?: number; +} + +/** + * GetPHostPrice - 获取物理机价格列表 + */ +export interface GetPHostPriceRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 购买数量,范围[1-5] + */ + Count: number; + /** + * 计费模式,枚举值为: Year/Month + */ + ChargeType: string; + /** + * 购买时长,1-10个月或1-10年;默认值为1。月付时,此参数传0,代表购买至月末,1代表整月。 + */ + Quantity: number; + /** + * 网络环境,可选千兆:1G ;万兆:10G;25G网络:25G。 + */ + Cluster?: string; + /** + * 默认为:DB(数据库型),可以通过接口 [DescribePHostMachineType](api/uphost-api/describe_phost_machine_type.html)获取 + */ + Type?: string; + /** + * + */ + Disks?: { + /** + * 裸金属机型参数->枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + */ + IsBoot?: string; + /** + * 裸金属机型参数->磁盘类型:枚举值:CLOUD_RSSD + */ + Type?: string; + /** + * 裸金属机型参数->磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB。数据盘是20-32000G。 + */ + Size?: string; + }[]; +} + +/** + * GetPHostPrice - 获取物理机价格列表 + */ +export interface GetPHostPriceResponse { + /** + * 价格列表 见 PHostPriceSet + */ + PriceSet?: { + /** + * Year/Month + */ + ChargeType?: string; + /** + * 价格, 单位:元, 保留小数点后两位有效数字 + */ + Price?: number; + /** + * 枚举值:phost=>为主机价格,如果是云盘包括了系统盘价格。cloudDisk=>所有数据盘价格,只是裸金属机型才返回此参数。 + */ + Product?: string; + /** + * 原价格, 单位:元, 保留小数点后两位有效数字 + */ + OriginalPrice?: number; + }[]; +} + +/** + * ModifyPHostInfo - 更改物理机信息 + */ +export interface ModifyPHostInfoRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * 物理机资源ID + */ + PHostId: string; + /** + * 物理机名称,默认不更改 + */ + Name?: string; + /** + * 物理机备注,默认不更改 + */ + Remark?: string; + /** + * 业务组,默认不更改 + */ + Tag?: string; +} + +/** + * ModifyPHostInfo - 更改物理机信息 + */ +export interface ModifyPHostInfoResponse { + /** + * PHost 的资源ID + */ + PHostId?: string; +} + +/** + * PoweroffPHost - 断电物理云主机 + */ +export interface PoweroffPHostRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * PHost资源ID + */ + PHostId: string; +} + +/** + * PoweroffPHost - 断电物理云主机 + */ +export interface PoweroffPHostResponse { + /** + * PHost 的资源ID + */ + PHostId?: string; +} + +/** + * RebootPHost - 重启物理机 + */ +export interface RebootPHostRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * PHost资源ID + */ + PHostId: string; +} + +/** + * RebootPHost - 重启物理机 + */ +export interface RebootPHostResponse { + /** + * PHost 的资源ID + */ + PHostId?: string; +} + +/** + * ReinstallPHost - 重装物理机操作系统 + */ +export interface ReinstallPHostRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * PHost资源ID + */ + PHostId: string; + /** + * 密码 + */ + Password: string; + /** + * 镜像Id,参考镜像列表,默认使用原镜像 + */ + ImageId?: string; + /** + * 物理机名称,默认不更改 + */ + Name?: string; + /** + * 物理机备注,默认为不更改。 + */ + Remark?: string; + /** + * 业务组,默认不更改。 + */ + Tag?: string; + /** + * 是否保留数据盘,保留:Yes,不报留:No, 默认:Yes + */ + ReserveDisk?: string; + /** + * 不保留数据盘重装,可选Raid + */ + Raid?: string; + /** + * 裸金属机型参数->系统盘大小。 单位:GB, 范围[20,500], 步长:10 + */ + BootDiskSpace?: number; +} + +/** + * ReinstallPHost - 重装物理机操作系统 + */ +export interface ReinstallPHostResponse { + /** + * PHost 的资源ID + */ + PHostId?: string; +} + +/** + * ResetPHostPassword - 重置裸金属实例的管理员密码 + */ +export interface ResetPHostPasswordRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 裸金属实例ID + */ + PHostId: string; + /** + * PHost新密码(密码格式使用BASE64编码) + */ + Password: string; +} + +/** + * ResetPHostPassword - 重置裸金属实例的管理员密码 + */ +export interface ResetPHostPasswordResponse { + /** + * 裸金属实例ID + */ + PHostId: string; +} + +/** + * ResizePHostAttachedDisk - 修改裸金属物理云已经挂载的云盘容量大小 + */ +export interface ResizePHostAttachedDiskRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * UPHost实例ID。 + */ + PHostId?: string; + /** + * 磁盘ID。 + */ + UDiskId?: string; + /** + * 裸金属机型参数->磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB,数据盘单块盘20-32000GB。 + */ + DiskSpace?: number; +} + +/** + * ResizePHostAttachedDisk - 修改裸金属物理云已经挂载的云盘容量大小 + */ +export interface ResizePHostAttachedDiskResponse { + /** + * 改配成功的磁盘id + */ + DiskId?: string; +} + +/** + * StartPHost - 启动物理机 + */ +export interface StartPHostRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * PHost资源ID + */ + PHostId: string; +} + +/** + * StartPHost - 启动物理机 + */ +export interface StartPHostResponse { + /** + * PHost 的资源ID + */ + PHostId?: string; +} + +/** + * TerminatePHost - 删除物理云主机 + */ +export interface TerminatePHostRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * PHost资源ID + */ + PHostId: string; + /** + * 是否释放绑定的EIP。true: 解绑EIP后,并释放;其他值或不填:解绑EIP。 + */ + ReleaseEIP?: boolean; + /** + * 裸金属机型参数->删除主机时是否同时删除挂载的数据盘。默认为false。 + */ + ReleaseUDisk?: boolean; +} + +/** + * TerminatePHost - 删除物理云主机 + */ +export interface TerminatePHostResponse { + /** + * PHost 的资源ID + */ + PHostId?: string; +} diff --git a/src/services/usms/index.ts b/src/services/usms/index.ts new file mode 100644 index 0000000..f62532b --- /dev/null +++ b/src/services/usms/index.ts @@ -0,0 +1,631 @@ +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 **usms** service + */ +export default class USMSClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * CreateUSMSSignature - 调用接口CreateUSMSSignature申请短信签名 + * + * See also: https://docs.ucloud.cn/api/usms-api/create_usms_signature + */ + createUSMSSignature( + request?: CreateUSMSSignatureRequest + ): Promise { + const args = { Action: 'CreateUSMSSignature', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUSMSSignatureResponse + ); + } + + /** + * CreateUSMSTemplate - 调用接口CreateUSMSTemplate申请短信模板 + * + * See also: https://docs.ucloud.cn/api/usms-api/create_usms_template + */ + createUSMSTemplate( + request?: CreateUSMSTemplateRequest + ): Promise { + const args = { Action: 'CreateUSMSTemplate', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUSMSTemplateResponse + ); + } + + /** + * DeleteUSMSSignature - 调用接口DeleteUSMSSignature删除短信签名 + * + * See also: https://docs.ucloud.cn/api/usms-api/delete_usms_signature + */ + deleteUSMSSignature( + request?: DeleteUSMSSignatureRequest + ): Promise { + const args = { Action: 'DeleteUSMSSignature', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUSMSSignatureResponse + ); + } + + /** + * DeleteUSMSTemplate - 调用接口DeleteUSMSTemplate删除短信模板 + * + * See also: https://docs.ucloud.cn/api/usms-api/delete_usms_template + */ + deleteUSMSTemplate( + request?: DeleteUSMSTemplateRequest + ): Promise { + const args = { Action: 'DeleteUSMSTemplate', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUSMSTemplateResponse + ); + } + + /** + * GetUSMSSendReceipt - 调用接口GetUSMSSendReceipt短信发送状态信息 + * + * See also: https://docs.ucloud.cn/api/usms-api/get_usms_send_receipt + */ + getUSMSSendReceipt( + request?: GetUSMSSendReceiptRequest + ): Promise { + const args = { Action: 'GetUSMSSendReceipt', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUSMSSendReceiptResponse + ); + } + + /** + * QueryUSMSSignature - 调用接口QueryUSMSSignature查询短信签名申请状态 + * + * See also: https://docs.ucloud.cn/api/usms-api/query_usms_signature + */ + queryUSMSSignature( + request?: QueryUSMSSignatureRequest + ): Promise { + const args = { Action: 'QueryUSMSSignature', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as QueryUSMSSignatureResponse + ); + } + + /** + * QueryUSMSTemplate - 调用接口QueryUSMSTemplate查询短信模板申请状态 + * + * See also: https://docs.ucloud.cn/api/usms-api/query_usms_template + */ + queryUSMSTemplate( + request?: QueryUSMSTemplateRequest + ): Promise { + const args = { Action: 'QueryUSMSTemplate', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as QueryUSMSTemplateResponse + ); + } + + /** + * SendBatchUSMSMessage - 调用SendBatchUSMSMessage接口批量发送短信 + * + * See also: https://docs.ucloud.cn/api/usms-api/send_batch_usms_message + */ + sendBatchUSMSMessage( + request?: SendBatchUSMSMessageRequest + ): Promise { + const args = { Action: 'SendBatchUSMSMessage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as SendBatchUSMSMessageResponse + ); + } + + /** + * SendUSMSMessage - 调用接口SendUSMSMessage发送短信 + * + * See also: https://docs.ucloud.cn/api/usms-api/send_usms_message + */ + sendUSMSMessage( + request?: SendUSMSMessageRequest + ): Promise { + const args = { Action: 'SendUSMSMessage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as SendUSMSMessageResponse + ); + } + + /** + * UpdateUSMSSignature - 调用接口UpdateUSMSSignature修改未通过审核的短信签名,并重新提交审核 + * + * See also: https://docs.ucloud.cn/api/usms-api/update_usms_signature + */ + updateUSMSSignature( + request?: UpdateUSMSSignatureRequest + ): Promise { + const args = { Action: 'UpdateUSMSSignature', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateUSMSSignatureResponse + ); + } + + /** + * UpdateUSMSTemplate - 调用接口UpdateUSMSTemplate修改未通过审核的短信模板,并重新提交审核 + * + * See also: https://docs.ucloud.cn/api/usms-api/update_usms_template + */ + updateUSMSTemplate( + request?: UpdateUSMSTemplateRequest + ): Promise { + const args = { Action: 'UpdateUSMSTemplate', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateUSMSTemplateResponse + ); + } +} + +/** + * CreateUSMSSignature - 调用接口CreateUSMSSignature申请短信签名 + */ +export interface CreateUSMSSignatureRequest { + /** + * 签名类型,说明如下:0-公司或企业的全称或简称;1-App应用的全称或简称;2-工信部备案网站的全称或简称;3-公众号或小程序的全称或简称;4-商标名的全称或简称;5-政府/机关事业单位/其他单位的全称或简称; + */ + SigType: number; + /** + * 签名用途,0-自用,1-他用; + */ + SigPurpose: number; + /** + * 签名的资质证明文件类型,需与签名类型保持一致,说明如下:0-三证合一/企业营业执照/组织机构代码证书/社会信用代码证书;1-应用商店后台开发者管理截图;2-备案服务商的备案成功截图(含域名,网站名称,备案号);3-公众号或小程序的管理界面截图;4-商标注册证书;5-组织机构代码证书、社会信用代码证书; + */ + CertificateType: number; + /** + * 短信签名申请原因 + */ + Description: string; + /** + * 短信签名的资质证明文件,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB + */ + File: string; + /** + * 国内/国际短信。true:国际短信,false:国内短信,若不传值则默认该值为false + */ + International?: boolean; + /** + * 短信签名授权委托文件,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB;当您是代理并使用第三方的签名时(也即SigPurpose为1-他用),该项为必填项; + */ + ProxyFile?: string; +} + +/** + * CreateUSMSSignature - 调用接口CreateUSMSSignature申请短信签名 + */ +export interface CreateUSMSSignatureResponse { + /** + * 短信签名ID(短信签名申请时的工单ID) + */ + SigId?: string; +} + +/** + * CreateUSMSTemplate - 调用接口CreateUSMSTemplate申请短信模板 + */ +export interface CreateUSMSTemplateRequest { + /** + * 短信模板用途类型:1-验证码类短信模板;2-系统通知类短信模板;3-会员推广类短信模板; + */ + Purpose: number; + /** + * 短信模板名称,不超过32个字符,每个中文、符号、英文、数字等都计为1个字。 + */ + TemplateName: string; + /** + * 短信模板内容,说明如下:字数不超过500,每个中文、符号、英文、数组等都计为一个字;模板中的变量填写格式:{N},其中N为大于1的整数,有多个参数时,建议N从1开始顺次,例如:{1}、{2}等;短信模板禁止仅包括变量的情况; + */ + Template: string; + /** + * 标记是否为国际短信。true:国际短信,false:国内短信,若不传值则默认该值为false + */ + International?: boolean; + /** + * 短信模板申请原因说明,字数不超过128,每个中文、符号、英文、数字等都计为1个字。 + */ + Remark?: string; +} + +/** + * CreateUSMSTemplate - 调用接口CreateUSMSTemplate申请短信模板 + */ +export interface CreateUSMSTemplateResponse { + /** + * 短信模板ID(短信模板申请时的工单ID) + */ + TemplateId: string; +} + +/** + * DeleteUSMSSignature - 调用接口DeleteUSMSSignature删除短信签名 + */ +export interface DeleteUSMSSignatureRequest { + /** + * 签名ID(也即短信签名申请时的工单ID),支持以数组的方式,举例,以SigIds.0、SigIds.1...SigIds.N方式传入 + */ + SigIds: string[]; +} + +/** + * DeleteUSMSSignature - 调用接口DeleteUSMSSignature删除短信签名 + */ +export interface DeleteUSMSSignatureResponse {} + +/** + * DeleteUSMSTemplate - 调用接口DeleteUSMSTemplate删除短信模板 + */ +export interface DeleteUSMSTemplateRequest { + /** + * 模板ID(也即短信模板申请时的工单ID),支持以数组的方式,举例,以TemplateIds.0、TemplateIds.1...TemplateIds.N方式传入 + */ + TemplateIds: string[]; +} + +/** + * DeleteUSMSTemplate - 调用接口DeleteUSMSTemplate删除短信模板 + */ +export interface DeleteUSMSTemplateResponse {} + +/** + * GetUSMSSendReceipt - 调用接口GetUSMSSendReceipt短信发送状态信息 + */ +export interface GetUSMSSendReceiptRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 发送短信时返回的SessionNo集合,SessionNoSet.0,SessionNoSet.1....格式 + */ + SessionNoSet: string[]; +} + +/** + * GetUSMSSendReceipt - 调用接口GetUSMSSendReceipt短信发送状态信息 + */ +export interface GetUSMSSendReceiptResponse { + /** + * 回执信息集合 + */ + Data: { + /** + * 发送短信时返回的SessionNo + */ + SessionNo: string; + /** + * 每个手机号的短信回执信息集合 + */ + ReceiptSet: { + /** + * 手机号码 + */ + Phone: string; + /** + * 消耗短信条数 + */ + CostCount: number; + /** + * 回执结果,枚举值:\\ > 发送成功: 代表成功 \\ > Success: 代表成功 \\ > 发送失败: 代表失败 \\ > Fail: 代表失败 \\ > 状态未知: 代表未知 \\ > Unknow: 代表未知 + */ + ReceiptResult: string; + /** + * 状态报告编码 + */ + ReceiptCode: string; + /** + * 回执结果描述 + */ + ReceiptDesc: string; + /** + * 回执返回时间 + */ + ReceiptTime: number; + /** + * 自定义的业务标识ID,字符串 + */ + UserId: string; + }[]; + }[]; +} + +/** + * QueryUSMSSignature - 调用接口QueryUSMSSignature查询短信签名申请状态 + */ +export interface QueryUSMSSignatureRequest { + /** + * 已申请的短信签名ID(短信签名申请时的工单ID);签名ID和签名至少需填写1项; + */ + SigId?: string; + /** + * 签名内容;签名ID和签名至少需填写1项; + */ + SigContent?: string; +} + +/** + * QueryUSMSSignature - 调用接口QueryUSMSSignature查询短信签名申请状态 + */ +export interface QueryUSMSSignatureResponse { + /** + * 签名信息 + */ + Data: { + /** + * 短信签名ID + */ + SigId: string; + /** + * 短信签名内容 + */ + SigContent: string; + /** + * 签名状态,0-待审核 1-审核中 2-审核通过 3-审核未通过 4-被禁用 + */ + Status: number; + /** + * 短信签名未通过审核原因 + */ + ErrDesc: string; + }; +} + +/** + * QueryUSMSTemplate - 调用接口QueryUSMSTemplate查询短信模板申请状态 + */ +export interface QueryUSMSTemplateRequest { + /** + * 模板ID + */ + TemplateId: string; +} + +/** + * QueryUSMSTemplate - 调用接口QueryUSMSTemplate查询短信模板申请状态 + */ +export interface QueryUSMSTemplateResponse { + /** + * 短信模板明细信息,各字段说明详见OutTemplate + */ + Data?: { + /** + * 短信模板ID + */ + TemplateId: string; + /** + * 模板类型,选项:1-验证码类 2-通知类 3-会员推广类 + */ + Purpose: number; + /** + * 短信模板名称 + */ + TemplateName: string; + /** + * 短信模板内容 + */ + Template: string; + /** + * 退订信息;一般填写方式“回T退订”,当purpose为3(也即会员推广类)时,为必填项 + */ + UnsubscribeInfo: string; + /** + * 短信模板状态;状态说明:0-待审核,1-审核中,2-审核通过,3-审核未通过,4-被禁用 + */ + Status: number; + /** + * 模板说明 + */ + Remark: string; + /** + * 审核失败原因 + */ + ErrDesc: string; + /** + * 创建时间 + */ + CreateTime: number; + }; +} + +/** + * SendBatchUSMSMessage - 调用SendBatchUSMSMessage接口批量发送短信 + */ +export interface SendBatchUSMSMessageRequest { + /** + * 批量发送内容,该参数是json数组的base64编码结果。发送内容json数组中,每个“模板+签名”组合作为一个子项,每个子项内支持多个号码,示例:发送内容json数组(base64编码前):[{"TemplateId": "UTA20212831C85C", "SigContent": "UCloud", "Target": [{"TemplateParams": ["123456"], "Phone": "18500000123", "ExtendCode": "123", "UserId": "456"} ] } ] 。json数组中各参数的定义:"TemplateId":模板ID,"SigContent"短信签名内容,"Target"具体到号码粒度的发送内容。"Target"中的具体字段有:"TemplateParams"实际发送的模板参数(若使用的是无参数模板,该参数不能传值),"Phone"手机号码, "ExtendCode"短信扩展码, "UserId"自定义业务标识ID。其中必传参数为"TemplateId", "SigContent", "Target"("Target"中必传参数为"Phone")。实际调用本接口时TaskContent传值(发送内容base64编码后)为:W3siVGVtcGxhdGVJZCI6ICJVVEEyMDIxMjgzMUM4NUMiLCAiU2lnQ29udGVudCI6ICJVQ2xvdWQiLCAiVGFyZ2V0IjogW3siVGVtcGxhdGVQYXJhbXMiOiBbIjEyMzQ1NiJdLCAiUGhvbmUiOiAiMTg1MDAwMDAxMjMiLCAiRXh0ZW5kQ29kZSI6ICIxMjMiLCAiVXNlcklkIjogIjQ1NiJ9IF0gfSBdIA== + */ + TaskContent: string; +} + +/** + * SendBatchUSMSMessage - 调用SendBatchUSMSMessage接口批量发送短信 + */ +export interface SendBatchUSMSMessageResponse { + /** + * 本次提交发送任务的唯一ID,可根据该值查询本次发送的短信列表。注:成功提交短信数大于0时,才返回该字段 + */ + SessionNo?: string; + /** + * 本次请求Uuid + */ + ReqUuid?: string; + /** + * 成功提交短信(未拆分)条数 + */ + SuccessCount?: number; + /** + * 未发送成功的详情,返回码非0时该字段有效,可根据该字段数据重发 + */ + FailContent?: { + /** + * 模板ID + */ + TemplateId: string; + /** + * 签名 + */ + SigContent: string; + /** + * 具体号码信息 + */ + Target: { + /** + * 模板参数 + */ + TemplateParams: string[]; + /** + * 手机号 + */ + Phone: string; + /** + * 扩展号码 + */ + ExtendCode?: string; + /** + * 用户自定义ID + */ + UserId?: string; + /** + * 发送失败原因。注:若模板/签名校验失败,该字段为空 + */ + FailureDetails?: string; + }[]; + /** + * 未能成功发送的详情。注:模板/签名检验失败时,该字段有效 + */ + FailureDetails?: string; + }[]; +} + +/** + * SendUSMSMessage - 调用接口SendUSMSMessage发送短信 + */ +export interface SendUSMSMessageRequest { + /** + * 电话号码数组,电话号码格式为(60)1xxxxxxxx,()中为国际长途区号(如中国为86或0086,两种格式都支持),后面为电话号码.若不传入国际区号,如1851623xxxx,则默认为国内手机号 + */ + PhoneNumbers: string[]; + /** + * 短信签名内容,请到[USMS控制台](https://console.ucloud.cn/usms)的签名管理页面查看;使用的短信签名必须是已申请并且通过审核; + */ + SigContent: string; + /** + * 模板ID(也即短信模板申请时的工单ID),请到[USMS控制台](https://console.ucloud.cn/usms)的模板管理页面查看;使用的短信模板必须是已申请并通过审核; + */ + TemplateId: string; + /** + * 模板可变参数,以数组的方式填写,举例,TempalteParams.0,TempalteParams.1,... 若模板中无可变参数,则该项可不填写;若模板中有可变参数,则该项为必填项,参数个数需与变量个数保持一致,否则无法发送; + */ + TemplateParams?: string[]; + /** + * 短信扩展码,格式为阿拉伯数字串,默认不开通,如需开通请联系 UCloud技术支持 + */ + ExtendCode?: string; + /** + * 自定义的业务标识ID,字符串( 长度不能超过32 位) + */ + UserId?: string; +} + +/** + * SendUSMSMessage - 调用接口SendUSMSMessage发送短信 + */ +export interface SendUSMSMessageResponse { + /** + * 本次提交发送的短信的唯一ID,可根据该值查询本次发送的短信列表 + */ + SessionNo?: string; + /** + * 本次提交的自定义业务标识ID,仅当发送时传入有效的UserId,才返回该字段。 + */ + UserId?: string; +} + +/** + * UpdateUSMSSignature - 调用接口UpdateUSMSSignature修改未通过审核的短信签名,并重新提交审核 + */ +export interface UpdateUSMSSignatureRequest { + /** + * 签名ID(也即短信签名申请时的工单ID),支持以数组的方式,举例,以SigIds.0、SigIds.1...SigIds.N方式传入 + */ + SigId: string; + /** + * 新的短信签名内容;长度为2-12个字符, 可包含中文、数字和符号;无需填写【】或[],系统会自动添加 + */ + SigContent: string; + /** + * 签名类型,说明如下:0-公司或企业的全称或简称;1-App应用的全称或简称;2-工信部备案网站的全称或简称;3-公众号或小程序的全称或简称;4-商标名的全称或简称;5-政府/机关事业单位/其他单位的全称或简称; + */ + SigType: number; + /** + * 签名用途,0-自用,1-他用; + */ + SigPurpose: number; + /** + * 短信签名的资质证明文件内容,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB。内容格式如下: [file type];[code type],[base64] 如:image/jpeg;base64,5YaF5a65 + */ + File?: string; + /** + * 签名的资质证明文件类型,需与签名类型保持一致,说明如下:0-三证合一/企业营业执照/组织机构代码证书/社会信用代码证书;1-应用商店后台开发者管理截图;2-备案服务商的备案成功截图(含域名,网站名称,备案号);3-公众号或小程序的管理界面截图;4-商标注册证书;5-组织机构代码证书、社会信用代码证书; + */ + CertificateType?: number; + /** + * 短信签名授权委托文件内容,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB;当您是代理并使用第三方的签名时(也即SigPurpose为1-他用),该项为必填项;格式和File类似。 + */ + ProxyFile?: string; + /** + * 短信签名的资质证明文件URL,若未更改审核材料,则该处使用已上传审核材料的URL链接,否则使用File参数 + */ + Document?: string; + /** + * 短信签名授权委托文件URL,若未更改授权委托文件,则该处填写已上传的授权委托文件的URL链接,否则使用ProxyFile参数 + */ + ProxyDoc?: string; +} + +/** + * UpdateUSMSSignature - 调用接口UpdateUSMSSignature修改未通过审核的短信签名,并重新提交审核 + */ +export interface UpdateUSMSSignatureResponse {} + +/** + * UpdateUSMSTemplate - 调用接口UpdateUSMSTemplate修改未通过审核的短信模板,并重新提交审核 + */ +export interface UpdateUSMSTemplateRequest { + /** + * 短信模板ID + */ + TemplateId: string; + /** + * 新的模板内容。模板名称和模板内容必须提供一个,否则会报错。小于等于600个字 + */ + Template: string; + /** + * 新的模板名称。小于等于32个字,每个中文、英文、数组、符合都计为一个字 + */ + TemplateName?: string; + /** + * 短信模板申请原因说明,字数不超过128,每个中文、符号、英文、数字等都计为1个字。 + */ + Remark?: string; +} + +/** + * UpdateUSMSTemplate - 调用接口UpdateUSMSTemplate修改未通过审核的短信模板,并重新提交审核 + */ +export interface UpdateUSMSTemplateResponse {} diff --git a/src/services/vpc/index.ts b/src/services/vpc/index.ts new file mode 100644 index 0000000..63b3d15 --- /dev/null +++ b/src/services/vpc/index.ts @@ -0,0 +1,3561 @@ +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 **vpc** service + */ +export default class VPCClient extends Client { + constructor({ + config, + credential, + }: { + config: ConfigOptions; + credential: CredentialOptions; + }) { + super({ config, credential }); + } + + /** + * AddSnatRule - 对于绑定了多个EIP的NAT网关,您可以将一个子网下的某台云主机映射到某个特定的EIP上,规则生效后,则该云主机通过该特定的EIP访问互联网。 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/add_snat_rule + */ + addSnatRule(request?: AddSnatRuleRequest): Promise { + const args = { Action: 'AddSnatRule', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AddSnatRuleResponse + ); + } + + /** + * AddVPCNetwork - 添加VPC网段 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/add_vpc_network + */ + addVPCNetwork( + request?: AddVPCNetworkRequest + ): Promise { + const args = { Action: 'AddVPCNetwork', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AddVPCNetworkResponse + ); + } + + /** + * AddWhiteListResource - 添加NAT网关白名单 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/add_white_list_resource + */ + addWhiteListResource( + request?: AddWhiteListResourceRequest + ): Promise { + const args = { Action: 'AddWhiteListResource', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AddWhiteListResourceResponse + ); + } + + /** + * AllocateSecondaryIp - 分配ip(用于uk8s使用) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/allocate_secondary_ip + */ + allocateSecondaryIp( + request?: AllocateSecondaryIpRequest + ): Promise { + const args = { Action: 'AllocateSecondaryIp', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AllocateSecondaryIpResponse + ); + } + + /** + * AllocateVIP - 根据提供信息,申请内网VIP(Virtual IP),多用于高可用程序作为漂移IP。 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/allocate_vip + */ + allocateVIP(request?: AllocateVIPRequest): Promise { + const args = { Action: 'AllocateVIP', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AllocateVIPResponse + ); + } + + /** + * AssociateRouteTable - 绑定子网的路由表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/associate_route_table + */ + associateRouteTable( + request?: AssociateRouteTableRequest + ): Promise { + const args = { Action: 'AssociateRouteTable', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AssociateRouteTableResponse + ); + } + + /** + * CloneRouteTable - 将现有的路由表复制为一张新的路由表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/clone_route_table + */ + cloneRouteTable( + request?: CloneRouteTableRequest + ): Promise { + const args = { Action: 'CloneRouteTable', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CloneRouteTableResponse + ); + } + + /** + * CreateNATGW - 创建NAT网关 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_natgw + */ + createNATGW(request?: CreateNATGWRequest): Promise { + const args = { Action: 'CreateNATGW', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateNATGWResponse + ); + } + + /** + * CreateNATGWPolicy - 添加NAT网关端口转发规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_natgw_policy + */ + createNATGWPolicy( + request?: CreateNATGWPolicyRequest + ): Promise { + const args = { Action: 'CreateNATGWPolicy', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateNATGWPolicyResponse + ); + } + + /** + * CreateNetworkAcl - 创建网络ACL + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_network_acl + */ + createNetworkAcl( + request?: CreateNetworkAclRequest + ): Promise { + const args = { Action: 'CreateNetworkAcl', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateNetworkAclResponse + ); + } + + /** + * CreateNetworkAclAssociation - 创建ACL的绑定关系 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_network_acl_association + */ + createNetworkAclAssociation( + request?: CreateNetworkAclAssociationRequest + ): Promise { + const args = { Action: 'CreateNetworkAclAssociation', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateNetworkAclAssociationResponse + ); + } + + /** + * CreateNetworkAclEntry - 创建ACL的规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_network_acl_entry + */ + createNetworkAclEntry( + request?: CreateNetworkAclEntryRequest + ): Promise { + const args = { Action: 'CreateNetworkAclEntry', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateNetworkAclEntryResponse + ); + } + + /** + * CreateRouteTable - 创建路由表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_route_table + */ + createRouteTable( + request?: CreateRouteTableRequest + ): Promise { + const args = { Action: 'CreateRouteTable', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateRouteTableResponse + ); + } + + /** + * CreateSubnet - 创建子网 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_subnet + */ + createSubnet(request?: CreateSubnetRequest): Promise { + const args = { Action: 'CreateSubnet', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateSubnetResponse + ); + } + + /** + * CreateVPC - 创建VPC + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_vpc + */ + createVPC(request?: CreateVPCRequest): Promise { + const args = { Action: 'CreateVPC', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateVPCResponse + ); + } + + /** + * CreateVPCIntercom - 新建VPC互通关系 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_vpc_intercom + */ + createVPCIntercom( + request?: CreateVPCIntercomRequest + ): Promise { + const args = { Action: 'CreateVPCIntercom', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateVPCIntercomResponse + ); + } + + /** + * DeleteNATGW - 删除NAT网关 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_natgw + */ + deleteNATGW(request?: DeleteNATGWRequest): Promise { + const args = { Action: 'DeleteNATGW', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteNATGWResponse + ); + } + + /** + * DeleteNATGWPolicy - 删除NAT网关端口转发规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_natgw_policy + */ + deleteNATGWPolicy( + request?: DeleteNATGWPolicyRequest + ): Promise { + const args = { Action: 'DeleteNATGWPolicy', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteNATGWPolicyResponse + ); + } + + /** + * DeleteNetworkAcl - 删除网络ACL + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_network_acl + */ + deleteNetworkAcl( + request?: DeleteNetworkAclRequest + ): Promise { + const args = { Action: 'DeleteNetworkAcl', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteNetworkAclResponse + ); + } + + /** + * DeleteNetworkAclAssociation - 删除网络ACL绑定关系 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_network_acl_association + */ + deleteNetworkAclAssociation( + request?: DeleteNetworkAclAssociationRequest + ): Promise { + const args = { Action: 'DeleteNetworkAclAssociation', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteNetworkAclAssociationResponse + ); + } + + /** + * DeleteNetworkAclEntry - 删除ACL的规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_network_acl_entry + */ + deleteNetworkAclEntry( + request?: DeleteNetworkAclEntryRequest + ): Promise { + const args = { Action: 'DeleteNetworkAclEntry', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteNetworkAclEntryResponse + ); + } + + /** + * DeleteRouteTable - 删除自定义路由表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_route_table + */ + deleteRouteTable( + request?: DeleteRouteTableRequest + ): Promise { + const args = { Action: 'DeleteRouteTable', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteRouteTableResponse + ); + } + + /** + * DeleteSecondaryIp - 删除ip(用于uk8s使用) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_secondary_ip + */ + deleteSecondaryIp( + request?: DeleteSecondaryIpRequest + ): Promise { + const args = { Action: 'DeleteSecondaryIp', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteSecondaryIpResponse + ); + } + + /** + * DeleteSnatRule - 删除指定的出口规则(SNAT规则) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_snat_rule + */ + deleteSnatRule( + request?: DeleteSnatRuleRequest + ): Promise { + const args = { Action: 'DeleteSnatRule', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteSnatRuleResponse + ); + } + + /** + * DeleteSubnet - 删除子网 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_subnet + */ + deleteSubnet(request?: DeleteSubnetRequest): Promise { + const args = { Action: 'DeleteSubnet', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteSubnetResponse + ); + } + + /** + * DeleteVPC - 删除VPC + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_vpc + */ + deleteVPC(request?: DeleteVPCRequest): Promise { + const args = { Action: 'DeleteVPC', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteVPCResponse + ); + } + + /** + * DeleteVPCIntercom - 删除VPC互通关系 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_vpc_intercom + */ + deleteVPCIntercom( + request?: DeleteVPCIntercomRequest + ): Promise { + const args = { Action: 'DeleteVPCIntercom', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteVPCIntercomResponse + ); + } + + /** + * DeleteWhiteListResource - 删除NAT网关白名单列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/delete_white_list_resource + */ + deleteWhiteListResource( + request?: DeleteWhiteListResourceRequest + ): Promise { + const args = { Action: 'DeleteWhiteListResource', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteWhiteListResourceResponse + ); + } + + /** + * DescribeNATGW - 获取NAT网关信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_natgw + */ + describeNATGW( + request?: DescribeNATGWRequest + ): Promise { + const args = { Action: 'DescribeNATGW', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeNATGWResponse + ); + } + + /** + * DescribeNATGWPolicy - 展示NAT网关端口转发规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_natgw_policy + */ + describeNATGWPolicy( + request?: DescribeNATGWPolicyRequest + ): Promise { + const args = { Action: 'DescribeNATGWPolicy', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeNATGWPolicyResponse + ); + } + + /** + * DescribeNetworkAcl - 获取网络ACL + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_network_acl + */ + describeNetworkAcl( + request?: DescribeNetworkAclRequest + ): Promise { + const args = { Action: 'DescribeNetworkAcl', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeNetworkAclResponse + ); + } + + /** + * DescribeNetworkAclAssociation - 获取网络ACL的绑定关系列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_network_acl_association + */ + describeNetworkAclAssociation( + request?: DescribeNetworkAclAssociationRequest + ): Promise { + const args = { + Action: 'DescribeNetworkAclAssociation', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeNetworkAclAssociationResponse + ); + } + + /** + * DescribeNetworkAclAssociationBySubnet - 获取子网的ACL绑定信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_network_acl_association_by_subnet + */ + describeNetworkAclAssociationBySubnet( + request?: DescribeNetworkAclAssociationBySubnetRequest + ): Promise { + const args = { + Action: 'DescribeNetworkAclAssociationBySubnet', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeNetworkAclAssociationBySubnetResponse + ); + } + + /** + * DescribeNetworkAclEntry - 获取ACL的规则信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_network_acl_entry + */ + describeNetworkAclEntry( + request?: DescribeNetworkAclEntryRequest + ): Promise { + const args = { Action: 'DescribeNetworkAclEntry', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeNetworkAclEntryResponse + ); + } + + /** + * DescribeRouteTable - 获取路由表详细信息(包括路由策略) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_route_table + */ + describeRouteTable( + request?: DescribeRouteTableRequest + ): Promise { + const args = { Action: 'DescribeRouteTable', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeRouteTableResponse + ); + } + + /** + * DescribeSecondaryIp - 查询SecondaryIp(uk8s使用) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_secondary_ip + */ + describeSecondaryIp( + request?: DescribeSecondaryIpRequest + ): Promise { + const args = { Action: 'DescribeSecondaryIp', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeSecondaryIpResponse + ); + } + + /** + * DescribeSnatRule - 获取Nat网关的出口规则(SNAT规则) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_snat_rule + */ + describeSnatRule( + request?: DescribeSnatRuleRequest + ): Promise { + const args = { Action: 'DescribeSnatRule', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeSnatRuleResponse + ); + } + + /** + * DescribeSubnet - 获取子网信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_subnet + */ + describeSubnet( + request?: DescribeSubnetRequest + ): Promise { + const args = { Action: 'DescribeSubnet', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeSubnetResponse + ); + } + + /** + * DescribeSubnetResource - 展示子网资源 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_subnet_resource + */ + describeSubnetResource( + request?: DescribeSubnetResourceRequest + ): Promise { + const args = { Action: 'DescribeSubnetResource', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeSubnetResourceResponse + ); + } + + /** + * DescribeVIP - 获取内网VIP详细信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_vip + */ + describeVIP(request?: DescribeVIPRequest): Promise { + const args = { Action: 'DescribeVIP', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeVIPResponse + ); + } + + /** + * DescribeVPC - 获取VPC信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_vpc + */ + describeVPC(request?: DescribeVPCRequest): Promise { + const args = { Action: 'DescribeVPC', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeVPCResponse + ); + } + + /** + * DescribeVPCIntercom - 获取VPC互通信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_vpc_intercom + */ + describeVPCIntercom( + request?: DescribeVPCIntercomRequest + ): Promise { + const args = { Action: 'DescribeVPCIntercom', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeVPCIntercomResponse + ); + } + + /** + * DescribeWhiteListResource - 展示NAT网关白名单资源列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/describe_white_list_resource + */ + describeWhiteListResource( + request?: DescribeWhiteListResourceRequest + ): Promise { + const args = { Action: 'DescribeWhiteListResource', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeWhiteListResourceResponse + ); + } + + /** + * EnableWhiteList - 修改NAT网关白名单开关 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/enable_white_list + */ + enableWhiteList( + request?: EnableWhiteListRequest + ): Promise { + const args = { Action: 'EnableWhiteList', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as EnableWhiteListResponse + ); + } + + /** + * GetAvailableResourceForPolicy - 获取NAT网关可配置端口转发规则的资源信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/get_available_resource_for_policy + */ + getAvailableResourceForPolicy( + request?: GetAvailableResourceForPolicyRequest + ): Promise { + const args = { + Action: 'GetAvailableResourceForPolicy', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetAvailableResourceForPolicyResponse + ); + } + + /** + * GetAvailableResourceForSnatRule - 获取可用于添加snat规则(出口规则)的资源列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/get_available_resource_for_snat_rule + */ + getAvailableResourceForSnatRule( + request?: GetAvailableResourceForSnatRuleRequest + ): Promise { + const args = { + Action: 'GetAvailableResourceForSnatRule', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetAvailableResourceForSnatRuleResponse + ); + } + + /** + * GetAvailableResourceForWhiteList - 获取NAT网关可添加白名单的资源 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/get_available_resource_for_white_list + */ + getAvailableResourceForWhiteList( + request?: GetAvailableResourceForWhiteListRequest + ): Promise { + const args = { + Action: 'GetAvailableResourceForWhiteList', + ...(request || {}), + }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetAvailableResourceForWhiteListResponse + ); + } + + /** + * GetNetworkAclTargetResource - 获取ACL规则应用目标列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/get_network_acl_target_resource + */ + getNetworkAclTargetResource( + request?: GetNetworkAclTargetResourceRequest + ): Promise { + const args = { Action: 'GetNetworkAclTargetResource', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetNetworkAclTargetResourceResponse + ); + } + + /** + * ListSubnetForNATGW - 展示NAT网关可绑定的子网列表 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/list_subnet_for_natgw + */ + listSubnetForNATGW( + request?: ListSubnetForNATGWRequest + ): Promise { + const args = { Action: 'ListSubnetForNATGW', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ListSubnetForNATGWResponse + ); + } + + /** + * ModifyRouteRule - 路由策略增、删、改 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/modify_route_rule + */ + modifyRouteRule( + request?: ModifyRouteRuleRequest + ): Promise { + const args = { Action: 'ModifyRouteRule', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ModifyRouteRuleResponse + ); + } + + /** + * ReleaseVIP - 释放VIP资源 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/release_vip + */ + releaseVIP(request?: ReleaseVIPRequest): Promise { + const args = { Action: 'ReleaseVIP', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as ReleaseVIPResponse + ); + } + + /** + * SetGwDefaultExport - 设置NAT网关的默认出口 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/set_gw_default_export + */ + setGwDefaultExport( + request?: SetGwDefaultExportRequest + ): Promise { + const args = { Action: 'SetGwDefaultExport', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as SetGwDefaultExportResponse + ); + } + + /** + * UpdateNATGWPolicy - 更新NAT网关端口转发规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_natgw_policy + */ + updateNATGWPolicy( + request?: UpdateNATGWPolicyRequest + ): Promise { + const args = { Action: 'UpdateNATGWPolicy', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateNATGWPolicyResponse + ); + } + + /** + * UpdateNATGWSubnet - 更新NAT网关绑定的子网 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_natgw_subnet + */ + updateNATGWSubnet( + request?: UpdateNATGWSubnetRequest + ): Promise { + const args = { Action: 'UpdateNATGWSubnet', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateNATGWSubnetResponse + ); + } + + /** + * UpdateNetworkAcl - 更改ACL + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_network_acl + */ + updateNetworkAcl( + request?: UpdateNetworkAclRequest + ): Promise { + const args = { Action: 'UpdateNetworkAcl', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateNetworkAclResponse + ); + } + + /** + * UpdateNetworkAclEntry - 更新ACL的规则 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_network_acl_entry + */ + updateNetworkAclEntry( + request?: UpdateNetworkAclEntryRequest + ): Promise { + const args = { Action: 'UpdateNetworkAclEntry', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateNetworkAclEntryResponse + ); + } + + /** + * UpdateRouteTableAttribute - 更新路由表基本信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_route_table_attribute + */ + updateRouteTableAttribute( + request?: UpdateRouteTableAttributeRequest + ): Promise { + const args = { Action: 'UpdateRouteTableAttribute', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateRouteTableAttributeResponse + ); + } + + /** + * UpdateSnatRule - 更新指定的出口规则(SNAT规则) + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_snat_rule + */ + updateSnatRule( + request?: UpdateSnatRuleRequest + ): Promise { + const args = { Action: 'UpdateSnatRule', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateSnatRuleResponse + ); + } + + /** + * UpdateSubnetAttribute - 更新子网信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_subnet_attribute + */ + updateSubnetAttribute( + request?: UpdateSubnetAttributeRequest + ): Promise { + const args = { Action: 'UpdateSubnetAttribute', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateSubnetAttributeResponse + ); + } + + /** + * UpdateVIPAttribute - 更新VIP信息 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_vip_attribute + */ + updateVIPAttribute( + request?: UpdateVIPAttributeRequest + ): Promise { + const args = { Action: 'UpdateVIPAttribute', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateVIPAttributeResponse + ); + } + + /** + * UpdateVPCNetwork - 更新VPC网段 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/update_vpc_network + */ + updateVPCNetwork( + request?: UpdateVPCNetworkRequest + ): Promise { + const args = { Action: 'UpdateVPCNetwork', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateVPCNetworkResponse + ); + } +} + +/** + * AddSnatRule - 对于绑定了多个EIP的NAT网关,您可以将一个子网下的某台云主机映射到某个特定的EIP上,规则生效后,则该云主机通过该特定的EIP访问互联网。 + */ +export interface AddSnatRuleRequest { + /** + * NAT网关的ID + */ + NATGWId: string; + /** + * 需要出外网的私网IP地址,例如10.9.7.xx + */ + SourceIp: string; + /** + * EIP的ip地址,例如106.75.xx.xx + */ + SnatIp: string; + /** + * snat规则名称,默认为“出口规则” + */ + Name?: string; +} + +/** + * AddSnatRule - 对于绑定了多个EIP的NAT网关,您可以将一个子网下的某台云主机映射到某个特定的EIP上,规则生效后,则该云主机通过该特定的EIP访问互联网。 + */ +export interface AddSnatRuleResponse {} + +/** + * AddVPCNetwork - 添加VPC网段 + */ +export interface AddVPCNetworkRequest { + /** + * 源VPC短ID + */ + VPCId: string; + /** + * 增加网段 + */ + Network: string[]; +} + +/** + * AddVPCNetwork - 添加VPC网段 + */ +export interface AddVPCNetworkResponse {} + +/** + * AddWhiteListResource - 添加NAT网关白名单 + */ +export interface AddWhiteListResourceRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 可添加白名单的资源Id + */ + ResourceIds: string[]; +} + +/** + * AddWhiteListResource - 添加NAT网关白名单 + */ +export interface AddWhiteListResourceResponse {} + +/** + * AllocateSecondaryIp - 分配ip(用于uk8s使用) + */ +export interface AllocateSecondaryIpRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * 节点mac + */ + Mac: string; + /** + * 资源Id + */ + ObjectId: string; + /** + * 子网Id(若未指定,则根据zone获取默认子网进行创建) + */ + SubnetId?: string; + /** + * vpcId + */ + VPCId?: string; + /** + * 指定Ip分配 + */ + Ip?: string; +} + +/** + * AllocateSecondaryIp - 分配ip(用于uk8s使用) + */ +export interface AllocateSecondaryIpResponse { + /** + * + */ + IpInfo: { + /** + * + */ + Ip?: string; + /** + * + */ + Mask?: string; + /** + * + */ + Gateway?: string; + /** + * + */ + Mac?: string; + /** + * + */ + SubnetId?: string; + /** + * + */ + VPCId?: string; + }; +} + +/** + * AllocateVIP - 根据提供信息,申请内网VIP(Virtual IP),多用于高可用程序作为漂移IP。 + */ +export interface AllocateVIPRequest { + /** + * 可用区 + */ + Zone?: string; + /** + * 指定vip所属的VPC + */ + VPCId: string; + /** + * 子网id + */ + SubnetId: string; + /** + * 指定ip + */ + Ip?: string; + /** + * 申请数量,默认: 1 + */ + Count?: number; + /** + * vip名,默认:VIP + */ + Name?: string; + /** + * 业务组名称,默认为Default + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 业务组 + */ + BusinessId?: string; +} + +/** + * AllocateVIP - 根据提供信息,申请内网VIP(Virtual IP),多用于高可用程序作为漂移IP。 + */ +export interface AllocateVIPResponse { + /** + * 申请到的VIP资源相关信息 + */ + VIPSet?: { + /** + * 虚拟ip + */ + VIP?: string; + /** + * 虚拟ip id + */ + VIPId?: string; + /** + * VPC id + */ + VPCId?: string; + }[]; + /** + * 申请到的VIP地址 + */ + DataSet?: string[]; +} + +/** + * AssociateRouteTable - 绑定子网的路由表 + */ +export interface AssociateRouteTableRequest { + /** + * 子网ID + */ + SubnetId: string; + /** + * 路由表资源ID + */ + RouteTableId: string; +} + +/** + * AssociateRouteTable - 绑定子网的路由表 + */ +export interface AssociateRouteTableResponse {} + +/** + * CloneRouteTable - 将现有的路由表复制为一张新的路由表 + */ +export interface CloneRouteTableRequest { + /** + * 被克隆的路由表ID + */ + RouteTableId: string; +} + +/** + * CloneRouteTable - 将现有的路由表复制为一张新的路由表 + */ +export interface CloneRouteTableResponse { + /** + * 复制后新的路由表资源ID + */ + RouteTableId?: string; +} + +/** + * CreateNATGW - 创建NAT网关 + */ +export interface CreateNATGWRequest { + /** + * NAT网关名称 + */ + NATGWName: string; + /** + * NAT网关绑定的子网Id + */ + SubnetworkIds: string[]; + /** + * NAT网关绑定的EIPId + */ + EIPIds: string[]; + /** + * NAT网关绑定的防火墙Id + */ + FirewallId: string; + /** + * NAT网关所属的VPC Id。默认为Default VPC Id + */ + VPCId?: string; + /** + * 白名单开关标记。0表示关闭,1表示开启。默认为0 + */ + IfOpen?: number; + /** + * 业务组。默认为空 + */ + Tag?: string; + /** + * 备注。默认为空 + */ + Remark?: string; +} + +/** + * CreateNATGW - 创建NAT网关 + */ +export interface CreateNATGWResponse { + /** + * 申请到的NATGateWay Id + */ + NATGWId?: string; +} + +/** + * CreateNATGWPolicy - 添加NAT网关端口转发规则 + */ +export interface CreateNATGWPolicyRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 协议类型。枚举值为:TCP、UDP + */ + Protocol: string; + /** + * 源IP。填写对应的EIP Id + */ + SrcEIPId: string; + /** + * 源端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535 + */ + SrcPort: string; + /** + * 目标IP。填写对应的目标IP地址 + */ + DstIP: string; + /** + * 目标端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535 + */ + DstPort: string; + /** + * 转发策略名称。默认为空 + */ + PolicyName?: string; +} + +/** + * CreateNATGWPolicy - 添加NAT网关端口转发规则 + */ +export interface CreateNATGWPolicyResponse { + /** + * 创建时分配的策略Id + */ + PolicyId: string; +} + +/** + * CreateNetworkAcl - 创建网络ACL + */ +export interface CreateNetworkAclRequest { + /** + * 将要创建的ACL所属VPC的ID + */ + VpcId: string; + /** + * ACL的名称 + */ + AclName: string; + /** + * ACL的描述 + */ + Description?: string; +} + +/** + * CreateNetworkAcl - 创建网络ACL + */ +export interface CreateNetworkAclResponse { + /** + * 创建的ACL的ID + */ + AclId: string; +} + +/** + * CreateNetworkAclAssociation - 创建ACL的绑定关系 + */ +export interface CreateNetworkAclAssociationRequest { + /** + * ACL的ID + */ + AclId: string; + /** + * 需要绑定的子网ID + */ + SubnetworkId: string; +} + +/** + * CreateNetworkAclAssociation - 创建ACL的绑定关系 + */ +export interface CreateNetworkAclAssociationResponse { + /** + * 创建的绑定关系的ID + */ + AssociationId: string; + /** + * 该子网之前的绑定关系信息 + */ + PrevAssociation?: { + /** + * 绑定ID + */ + AssociationId: string; + /** + * ACL的ID + */ + AclId: string; + /** + * 绑定的子网ID + */ + SubnetworkId: string; + /** + * 创建的Unix时间戳 + */ + CreateTime: number; + }; +} + +/** + * CreateNetworkAclEntry - 创建ACL的规则 + */ +export interface CreateNetworkAclEntryRequest { + /** + * ACL的ID + */ + AclId: string; + /** + * Entry的优先级,对于同样的Direction来说,不能重复 + */ + Priority: number; + /** + * 出向或者入向(“Ingress”, "Egress") + */ + Direction: string; + /** + * 协议规则描述 + */ + IpProtocol: string; + /** + * IPv4段的CIDR表示 + */ + CidrBlock: string; + /** + * 针对的端口范围 + */ + PortRange: string; + /** + * 规则的行为("Accept", "Reject") + */ + EntryAction: string; + /** + * 描述。长度限制为不超过32字节。 + */ + Description?: string; + /** + * 应用目标类型。0代表“子网内全部资源”,1代表“子网内指定资源”,默认为0 + */ + TargetType?: number; + /** + * 应用目标资源列表。默认为全部资源生效。TargetType为0时不用填写该值。 + */ + TargetResourceIds?: string[]; +} + +/** + * CreateNetworkAclEntry - 创建ACL的规则 + */ +export interface CreateNetworkAclEntryResponse { + /** + * 创建的Entry的ID + */ + EntryId: string; +} + +/** + * CreateRouteTable - 创建路由表 + */ +export interface CreateRouteTableRequest { + /** + * 所属的VPC资源ID + */ + VPCId: string; + /** + * 路由表名称。默认为RouteTable + */ + Name?: string; + /** + * 路由表所属业务组 + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; +} + +/** + * CreateRouteTable - 创建路由表 + */ +export interface CreateRouteTableResponse { + /** + * 路由表ID + */ + RouteTableId?: string; +} + +/** + * CreateSubnet - 创建子网 + */ +export interface CreateSubnetRequest { + /** + * VPC资源ID + */ + VPCId: string; + /** + * 子网网络地址,例如192.168.0.0 + */ + Subnet: string; + /** + * 子网网络号位数,默认为24 + */ + Netmask?: number; + /** + * 子网名称,默认为Subnet + */ + SubnetName?: string; + /** + * 业务组名称,默认为Default + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; +} + +/** + * CreateSubnet - 创建子网 + */ +export interface CreateSubnetResponse { + /** + * 子网ID + */ + SubnetId?: string; +} + +/** + * CreateVPC - 创建VPC + */ +export interface CreateVPCRequest { + /** + * VPC名称 + */ + Name: string; + /** + * VPC网段 + */ + Network: string[]; + /** + * 业务组名称 + */ + Tag?: string; + /** + * 备注 + */ + Remark?: string; +} + +/** + * CreateVPC - 创建VPC + */ +export interface CreateVPCResponse { + /** + * VPC资源Id + */ + VPCId?: string; +} + +/** + * CreateVPCIntercom - 新建VPC互通关系 + */ +export interface CreateVPCIntercomRequest { + /** + * 源VPC短ID + */ + VPCId: string; + /** + * 目的VPC短ID + */ + DstVPCId: string; + /** + * 目的VPC所在地域,默认与源VPC同地域。 + */ + DstRegion?: string; + /** + * 目的VPC项目ID。默认与源VPC同项目。 + */ + DstProjectId?: string; +} + +/** + * CreateVPCIntercom - 新建VPC互通关系 + */ +export interface CreateVPCIntercomResponse {} + +/** + * DeleteNATGW - 删除NAT网关 + */ +export interface DeleteNATGWRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 是否释放绑定的EIP。true:解绑并释放;false:只解绑不释放。默认为false + */ + ReleaseEip?: boolean; +} + +/** + * DeleteNATGW - 删除NAT网关 + */ +export interface DeleteNATGWResponse {} + +/** + * DeleteNATGWPolicy - 删除NAT网关端口转发规则 + */ +export interface DeleteNATGWPolicyRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 端口转发规则Id + */ + PolicyId: string; +} + +/** + * DeleteNATGWPolicy - 删除NAT网关端口转发规则 + */ +export interface DeleteNATGWPolicyResponse {} + +/** + * DeleteNetworkAcl - 删除网络ACL + */ +export interface DeleteNetworkAclRequest { + /** + * 需要删除的AclId + */ + AclId: string; +} + +/** + * DeleteNetworkAcl - 删除网络ACL + */ +export interface DeleteNetworkAclResponse {} + +/** + * DeleteNetworkAclAssociation - 删除网络ACL绑定关系 + */ +export interface DeleteNetworkAclAssociationRequest { + /** + * 需要删除的AclId + */ + AclId: string; + /** + * 绑定的子网ID + */ + SubnetworkId: string; +} + +/** + * DeleteNetworkAclAssociation - 删除网络ACL绑定关系 + */ +export interface DeleteNetworkAclAssociationResponse {} + +/** + * DeleteNetworkAclEntry - 删除ACL的规则 + */ +export interface DeleteNetworkAclEntryRequest { + /** + * Acl的ID + */ + AclId: string; + /** + * 需要删除的EntryId + */ + EntryId: string; +} + +/** + * DeleteNetworkAclEntry - 删除ACL的规则 + */ +export interface DeleteNetworkAclEntryResponse {} + +/** + * DeleteRouteTable - 删除自定义路由表 + */ +export interface DeleteRouteTableRequest { + /** + * 路由表资源ID + */ + RouteTableId: string; +} + +/** + * DeleteRouteTable - 删除自定义路由表 + */ +export interface DeleteRouteTableResponse {} + +/** + * DeleteSecondaryIp - 删除ip(用于uk8s使用) + */ +export interface DeleteSecondaryIpRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone: string; + /** + * ip + */ + Ip: string; + /** + * mac + */ + Mac: string; + /** + * 子网Id + */ + SubnetId: string; + /** + * VPCId + */ + VPCId?: string; + /** + * 资源Id + */ + ObjectId?: string; +} + +/** + * DeleteSecondaryIp - 删除ip(用于uk8s使用) + */ +export interface DeleteSecondaryIpResponse {} + +/** + * DeleteSnatRule - 删除指定的出口规则(SNAT规则) + */ +export interface DeleteSnatRuleRequest { + /** + * NAT网关的ID + */ + NATGWId: string; + /** + * 需要出外网的私网IP地址,例如10.9.7.xx + */ + SourceIp: string; +} + +/** + * DeleteSnatRule - 删除指定的出口规则(SNAT规则) + */ +export interface DeleteSnatRuleResponse {} + +/** + * DeleteSubnet - 删除子网 + */ +export interface DeleteSubnetRequest { + /** + * 子网ID + */ + SubnetId: string; +} + +/** + * DeleteSubnet - 删除子网 + */ +export interface DeleteSubnetResponse {} + +/** + * DeleteVPC - 删除VPC + */ +export interface DeleteVPCRequest { + /** + * VPC资源Id + */ + VPCId: string; +} + +/** + * DeleteVPC - 删除VPC + */ +export interface DeleteVPCResponse {} + +/** + * DeleteVPCIntercom - 删除VPC互通关系 + */ +export interface DeleteVPCIntercomRequest { + /** + * 源VPC短ID + */ + VPCId: string; + /** + * 目的VPC短ID + */ + DstVPCId: string; + /** + * 目的VPC所在地域,默认为源VPC所在地域 + */ + DstRegion?: string; + /** + * 目的VPC所在项目ID,默认为源VPC所在项目ID + */ + DstProjectId?: string; +} + +/** + * DeleteVPCIntercom - 删除VPC互通关系 + */ +export interface DeleteVPCIntercomResponse {} + +/** + * DeleteWhiteListResource - 删除NAT网关白名单列表 + */ +export interface DeleteWhiteListResourceRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 删除白名单的资源Id + */ + ResourceIds: string[]; +} + +/** + * DeleteWhiteListResource - 删除NAT网关白名单列表 + */ +export interface DeleteWhiteListResourceResponse {} + +/** + * DescribeNATGW - 获取NAT网关信息 + */ +export interface DescribeNATGWRequest { + /** + * NAT网关Id。默认为该项目下所有NAT网关 + */ + NATGWIds?: string[]; + /** + * 数据偏移量。默认为0 + */ + Offset?: number; + /** + * 数据分页值。默认为20 + */ + Limit?: number; +} + +/** + * DescribeNATGW - 获取NAT网关信息 + */ +export interface DescribeNATGWResponse { + /** + * 满足条件的实例的总数 + */ + TotalCount: number; + /** + * 查到的NATGW信息列表 + */ + DataSet: { + /** + * natgw id + */ + NATGWId: string; + /** + * natgw名称 + */ + NATGWName: string; + /** + * natgw创建时间 + */ + CreateTime: number; + /** + * 业务组 + */ + Tag: string; + /** + * 备注 + */ + Remark: string; + /** + * 绑定的防火墙Id + */ + FirewallId: string; + /** + * 所属VPC Id + */ + VPCId: string; + /** + * 子网 Id + */ + SubnetSet: { + /** + * 子网id + */ + SubnetworkId: string; + /** + * 子网网段 + */ + Subnet: string; + /** + * 子网名字 + */ + SubnetName: string; + }[]; + /** + * 绑定的EIP 信息 + */ + IPSet: { + /** + * 外网IP的 EIPId + */ + EIPId: string; + /** + * 权重为100的为出口 + */ + Weight: number; + /** + * EIP带宽类型 + */ + BandwidthType: string; + /** + * 带宽 + */ + Bandwidth: number; + /** + * 外网IP信息 + */ + IPResInfo: { + /** + * IP的运营商信息 + */ + OperatorName: string; + /** + * 外网IP + */ + EIP: string; + }[]; + }[]; + /** + * 转发策略Id + */ + PolicyId?: string[]; + }[]; +} + +/** + * DescribeNATGWPolicy - 展示NAT网关端口转发规则 + */ +export interface DescribeNATGWPolicyRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 返回数据长度,默认为10000 + */ + Limit?: number; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; +} + +/** + * DescribeNATGWPolicy - 展示NAT网关端口转发规则 + */ +export interface DescribeNATGWPolicyResponse { + /** + * 满足条件的转发策略总数 + */ + TotalCount: number; + /** + * 查到的NATGW 转发策略的详细信息 + */ + DataSet?: { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 转发策略Id + */ + PolicyId: string; + /** + * 协议类型 + */ + Protocol: string; + /** + * 端口转发前端EIP + */ + SrcEIP: string; + /** + * 端口转发前端EIP Id + */ + SrcEIPId: string; + /** + * 源端口 + */ + SrcPort: string; + /** + * 目的地址 + */ + DstIP: string; + /** + * 目的端口 + */ + DstPort: string; + /** + * 转发策略名称 + */ + PolicyName?: string; + }[]; +} + +/** + * DescribeNetworkAcl - 获取网络ACL + */ +export interface DescribeNetworkAclRequest { + /** + * 列表偏移量 + */ + Offset?: number; + /** + * 列表获取的个数限制 + */ + Limit?: string; + /** + * 需要获取的ACL所属的VPC的ID + */ + VpcId?: string; +} + +/** + * DescribeNetworkAcl - 获取网络ACL + */ +export interface DescribeNetworkAclResponse { + /** + * ACL的信息,具体结构见下方AclInfo + */ + AclList: { + /** + * ACL所属的VPC ID + */ + VpcId: string; + /** + * ACL的ID + */ + AclId: string; + /** + * 名称 + */ + AclName: string; + /** + * 描述 + */ + Description: string; + /** + * 所有的规则 + */ + Entries: { + /** + * Entry的ID + */ + EntryId: string; + /** + * 优先级 + */ + Priority: string; + /** + * 出向或者入向 + */ + Direction: string; + /** + * 针对的IP协议 + */ + IpProtocol: string; + /** + * IP段的CIDR信息 + */ + CidrBlock: string; + /** + * Port的段信息 + */ + PortRange: string; + /** + * 匹配规则的动作 + */ + EntryAction: string; + /** + * 应用目标类型。 0代表“子网内全部资源” ,1代表“子网内指定资源” 。 + */ + TargetType: number; + /** + * 创建的Unix时间戳 + */ + CreateTime: number; + /** + * 更改的Unix时间戳 + */ + UpdateTime: number; + /** + * 应用目标资源信息。TargetType为0时不返回该值。具体结构见下方TargetResourceInfo + */ + TargetResourceList?: { + /** + * 子网ID + */ + SubnetworkId: string; + /** + * 资源名称 + */ + ResourceName: string; + /** + * 资源ID + */ + ResourceId: string; + /** + * 资源类型 + */ + ResourceType: number; + /** + * 资源绑定的虚拟网卡的名称 + */ + SubResourceName: string; + /** + * 资源绑定的虚拟网卡的ID + */ + SubResourceId: string; + /** + * 资源绑定虚拟网卡的类型 + */ + SubResourceType: number; + /** + * 资源内网IP + */ + PrivateIp: string; + }[]; + /** + * 应用目标资源数量。TargetType为0时不返回该值。 + */ + TargetResourceCount?: number; + }[]; + /** + * 所有的绑定关系,具体结构见下方AssociationInfo + */ + Associations: { + /** + * 绑定ID + */ + AssociationId: string; + /** + * ACL的ID + */ + AclId: string; + /** + * 绑定的子网ID + */ + SubnetworkId: string; + /** + * 创建的Unix时间戳 + */ + CreateTime: number; + }[]; + /** + * 创建的Unix时间戳 + */ + CreateTime: number; + /** + * 更改的Unix时间戳 + */ + UpdateTime: number; + }[]; +} + +/** + * DescribeNetworkAclAssociation - 获取网络ACL的绑定关系列表 + */ +export interface DescribeNetworkAclAssociationRequest { + /** + * Acl的ID + */ + AclId: string; + /** + * 列表偏移量 + */ + Offset?: number; + /** + * 列表获取的个数限制 + */ + Limit?: string; +} + +/** + * DescribeNetworkAclAssociation - 获取网络ACL的绑定关系列表 + */ +export interface DescribeNetworkAclAssociationResponse { + /** + * 绑定信息列表 + */ + AssociationList: { + /** + * 绑定ID + */ + AssociationId: string; + /** + * ACL的ID + */ + AclId: string; + /** + * 绑定的子网ID + */ + SubnetworkId: string; + /** + * 创建的Unix时间戳 + */ + CreateTime: number; + }[]; +} + +/** + * DescribeNetworkAclAssociationBySubnet - 获取子网的ACL绑定信息 + */ +export interface DescribeNetworkAclAssociationBySubnetRequest { + /** + * 子网的ID + */ + SubnetworkId: string; +} + +/** + * DescribeNetworkAclAssociationBySubnet - 获取子网的ACL绑定信息 + */ +export interface DescribeNetworkAclAssociationBySubnetResponse { + /** + * 绑定信息 + */ + Association: { + /** + * 绑定ID + */ + AssociationId: string; + /** + * ACL的ID + */ + AclId: string; + /** + * 绑定的子网ID + */ + SubnetworkId: string; + /** + * 创建的Unix时间戳 + */ + CreateTime: number; + }; +} + +/** + * DescribeNetworkAclEntry - 获取ACL的规则信息 + */ +export interface DescribeNetworkAclEntryRequest { + /** + * ACL的ID + */ + AclId: string; +} + +/** + * DescribeNetworkAclEntry - 获取ACL的规则信息 + */ +export interface DescribeNetworkAclEntryResponse { + /** + * 所有的规则信息 + */ + EntryList: { + /** + * Entry的ID + */ + EntryId: string; + /** + * 优先级 + */ + Priority: string; + /** + * 出向或者入向 + */ + Direction: string; + /** + * 针对的IP协议 + */ + IpProtocol: string; + /** + * IP段的CIDR信息 + */ + CidrBlock: string; + /** + * Port的段信息 + */ + PortRange: string; + /** + * 匹配规则的动作 + */ + EntryAction: string; + /** + * 应用目标类型。 0代表“子网内全部资源” ,1代表“子网内指定资源” 。 + */ + TargetType: number; + /** + * 创建的Unix时间戳 + */ + CreateTime: number; + /** + * 更改的Unix时间戳 + */ + UpdateTime: number; + /** + * 应用目标资源信息。TargetType为0时不返回该值。具体结构见下方TargetResourceInfo + */ + TargetResourceList?: { + /** + * 子网ID + */ + SubnetworkId: string; + /** + * 资源名称 + */ + ResourceName: string; + /** + * 资源ID + */ + ResourceId: string; + /** + * 资源类型 + */ + ResourceType: number; + /** + * 资源绑定的虚拟网卡的名称 + */ + SubResourceName: string; + /** + * 资源绑定的虚拟网卡的ID + */ + SubResourceId: string; + /** + * 资源绑定虚拟网卡的类型 + */ + SubResourceType: number; + /** + * 资源内网IP + */ + PrivateIp: string; + }[]; + /** + * 应用目标资源数量。TargetType为0时不返回该值。 + */ + TargetResourceCount?: number; + }[]; +} + +/** + * DescribeRouteTable - 获取路由表详细信息(包括路由策略) + */ +export interface DescribeRouteTableRequest { + /** + * 所属VPC的资源ID + */ + VPCId?: string; + /** + * 路由表资源ID + */ + RouteTableId?: string; + /** + * 数据偏移量。默认为0 + */ + OffSet?: number; + /** + * 数据分页值。默认为20 + */ + Limit?: number; + /** + * 业务组ID + */ + BusinessId?: string; +} + +/** + * DescribeRouteTable - 获取路由表详细信息(包括路由策略) + */ +export interface DescribeRouteTableResponse { + /** + * 路由表信息 + */ + RouteTables?: { + /** + * 路由表资源ID + */ + RouteTableId?: string; + /** + * 路由表类型。1为默认路由表,0为自定义路由表 + */ + RouteTableType?: number; + /** + * 绑定该路由表的子网数量 + */ + SubnetCount?: number; + /** + * 路由表所属的VPC资源ID + */ + VPCId?: string; + /** + * 路由表所属的VPC资源名称 + */ + VPCName?: string; + /** + * 路由表所属业务组 + */ + Tag?: string; + /** + * 路由表备注 + */ + Remark?: string; + /** + * 创建时间戳 + */ + CreateTime?: number; + /** + * 路由规则 + */ + RouteRules?: { + /** + * 项目ID信息 + */ + AccountId?: number; + /** + * 目的地址 + */ + DstAddr?: string; + /** + * 保留字段,暂未使用 + */ + DstPort?: number; + /** + * 路由下一跳资源ID + */ + NexthopId?: string; + /** + * 路由表下一跳类型。LOCAL,本VPC内部通信路由;PUBLIC,公共服务路由;CNAT,外网路由;UDPN,跨域高速通道路由;HYBRIDGW,混合云路由;INSTANCE,实例路由;VNET,VPC联通路由;IPSEC VPN,指向VPN网关的路由。 + */ + NexthopType?: string; + /** + * 保留字段,暂未使用 + */ + OriginAddr?: string; + /** + * 保留字段,暂未使用 + */ + Priority?: number; + /** + * 路由规则备注 + */ + Remark?: string; + /** + * 规则ID + */ + RouteRuleId?: string; + /** + * 路由表资源ID + */ + RouteTableId?: string; + /** + * 路由规则类型。0,系统路由规则;1,自定义路由规则 + */ + RuleType?: number; + /** + * 保留字段,暂未使用 + */ + SrcAddr?: string; + /** + * 保留字段,暂未使用 + */ + SrcPort?: number; + /** + * 所属的VPC + */ + VNetId?: string; + }[]; + }[]; + /** + * RouteTables字段的数量 + */ + TotalCount?: number; +} + +/** + * DescribeSecondaryIp - 查询SecondaryIp(uk8s使用) + */ +export interface DescribeSecondaryIpRequest { + /** + * 子网Id + */ + SubnetId: string; + /** + * VPCId + */ + VPCId: string; + /** + * Ip + */ + Ip?: string; + /** + * Mac + */ + Mac?: string; +} + +/** + * DescribeSecondaryIp - 查询SecondaryIp(uk8s使用) + */ +export interface DescribeSecondaryIpResponse { + /** + * + */ + DataSet?: { + /** + * + */ + Ip?: string; + /** + * + */ + Mask?: string; + /** + * + */ + Gateway?: string; + /** + * + */ + Mac?: string; + /** + * + */ + SubnetId?: string; + /** + * + */ + VPCId?: string; + }[]; +} + +/** + * DescribeSnatRule - 获取Nat网关的出口规则(SNAT规则) + */ +export interface DescribeSnatRuleRequest { + /** + * NAT网关的ID + */ + NATGWId: string; + /** + * 需要出外网的私网IP地址,例如10.9.7.xx + */ + SourceIp?: string; + /** + * EIP的ip地址,例如106.75.xx.xx + */ + SnatIp?: string; + /** + * 偏移,默认为0 + */ + Offset?: string; + /** + * 分页,默认为20 + */ + Limit?: string; +} + +/** + * DescribeSnatRule - 获取Nat网关的出口规则(SNAT规则) + */ +export interface DescribeSnatRuleResponse { + /** + * 某个NAT网关的所有Snat规则 + */ + DataSet: { + /** + * EIP地址,如106.76.xx.xx + */ + SnatIp: string; + /** + * 资源的内网IP地址 + */ + SourceIp: string; + /** + * SourceIp所属的子网id + */ + SubnetworkId: string; + /** + * snat规则名称 + */ + Name: string; + }[]; + /** + * 规则数量 + */ + TotalCount: number; +} + +/** + * DescribeSubnet - 获取子网信息 + */ +export interface DescribeSubnetRequest { + /** + * 子网id数组,适用于一次查询多个子网信息 + */ + SubnetIds?: string[]; + /** + * 子网id,适用于一次查询一个子网信息 + */ + SubnetId?: string; + /** + * 路由表Id + */ + RouteTableId?: string; + /** + * VPC资源id + */ + VPCId?: string; + /** + * 业务组名称,默认为Default + */ + Tag?: string; + /** + * 偏移量,默认为0 + */ + Offset?: number; + /** + * 列表长度,默认为20 + */ + Limit?: number; + /** + * 是否返回子网的可用IP数,true为是,false为否,默认不返回 + */ + ShowAvailableIPs?: boolean; +} + +/** + * DescribeSubnet - 获取子网信息 + */ +export interface DescribeSubnetResponse { + /** + * 子网总数量 + */ + TotalCount: number; + /** + * 子网信息数组,具体资源见下方SubnetInfo + */ + DataSet: { + /** + * 可用区名称 + */ + Zone?: string; + /** + * 子网关联的IPv6网段 + */ + IPv6Network?: string; + /** + * VPCId + */ + VPCId?: string; + /** + * VPC名称 + */ + VPCName?: string; + /** + * 子网Id + */ + SubnetId?: string; + /** + * 子网名称 + */ + SubnetName?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 业务组 + */ + Tag?: string; + /** + * 子网类型 + */ + SubnetType?: number; + /** + * 子网网段 + */ + Subnet?: string; + /** + * 子网掩码 + */ + Netmask?: string; + /** + * 子网网关 + */ + Gateway?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 是否有natgw + */ + HasNATGW?: boolean; + /** + * 路由表Id + */ + RouteTableId?: string; + /** + * 可用IP数量 + */ + AvailableIPs?: number; + }[]; +} + +/** + * DescribeSubnetResource - 展示子网资源 + */ +export interface DescribeSubnetResourceRequest { + /** + * 子网id + */ + SubnetId: string; + /** + * 资源类型,默认为全部资源类型。枚举值为:UHOST,云主机;PHOST,物理云主机;ULB,负载均衡;UHADOOP_HOST,hadoop节点;UFORTRESS_HOST,堡垒机;UNATGW,NAT网关;UKAFKA,Kafka消息队列;UMEM,内存存储;DOCKER,容器集群;UDB,数据库;UDW,数据仓库;VIP,内网VIP. + */ + ResourceType?: string; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; + /** + * 单页返回数据长度,默认为20 + */ + Limit?: number; +} + +/** + * DescribeSubnetResource - 展示子网资源 + */ +export interface DescribeSubnetResourceResponse { + /** + * 总数 + */ + TotalCount?: number; + /** + * 返回数据集,请见SubnetResource + */ + DataSet?: { + /** + * 名称 + */ + Name?: string; + /** + * 资源Id + */ + ResourceId?: string; + /** + * 资源类型。对应的资源类型:UHOST,云主机;PHOST,物理云主机;ULB,负载均衡;UHADOOP_HOST,hadoop节点;UFORTRESS_HOST,堡垒机;UNATGW,NAT网关;UKAFKA,分布式消息系统;UMEM,内存存储;DOCKER,容器集群;UDB,数据库;UDW,数据仓库;VIP,内网VIP. + */ + ResourceType?: string; + /** + * 资源ip + */ + IP?: string; + }[]; +} + +/** + * DescribeVIP - 获取内网VIP详细信息 + */ +export interface DescribeVIPRequest { + /** + * 可用区。参见 [可用区列表](../summary/regionlist.html) + */ + Zone?: string; + /** + * vpc的id,指定SubnetId时必填 + */ + VPCId?: string; + /** + * 子网id,不指定则获取VPCId下的所有vip + */ + SubnetId?: string; + /** + * VIP ID + */ + VIPId?: string; + /** + * 业务组名称, 默认为 Default + */ + Tag?: string; + /** + * 业务组 + */ + BusinessId?: string; +} + +/** + * DescribeVIP - 获取内网VIP详细信息 + */ +export interface DescribeVIPResponse { + /** + * 内网VIP详情,请见VIPDetailSet + */ + VIPSet?: { + /** + * 地域 + */ + Zone?: string; + /** + * 虚拟ip id + */ + VIPId?: string; + /** + * 创建时间 + */ + CreateTime?: number; + /** + * 真实主机ip + */ + RealIp?: string; + /** + * 虚拟ip + */ + VIP?: string; + /** + * 子网id + */ + SubnetId?: string; + /** + * VPC id + */ + VPCId?: string; + /** + * VIP名称 + */ + Name?: string; + /** + * VIP备注 + */ + Remark?: string; + /** + * VIP所属业务组 + */ + Tag?: string; + }[]; + /** + * 内网VIP地址列表 + */ + DataSet?: string[]; + /** + * vip数量 + */ + TotalCount?: number; +} + +/** + * DescribeVPC - 获取VPC信息 + */ +export interface DescribeVPCRequest { + /** + * VPCId + */ + VPCIds?: string[]; + /** + * 业务组名称 + */ + Tag?: string; + /** + * + */ + Offset?: number; + /** + * + */ + Limit?: number; +} + +/** + * DescribeVPC - 获取VPC信息 + */ +export interface DescribeVPCResponse { + /** + * vpc信息,具体结构见下方VPCInfo + */ + DataSet?: { + /** + * + */ + NetworkInfo: { + /** + * vpc地址空间 + */ + Network?: string; + /** + * 地址空间中子网数量 + */ + SubnetCount?: number; + }[]; + /** + * + */ + SubnetCount: number; + /** + * + */ + CreateTime: number; + /** + * + */ + UpdateTime: number; + /** + * + */ + Tag: string; + /** + * + */ + Name: string; + /** + * VPCId + */ + VPCId?: string; + /** + * + */ + Network?: string[]; + /** + * VPC关联的IPv6网段 + */ + IPv6Network?: string; + /** + * VPC关联的IPv6网段所属运营商 + */ + OperatorName?: string; + }[]; +} + +/** + * DescribeVPCIntercom - 获取VPC互通信息 + */ +export interface DescribeVPCIntercomRequest { + /** + * VPC短ID + */ + VPCId: string; + /** + * 目的VPC所在地域,默认为全部地域 + */ + DstRegion?: string; + /** + * 目的项目ID,默认为全部项目 + */ + DstProjectId?: string; +} + +/** + * DescribeVPCIntercom - 获取VPC互通信息 + */ +export interface DescribeVPCIntercomResponse { + /** + * 联通VPC信息数组 + */ + DataSet?: { + /** + * 项目Id + */ + ProjectId?: string; + /** + * vpc类型(1表示托管VPC,0表示公有云VPC) + */ + VPCType: number; + /** + * 项目Id(数字) + */ + AccountId: number; + /** + * VPC的地址空间 + */ + Network?: string[]; + /** + * 所属地域 + */ + DstRegion?: string; + /** + * VPC名字 + */ + Name?: string; + /** + * VPCId + */ + VPCId?: string; + /** + * 业务组(未分组显示为 Default) + */ + Tag?: string; + }[]; +} + +/** + * DescribeWhiteListResource - 展示NAT网关白名单资源列表 + */ +export interface DescribeWhiteListResourceRequest { + /** + * NAT网关的Id + */ + NATGWIds: string[]; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 数据分页值, 默认为20 + */ + Limit?: number; +} + +/** + * DescribeWhiteListResource - 展示NAT网关白名单资源列表 + */ +export interface DescribeWhiteListResourceResponse { + /** + * 白名单资源的详细信息,详见DescribeResourceWhiteListDataSet + */ + DataSet: { + /** + * NATGateWay Id + */ + NATGWId: string; + /** + * 白名单开关标记 + */ + IfOpen: number; + /** + * 白名单详情 + */ + ObjectIPInfo: { + /** + * natgw字符串 + */ + GwType: string; + /** + * 白名单资源的内网IP + */ + PrivateIP: string; + /** + * 白名单资源Id信息 + */ + ResourceId: string; + /** + * 白名单资源名称 + */ + ResourceName: string; + /** + * 白名单资源类型 + */ + ResourceType: string; + /** + * 资源绑定的虚拟网卡的实例ID + */ + SubResourceId: string; + /** + * 资源绑定的虚拟网卡的实例名称 + */ + SubResourceName: string; + /** + * 资源绑定的虚拟网卡的类型 + */ + SubResourceType: string; + /** + * 白名单资源所属VPCId + */ + VPCId?: string; + }[]; + }[]; + /** + * 上述DataSet总数量 + */ + TotalCount: number; +} + +/** + * EnableWhiteList - 修改NAT网关白名单开关 + */ +export interface EnableWhiteListRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 白名单开关标记。0:关闭;1:开启。默认为0 + */ + IfOpen: number; +} + +/** + * EnableWhiteList - 修改NAT网关白名单开关 + */ +export interface EnableWhiteListResponse {} + +/** + * GetAvailableResourceForPolicy - 获取NAT网关可配置端口转发规则的资源信息 + */ +export interface GetAvailableResourceForPolicyRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 返回数据长度,默认为20 + */ + Limit?: number; + /** + * 列表起始位置偏移量,默认为0 + */ + Offset?: number; +} + +/** + * GetAvailableResourceForPolicy - 获取NAT网关可配置端口转发规则的资源信息 + */ +export interface GetAvailableResourceForPolicyResponse { + /** + * 支持资源类型的信息 + */ + DataSet: { + /** + * 资源的Id + */ + ResourceId: string; + /** + * 资源对应的内网Ip + */ + PrivateIP: string; + /** + * 资源类型。"uhost":云主机; "upm",物理云主机; "hadoophost":hadoop节点; "fortresshost":堡垒机: "udockhost",容器 + */ + ResourceType: string; + }[]; +} + +/** + * GetAvailableResourceForSnatRule - 获取可用于添加snat规则(出口规则)的资源列表 + */ +export interface GetAvailableResourceForSnatRuleRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 数据分页值, 默认为20 + */ + Limit?: number; +} + +/** + * GetAvailableResourceForSnatRule - 获取可用于添加snat规则(出口规则)的资源列表 + */ +export interface GetAvailableResourceForSnatRuleResponse { + /** + * 返回的资源详细信息 + */ + DataSet: { + /** + * 资源ID + */ + ResourceId?: string; + /** + * 资源名称 + */ + ResourceName?: string; + /** + * 资源内网IP + */ + PrivateIP?: string; + /** + * 资源类型 + */ + ResourceType?: string; + /** + * 资源所属VPC的ID + */ + SubnetworkId?: string; + /** + * 资源所属子网的ID + */ + VPCId?: string; + }[]; + /** + * 总数 + */ + TotalCount: number; +} + +/** + * GetAvailableResourceForWhiteList - 获取NAT网关可添加白名单的资源 + */ +export interface GetAvailableResourceForWhiteListRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 数据偏移量, 默认为0 + */ + Offset?: number; + /** + * 数据分页值, 默认为20 + */ + Limit?: number; +} + +/** + * GetAvailableResourceForWhiteList - 获取NAT网关可添加白名单的资源 + */ +export interface GetAvailableResourceForWhiteListResponse { + /** + * 返回白名单列表的详细信息 + */ + DataSet: { + /** + * 资源类型Id + */ + ResourceId: string; + /** + * 资源名称 + */ + ResourceName: string; + /** + * 资源的内网Ip + */ + PrivateIP: string; + /** + * 资源类型。"uhost":云主机; "upm",物理云主机; "hadoophost":hadoop节点; "fortresshost":堡垒机: "udockhost",容器 + */ + ResourceType: string; + /** + * 资源绑定的虚拟网卡的实例名称 + */ + SubResourceName: string; + /** + * 资源所属VPCId + */ + VPCId: string; + /** + * 资源所属子网Id + */ + SubnetworkId: string; + /** + * 资源绑定的虚拟网卡的实例ID + */ + SubResourceId?: string; + /** + * 资源绑定的虚拟网卡的实例类型 + */ + SubResourceType?: string; + }[]; + /** + * 白名单资源列表的总的个数 + */ + TotalCount: number; +} + +/** + * GetNetworkAclTargetResource - 获取ACL规则应用目标列表 + */ +export interface GetNetworkAclTargetResourceRequest { + /** + * 子网ID。 + */ + SubnetworkId: string[]; +} + +/** + * GetNetworkAclTargetResource - 获取ACL规则应用目标列表 + */ +export interface GetNetworkAclTargetResourceResponse { + /** + * ACL规则应用目标资源列表,具体结构见下方TargetResourceInfo + */ + TargetResourceList: { + /** + * 子网ID + */ + SubnetworkId: string; + /** + * 资源名称 + */ + ResourceName: string; + /** + * 资源ID + */ + ResourceId: string; + /** + * 资源类型 + */ + ResourceType: number; + /** + * 资源绑定的虚拟网卡的名称 + */ + SubResourceName: string; + /** + * 资源绑定的虚拟网卡的ID + */ + SubResourceId: string; + /** + * 资源绑定虚拟网卡的类型 + */ + SubResourceType: number; + /** + * 资源内网IP + */ + PrivateIp: string; + }[]; + /** + * ACL规则应用目标资源总数 + */ + TotalCount: number; +} + +/** + * ListSubnetForNATGW - 展示NAT网关可绑定的子网列表 + */ +export interface ListSubnetForNATGWRequest { + /** + * NAT网关所属VPC Id。默认值为Default VPC Id + */ + VPCId?: string; +} + +/** + * ListSubnetForNATGW - 展示NAT网关可绑定的子网列表 + */ +export interface ListSubnetForNATGWResponse { + /** + * 具体参数请见NatgwSubnetDataSet + */ + DataSet?: { + /** + * 子网id + */ + SubnetId: string; + /** + * 子网网段 + */ + Subnet: string; + /** + * 掩码 + */ + Netmask: string; + /** + * 子网名字 + */ + SubnetName: string; + /** + * 是否绑定NATGW + */ + HasNATGW: boolean; + }[]; +} + +/** + * ModifyRouteRule - 路由策略增、删、改 + */ +export interface ModifyRouteRuleRequest { + /** + * 通过DescribeRouteTable拿到 + */ + RouteTableId: string; + /** + * 格式: RouteRuleId | 目的网段 | 下一跳类型(支持INSTANCE、VIP) | 下一跳 |优先级(保留字段,填写0即可)| 备注 | 增、删、改标志(add/delete/update) 。"添加"示例: test_id | 10.8.0.0/16 | instance | uhost-xd8ja | 0 | Default Route Rule| add (添加的RouteRuleId填任意非空字符串) 。"删除"示例: routerule-xk3jxa | 10.8.0.0/16 | instance | uhost-xd8ja | 0 | Default Route Rule| delete (RouteRuleId来自DescribeRouteTable中) 。“修改”示例: routerule-xk3jxa | 10.8.0.0/16 | instance | uhost-cjksa2 | 0 | Default Route Rule| update (RouteRuleId来自DescribeRouteTable中) + */ + RouteRule: string[]; +} + +/** + * ModifyRouteRule - 路由策略增、删、改 + */ +export interface ModifyRouteRuleResponse {} + +/** + * ReleaseVIP - 释放VIP资源 + */ +export interface ReleaseVIPRequest { + /** + * 可用区 + */ + Zone?: string; + /** + * 内网VIP的id + */ + VIPId: string; +} + +/** + * ReleaseVIP - 释放VIP资源 + */ +export interface ReleaseVIPResponse {} + +/** + * SetGwDefaultExport - 设置NAT网关的默认出口 + */ +export interface SetGwDefaultExportRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * NAT网关绑定的EIP。ExportIp和ExportEipId必填一个 + */ + ExportIp?: string; + /** + * NAT网关绑定的EIP Id。ExportIp和ExportEipId必填一个 + */ + ExportEipId?: string; +} + +/** + * SetGwDefaultExport - 设置NAT网关的默认出口 + */ +export interface SetGwDefaultExportResponse {} + +/** + * UpdateNATGWPolicy - 更新NAT网关端口转发规则 + */ +export interface UpdateNATGWPolicyRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * 转发策略Id + */ + PolicyId: string; + /** + * 协议类型。枚举值为:TCP 、 UDP + */ + Protocol: string; + /** + * 源IP。填写对应的EIP Id + */ + SrcEIPId: string; + /** + * 源端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-6553 + */ + SrcPort: string; + /** + * 目标IP。填写对饮的目标IP地址 + */ + DstIP: string; + /** + * 目标端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535 + */ + DstPort: string; + /** + * 转发策略名称。默认为空 + */ + PolicyName?: string; +} + +/** + * UpdateNATGWPolicy - 更新NAT网关端口转发规则 + */ +export interface UpdateNATGWPolicyResponse {} + +/** + * UpdateNATGWSubnet - 更新NAT网关绑定的子网 + */ +export interface UpdateNATGWSubnetRequest { + /** + * NAT网关Id + */ + NATGWId: string; + /** + * NAT网关绑定的子网Id + */ + SubnetworkIds: string[]; +} + +/** + * UpdateNATGWSubnet - 更新NAT网关绑定的子网 + */ +export interface UpdateNATGWSubnetResponse {} + +/** + * UpdateNetworkAcl - 更改ACL + */ +export interface UpdateNetworkAclRequest { + /** + * Acl的名称 + */ + AclName: string; + /** + * 需要更改的ACL ID + */ + AclId: string; + /** + * 描述 + */ + Description: string; +} + +/** + * UpdateNetworkAcl - 更改ACL + */ +export interface UpdateNetworkAclResponse {} + +/** + * UpdateNetworkAclEntry - 更新ACL的规则 + */ +export interface UpdateNetworkAclEntryRequest { + /** + * ACL的ID + */ + AclId: string; + /** + * 需要更新的Entry Id + */ + EntryId: string; + /** + * Entry的优先级,对于同样的Direction来说,不能重复 + */ + Priority: number; + /** + * 出向或者入向(“Ingress”, "Egress") + */ + Direction: string; + /** + * 针对的协议规则 + */ + IpProtocol: string; + /** + * IPv4段的CIDR表示 + */ + CidrBlock: string; + /** + * 针对的端口范围 + */ + PortRange: string; + /** + * 规则的行为("Accept", "Reject") + */ + EntryAction: string; + /** + * 描述 + */ + Description?: string; + /** + * 应用目标类型。0代表“子网内全部资源”, 1代表“子网内指定资源”。默认为0 + */ + TargetType?: number; + /** + * 应用目标资源列表。默认为全部资源生效。TargetType为0时不用填写该值 + */ + TargetResourceIds?: string[]; +} + +/** + * UpdateNetworkAclEntry - 更新ACL的规则 + */ +export interface UpdateNetworkAclEntryResponse {} + +/** + * UpdateRouteTableAttribute - 更新路由表基本信息 + */ +export interface UpdateRouteTableAttributeRequest { + /** + * 路由表ID + */ + RouteTableId: string; + /** + * 名称 + */ + Name?: string; + /** + * 备注 + */ + Remark?: string; + /** + * 业务组名称 + */ + Tag?: string; +} + +/** + * UpdateRouteTableAttribute - 更新路由表基本信息 + */ +export interface UpdateRouteTableAttributeResponse {} + +/** + * UpdateSnatRule - 更新指定的出口规则(SNAT规则) + */ +export interface UpdateSnatRuleRequest { + /** + * NAT网关的ID, + */ + NATGWId: string; + /** + * 需要出外网的私网IP地址,例如10.9.7.xx + */ + SourceIp: string; + /** + * EIP的ip地址,例如106.75.xx.xx + */ + SnatIp: string; + /** + * snat名称,即出口规则名称 + */ + Name?: string; +} + +/** + * UpdateSnatRule - 更新指定的出口规则(SNAT规则) + */ +export interface UpdateSnatRuleResponse {} + +/** + * UpdateSubnetAttribute - 更新子网信息 + */ +export interface UpdateSubnetAttributeRequest { + /** + * 子网ID + */ + SubnetId: string; + /** + * 子网名称(如果Name不填写,Tag必须填写) + */ + Name?: string; + /** + * 业务组名称(如果Tag不填写,Name必须填写) + */ + Tag?: string; +} + +/** + * UpdateSubnetAttribute - 更新子网信息 + */ +export interface UpdateSubnetAttributeResponse {} + +/** + * UpdateVIPAttribute - 更新VIP信息 + */ +export interface UpdateVIPAttributeRequest { + /** + * 内网VIP的资源Id + */ + VIPId: string; + /** + * 内网VIP的备注 + */ + Remark?: string; + /** + * 内网VIP的名称 + */ + Name?: string; + /** + * 内网VIP所属的业务组 + */ + Tag?: string; +} + +/** + * UpdateVIPAttribute - 更新VIP信息 + */ +export interface UpdateVIPAttributeResponse {} + +/** + * UpdateVPCNetwork - 更新VPC网段 + */ +export interface UpdateVPCNetworkRequest { + /** + * VPC的ID + */ + VPCId: string; + /** + * 需要保留的VPC网段。当前仅支持删除VPC网段,添加网段请参考[AddVPCNetwork](https://docs.ucloud.cn/api/vpc2.0-api/add_vpc_network) + */ + Network: string[]; +} + +/** + * UpdateVPCNetwork - 更新VPC网段 + */ +export interface UpdateVPCNetworkResponse {} diff --git a/src/version.ts b/src/version.ts new file mode 100644 index 0000000..1e919da --- /dev/null +++ b/src/version.ts @@ -0,0 +1 @@ +export const VERSION = "0.0.1"; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..7701644 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "ES2015", + "module": "commonjs", + "lib": ["es2015"], + "outDir": "./lib", + "strict": true, + "esModuleInterop": true, + "declaration": true + }, + "include": [ + "src/**/*" + ], + "exclude": [ + "node_modules", "**/*.test.ts"] +} diff --git a/tslint.json b/tslint.json new file mode 100644 index 0000000..dc463a5 --- /dev/null +++ b/tslint.json @@ -0,0 +1,10 @@ +{ + "defaultSeverity": "error", + "extends": ["tslint:recommended"], + "jsRules": {}, + "rules": { + "quotemark": [true, "single", "jsx-double"], + "trailing-comma": [false] + }, + "rulesDirectory": [] +} diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..ef396b0 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,5318 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.0.0-beta.35", "@babel/code-frame@^7.14.5": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/code-frame/download/@babel/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" + integrity sha1-I7CNdA6D9JxeWZRfvxtD6Au/Tts= + dependencies: + "@babel/highlight" "^7.14.5" + +"@babel/compat-data@^7.15.0": + version "7.15.0" + resolved "https://registry.nlark.com/@babel/compat-data/download/@babel/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176" + integrity sha1-Lbr4uFM0eWyvuw9Xk6kKL8AQsXY= + +"@babel/core@^7.1.0", "@babel/core@^7.7.5": + version "7.15.0" + resolved "https://registry.nlark.com/@babel/core/download/@babel/core-7.15.0.tgz#749e57c68778b73ad8082775561f67f5196aafa8" + integrity sha1-dJ5Xxod4tzrYCCd1Vh9n9Rlqr6g= + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/generator" "^7.15.0" + "@babel/helper-compilation-targets" "^7.15.0" + "@babel/helper-module-transforms" "^7.15.0" + "@babel/helpers" "^7.14.8" + "@babel/parser" "^7.15.0" + "@babel/template" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.1.2" + semver "^6.3.0" + source-map "^0.5.0" + +"@babel/generator@^7.15.0": + version "7.15.0" + resolved "https://registry.nlark.com/@babel/generator/download/@babel/generator-7.15.0.tgz?cache=0&sync_timestamp=1628112041409&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fgenerator%2Fdownload%2F%40babel%2Fgenerator-7.15.0.tgz#a7d0c172e0d814974bad5aa77ace543b97917f15" + integrity sha1-p9DBcuDYFJdLrVqnes5UO5eRfxU= + dependencies: + "@babel/types" "^7.15.0" + jsesc "^2.5.1" + source-map "^0.5.0" + +"@babel/helper-compilation-targets@^7.15.0": + version "7.15.0" + resolved "https://registry.nlark.com/@babel/helper-compilation-targets/download/@babel/helper-compilation-targets-7.15.0.tgz#973df8cbd025515f3ff25db0c05efc704fa79818" + integrity sha1-lz34y9AlUV8/8l2wwF78cE+nmBg= + dependencies: + "@babel/compat-data" "^7.15.0" + "@babel/helper-validator-option" "^7.14.5" + browserslist "^4.16.6" + semver "^6.3.0" + +"@babel/helper-function-name@^7.14.5": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/helper-function-name/download/@babel/helper-function-name-7.14.5.tgz#89e2c474972f15d8e233b52ee8c480e2cfcd50c4" + integrity sha1-ieLEdJcvFdjiM7Uu6MSA4s/NUMQ= + dependencies: + "@babel/helper-get-function-arity" "^7.14.5" + "@babel/template" "^7.14.5" + "@babel/types" "^7.14.5" + +"@babel/helper-get-function-arity@^7.14.5": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/helper-get-function-arity/download/@babel/helper-get-function-arity-7.14.5.tgz#25fbfa579b0937eee1f3b805ece4ce398c431815" + integrity sha1-Jfv6V5sJN+7h87gF7OTOOYxDGBU= + dependencies: + "@babel/types" "^7.14.5" + +"@babel/helper-hoist-variables@^7.14.5": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/helper-hoist-variables/download/@babel/helper-hoist-variables-7.14.5.tgz#e0dd27c33a78e577d7c8884916a3e7ef1f7c7f8d" + integrity sha1-4N0nwzp45XfXyIhJFqPn7x98f40= + dependencies: + "@babel/types" "^7.14.5" + +"@babel/helper-member-expression-to-functions@^7.15.0": + version "7.15.0" + resolved "https://registry.nlark.com/@babel/helper-member-expression-to-functions/download/@babel/helper-member-expression-to-functions-7.15.0.tgz#0ddaf5299c8179f27f37327936553e9bba60990b" + integrity sha1-Ddr1KZyBefJ/NzJ5NlU+m7pgmQs= + dependencies: + "@babel/types" "^7.15.0" + +"@babel/helper-module-imports@^7.14.5": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/helper-module-imports/download/@babel/helper-module-imports-7.14.5.tgz?cache=0&sync_timestamp=1624608041405&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fhelper-module-imports%2Fdownload%2F%40babel%2Fhelper-module-imports-7.14.5.tgz#6d1a44df6a38c957aa7c312da076429f11b422f3" + integrity sha1-bRpE32o4yVeqfDEtoHZCnxG0IvM= + dependencies: + "@babel/types" "^7.14.5" + +"@babel/helper-module-transforms@^7.15.0": + version "7.15.0" + resolved "https://registry.nlark.com/@babel/helper-module-transforms/download/@babel/helper-module-transforms-7.15.0.tgz#679275581ea056373eddbe360e1419ef23783b08" + integrity sha1-Z5J1WB6gVjc+3b42DhQZ7yN4Owg= + dependencies: + "@babel/helper-module-imports" "^7.14.5" + "@babel/helper-replace-supers" "^7.15.0" + "@babel/helper-simple-access" "^7.14.8" + "@babel/helper-split-export-declaration" "^7.14.5" + "@babel/helper-validator-identifier" "^7.14.9" + "@babel/template" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" + +"@babel/helper-optimise-call-expression@^7.14.5": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/helper-optimise-call-expression/download/@babel/helper-optimise-call-expression-7.14.5.tgz#f27395a8619e0665b3f0364cddb41c25d71b499c" + integrity sha1-8nOVqGGeBmWz8DZM3bQcJdcbSZw= + dependencies: + "@babel/types" "^7.14.5" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.8.0": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/helper-plugin-utils/download/@babel/helper-plugin-utils-7.14.5.tgz#5ac822ce97eec46741ab70a517971e443a70c5a9" + integrity sha1-WsgizpfuxGdBq3ClF5ceRDpwxak= + +"@babel/helper-replace-supers@^7.15.0": + version "7.15.0" + resolved "https://registry.nlark.com/@babel/helper-replace-supers/download/@babel/helper-replace-supers-7.15.0.tgz#ace07708f5bf746bf2e6ba99572cce79b5d4e7f4" + integrity sha1-rOB3CPW/dGvy5rqZVyzOebXU5/Q= + dependencies: + "@babel/helper-member-expression-to-functions" "^7.15.0" + "@babel/helper-optimise-call-expression" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" + +"@babel/helper-simple-access@^7.14.8": + version "7.14.8" + resolved "https://registry.nlark.com/@babel/helper-simple-access/download/@babel/helper-simple-access-7.14.8.tgz#82e1fec0644a7e775c74d305f212c39f8fe73924" + integrity sha1-guH+wGRKfndcdNMF8hLDn4/nOSQ= + dependencies: + "@babel/types" "^7.14.8" + +"@babel/helper-split-export-declaration@^7.14.5": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/helper-split-export-declaration/download/@babel/helper-split-export-declaration-7.14.5.tgz#22b23a54ef51c2b7605d851930c1976dd0bc693a" + integrity sha1-IrI6VO9RwrdgXYUZMMGXbdC8aTo= + dependencies: + "@babel/types" "^7.14.5" + +"@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9": + version "7.14.9" + resolved "https://registry.nlark.com/@babel/helper-validator-identifier/download/@babel/helper-validator-identifier-7.14.9.tgz?cache=0&sync_timestamp=1627804408187&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fhelper-validator-identifier%2Fdownload%2F%40babel%2Fhelper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" + integrity sha1-ZlTRcbICT22O4VG/JQlpmRkTHUg= + +"@babel/helper-validator-option@^7.14.5": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/helper-validator-option/download/@babel/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3" + integrity sha1-bnKh//GNXfy4eOHmLxoCHEty1aM= + +"@babel/helpers@^7.14.8": + version "7.15.3" + resolved "https://registry.nlark.com/@babel/helpers/download/@babel/helpers-7.15.3.tgz#c96838b752b95dcd525b4e741ed40bb1dc2a1357" + integrity sha1-yWg4t1K5Xc1SW050HtQLsdwqE1c= + dependencies: + "@babel/template" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" + +"@babel/highlight@^7.14.5": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/highlight/download/@babel/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" + integrity sha1-aGGlLwOWZAUAH2qlNKAaJNmejNk= + dependencies: + "@babel/helper-validator-identifier" "^7.14.5" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.14.5", "@babel/parser@^7.15.0": + version "7.15.3" + resolved "https://registry.nlark.com/@babel/parser/download/@babel/parser-7.15.3.tgz#3416d9bea748052cfcb63dbcc27368105b1ed862" + integrity sha1-NBbZvqdIBSz8tj28wnNoEFse2GI= + +"@babel/plugin-syntax-async-generators@^7.8.4": + version "7.8.4" + resolved "https://registry.nlark.com/@babel/plugin-syntax-async-generators/download/@babel/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha1-qYP7Gusuw/btBCohD2QOkOeG/g0= + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-bigint@^7.8.3": + version "7.8.3" + resolved "https://registry.nlark.com/@babel/plugin-syntax-bigint/download/@babel/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" + integrity sha1-TJpvZp9dDN8bkKFnHpoUa+UwDOo= + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.8.3": + version "7.12.13" + resolved "https://registry.nlark.com/@babel/plugin-syntax-class-properties/download/@babel/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha1-tcmHJ0xKOoK4lxR5aTGmtTVErhA= + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-import-meta@^7.8.3": + version "7.10.4" + resolved "https://registry.nlark.com/@babel/plugin-syntax-import-meta/download/@babel/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" + integrity sha1-7mATSMNw+jNNIge+FYd3SWUh/VE= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-json-strings@^7.8.3": + version "7.8.3" + resolved "https://registry.nlark.com/@babel/plugin-syntax-json-strings/download/@babel/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha1-AcohtmjNghjJ5kDLbdiMVBKyyWo= + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": + version "7.10.4" + resolved "https://registry.nlark.com/@babel/plugin-syntax-logical-assignment-operators/download/@babel/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + integrity sha1-ypHvRjA1MESLkGZSusLp/plB9pk= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.nlark.com/@babel/plugin-syntax-nullish-coalescing-operator/download/@babel/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha1-Fn7XA2iIYIH3S1w2xlqIwDtm0ak= + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.8.3": + version "7.10.4" + resolved "https://registry.nlark.com/@babel/plugin-syntax-numeric-separator/download/@babel/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha1-ubBws+M1cM2f0Hun+pHA3Te5r5c= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.nlark.com/@babel/plugin-syntax-object-rest-spread/download/@babel/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha1-YOIl7cvZimQDMqLnLdPmbxr1WHE= + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.3": + version "7.8.3" + resolved "https://registry.nlark.com/@babel/plugin-syntax-optional-catch-binding/download/@babel/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha1-YRGiZbz7Ag6579D9/X0mQCue1sE= + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.3": + version "7.8.3" + resolved "https://registry.nlark.com/@babel/plugin-syntax-optional-chaining/download/@babel/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha1-T2nCq5UWfgGAzVM2YT+MV4j31Io= + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-top-level-await@^7.8.3": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/plugin-syntax-top-level-await/download/@babel/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" + integrity sha1-wc/a3DWmRiQAAfBhOCR7dBw02Uw= + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/template@^7.14.5", "@babel/template@^7.3.3": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/template/download/@babel/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4" + integrity sha1-qbydizM1T/blWpxg0RCSAKaJdPQ= + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/parser" "^7.14.5" + "@babel/types" "^7.14.5" + +"@babel/traverse@^7.1.0", "@babel/traverse@^7.15.0": + version "7.15.0" + resolved "https://registry.nlark.com/@babel/traverse/download/@babel/traverse-7.15.0.tgz?cache=0&sync_timestamp=1628112041041&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Ftraverse%2Fdownload%2F%40babel%2Ftraverse-7.15.0.tgz#4cca838fd1b2a03283c1f38e141f639d60b3fc98" + integrity sha1-TMqDj9GyoDKDwfOOFB9jnWCz/Jg= + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/generator" "^7.15.0" + "@babel/helper-function-name" "^7.14.5" + "@babel/helper-hoist-variables" "^7.14.5" + "@babel/helper-split-export-declaration" "^7.14.5" + "@babel/parser" "^7.15.0" + "@babel/types" "^7.15.0" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/types@^7.0.0", "@babel/types@^7.14.5", "@babel/types@^7.14.8", "@babel/types@^7.15.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3": + version "7.15.0" + resolved "https://registry.nlark.com/@babel/types/download/@babel/types-7.15.0.tgz?cache=0&sync_timestamp=1628112038326&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Ftypes%2Fdownload%2F%40babel%2Ftypes-7.15.0.tgz#61af11f2286c4e9c69ca8deb5f4375a73c72dcbd" + integrity sha1-Ya8R8ihsTpxpyo3rX0N1pzxy3L0= + dependencies: + "@babel/helper-validator-identifier" "^7.14.9" + to-fast-properties "^2.0.0" + +"@bcoe/v8-coverage@^0.2.3": + version "0.2.3" + resolved "https://registry.nlark.com/@bcoe/v8-coverage/download/@bcoe/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + integrity sha1-daLotRy3WKdVPWgEpZMteqznXDk= + +"@cnakazawa/watch@^1.0.3": + version "1.0.4" + resolved "https://registry.nlark.com/@cnakazawa/watch/download/@cnakazawa/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a" + integrity sha1-+GSuhQBND8q29QvpFBxNo2jRZWo= + dependencies: + exec-sh "^0.3.2" + minimist "^1.2.0" + +"@istanbuljs/load-nyc-config@^1.0.0": + version "1.1.0" + resolved "https://registry.nlark.com/@istanbuljs/load-nyc-config/download/@istanbuljs/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + integrity sha1-/T2x1Z7PfPEh6AZQu4ZxL5tV7O0= + dependencies: + camelcase "^5.3.1" + find-up "^4.1.0" + get-package-type "^0.1.0" + js-yaml "^3.13.1" + resolve-from "^5.0.0" + +"@istanbuljs/schema@^0.1.2": + version "0.1.3" + resolved "https://registry.nlark.com/@istanbuljs/schema/download/@istanbuljs/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha1-5F44TkuOwWvOL9kDr3hFD2v37Jg= + +"@jest/console@^26.6.2": + version "26.6.2" + resolved "https://registry.nlark.com/@jest/console/download/@jest/console-26.6.2.tgz#4e04bc464014358b03ab4937805ee36a0aeb98f2" + integrity sha1-TgS8RkAUNYsDq0k3gF7jagrrmPI= + dependencies: + "@jest/types" "^26.6.2" + "@types/node" "*" + chalk "^4.0.0" + jest-message-util "^26.6.2" + jest-util "^26.6.2" + slash "^3.0.0" + +"@jest/core@^26.6.3": + version "26.6.3" + resolved "https://registry.nlark.com/@jest/core/download/@jest/core-26.6.3.tgz?cache=0&sync_timestamp=1630058522502&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40jest%2Fcore%2Fdownload%2F%40jest%2Fcore-26.6.3.tgz#7639fcb3833d748a4656ada54bde193051e45fad" + integrity sha1-djn8s4M9dIpGVq2lS94ZMFHkX60= + dependencies: + "@jest/console" "^26.6.2" + "@jest/reporters" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.4" + jest-changed-files "^26.6.2" + jest-config "^26.6.3" + jest-haste-map "^26.6.2" + jest-message-util "^26.6.2" + jest-regex-util "^26.0.0" + jest-resolve "^26.6.2" + jest-resolve-dependencies "^26.6.3" + jest-runner "^26.6.3" + jest-runtime "^26.6.3" + jest-snapshot "^26.6.2" + jest-util "^26.6.2" + jest-validate "^26.6.2" + jest-watcher "^26.6.2" + micromatch "^4.0.2" + p-each-series "^2.1.0" + rimraf "^3.0.0" + slash "^3.0.0" + strip-ansi "^6.0.0" + +"@jest/environment@^26.6.2": + version "26.6.2" + resolved "https://registry.nlark.com/@jest/environment/download/@jest/environment-26.6.2.tgz#ba364cc72e221e79cc8f0a99555bf5d7577cf92c" + integrity sha1-ujZMxy4iHnnMjwqZVVv111d8+Sw= + dependencies: + "@jest/fake-timers" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/node" "*" + jest-mock "^26.6.2" + +"@jest/fake-timers@^26.6.2": + version "26.6.2" + resolved "https://registry.nlark.com/@jest/fake-timers/download/@jest/fake-timers-26.6.2.tgz#459c329bcf70cee4af4d7e3f3e67848123535aad" + integrity sha1-RZwym89wzuSvTX4/PmeEgSNTWq0= + dependencies: + "@jest/types" "^26.6.2" + "@sinonjs/fake-timers" "^6.0.1" + "@types/node" "*" + jest-message-util "^26.6.2" + jest-mock "^26.6.2" + jest-util "^26.6.2" + +"@jest/globals@^26.6.2": + version "26.6.2" + resolved "https://registry.nlark.com/@jest/globals/download/@jest/globals-26.6.2.tgz?cache=0&sync_timestamp=1630058522118&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40jest%2Fglobals%2Fdownload%2F%40jest%2Fglobals-26.6.2.tgz#5b613b78a1aa2655ae908eba638cc96a20df720a" + integrity sha1-W2E7eKGqJlWukI66Y4zJaiDfcgo= + dependencies: + "@jest/environment" "^26.6.2" + "@jest/types" "^26.6.2" + expect "^26.6.2" + +"@jest/reporters@^26.6.2": + version "26.6.2" + resolved "https://registry.nlark.com/@jest/reporters/download/@jest/reporters-26.6.2.tgz#1f518b99637a5f18307bd3ecf9275f6882a667f6" + integrity sha1-H1GLmWN6Xxgwe9Ps+SdfaIKmZ/Y= + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@jest/console" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" + chalk "^4.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.2" + graceful-fs "^4.2.4" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-instrument "^4.0.3" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.0.2" + jest-haste-map "^26.6.2" + jest-resolve "^26.6.2" + jest-util "^26.6.2" + jest-worker "^26.6.2" + slash "^3.0.0" + source-map "^0.6.0" + string-length "^4.0.1" + terminal-link "^2.0.0" + v8-to-istanbul "^7.0.0" + optionalDependencies: + node-notifier "^8.0.0" + +"@jest/source-map@^26.6.2": + version "26.6.2" + resolved "https://registry.nlark.com/@jest/source-map/download/@jest/source-map-26.6.2.tgz?cache=0&sync_timestamp=1624900308106&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40jest%2Fsource-map%2Fdownload%2F%40jest%2Fsource-map-26.6.2.tgz#29af5e1e2e324cafccc936f218309f54ab69d535" + integrity sha1-Ka9eHi4yTK/MyTbyGDCfVKtp1TU= + dependencies: + callsites "^3.0.0" + graceful-fs "^4.2.4" + source-map "^0.6.0" + +"@jest/test-result@^26.6.2": + version "26.6.2" + resolved "https://registry.nlark.com/@jest/test-result/download/@jest/test-result-26.6.2.tgz?cache=0&sync_timestamp=1630058507653&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40jest%2Ftest-result%2Fdownload%2F%40jest%2Ftest-result-26.6.2.tgz#55da58b62df134576cc95476efa5f7949e3f5f18" + integrity sha1-VdpYti3xNFdsyVR276X3lJ4/Xxg= + dependencies: + "@jest/console" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" + +"@jest/test-sequencer@^26.6.3": + version "26.6.3" + resolved "https://registry.nlark.com/@jest/test-sequencer/download/@jest/test-sequencer-26.6.3.tgz?cache=0&sync_timestamp=1630058509782&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40jest%2Ftest-sequencer%2Fdownload%2F%40jest%2Ftest-sequencer-26.6.3.tgz#98e8a45100863886d074205e8ffdc5a7eb582b17" + integrity sha1-mOikUQCGOIbQdCBej/3Fp+tYKxc= + dependencies: + "@jest/test-result" "^26.6.2" + graceful-fs "^4.2.4" + jest-haste-map "^26.6.2" + jest-runner "^26.6.3" + jest-runtime "^26.6.3" + +"@jest/transform@^26.6.2": + version "26.6.2" + resolved "https://registry.nlark.com/@jest/transform/download/@jest/transform-26.6.2.tgz?cache=0&sync_timestamp=1630058509391&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40jest%2Ftransform%2Fdownload%2F%40jest%2Ftransform-26.6.2.tgz#5ac57c5fa1ad17b2aae83e73e45813894dcf2e4b" + integrity sha1-WsV8X6GtF7Kq6D5z5FgTiU3PLks= + dependencies: + "@babel/core" "^7.1.0" + "@jest/types" "^26.6.2" + babel-plugin-istanbul "^6.0.0" + chalk "^4.0.0" + convert-source-map "^1.4.0" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.2.4" + jest-haste-map "^26.6.2" + jest-regex-util "^26.0.0" + jest-util "^26.6.2" + micromatch "^4.0.2" + pirates "^4.0.1" + slash "^3.0.0" + source-map "^0.6.1" + write-file-atomic "^3.0.0" + +"@jest/types@^26.6.2": + version "26.6.2" + resolved "https://registry.nlark.com/@jest/types/download/@jest/types-26.6.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40jest%2Ftypes%2Fdownload%2F%40jest%2Ftypes-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" + integrity sha1-vvWlMgMOHYii9abZM/hOlyJu1I4= + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^15.0.0" + chalk "^4.0.0" + +"@sinonjs/commons@^1.7.0": + version "1.8.3" + resolved "https://registry.nlark.com/@sinonjs/commons/download/@sinonjs/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" + integrity sha1-OALd0hpQqUm2ch3dcto25n5/Gy0= + dependencies: + type-detect "4.0.8" + +"@sinonjs/fake-timers@^6.0.1": + version "6.0.1" + resolved "https://registry.nlark.com/@sinonjs/fake-timers/download/@sinonjs/fake-timers-6.0.1.tgz#293674fccb3262ac782c7aadfdeca86b10c75c40" + integrity sha1-KTZ0/MsyYqx4LHqt/eyoaxDHXEA= + dependencies: + "@sinonjs/commons" "^1.7.0" + +"@tootallnate/once@1": + version "1.1.2" + resolved "https://registry.nlark.com/@tootallnate/once/download/@tootallnate/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" + integrity sha1-zLkURTYBeaBOf+av94wA/8Hur4I= + +"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": + version "7.1.15" + resolved "https://registry.nlark.com/@types/babel__core/download/@types/babel__core-7.1.15.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fbabel__core%2Fdownload%2F%40types%2Fbabel__core-7.1.15.tgz#2ccfb1ad55a02c83f8e0ad327cbc332f55eb1024" + integrity sha1-LM+xrVWgLIP44K0yfLwzL1XrECQ= + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.6.3" + resolved "https://registry.nlark.com/@types/babel__generator/download/@types/babel__generator-7.6.3.tgz#f456b4b2ce79137f768aa130d2423d2f0ccfaba5" + integrity sha1-9Fa0ss55E392iqEw0kI9LwzPq6U= + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.4.1" + resolved "https://registry.nlark.com/@types/babel__template/download/@types/babel__template-7.4.1.tgz?cache=0&sync_timestamp=1629706734879&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fbabel__template%2Fdownload%2F%40types%2Fbabel__template-7.4.1.tgz#3d1a48fd9d6c0edfd56f2ff578daed48f36c8969" + integrity sha1-PRpI/Z1sDt/Vby/1eNrtSPNsiWk= + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": + version "7.14.2" + resolved "https://registry.nlark.com/@types/babel__traverse/download/@types/babel__traverse-7.14.2.tgz?cache=0&sync_timestamp=1629706733915&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fbabel__traverse%2Fdownload%2F%40types%2Fbabel__traverse-7.14.2.tgz#ffcd470bbb3f8bf30481678fb5502278ca833a43" + integrity sha1-/81HC7s/i/MEgWePtVAieMqDOkM= + dependencies: + "@babel/types" "^7.3.0" + +"@types/graceful-fs@^4.1.2": + version "4.1.5" + resolved "https://registry.nlark.com/@types/graceful-fs/download/@types/graceful-fs-4.1.5.tgz?cache=0&sync_timestamp=1629708105088&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fgraceful-fs%2Fdownload%2F%40types%2Fgraceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" + integrity sha1-If+6DZjaQ1DbZIkfkqnl2zzbThU= + dependencies: + "@types/node" "*" + +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": + version "2.0.3" + resolved "https://registry.nlark.com/@types/istanbul-lib-coverage/download/@types/istanbul-lib-coverage-2.0.3.tgz#4ba8ddb720221f432e443bd5f9117fd22cfd4762" + integrity sha1-S6jdtyAiH0MuRDvV+RF/0iz9R2I= + +"@types/istanbul-lib-report@*": + version "3.0.0" + resolved "https://registry.nlark.com/@types/istanbul-lib-report/download/@types/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" + integrity sha1-wUwk8Y6oGQwRjudWK3/5mjZVJoY= + dependencies: + "@types/istanbul-lib-coverage" "*" + +"@types/istanbul-reports@^3.0.0": + version "3.0.1" + resolved "https://registry.nlark.com/@types/istanbul-reports/download/@types/istanbul-reports-3.0.1.tgz?cache=0&sync_timestamp=1629708071482&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fistanbul-reports%2Fdownload%2F%40types%2Fistanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" + integrity sha1-kVP+mLuivVZaY63ZQ21vDX+EaP8= + dependencies: + "@types/istanbul-lib-report" "*" + +"@types/jest@^23.3.1": + version "23.3.14" + resolved "https://registry.nlark.com/@types/jest/download/@types/jest-23.3.14.tgz#37daaf78069e7948520474c87b80092ea912520a" + integrity sha1-N9qveAaeeUhSBHTIe4AJLqkSUgo= + +"@types/node@*": + version "16.7.8" + resolved "https://registry.nlark.com/@types/node/download/@types/node-16.7.8.tgz?cache=0&sync_timestamp=1630352045402&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-16.7.8.tgz#2448be5f24fe6b77114632b6350fcd219334651e" + integrity sha1-JEi+XyT+a3cRRjK2NQ/NIZM0ZR4= + +"@types/node@^10.9.2": + version "10.17.60" + resolved "https://registry.nlark.com/@types/node/download/@types/node-10.17.60.tgz?cache=0&sync_timestamp=1630352045402&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" + integrity sha1-NfPWIT2u2V2n8Pc+dbzGmA6QWXs= + +"@types/normalize-package-data@^2.4.0": + version "2.4.1" + resolved "https://registry.nlark.com/@types/normalize-package-data/download/@types/normalize-package-data-2.4.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fnormalize-package-data%2Fdownload%2F%40types%2Fnormalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" + integrity sha1-0zV0eaD9/dWQf+Z+F+CoXJBuEwE= + +"@types/prettier@^2.0.0": + version "2.3.2" + resolved "https://registry.nlark.com/@types/prettier/download/@types/prettier-2.3.2.tgz#fc8c2825e4ed2142473b4a81064e6e081463d1b3" + integrity sha1-/IwoJeTtIUJHO0qBBk5uCBRj0bM= + +"@types/stack-utils@^2.0.0": + version "2.0.1" + resolved "https://registry.nlark.com/@types/stack-utils/download/@types/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" + integrity sha1-IPGClPeX8iCbX2XI47XI6CYdEnw= + +"@types/yargs-parser@*": + version "20.2.1" + resolved "https://registry.nlark.com/@types/yargs-parser/download/@types/yargs-parser-20.2.1.tgz#3b9ce2489919d9e4fea439b76916abc34b2df129" + integrity sha1-O5ziSJkZ2eT+pDm3aRarw0st8Sk= + +"@types/yargs@^15.0.0": + version "15.0.14" + resolved "https://registry.nlark.com/@types/yargs/download/@types/yargs-15.0.14.tgz?cache=0&sync_timestamp=1629709792352&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fyargs%2Fdownload%2F%40types%2Fyargs-15.0.14.tgz#26d821ddb89e70492160b66d10a0eb6df8f6fb06" + integrity sha1-Jtgh3biecEkhYLZtEKDrbfj2+wY= + dependencies: + "@types/yargs-parser" "*" + +abab@^2.0.0, abab@^2.0.3, abab@^2.0.5: + version "2.0.5" + resolved "https://registry.nlark.com/abab/download/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" + integrity sha1-wLZ4+zLWD8EhnHhNaoJv44Wut5o= + +acorn-globals@^4.1.0: + version "4.3.4" + resolved "https://registry.nlark.com/acorn-globals/download/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" + integrity sha1-n6GSat3BHJcwjE5m163Q1Awycuc= + dependencies: + acorn "^6.0.1" + acorn-walk "^6.0.1" + +acorn-globals@^6.0.0: + version "6.0.0" + resolved "https://registry.nlark.com/acorn-globals/download/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" + integrity sha1-Rs3Tnw+P8IqHZhm1X1rIptx3C0U= + dependencies: + acorn "^7.1.1" + acorn-walk "^7.1.1" + +acorn-walk@^6.0.1: + version "6.2.0" + resolved "https://registry.nlark.com/acorn-walk/download/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" + integrity sha1-Ejy487hMIXHx9/slJhWxx4prGow= + +acorn-walk@^7.1.1: + version "7.2.0" + resolved "https://registry.nlark.com/acorn-walk/download/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" + integrity sha1-DeiJpgEgOQmw++B7iTjcIdLpZ7w= + +acorn@^5.5.3: + version "5.7.4" + resolved "https://registry.nlark.com/acorn/download/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" + integrity sha1-Po2KmUfQWZoXltECJddDL0pKz14= + +acorn@^6.0.1: + version "6.4.2" + resolved "https://registry.nlark.com/acorn/download/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" + integrity sha1-NYZv1xBSjpLeEM8GAWSY5H454eY= + +acorn@^7.1.1: + version "7.4.1" + resolved "https://registry.nlark.com/acorn/download/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" + integrity sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo= + +acorn@^8.2.4: + version "8.4.1" + resolved "https://registry.nlark.com/acorn/download/acorn-8.4.1.tgz#56c36251fc7cabc7096adc18f05afe814321a28c" + integrity sha1-VsNiUfx8q8cJatwY8Fr+gUMhoow= + +agent-base@6: + version "6.0.2" + resolved "https://registry.nlark.com/agent-base/download/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha1-Sf/1hXfP7j83F2/qtMIuAPhtf3c= + dependencies: + debug "4" + +ajv@^6.12.3: + version "6.12.6" + resolved "https://registry.nlark.com/ajv/download/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha1-uvWmLoArB9l3A0WG+MO69a3ybfQ= + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-escapes@^4.2.1: + version "4.3.2" + resolved "https://registry.nlark.com/ansi-escapes/download/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha1-ayKR0dt9mLZSHV8e+kLQ86n+tl4= + dependencies: + type-fest "^0.21.3" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.nlark.com/ansi-regex/download/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/ansi-regex/download/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.nlark.com/ansi-regex/download/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha1-OIU59VF5vzkznIGvMKZU1p+Hy3U= + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.nlark.com/ansi-styles/download/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.nlark.com/ansi-styles/download/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0= + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha1-7dgDYornHATIWuegkG7a00tkiTc= + dependencies: + color-convert "^2.0.1" + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/anymatch/download/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha1-vLJLTzeTTZqnrBe0ra+J58du8us= + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +anymatch@^3.0.3: + version "3.1.2" + resolved "https://registry.nlark.com/anymatch/download/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha1-wFV8CWrzLxBhmPT04qODU343hxY= + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.nlark.com/argparse/download/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE= + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/arr-diff/download/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= + dependencies: + arr-flatten "^1.0.1" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/arr-diff/download/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.0.1, arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.nlark.com/arr-flatten/download/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha1-NgSLv/TntH4TZkQxbJlmnqWukfE= + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.nlark.com/arr-union/download/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/array-equal/download/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.nlark.com/array-unique/download/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.nlark.com/array-unique/download/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/arrify/download/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.nlark.com/asn1/download/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha1-jSR136tVO7M+d7VOWeiAu4ziMTY= + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/assert-plus/download/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/assign-symbols/download/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.nlark.com/async-limiter/download/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha1-3TeelPDbgxCwgpH51kwyCXZmF/0= + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.nlark.com/asynckit/download/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.nlark.com/atob/download/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha1-bZUX654DDSQ2ZmZR6GvZ9vE1M8k= + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.nlark.com/aws-sign2/download/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.11.0" + resolved "https://registry.nlark.com/aws4/download/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha1-1h9G2DslGSUOJ4Ta9bCUeai0HFk= + +axios@^0.21.1: + version "0.21.1" + resolved "https://registry.nlark.com/axios/download/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" + integrity sha1-IlY0gZYvTWvemnbVFu8OXTwJsrg= + dependencies: + follow-redirects "^1.10.0" + +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.nlark.com/babel-code-frame/download/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-core@^6.0.0, babel-core@^6.26.0: + version "6.26.3" + resolved "https://registry.nlark.com/babel-core/download/babel-core-6.26.3.tgz?cache=0&sync_timestamp=1624608013272&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fbabel-core%2Fdownload%2Fbabel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" + integrity sha1-suLwnjQtDwyI4vAuBneUEl51wgc= + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.1" + debug "^2.6.9" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.8" + slash "^1.0.0" + source-map "^0.5.7" + +babel-generator@^6.18.0, babel-generator@^6.26.0: + version "6.26.1" + resolved "https://registry.nlark.com/babel-generator/download/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + integrity sha1-GERAjTuPDTWkBOp6wYDwh6YBvZA= + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.7" + trim-right "^1.0.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.nlark.com/babel-helpers/download/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-jest@^23.6.0: + version "23.6.0" + resolved "https://registry.nlark.com/babel-jest/download/babel-jest-23.6.0.tgz#a644232366557a2240a0c083da6b25786185a2f1" + integrity sha1-pkQjI2ZVeiJAoMCD2msleGGFovE= + dependencies: + babel-plugin-istanbul "^4.1.6" + babel-preset-jest "^23.2.0" + +babel-jest@^26.6.3: + version "26.6.3" + resolved "https://registry.nlark.com/babel-jest/download/babel-jest-26.6.3.tgz#d87d25cb0037577a0c89f82e5755c5d293c01056" + integrity sha1-2H0lywA3V3oMifguV1XF0pPAEFY= + dependencies: + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/babel__core" "^7.1.7" + babel-plugin-istanbul "^6.0.0" + babel-preset-jest "^26.6.2" + chalk "^4.0.0" + graceful-fs "^4.2.4" + slash "^3.0.0" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.nlark.com/babel-messages/download/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-istanbul@^4.1.6: + version "4.1.6" + resolved "https://registry.nlark.com/babel-plugin-istanbul/download/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45" + integrity sha1-NsWbIZLvzoHFs3gyG3QXWt0cmkU= + dependencies: + babel-plugin-syntax-object-rest-spread "^6.13.0" + find-up "^2.1.0" + istanbul-lib-instrument "^1.10.1" + test-exclude "^4.2.1" + +babel-plugin-istanbul@^6.0.0: + version "6.0.0" + resolved "https://registry.nlark.com/babel-plugin-istanbul/download/babel-plugin-istanbul-6.0.0.tgz#e159ccdc9af95e0b570c75b4573b7c34d671d765" + integrity sha1-4VnM3Jr5XgtXDHW0Vzt8NNZx12U= + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@istanbuljs/load-nyc-config" "^1.0.0" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-instrument "^4.0.0" + test-exclude "^6.0.0" + +babel-plugin-jest-hoist@^23.2.0: + version "23.2.0" + resolved "https://registry.nlark.com/babel-plugin-jest-hoist/download/babel-plugin-jest-hoist-23.2.0.tgz#e61fae05a1ca8801aadee57a6d66b8cefaf44167" + integrity sha1-5h+uBaHKiAGq3uV6bWa4zvr0QWc= + +babel-plugin-jest-hoist@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/babel-plugin-jest-hoist/download/babel-plugin-jest-hoist-26.6.2.tgz#8185bd030348d254c6d7dd974355e6a28b21e62d" + integrity sha1-gYW9AwNI0lTG192XQ1Xmoosh5i0= + dependencies: + "@babel/template" "^7.3.3" + "@babel/types" "^7.3.3" + "@types/babel__core" "^7.0.0" + "@types/babel__traverse" "^7.0.6" + +babel-plugin-syntax-object-rest-spread@^6.13.0: + version "6.13.0" + resolved "https://registry.nlark.com/babel-plugin-syntax-object-rest-spread/download/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U= + +babel-preset-current-node-syntax@^1.0.0: + version "1.0.1" + resolved "https://registry.nlark.com/babel-preset-current-node-syntax/download/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" + integrity sha1-tDmSObibKgEfndvj5PQB/EDP9zs= + dependencies: + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-bigint" "^7.8.3" + "@babel/plugin-syntax-class-properties" "^7.8.3" + "@babel/plugin-syntax-import-meta" "^7.8.3" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.8.3" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-top-level-await" "^7.8.3" + +babel-preset-jest@^23.2.0: + version "23.2.0" + resolved "https://registry.nlark.com/babel-preset-jest/download/babel-preset-jest-23.2.0.tgz?cache=0&sync_timestamp=1624900309099&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fbabel-preset-jest%2Fdownload%2Fbabel-preset-jest-23.2.0.tgz#8ec7a03a138f001a1a8fb1e8113652bf1a55da46" + integrity sha1-jsegOhOPABoaj7HoETZSvxpV2kY= + dependencies: + babel-plugin-jest-hoist "^23.2.0" + babel-plugin-syntax-object-rest-spread "^6.13.0" + +babel-preset-jest@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/babel-preset-jest/download/babel-preset-jest-26.6.2.tgz?cache=0&sync_timestamp=1624900309099&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fbabel-preset-jest%2Fdownload%2Fbabel-preset-jest-26.6.2.tgz#747872b1171df032252426586881d62d31798fee" + integrity sha1-dHhysRcd8DIlJCZYaIHWLTF5j+4= + dependencies: + babel-plugin-jest-hoist "^26.6.2" + babel-preset-current-node-syntax "^1.0.0" + +babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.nlark.com/babel-register/download/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= + dependencies: + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + home-or-tmp "^2.0.0" + lodash "^4.17.4" + mkdirp "^0.5.1" + source-map-support "^0.4.15" + +babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.nlark.com/babel-runtime/download/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.nlark.com/babel-template/download/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.nlark.com/babel-traverse/download/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.nlark.com/babel-types/download/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.nlark.com/babylon/download/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + integrity sha1-ry87iPpvXB5MY00aD46sT1WzleM= + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.nlark.com/balanced-match/download/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4= + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.nlark.com/base/download/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha1-e95c7RRbbVUakNuH+DxVi060io8= + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.nlark.com/bcrypt-pbkdf/download/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.nlark.com/brace-expansion/download/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0= + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.nlark.com/braces/download/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +braces@^2.3.1: + version "2.3.2" + resolved "https://registry.nlark.com/braces/download/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha1-WXn9PxTNUxVl5fot8av/8d+u5yk= + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +braces@^3.0.1: + version "3.0.2" + resolved "https://registry.nlark.com/braces/download/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha1-NFThpGLujVmeI23zNs2epPiv4Qc= + dependencies: + fill-range "^7.0.1" + +browser-process-hrtime@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/browser-process-hrtime/download/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" + integrity sha1-PJtLfXgsgSHlbxAQbYTA0P/JRiY= + +browser-resolve@^1.11.3: + version "1.11.3" + resolved "https://registry.nlark.com/browser-resolve/download/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" + integrity sha1-m3y7PQ9RDky4a9vXlhJNKLWJCvY= + dependencies: + resolve "1.1.7" + +browserslist@^4.16.6: + version "4.16.8" + resolved "https://registry.nlark.com/browserslist/download/browserslist-4.16.8.tgz?cache=0&sync_timestamp=1629302575089&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fbrowserslist%2Fdownload%2Fbrowserslist-4.16.8.tgz#cb868b0b554f137ba6e33de0ecff2eda403c4fb0" + integrity sha1-y4aLC1VPE3um4z3g7P8u2kA8T7A= + dependencies: + caniuse-lite "^1.0.30001251" + colorette "^1.3.0" + electron-to-chromium "^1.3.811" + escalade "^3.1.1" + node-releases "^1.1.75" + +bs-logger@0.x: + version "0.2.6" + resolved "https://registry.nlark.com/bs-logger/download/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" + integrity sha1-6302UwenLPl0zGzadraDVK0za9g= + dependencies: + fast-json-stable-stringify "2.x" + +bser@2.1.1: + version "2.1.1" + resolved "https://registry.nlark.com/bser/download/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" + integrity sha1-5nh9og7OnQeZhTPP2d5vXDj0vAU= + dependencies: + node-int64 "^0.4.0" + +buffer-from@1.x, buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.nlark.com/buffer-from/download/buffer-from-1.1.2.tgz?cache=0&sync_timestamp=1627578361955&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fbuffer-from%2Fdownload%2Fbuffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha1-KxRqb9cugLT1XSVfNe1Zo6mkG9U= + +builtin-modules@^1.1.1: + version "1.1.1" + resolved "https://registry.nlark.com/builtin-modules/download/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/cache-base/download/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha1-Cn9GQWgxyLZi7jb+TnxZ129marI= + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.nlark.com/call-bind/download/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha1-sdTonmiBGcPJqQOtMKuy9qkZvjw= + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +caller-callsite@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/caller-callsite/download/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" + integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= + dependencies: + callsites "^2.0.0" + +caller-path@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/caller-path/download/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" + integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= + dependencies: + caller-callsite "^2.0.0" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/callsites/download/callsites-2.0.0.tgz?cache=0&sync_timestamp=1628464907898&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcallsites%2Fdownload%2Fcallsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.nlark.com/callsites/download/callsites-3.1.0.tgz?cache=0&sync_timestamp=1628464907898&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcallsites%2Fdownload%2Fcallsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha1-s2MKvYlDQy9Us/BRkjjjPNffL3M= + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.nlark.com/camelcase/download/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= + +camelcase@^5.0.0, camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.nlark.com/camelcase/download/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA= + +camelcase@^6.0.0: + version "6.2.0" + resolved "https://registry.nlark.com/camelcase/download/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" + integrity sha1-kkr4gcnVJaydh/QNlk5c6pgqGAk= + +caniuse-lite@^1.0.30001251: + version "1.0.30001252" + resolved "https://registry.nlark.com/caniuse-lite/download/caniuse-lite-1.0.30001252.tgz#cb16e4e3dafe948fc4a9bb3307aea054b912019a" + integrity sha1-yxbk49r+lI/EqbszB66gVLkSAZo= + +capture-exit@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/capture-exit/download/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" + integrity sha1-+5U7+uvreB9iiYI52rtCbQilCaQ= + dependencies: + rsvp "^4.8.4" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.nlark.com/caseless/download/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.nlark.com/chalk/download/chalk-1.1.3.tgz?cache=0&sync_timestamp=1627646614989&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0: + version "2.4.2" + resolved "https://registry.nlark.com/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1627646614989&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ= + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.nlark.com/chalk/download/chalk-4.1.2.tgz?cache=0&sync_timestamp=1627646614989&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha1-qsTit3NKdAhnrrFr8CqtVWoeegE= + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +char-regex@^1.0.2: + version "1.0.2" + resolved "https://registry.nlark.com/char-regex/download/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" + integrity sha1-10Q1giYhf5ge1Y9Hmx1rzClUXc8= + +ci-info@^1.5.0: + version "1.6.0" + resolved "https://registry.nlark.com/ci-info/download/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" + integrity sha1-LKINu5zrMtRSSmgzAzE/AwSx5Jc= + +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/ci-info/download/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha1-Z6npZL4xpR4V5QENWObxKDQAL0Y= + +cjs-module-lexer@^0.6.0: + version "0.6.0" + resolved "https://registry.nlark.com/cjs-module-lexer/download/cjs-module-lexer-0.6.0.tgz#4186fcca0eae175970aee870b9fe2d6cf8d5655f" + integrity sha1-QYb8yg6uF1lwruhwuf4tbPjVZV8= + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.nlark.com/class-utils/download/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha1-+TNprouafOAv1B+q0MqDAzGQxGM= + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.nlark.com/cliui/download/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha1-UR1wLAxOQcoVbX0OlgIfI+EyJbE= + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.nlark.com/co/download/co-4.6.0.tgz?cache=0&sync_timestamp=1624608078028&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fco%2Fdownload%2Fco-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= + +collect-v8-coverage@^1.0.0: + version "1.0.1" + resolved "https://registry.nlark.com/collect-v8-coverage/download/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" + integrity sha1-zCyOlPwYu9/+ZNZTRXDIpnOyf1k= + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/collection-visit/download/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.nlark.com/color-convert/download/color-convert-1.9.3.tgz?cache=0&sync_timestamp=1624607968569&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcolor-convert%2Fdownload%2Fcolor-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg= + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.nlark.com/color-convert/download/color-convert-2.0.1.tgz?cache=0&sync_timestamp=1624607968569&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcolor-convert%2Fdownload%2Fcolor-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM= + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.nlark.com/color-name/download/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.nlark.com/color-name/download/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha1-wqCah6y95pVD3m9j+jmVyCbFNqI= + +colorette@^1.3.0: + version "1.3.0" + resolved "https://registry.nlark.com/colorette/download/colorette-1.3.0.tgz#ff45d2f0edb244069d3b772adeb04fed38d0a0af" + integrity sha1-/0XS8O2yRAadO3cq3rBP7TjQoK8= + +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.nlark.com/combined-stream/download/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha1-w9RaizT9cwYxoRCoolIGgrMdWn8= + dependencies: + delayed-stream "~1.0.0" + +commander@^2.12.1: + version "2.20.3" + resolved "https://registry.nlark.com/commander/download/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha1-/UhehMA+tIgcIHIrpIA16FMa6zM= + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.nlark.com/component-emitter/download/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha1-FuQHD7qK4ptnnyIVhT7hgasuq8A= + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.nlark.com/concat-map/download/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +convert-source-map@^1.4.0, convert-source-map@^1.5.1, convert-source-map@^1.6.0, convert-source-map@^1.7.0: + version "1.8.0" + resolved "https://registry.nlark.com/convert-source-map/download/convert-source-map-1.8.0.tgz?cache=0&sync_timestamp=1624608042394&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fconvert-source-map%2Fdownload%2Fconvert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" + integrity sha1-8zc8MtIbTXgN2ABFFGhPt5HKQ2k= + dependencies: + safe-buffer "~5.1.1" + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.nlark.com/copy-descriptor/download/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +core-js@^2.4.0, core-js@^2.5.0: + version "2.6.12" + resolved "https://registry.nlark.com/core-js/download/core-js-2.6.12.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcore-js%2Fdownload%2Fcore-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" + integrity sha1-2TM9+nsGXjR8xWgiGdb2kIWcwuw= + +core-util-is@1.0.2: + version "1.0.2" + resolved "https://registry.nlark.com/core-util-is/download/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +cosmiconfig@^5.0.7: + version "5.2.1" + resolved "https://registry.nlark.com/cosmiconfig/download/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" + integrity sha1-BA9yaAnFked6F8CjYmykW08Wixo= + dependencies: + import-fresh "^2.0.0" + is-directory "^0.3.1" + js-yaml "^3.13.1" + parse-json "^4.0.0" + +coveralls@^3.0.2: + version "3.1.1" + resolved "https://registry.nlark.com/coveralls/download/coveralls-3.1.1.tgz#f5d4431d8b5ae69c5079c8f8ca00d64ac77cf081" + integrity sha1-9dRDHYta5pxQecj4ygDWSsd88IE= + dependencies: + js-yaml "^3.13.1" + lcov-parse "^1.0.0" + log-driver "^1.2.7" + minimist "^1.2.5" + request "^2.88.2" + +cross-spawn@^6.0.0: + version "6.0.5" + resolved "https://registry.nlark.com/cross-spawn/download/cross-spawn-6.0.5.tgz?cache=0&sync_timestamp=1624608055915&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcross-spawn%2Fdownload%2Fcross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q= + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +cross-spawn@^7.0.0: + version "7.0.3" + resolved "https://registry.nlark.com/cross-spawn/download/cross-spawn-7.0.3.tgz?cache=0&sync_timestamp=1624608055915&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcross-spawn%2Fdownload%2Fcross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha1-9zqFudXUHQRVUcF34ogtSshXKKY= + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0", cssom@~0.3.6: + version "0.3.8" + resolved "https://registry.nlark.com/cssom/download/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" + integrity sha1-nxJ29bK0Y/IRTT8sdSUK+MGjb0o= + +cssom@^0.4.4: + version "0.4.4" + resolved "https://registry.nlark.com/cssom/download/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" + integrity sha1-WmbPk9LQtmHYC/akT7ZfXC5OChA= + +cssstyle@^1.0.0: + version "1.4.0" + resolved "https://registry.nlark.com/cssstyle/download/cssstyle-1.4.0.tgz?cache=0&sync_timestamp=1624607997771&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcssstyle%2Fdownload%2Fcssstyle-1.4.0.tgz#9d31328229d3c565c61e586b02041a28fccdccf1" + integrity sha1-nTEyginTxWXGHlhrAgQaKPzNzPE= + dependencies: + cssom "0.3.x" + +cssstyle@^2.3.0: + version "2.3.0" + resolved "https://registry.nlark.com/cssstyle/download/cssstyle-2.3.0.tgz?cache=0&sync_timestamp=1624607997771&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcssstyle%2Fdownload%2Fcssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" + integrity sha1-/2ZaDdvcMYZLCWR/NBY0Q9kLCFI= + dependencies: + cssom "~0.3.6" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.nlark.com/dashdash/download/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +data-urls@^1.0.0: + version "1.1.0" + resolved "https://registry.nlark.com/data-urls/download/data-urls-1.1.0.tgz?cache=0&sync_timestamp=1626722283326&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdata-urls%2Fdownload%2Fdata-urls-1.1.0.tgz#15ee0582baa5e22bb59c77140da8f9c76963bbfe" + integrity sha1-Fe4Fgrql4iu1nHcUDaj5x2lju/4= + dependencies: + abab "^2.0.0" + whatwg-mimetype "^2.2.0" + whatwg-url "^7.0.0" + +data-urls@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/data-urls/download/data-urls-2.0.0.tgz?cache=0&sync_timestamp=1626722283326&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdata-urls%2Fdownload%2Fdata-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" + integrity sha1-FWSFpyljqXD11YIar2Qr7yvy25s= + dependencies: + abab "^2.0.3" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.0.0" + +debug@4, debug@^4.1.0, debug@^4.1.1: + version "4.3.2" + resolved "https://registry.nlark.com/debug/download/debug-4.3.2.tgz?cache=0&sync_timestamp=1625374653719&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdebug%2Fdownload%2Fdebug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" + integrity sha1-8KScGKyHeeMdSgxgKd+3aHPHQos= + dependencies: + ms "2.1.2" + +debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: + version "2.6.9" + resolved "https://registry.nlark.com/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1625374653719&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8= + dependencies: + ms "2.0.0" + +decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.nlark.com/decamelize/download/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decimal.js@^10.2.1: + version "10.3.1" + resolved "https://registry.nlark.com/decimal.js/download/decimal.js-10.3.1.tgz#d8c3a444a9c6774ba60ca6ad7261c3a94fd5e783" + integrity sha1-2MOkRKnGd0umDKatcmHDqU/V54M= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.nlark.com/decode-uri-component/download/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.nlark.com/deep-is/download/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + +deepmerge@^4.2.2: + version "4.2.2" + resolved "https://registry.nlark.com/deepmerge/download/deepmerge-4.2.2.tgz?cache=0&sync_timestamp=1624608044263&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdeepmerge%2Fdownload%2Fdeepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" + integrity sha1-RNLqNnm49NT/ujPwPYZfwee/SVU= + +define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.nlark.com/define-properties/download/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha1-z4jabL7ib+bbcJT2HYcMvYTO6fE= + dependencies: + object-keys "^1.0.12" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.nlark.com/define-property/download/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/define-property/download/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.nlark.com/define-property/download/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha1-1Flono1lS6d+AqgX+HENcCyxbp0= + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/delayed-stream/download/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/detect-indent/download/detect-indent-4.0.0.tgz?cache=0&sync_timestamp=1628462154859&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdetect-indent%2Fdownload%2Fdetect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= + dependencies: + repeating "^2.0.0" + +detect-newline@^3.0.0: + version "3.1.0" + resolved "https://registry.nlark.com/detect-newline/download/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" + integrity sha1-V29d/GOuGhkv8ZLYrTr2MImRtlE= + +diff-sequences@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/diff-sequences/download/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1" + integrity sha1-SLqZFX3hkjQS7tQdtrbUqpynwLE= + +diff@^3.2.0: + version "3.5.0" + resolved "https://registry.nlark.com/diff/download/diff-3.5.0.tgz?cache=0&sync_timestamp=1624608104914&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdiff%2Fdownload%2Fdiff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha1-gAwN0eCov7yVg1wgKtIg/jF+WhI= + +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.nlark.com/diff/download/diff-4.0.2.tgz?cache=0&sync_timestamp=1624608104914&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdiff%2Fdownload%2Fdiff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha1-YPOuy4nV+uUgwRqhnvwruYKq3n0= + +domexception@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/domexception/download/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" + integrity sha1-k3RCZEymoxJh7zbj7Gd/6AVYLJA= + dependencies: + webidl-conversions "^4.0.2" + +domexception@^2.0.1: + version "2.0.1" + resolved "https://registry.nlark.com/domexception/download/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" + integrity sha1-+0Su+6eT4VdLCvau0oAdBXUp8wQ= + dependencies: + webidl-conversions "^5.0.0" + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.nlark.com/ecc-jsbn/download/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +electron-to-chromium@^1.3.811: + version "1.3.824" + resolved "https://registry.nlark.com/electron-to-chromium/download/electron-to-chromium-1.3.824.tgz?cache=0&sync_timestamp=1630375378248&other_urls=https%3A%2F%2Fregistry.nlark.com%2Felectron-to-chromium%2Fdownload%2Felectron-to-chromium-1.3.824.tgz#9f85cc826c70b12180009d461e3b19c8121a56d2" + integrity sha1-n4XMgmxwsSGAAJ1GHjsZyBIaVtI= + +emittery@^0.7.1: + version "0.7.2" + resolved "https://registry.nlark.com/emittery/download/emittery-0.7.2.tgz#25595908e13af0f5674ab419396e2fb394cdfa82" + integrity sha1-JVlZCOE68PVnSrQZOW4vs5TN+oI= + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.nlark.com/emoji-regex/download/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha1-6Bj9ac5cz8tARZT4QpY79TFkzDc= + +end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.nlark.com/end-of-stream/download/end-of-stream-1.4.4.tgz?cache=0&sync_timestamp=1624607958717&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fend-of-stream%2Fdownload%2Fend-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha1-WuZKX0UFe682JuwU2gyl5LJDHrA= + dependencies: + once "^1.4.0" + +error-ex@^1.2.0, error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.nlark.com/error-ex/download/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha1-tKxAZIEH/c3PriQvQovqihTU8b8= + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.18.0-next.2: + version "1.18.5" + resolved "https://registry.nlark.com/es-abstract/download/es-abstract-1.18.5.tgz#9b10de7d4c206a3581fd5b2124233e04db49ae19" + integrity sha1-mxDefUwgajWB/VshJCM+BNtJrhk= + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.2" + internal-slot "^1.0.3" + is-callable "^1.2.3" + is-negative-zero "^2.0.1" + is-regex "^1.1.3" + is-string "^1.0.6" + object-inspect "^1.11.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.1" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.nlark.com/es-to-primitive/download/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha1-5VzUyc3BiLzvsDs2bHNjI/xciYo= + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.nlark.com/escalade/download/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha1-2M/ccACWXFoBdLSoLqpcBVJ0LkA= + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.nlark.com/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/escape-string-regexp/download/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha1-owME6Z2qMuI7L9IPUbq9B8/8o0Q= + +escodegen@^1.9.1: + version "1.14.3" + resolved "https://registry.nlark.com/escodegen/download/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" + integrity sha1-TnuB+6YVgdyXWC7XjKt/Do1j9QM= + dependencies: + esprima "^4.0.1" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +escodegen@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/escodegen/download/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" + integrity sha1-XjKxKDPoqo+jXhvwvvqJOASEx90= + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +esprima@^4.0.0, esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/esprima/download/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha1-E7BM2z5sXRnfkatph6hpVhmwqnE= + +estraverse@^4.2.0: + version "4.3.0" + resolved "https://registry.nlark.com/estraverse/download/estraverse-4.3.0.tgz?cache=0&sync_timestamp=1624607974054&other_urls=https%3A%2F%2Fregistry.nlark.com%2Festraverse%2Fdownload%2Festraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha1-OYrT88WiSUi+dyXoPRGn3ijNvR0= + +estraverse@^5.2.0: + version "5.2.0" + resolved "https://registry.nlark.com/estraverse/download/estraverse-5.2.0.tgz?cache=0&sync_timestamp=1624607974054&other_urls=https%3A%2F%2Fregistry.nlark.com%2Festraverse%2Fdownload%2Festraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" + integrity sha1-MH30JUfmzHMk088DwVXVzbjFOIA= + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.nlark.com/esutils/download/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha1-dNLrTeC42hKTcRkQ1Qd1ubcQ72Q= + +exec-sh@^0.3.2: + version "0.3.6" + resolved "https://registry.nlark.com/exec-sh/download/exec-sh-0.3.6.tgz#ff264f9e325519a60cb5e273692943483cca63bc" + integrity sha1-/yZPnjJVGaYMteJzaSlDSDzKY7w= + +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/execa/download/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha1-xiNqW7TfbW8V6I5/AXeYIWdJ3dg= + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +execa@^4.0.0: + version "4.1.0" + resolved "https://registry.nlark.com/execa/download/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" + integrity sha1-TlSRrRVy8vF6d9OIxshXE1sihHo= + dependencies: + cross-spawn "^7.0.0" + get-stream "^5.0.0" + human-signals "^1.1.1" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.0" + onetime "^5.1.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.nlark.com/exit/download/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.nlark.com/expand-brackets/download/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= + dependencies: + is-posix-bracket "^0.1.0" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.nlark.com/expand-brackets/download/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.nlark.com/expand-range/download/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= + dependencies: + fill-range "^2.1.0" + +expect@^23.6.0: + version "23.6.0" + resolved "https://registry.nlark.com/expect/download/expect-23.6.0.tgz#1e0c8d3ba9a581c87bd71fb9bc8862d443425f98" + integrity sha1-HgyNO6mlgch71x+5vIhi1ENCX5g= + dependencies: + ansi-styles "^3.2.0" + jest-diff "^23.6.0" + jest-get-type "^22.1.0" + jest-matcher-utils "^23.6.0" + jest-message-util "^23.4.0" + jest-regex-util "^23.3.0" + +expect@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/expect/download/expect-26.6.2.tgz#c6b996bf26bf3fe18b67b2d0f51fc981ba934417" + integrity sha1-xrmWvya/P+GLZ7LQ9R/JgbqTRBc= + dependencies: + "@jest/types" "^26.6.2" + ansi-styles "^4.0.0" + jest-get-type "^26.3.0" + jest-matcher-utils "^26.6.2" + jest-message-util "^26.6.2" + jest-regex-util "^26.0.0" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.nlark.com/extend-shallow/download/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.nlark.com/extend-shallow/download/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.nlark.com/extend/download/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo= + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.nlark.com/extglob/download/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= + dependencies: + is-extglob "^1.0.0" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.nlark.com/extglob/download/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM= + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.nlark.com/extsprintf/download/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.nlark.com/extsprintf/download/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.nlark.com/fast-deep-equal/download/fast-deep-equal-3.1.3.tgz?cache=0&sync_timestamp=1624607945641&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU= + +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.nlark.com/fast-json-stable-stringify/download/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM= + +fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.nlark.com/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +fb-watchman@^2.0.0: + version "2.0.1" + resolved "https://registry.nlark.com/fb-watchman/download/fb-watchman-2.0.1.tgz?cache=0&sync_timestamp=1624607942135&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffb-watchman%2Fdownload%2Ffb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85" + integrity sha1-/IT7OdJwnPP/bXQ3BhV7tXCKioU= + dependencies: + bser "2.1.1" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.nlark.com/filename-regex/download/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= + +fill-range@^2.1.0: + version "2.2.4" + resolved "https://registry.nlark.com/fill-range/download/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" + integrity sha1-6x53OrsFbc2N8r/favWbizqTZWU= + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^3.0.0" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/fill-range/download/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.nlark.com/fill-range/download/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha1-GRmmp8df44ssfHflGYU12prN2kA= + dependencies: + to-regex-range "^5.0.1" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.nlark.com/find-up/download/find-up-1.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffind-up%2Fdownload%2Ffind-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.nlark.com/find-up/download/find-up-2.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffind-up%2Fdownload%2Ffind-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/find-up/download/find-up-3.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffind-up%2Fdownload%2Ffind-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha1-SRafHXmTQwZG2mHsxa41XCHJe3M= + dependencies: + locate-path "^3.0.0" + +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.nlark.com/find-up/download/find-up-4.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffind-up%2Fdownload%2Ffind-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha1-l6/n1s3AvFkoWEt8jXsW6KmqXRk= + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +follow-redirects@^1.10.0: + version "1.14.2" + resolved "https://registry.nlark.com/follow-redirects/download/follow-redirects-1.14.2.tgz?cache=0&sync_timestamp=1629288519293&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.14.2.tgz#cecb825047c00f5e66b142f90fed4f515dec789b" + integrity sha1-zsuCUEfAD15msUL5D+1PUV3seJs= + +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.nlark.com/for-each/download/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha1-abRH6IoKXTLD5whPPxcQA0shN24= + dependencies: + is-callable "^1.1.3" + +for-in@^1.0.1, for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.nlark.com/for-in/download/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.nlark.com/for-own/download/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= + dependencies: + for-in "^1.0.1" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.nlark.com/forever-agent/download/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@^3.0.0: + version "3.0.1" + resolved "https://registry.nlark.com/form-data/download/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" + integrity sha1-69U3kbeDVqma+aMA1CgsTV65dV8= + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.nlark.com/form-data/download/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha1-3M5SwF9kTymManq5Nr1yTO/786Y= + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.nlark.com/fragment-cache/download/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/fs.realpath/download/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@^2.1.2: + version "2.3.2" + resolved "https://registry.nlark.com/fsevents/download/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha1-ilJveLj99GI7cJ4Ll1xSwkwC/Ro= + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.nlark.com/function-bind/download/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0= + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.nlark.com/gensync/download/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha1-MqbudsPX9S1GsrGuXZP+qFgKJeA= + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.nlark.com/get-caller-file/download/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha1-T5RBKoLbMvNuOwuXQfipf+sDH34= + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: + version "1.1.1" + resolved "https://registry.nlark.com/get-intrinsic/download/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha1-FfWfN2+FXERpY5SPDSTNNje0q8Y= + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + +get-package-type@^0.1.0: + version "0.1.0" + resolved "https://registry.nlark.com/get-package-type/download/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + integrity sha1-jeLYA8/0TfO8bEVuZmizbDkm4Ro= + +get-stdin@^6.0.0: + version "6.0.0" + resolved "https://registry.nlark.com/get-stdin/download/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" + integrity sha1-ngm/cSs2CrkiXoEgSPcf3pyJZXs= + +get-stream@^4.0.0: + version "4.1.0" + resolved "https://registry.nlark.com/get-stream/download/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha1-wbJVV189wh1Zv8ec09K0axw6VLU= + dependencies: + pump "^3.0.0" + +get-stream@^5.0.0: + version "5.2.0" + resolved "https://registry.nlark.com/get-stream/download/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha1-SWaheV7lrOZecGxLe+txJX1uItM= + dependencies: + pump "^3.0.0" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.nlark.com/get-value/download/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.nlark.com/getpass/download/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.nlark.com/glob-base/download/glob-base-0.3.0.tgz?cache=0&sync_timestamp=1624607962566&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fglob-base%2Fdownload%2Fglob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/glob-parent/download/glob-parent-2.0.0.tgz?cache=0&sync_timestamp=1626761012320&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fglob-parent%2Fdownload%2Fglob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= + dependencies: + is-glob "^2.0.0" + +glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: + version "7.1.7" + resolved "https://registry.nlark.com/glob/download/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha1-Oxk+kjPwHULQs/eClLvutBj5SpA= + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.nlark.com/globals/download/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha1-q4eVM4hooLq9hSV1gBjCp+uVxC4= + +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.nlark.com/globals/download/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + integrity sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo= + +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.2.4: + version "4.2.8" + resolved "https://registry.nlark.com/graceful-fs/download/graceful-fs-4.2.8.tgz?cache=0&sync_timestamp=1628194007768&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fgraceful-fs%2Fdownload%2Fgraceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" + integrity sha1-5BK40z9eAGWTy9PO5t+fLOu+gCo= + +growly@^1.3.0: + version "1.3.0" + resolved "https://registry.nlark.com/growly/download/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/har-schema/download/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.nlark.com/har-validator/download/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha1-HwgDufjLIMD6E4It8ezds2veHv0= + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/has-ansi/download/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + +has-bigints@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/has-bigints/download/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" + integrity sha1-ZP5qywIGc+O3jbA1pa9pqp0HsRM= + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/has-flag/download/has-flag-3.0.0.tgz?cache=0&sync_timestamp=1626716578584&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1626716578584&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s= + +has-symbols@^1.0.1, has-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.nlark.com/has-symbols/download/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + integrity sha1-Fl0wcMADCXUqEjakeTMeOsVvFCM= + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/has-tostringtag/download/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha1-fhM4GKfTlHNPlB5zw9P5KR5liyU= + dependencies: + has-symbols "^1.0.2" + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.nlark.com/has-value/download/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/has-value/download/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.nlark.com/has-values/download/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/has-values/download/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.nlark.com/has/download/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y= + dependencies: + function-bind "^1.1.1" + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/home-or-tmp/download/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +hosted-git-info@^2.1.4: + version "2.8.9" + resolved "https://registry.nlark.com/hosted-git-info/download/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha1-3/wL+aIcAiCQkPKqaUKeFBTa8/k= + +html-encoding-sniffer@^1.0.2: + version "1.0.2" + resolved "https://registry.nlark.com/html-encoding-sniffer/download/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" + integrity sha1-5w2EuU2lOqN14R/jo1G+ZkLKRvg= + dependencies: + whatwg-encoding "^1.0.1" + +html-encoding-sniffer@^2.0.1: + version "2.0.1" + resolved "https://registry.nlark.com/html-encoding-sniffer/download/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" + integrity sha1-QqbcT9M/ACgRduiyN1nKTk+hhfM= + dependencies: + whatwg-encoding "^1.0.5" + +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://registry.nlark.com/html-escaper/download/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha1-39YAJ9o2o238viNiYsAKWCJoFFM= + +http-proxy-agent@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/http-proxy-agent/download/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" + integrity sha1-ioyO9/WTLM+VPClsqCkblap0qjo= + dependencies: + "@tootallnate/once" "1" + agent-base "6" + debug "4" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.nlark.com/http-signature/download/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.nlark.com/https-proxy-agent/download/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" + integrity sha1-4qkFQqu2inYuCghQ9sntrf2FBrI= + dependencies: + agent-base "6" + debug "4" + +human-signals@^1.1.1: + version "1.1.1" + resolved "https://registry.nlark.com/human-signals/download/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" + integrity sha1-xbHNFPUK6uCatsWf5jujOV/k36M= + +husky@^1.0.0-rc.13: + version "1.3.1" + resolved "https://registry.nlark.com/husky/download/husky-1.3.1.tgz?cache=0&sync_timestamp=1629854696569&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhusky%2Fdownload%2Fhusky-1.3.1.tgz#26823e399300388ca2afff11cfa8a86b0033fae0" + integrity sha1-JoI+OZMAOIyir/8Rz6ioawAz+uA= + dependencies: + cosmiconfig "^5.0.7" + execa "^1.0.0" + find-up "^3.0.0" + get-stdin "^6.0.0" + is-ci "^2.0.0" + pkg-dir "^3.0.0" + please-upgrade-node "^3.1.1" + read-pkg "^4.0.1" + run-node "^1.0.0" + slash "^2.0.0" + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.nlark.com/iconv-lite/download/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha1-ICK0sl+93CHS9SSXSkdKr+czkIs= + dependencies: + safer-buffer ">= 2.1.2 < 3" + +import-fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/import-fresh/download/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" + integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= + dependencies: + caller-path "^2.0.0" + resolve-from "^3.0.0" + +import-local@^3.0.2: + version "3.0.2" + resolved "https://registry.nlark.com/import-local/download/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6" + integrity sha1-qM/QQx0d5KIZlwPQA+PmI2T6bbY= + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.nlark.com/imurmurhash/download/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.nlark.com/inflight/download/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.nlark.com/inherits/download/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w= + +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.nlark.com/internal-slot/download/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha1-c0fjB97uovqsKsYgXUvH00ln9Zw= + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" + +invariant@^2.2.2: + version "2.2.4" + resolved "https://registry.nlark.com/invariant/download/invariant-2.2.4.tgz?cache=0&sync_timestamp=1624607938082&other_urls=https%3A%2F%2Fregistry.nlark.com%2Finvariant%2Fdownload%2Finvariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY= + dependencies: + loose-envify "^1.0.0" + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.nlark.com/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY= + dependencies: + kind-of "^6.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.nlark.com/is-arrayish/download/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.nlark.com/is-bigint/download/is-bigint-1.0.4.tgz?cache=0&sync_timestamp=1628747500062&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-bigint%2Fdownload%2Fis-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha1-CBR6GHW8KzIAXUHM2Ckd/8ZpHfM= + dependencies: + has-bigints "^1.0.1" + +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.nlark.com/is-boolean-object/download/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha1-XG3CACRt2TIa5LiFoRS7H3X2Nxk= + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.nlark.com/is-buffer/download/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha1-76ouqdqg16suoTqXsritUf776L4= + +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.3: + version "1.2.4" + resolved "https://registry.nlark.com/is-callable/download/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha1-RzAdWN0CWUB4ZVR4U99tYf5HGUU= + +is-ci@^1.0.10: + version "1.2.1" + resolved "https://registry.nlark.com/is-ci/download/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c" + integrity sha1-43ecjuF/zPQoSI9uKBGH8uYyhBw= + dependencies: + ci-info "^1.5.0" + +is-ci@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/is-ci/download/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + integrity sha1-a8YzQYGBDgS1wis9WJ/cpVAmQEw= + dependencies: + ci-info "^2.0.0" + +is-core-module@^2.2.0: + version "2.6.0" + resolved "https://registry.nlark.com/is-core-module/download/is-core-module-2.6.0.tgz?cache=0&sync_timestamp=1629225103688&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-core-module%2Fdownload%2Fis-core-module-2.6.0.tgz#d7553b2526fe59b92ba3e40c8df757ec8a709e19" + integrity sha1-11U7JSb+Wbkro+QMjfdX7Ipwnhk= + dependencies: + has "^1.0.3" + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.nlark.com/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc= + dependencies: + kind-of "^6.0.0" + +is-date-object@^1.0.1: + version "1.0.5" + resolved "https://registry.nlark.com/is-date-object/download/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha1-CEHVU25yTCVZe/bqYuG9OCmN8x8= + dependencies: + has-tostringtag "^1.0.0" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.nlark.com/is-descriptor/download/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco= + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.nlark.com/is-descriptor/download/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw= + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.nlark.com/is-directory/download/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= + +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.nlark.com/is-docker/download/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha1-M+6r4jz+hvFL3kQIoCwM+4U6zao= + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.nlark.com/is-dotfile/download/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.nlark.com/is-equal-shallow/download/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.nlark.com/is-extendable/download/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/is-extendable/download/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ= + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/is-extglob/download/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= + +is-finite@^1.0.0: + version "1.1.0" + resolved "https://registry.nlark.com/is-finite/download/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" + integrity sha1-kEE1x3+0LAZB1qobzbxNqo2ggvM= + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/is-fullwidth-code-point/download/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha1-8Rb4Bk/pCz94RKOJl8C3UFEmnx0= + +is-generator-fn@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/is-generator-fn/download/is-generator-fn-1.0.0.tgz?cache=0&sync_timestamp=1628686122487&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-generator-fn%2Fdownload%2Fis-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" + integrity sha1-lp1J4bszKfa7fwkIm+JleLLd1Go= + +is-generator-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.nlark.com/is-generator-fn/download/is-generator-fn-2.1.0.tgz?cache=0&sync_timestamp=1628686122487&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-generator-fn%2Fdownload%2Fis-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" + integrity sha1-fRQK3DiarzARqPKipM+m+q3/sRg= + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.nlark.com/is-glob/download/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= + dependencies: + is-extglob "^1.0.0" + +is-negative-zero@^2.0.1: + version "2.0.1" + resolved "https://registry.nlark.com/is-negative-zero/download/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha1-PedGwY3aIxkkGlNnWQjY92bxHCQ= + +is-number-object@^1.0.4: + version "1.0.6" + resolved "https://registry.nlark.com/is-number-object/download/is-number-object-1.0.6.tgz?cache=0&sync_timestamp=1628221744591&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-number-object%2Fdownload%2Fis-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" + integrity sha1-anqvg4x/BoalC0VT9+VKlklOifA= + dependencies: + has-tostringtag "^1.0.0" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.nlark.com/is-number/download/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/is-number/download/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/is-number/download/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + integrity sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8= + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.nlark.com/is-number/download/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss= + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.nlark.com/is-plain-object/download/is-plain-object-2.0.4.tgz?cache=0&sync_timestamp=1624608043754&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-plain-object%2Fdownload%2Fis-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc= + dependencies: + isobject "^3.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.nlark.com/is-posix-bracket/download/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= + +is-potential-custom-element-name@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/is-potential-custom-element-name/download/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" + integrity sha1-Fx7W8Z46xVQ5Tt94yqBXhKRb67U= + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/is-primitive/download/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= + +is-regex@^1.1.3: + version "1.1.4" + resolved "https://registry.nlark.com/is-regex/download/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha1-7vVmPNWfpMCuM5UFMj32hUuxWVg= + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.nlark.com/is-stream/download/is-stream-1.1.0.tgz?cache=0&sync_timestamp=1628592752355&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-stream%2Fdownload%2Fis-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.nlark.com/is-stream/download/is-stream-2.0.1.tgz?cache=0&sync_timestamp=1628592752355&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-stream%2Fdownload%2Fis-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha1-+sHj1TuXrVqdCunO8jifWBClwHc= + +is-string@^1.0.5, is-string@^1.0.6: + version "1.0.7" + resolved "https://registry.nlark.com/is-string/download/is-string-1.0.7.tgz?cache=0&sync_timestamp=1628213433356&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-string%2Fdownload%2Fis-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha1-DdEr8gBvJVu1j2lREO/3SR7rwP0= + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.nlark.com/is-symbol/download/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha1-ptrJO2NbBjymhyI23oiRClevE5w= + dependencies: + has-symbols "^1.0.2" + +is-typedarray@^1.0.0, is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/is-typedarray/download/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.nlark.com/is-utf8/download/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.nlark.com/is-windows/download/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0= + +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.nlark.com/is-wsl/download/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha1-dKTHbnfKn9P5MvKQwX6jJs0VcnE= + dependencies: + is-docker "^2.0.0" + +isarray@1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/isarray/download/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/isexe/download/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.nlark.com/isobject/download/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.nlark.com/isobject/download/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.nlark.com/isstream/download/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +istanbul-lib-coverage@^1.2.1: + version "1.2.1" + resolved "https://registry.nlark.com/istanbul-lib-coverage/download/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" + integrity sha1-zPftzQoLubj3Kf7rCTBHD5r2ZPA= + +istanbul-lib-coverage@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/istanbul-lib-coverage/download/istanbul-lib-coverage-3.0.0.tgz#f5944a37c70b550b02a78a5c3b2055b280cec8ec" + integrity sha1-9ZRKN8cLVQsCp4pcOyBVsoDOyOw= + +istanbul-lib-instrument@^1.10.1: + version "1.10.2" + resolved "https://registry.nlark.com/istanbul-lib-instrument/download/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca" + integrity sha1-H1XtEKw8R/K93dUweTUSZ1TQqco= + dependencies: + babel-generator "^6.18.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.18.0" + istanbul-lib-coverage "^1.2.1" + semver "^5.3.0" + +istanbul-lib-instrument@^4.0.0, istanbul-lib-instrument@^4.0.3: + version "4.0.3" + resolved "https://registry.nlark.com/istanbul-lib-instrument/download/istanbul-lib-instrument-4.0.3.tgz#873c6fff897450118222774696a3f28902d77c1d" + integrity sha1-hzxv/4l0UBGCIndGlqPyiQLXfB0= + dependencies: + "@babel/core" "^7.7.5" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.0.0" + semver "^6.3.0" + +istanbul-lib-report@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/istanbul-lib-report/download/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" + integrity sha1-dRj+UupE3jcvRgp2tezan/tz2KY= + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^3.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/istanbul-lib-source-maps/download/istanbul-lib-source-maps-4.0.0.tgz#75743ce6d96bb86dc7ee4352cf6366a23f0b1ad9" + integrity sha1-dXQ85tlruG3H7kNSz2Nmoj8LGtk= + dependencies: + debug "^4.1.1" + istanbul-lib-coverage "^3.0.0" + source-map "^0.6.1" + +istanbul-reports@^3.0.2: + version "3.0.2" + resolved "https://registry.nlark.com/istanbul-reports/download/istanbul-reports-3.0.2.tgz#d593210e5000683750cb09fc0644e4b6e27fd53b" + integrity sha1-1ZMhDlAAaDdQywn8BkTktuJ/1Ts= + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + +jest-changed-files@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/jest-changed-files/download/jest-changed-files-26.6.2.tgz#f6198479e1cc66f22f9ae1e22acaa0b429c042d0" + integrity sha1-9hmEeeHMZvIvmuHiKsqgtCnAQtA= + dependencies: + "@jest/types" "^26.6.2" + execa "^4.0.0" + throat "^5.0.0" + +jest-cli@^26.6.3: + version "26.6.3" + resolved "https://registry.nlark.com/jest-cli/download/jest-cli-26.6.3.tgz#43117cfef24bc4cd691a174a8796a532e135e92a" + integrity sha1-QxF8/vJLxM1pGhdKh5alMuE16So= + dependencies: + "@jest/core" "^26.6.3" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.4" + import-local "^3.0.2" + is-ci "^2.0.0" + jest-config "^26.6.3" + jest-util "^26.6.2" + jest-validate "^26.6.2" + prompts "^2.0.1" + yargs "^15.4.1" + +jest-config@^23.6.0: + version "23.6.0" + resolved "https://registry.nlark.com/jest-config/download/jest-config-23.6.0.tgz#f82546a90ade2d8c7026fbf6ac5207fc22f8eb1d" + integrity sha1-+CVGqQreLYxwJvv2rFIH/CL46x0= + dependencies: + babel-core "^6.0.0" + babel-jest "^23.6.0" + chalk "^2.0.1" + glob "^7.1.1" + jest-environment-jsdom "^23.4.0" + jest-environment-node "^23.4.0" + jest-get-type "^22.1.0" + jest-jasmine2 "^23.6.0" + jest-regex-util "^23.3.0" + jest-resolve "^23.6.0" + jest-util "^23.4.0" + jest-validate "^23.6.0" + micromatch "^2.3.11" + pretty-format "^23.6.0" + +jest-config@^26.6.3: + version "26.6.3" + resolved "https://registry.nlark.com/jest-config/download/jest-config-26.6.3.tgz#64f41444eef9eb03dc51d5c53b75c8c71f645349" + integrity sha1-ZPQURO756wPcUdXFO3XIxx9kU0k= + dependencies: + "@babel/core" "^7.1.0" + "@jest/test-sequencer" "^26.6.3" + "@jest/types" "^26.6.2" + babel-jest "^26.6.3" + chalk "^4.0.0" + deepmerge "^4.2.2" + glob "^7.1.1" + graceful-fs "^4.2.4" + jest-environment-jsdom "^26.6.2" + jest-environment-node "^26.6.2" + jest-get-type "^26.3.0" + jest-jasmine2 "^26.6.3" + jest-regex-util "^26.0.0" + jest-resolve "^26.6.2" + jest-util "^26.6.2" + jest-validate "^26.6.2" + micromatch "^4.0.2" + pretty-format "^26.6.2" + +jest-diff@^23.6.0: + version "23.6.0" + resolved "https://registry.nlark.com/jest-diff/download/jest-diff-23.6.0.tgz?cache=0&sync_timestamp=1630058512777&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjest-diff%2Fdownload%2Fjest-diff-23.6.0.tgz#1500f3f16e850bb3d71233408089be099f610c7d" + integrity sha1-FQDz8W6FC7PXEjNAgIm+CZ9hDH0= + dependencies: + chalk "^2.0.1" + diff "^3.2.0" + jest-get-type "^22.1.0" + pretty-format "^23.6.0" + +jest-diff@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/jest-diff/download/jest-diff-26.6.2.tgz?cache=0&sync_timestamp=1630058512777&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjest-diff%2Fdownload%2Fjest-diff-26.6.2.tgz#1aa7468b52c3a68d7d5c5fdcdfcd5e49bd164394" + integrity sha1-GqdGi1LDpo19XF/c381eSb0WQ5Q= + dependencies: + chalk "^4.0.0" + diff-sequences "^26.6.2" + jest-get-type "^26.3.0" + pretty-format "^26.6.2" + +jest-docblock@^26.0.0: + version "26.0.0" + resolved "https://registry.nlark.com/jest-docblock/download/jest-docblock-26.0.0.tgz#3e2fa20899fc928cb13bd0ff68bd3711a36889b5" + integrity sha1-Pi+iCJn8koyxO9D/aL03EaNoibU= + dependencies: + detect-newline "^3.0.0" + +jest-each@^23.6.0: + version "23.6.0" + resolved "https://registry.nlark.com/jest-each/download/jest-each-23.6.0.tgz#ba0c3a82a8054387016139c733a05242d3d71575" + integrity sha1-ugw6gqgFQ4cBYTnHM6BSQtPXFXU= + dependencies: + chalk "^2.0.1" + pretty-format "^23.6.0" + +jest-each@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/jest-each/download/jest-each-26.6.2.tgz#02526438a77a67401c8a6382dfe5999952c167cb" + integrity sha1-AlJkOKd6Z0AcimOC3+WZmVLBZ8s= + dependencies: + "@jest/types" "^26.6.2" + chalk "^4.0.0" + jest-get-type "^26.3.0" + jest-util "^26.6.2" + pretty-format "^26.6.2" + +jest-environment-jsdom@^23.4.0: + version "23.4.0" + resolved "https://registry.nlark.com/jest-environment-jsdom/download/jest-environment-jsdom-23.4.0.tgz?cache=0&sync_timestamp=1630058512468&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjest-environment-jsdom%2Fdownload%2Fjest-environment-jsdom-23.4.0.tgz#056a7952b3fea513ac62a140a2c368c79d9e6023" + integrity sha1-BWp5UrP+pROsYqFAosNox52eYCM= + dependencies: + jest-mock "^23.2.0" + jest-util "^23.4.0" + jsdom "^11.5.1" + +jest-environment-jsdom@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/jest-environment-jsdom/download/jest-environment-jsdom-26.6.2.tgz?cache=0&sync_timestamp=1630058512468&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjest-environment-jsdom%2Fdownload%2Fjest-environment-jsdom-26.6.2.tgz#78d09fe9cf019a357009b9b7e1f101d23bd1da3e" + integrity sha1-eNCf6c8BmjVwCbm34fEB0jvR2j4= + dependencies: + "@jest/environment" "^26.6.2" + "@jest/fake-timers" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/node" "*" + jest-mock "^26.6.2" + jest-util "^26.6.2" + jsdom "^16.4.0" + +jest-environment-node@^23.4.0: + version "23.4.0" + resolved "https://registry.nlark.com/jest-environment-node/download/jest-environment-node-23.4.0.tgz#57e80ed0841dea303167cce8cd79521debafde10" + integrity sha1-V+gO0IQd6jAxZ8zozXlSHeuv3hA= + dependencies: + jest-mock "^23.2.0" + jest-util "^23.4.0" + +jest-environment-node@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/jest-environment-node/download/jest-environment-node-26.6.2.tgz#824e4c7fb4944646356f11ac75b229b0035f2b0c" + integrity sha1-gk5Mf7SURkY1bxGsdbIpsANfKww= + dependencies: + "@jest/environment" "^26.6.2" + "@jest/fake-timers" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/node" "*" + jest-mock "^26.6.2" + jest-util "^26.6.2" + +jest-get-type@^22.1.0: + version "22.4.3" + resolved "https://registry.nlark.com/jest-get-type/download/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" + integrity sha1-46hQTYR5NC3UQgI2syKGnxiQDOQ= + +jest-get-type@^26.3.0: + version "26.3.0" + resolved "https://registry.nlark.com/jest-get-type/download/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" + integrity sha1-6X3Dw/U8K0Bsp6+u1Ek7HQmRmeA= + +jest-haste-map@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/jest-haste-map/download/jest-haste-map-26.6.2.tgz#dd7e60fe7dc0e9f911a23d79c5ff7fb5c2cafeaa" + integrity sha1-3X5g/n3A6fkRoj15xf9/tcLK/qo= + dependencies: + "@jest/types" "^26.6.2" + "@types/graceful-fs" "^4.1.2" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.4" + jest-regex-util "^26.0.0" + jest-serializer "^26.6.2" + jest-util "^26.6.2" + jest-worker "^26.6.2" + micromatch "^4.0.2" + sane "^4.0.3" + walker "^1.0.7" + optionalDependencies: + fsevents "^2.1.2" + +jest-jasmine2@^23.6.0: + version "23.6.0" + resolved "https://registry.nlark.com/jest-jasmine2/download/jest-jasmine2-23.6.0.tgz#840e937f848a6c8638df24360ab869cc718592e0" + integrity sha1-hA6Tf4SKbIY43yQ2CrhpzHGFkuA= + dependencies: + babel-traverse "^6.0.0" + chalk "^2.0.1" + co "^4.6.0" + expect "^23.6.0" + is-generator-fn "^1.0.0" + jest-diff "^23.6.0" + jest-each "^23.6.0" + jest-matcher-utils "^23.6.0" + jest-message-util "^23.4.0" + jest-snapshot "^23.6.0" + jest-util "^23.4.0" + pretty-format "^23.6.0" + +jest-jasmine2@^26.6.3: + version "26.6.3" + resolved "https://registry.nlark.com/jest-jasmine2/download/jest-jasmine2-26.6.3.tgz#adc3cf915deacb5212c93b9f3547cd12958f2edd" + integrity sha1-rcPPkV3qy1ISyTufNUfNEpWPLt0= + dependencies: + "@babel/traverse" "^7.1.0" + "@jest/environment" "^26.6.2" + "@jest/source-map" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + expect "^26.6.2" + is-generator-fn "^2.0.0" + jest-each "^26.6.2" + jest-matcher-utils "^26.6.2" + jest-message-util "^26.6.2" + jest-runtime "^26.6.3" + jest-snapshot "^26.6.2" + jest-util "^26.6.2" + pretty-format "^26.6.2" + throat "^5.0.0" + +jest-junit@^5.1.0: + version "5.2.0" + resolved "https://registry.nlark.com/jest-junit/download/jest-junit-5.2.0.tgz#980401db7aa69999cf117c6d740a8135c22ae379" + integrity sha1-mAQB23qmmZnPEXxtdAqBNcIq43k= + dependencies: + jest-config "^23.6.0" + jest-validate "^23.0.1" + mkdirp "^0.5.1" + strip-ansi "^4.0.0" + xml "^1.0.1" + +jest-leak-detector@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/jest-leak-detector/download/jest-leak-detector-26.6.2.tgz#7717cf118b92238f2eba65054c8a0c9c653a91af" + integrity sha1-dxfPEYuSI48uumUFTIoMnGU6ka8= + dependencies: + jest-get-type "^26.3.0" + pretty-format "^26.6.2" + +jest-matcher-utils@^23.6.0: + version "23.6.0" + resolved "https://registry.nlark.com/jest-matcher-utils/download/jest-matcher-utils-23.6.0.tgz?cache=0&sync_timestamp=1630058520472&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjest-matcher-utils%2Fdownload%2Fjest-matcher-utils-23.6.0.tgz#726bcea0c5294261a7417afb6da3186b4b8cac80" + integrity sha1-cmvOoMUpQmGnQXr7baMYa0uMrIA= + dependencies: + chalk "^2.0.1" + jest-get-type "^22.1.0" + pretty-format "^23.6.0" + +jest-matcher-utils@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/jest-matcher-utils/download/jest-matcher-utils-26.6.2.tgz?cache=0&sync_timestamp=1630058520472&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjest-matcher-utils%2Fdownload%2Fjest-matcher-utils-26.6.2.tgz#8e6fd6e863c8b2d31ac6472eeb237bc595e53e7a" + integrity sha1-jm/W6GPIstMaxkcu6yN7xZXlPno= + dependencies: + chalk "^4.0.0" + jest-diff "^26.6.2" + jest-get-type "^26.3.0" + pretty-format "^26.6.2" + +jest-message-util@^23.4.0: + version "23.4.0" + resolved "https://registry.nlark.com/jest-message-util/download/jest-message-util-23.4.0.tgz#17610c50942349508d01a3d1e0bda2c079086a9f" + integrity sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8= + dependencies: + "@babel/code-frame" "^7.0.0-beta.35" + chalk "^2.0.1" + micromatch "^2.3.11" + slash "^1.0.0" + stack-utils "^1.0.1" + +jest-message-util@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/jest-message-util/download/jest-message-util-26.6.2.tgz#58173744ad6fc0506b5d21150b9be56ef001ca07" + integrity sha1-WBc3RK1vwFBrXSEVC5vlbvABygc= + dependencies: + "@babel/code-frame" "^7.0.0" + "@jest/types" "^26.6.2" + "@types/stack-utils" "^2.0.0" + chalk "^4.0.0" + graceful-fs "^4.2.4" + micromatch "^4.0.2" + pretty-format "^26.6.2" + slash "^3.0.0" + stack-utils "^2.0.2" + +jest-mock@^23.2.0: + version "23.2.0" + resolved "https://registry.nlark.com/jest-mock/download/jest-mock-23.2.0.tgz#ad1c60f29e8719d47c26e1138098b6d18b261134" + integrity sha1-rRxg8p6HGdR8JuETgJi20YsmETQ= + +jest-mock@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/jest-mock/download/jest-mock-26.6.2.tgz#d6cb712b041ed47fe0d9b6fc3474bc6543feb302" + integrity sha1-1stxKwQe1H/g2bb8NHS8ZUP+swI= + dependencies: + "@jest/types" "^26.6.2" + "@types/node" "*" + +jest-pnp-resolver@^1.2.2: + version "1.2.2" + resolved "https://registry.nlark.com/jest-pnp-resolver/download/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" + integrity sha1-twSsCuAoqJEIpNBAs/kZ393I4zw= + +jest-regex-util@^23.3.0: + version "23.3.0" + resolved "https://registry.nlark.com/jest-regex-util/download/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5" + integrity sha1-X4ZylUfCeFxAAs6qj4Sf6MpHG8U= + +jest-regex-util@^26.0.0: + version "26.0.0" + resolved "https://registry.nlark.com/jest-regex-util/download/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" + integrity sha1-0l5xhLNuOf1GbDvEG+CXHoIf7ig= + +jest-resolve-dependencies@^26.6.3: + version "26.6.3" + resolved "https://registry.nlark.com/jest-resolve-dependencies/download/jest-resolve-dependencies-26.6.3.tgz?cache=0&sync_timestamp=1630058511127&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjest-resolve-dependencies%2Fdownload%2Fjest-resolve-dependencies-26.6.3.tgz#6680859ee5d22ee5dcd961fe4871f59f4c784fb6" + integrity sha1-ZoCFnuXSLuXc2WH+SHH1n0x4T7Y= + dependencies: + "@jest/types" "^26.6.2" + jest-regex-util "^26.0.0" + jest-snapshot "^26.6.2" + +jest-resolve@^23.6.0: + version "23.6.0" + resolved "https://registry.nlark.com/jest-resolve/download/jest-resolve-23.6.0.tgz#cf1d1a24ce7ee7b23d661c33ba2150f3aebfa0ae" + integrity sha1-zx0aJM5+57I9ZhwzuiFQ866/oK4= + dependencies: + browser-resolve "^1.11.3" + chalk "^2.0.1" + realpath-native "^1.0.0" + +jest-resolve@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/jest-resolve/download/jest-resolve-26.6.2.tgz#a3ab1517217f469b504f1b56603c5bb541fbb507" + integrity sha1-o6sVFyF/RptQTxtWYDxbtUH7tQc= + dependencies: + "@jest/types" "^26.6.2" + chalk "^4.0.0" + graceful-fs "^4.2.4" + jest-pnp-resolver "^1.2.2" + jest-util "^26.6.2" + read-pkg-up "^7.0.1" + resolve "^1.18.1" + slash "^3.0.0" + +jest-runner@^26.6.3: + version "26.6.3" + resolved "https://registry.nlark.com/jest-runner/download/jest-runner-26.6.3.tgz?cache=0&sync_timestamp=1630058511552&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjest-runner%2Fdownload%2Fjest-runner-26.6.3.tgz#2d1fed3d46e10f233fd1dbd3bfaa3fe8924be159" + integrity sha1-LR/tPUbhDyM/0dvTv6o/6JJL4Vk= + dependencies: + "@jest/console" "^26.6.2" + "@jest/environment" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/node" "*" + chalk "^4.0.0" + emittery "^0.7.1" + exit "^0.1.2" + graceful-fs "^4.2.4" + jest-config "^26.6.3" + jest-docblock "^26.0.0" + jest-haste-map "^26.6.2" + jest-leak-detector "^26.6.2" + jest-message-util "^26.6.2" + jest-resolve "^26.6.2" + jest-runtime "^26.6.3" + jest-util "^26.6.2" + jest-worker "^26.6.2" + source-map-support "^0.5.6" + throat "^5.0.0" + +jest-runtime@^26.6.3: + version "26.6.3" + resolved "https://registry.nlark.com/jest-runtime/download/jest-runtime-26.6.3.tgz#4f64efbcfac398331b74b4b3c82d27d401b8fa2b" + integrity sha1-T2TvvPrDmDMbdLSzyC0n1AG4+is= + dependencies: + "@jest/console" "^26.6.2" + "@jest/environment" "^26.6.2" + "@jest/fake-timers" "^26.6.2" + "@jest/globals" "^26.6.2" + "@jest/source-map" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/yargs" "^15.0.0" + chalk "^4.0.0" + cjs-module-lexer "^0.6.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.2.4" + jest-config "^26.6.3" + jest-haste-map "^26.6.2" + jest-message-util "^26.6.2" + jest-mock "^26.6.2" + jest-regex-util "^26.0.0" + jest-resolve "^26.6.2" + jest-snapshot "^26.6.2" + jest-util "^26.6.2" + jest-validate "^26.6.2" + slash "^3.0.0" + strip-bom "^4.0.0" + yargs "^15.4.1" + +jest-serializer@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/jest-serializer/download/jest-serializer-26.6.2.tgz?cache=0&sync_timestamp=1624900308094&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjest-serializer%2Fdownload%2Fjest-serializer-26.6.2.tgz#d139aafd46957d3a448f3a6cdabe2919ba0742d1" + integrity sha1-0Tmq/UaVfTpEjzps2r4pGboHQtE= + dependencies: + "@types/node" "*" + graceful-fs "^4.2.4" + +jest-snapshot@^23.6.0: + version "23.6.0" + resolved "https://registry.nlark.com/jest-snapshot/download/jest-snapshot-23.6.0.tgz#f9c2625d1b18acda01ec2d2b826c0ce58a5aa17a" + integrity sha1-+cJiXRsYrNoB7C0rgmwM5YpaoXo= + dependencies: + babel-types "^6.0.0" + chalk "^2.0.1" + jest-diff "^23.6.0" + jest-matcher-utils "^23.6.0" + jest-message-util "^23.4.0" + jest-resolve "^23.6.0" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + pretty-format "^23.6.0" + semver "^5.5.0" + +jest-snapshot@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/jest-snapshot/download/jest-snapshot-26.6.2.tgz#f3b0af1acb223316850bd14e1beea9837fb39c84" + integrity sha1-87CvGssiMxaFC9FOG+6pg3+znIQ= + dependencies: + "@babel/types" "^7.0.0" + "@jest/types" "^26.6.2" + "@types/babel__traverse" "^7.0.4" + "@types/prettier" "^2.0.0" + chalk "^4.0.0" + expect "^26.6.2" + graceful-fs "^4.2.4" + jest-diff "^26.6.2" + jest-get-type "^26.3.0" + jest-haste-map "^26.6.2" + jest-matcher-utils "^26.6.2" + jest-message-util "^26.6.2" + jest-resolve "^26.6.2" + natural-compare "^1.4.0" + pretty-format "^26.6.2" + semver "^7.3.2" + +jest-util@^23.4.0: + version "23.4.0" + resolved "https://registry.nlark.com/jest-util/download/jest-util-23.4.0.tgz#4d063cb927baf0a23831ff61bec2cbbf49793561" + integrity sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE= + dependencies: + callsites "^2.0.0" + chalk "^2.0.1" + graceful-fs "^4.1.11" + is-ci "^1.0.10" + jest-message-util "^23.4.0" + mkdirp "^0.5.1" + slash "^1.0.0" + source-map "^0.6.0" + +jest-util@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/jest-util/download/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" + integrity sha1-kHU12+TVpstMR6ybkm9q8pV2y8E= + dependencies: + "@jest/types" "^26.6.2" + "@types/node" "*" + chalk "^4.0.0" + graceful-fs "^4.2.4" + is-ci "^2.0.0" + micromatch "^4.0.2" + +jest-validate@^23.0.1, jest-validate@^23.6.0: + version "23.6.0" + resolved "https://registry.nlark.com/jest-validate/download/jest-validate-23.6.0.tgz?cache=0&sync_timestamp=1630058474453&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjest-validate%2Fdownload%2Fjest-validate-23.6.0.tgz#36761f99d1ed33fcd425b4e4c5595d62b6597474" + integrity sha1-NnYfmdHtM/zUJbTkxVldYrZZdHQ= + dependencies: + chalk "^2.0.1" + jest-get-type "^22.1.0" + leven "^2.1.0" + pretty-format "^23.6.0" + +jest-validate@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/jest-validate/download/jest-validate-26.6.2.tgz?cache=0&sync_timestamp=1630058474453&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjest-validate%2Fdownload%2Fjest-validate-26.6.2.tgz#23d380971587150467342911c3d7b4ac57ab20ec" + integrity sha1-I9OAlxWHFQRnNCkRw9e0rFerIOw= + dependencies: + "@jest/types" "^26.6.2" + camelcase "^6.0.0" + chalk "^4.0.0" + jest-get-type "^26.3.0" + leven "^3.1.0" + pretty-format "^26.6.2" + +jest-watcher@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/jest-watcher/download/jest-watcher-26.6.2.tgz#a5b683b8f9d68dbcb1d7dae32172d2cca0592975" + integrity sha1-pbaDuPnWjbyx19rjIXLSzKBZKXU= + dependencies: + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + jest-util "^26.6.2" + string-length "^4.0.1" + +jest-worker@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/jest-worker/download/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" + integrity sha1-f3LLxNZDw2Xie5/XdfnQ6qnHqO0= + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^7.0.0" + +jest@^26.6.3: + version "26.6.3" + resolved "https://registry.nlark.com/jest/download/jest-26.6.3.tgz?cache=0&sync_timestamp=1630058524015&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjest%2Fdownload%2Fjest-26.6.3.tgz#40e8fdbe48f00dfa1f0ce8121ca74b88ac9148ef" + integrity sha1-QOj9vkjwDfofDOgSHKdLiKyRSO8= + dependencies: + "@jest/core" "^26.6.3" + import-local "^3.0.2" + jest-cli "^26.6.3" + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/js-tokens/download/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha1-GSA/tZmR35jjoocFDUZHzerzJJk= + +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.nlark.com/js-tokens/download/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.nlark.com/js-yaml/download/js-yaml-3.14.1.tgz?cache=0&sync_timestamp=1624607946901&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjs-yaml%2Fdownload%2Fjs-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha1-2ugS/bOCX6MGYJqHFzg8UMNqBTc= + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.nlark.com/jsbn/download/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +jsdom@^11.5.1: + version "11.12.0" + resolved "https://registry.nlark.com/jsdom/download/jsdom-11.12.0.tgz#1a80d40ddd378a1de59656e9e6dc5a3ba8657bc8" + integrity sha1-GoDUDd03ih3lllbp5txaO6hle8g= + dependencies: + abab "^2.0.0" + acorn "^5.5.3" + acorn-globals "^4.1.0" + array-equal "^1.0.0" + cssom ">= 0.3.2 < 0.4.0" + cssstyle "^1.0.0" + data-urls "^1.0.0" + domexception "^1.0.1" + escodegen "^1.9.1" + html-encoding-sniffer "^1.0.2" + left-pad "^1.3.0" + nwsapi "^2.0.7" + parse5 "4.0.0" + pn "^1.1.0" + request "^2.87.0" + request-promise-native "^1.0.5" + sax "^1.2.4" + symbol-tree "^3.2.2" + tough-cookie "^2.3.4" + w3c-hr-time "^1.0.1" + webidl-conversions "^4.0.2" + whatwg-encoding "^1.0.3" + whatwg-mimetype "^2.1.0" + whatwg-url "^6.4.1" + ws "^5.2.0" + xml-name-validator "^3.0.0" + +jsdom@^16.4.0: + version "16.7.0" + resolved "https://registry.nlark.com/jsdom/download/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" + integrity sha1-kYrnGWVCSxl8gZ+Bg6dU4Yl3txA= + dependencies: + abab "^2.0.5" + acorn "^8.2.4" + acorn-globals "^6.0.0" + cssom "^0.4.4" + cssstyle "^2.3.0" + data-urls "^2.0.0" + decimal.js "^10.2.1" + domexception "^2.0.1" + escodegen "^2.0.0" + form-data "^3.0.0" + html-encoding-sniffer "^2.0.1" + http-proxy-agent "^4.0.1" + https-proxy-agent "^5.0.0" + is-potential-custom-element-name "^1.0.1" + nwsapi "^2.2.0" + parse5 "6.0.1" + saxes "^5.0.1" + symbol-tree "^3.2.4" + tough-cookie "^4.0.0" + w3c-hr-time "^1.0.2" + w3c-xmlserializer "^2.0.0" + webidl-conversions "^6.1.0" + whatwg-encoding "^1.0.5" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.5.0" + ws "^7.4.6" + xml-name-validator "^3.0.0" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.nlark.com/jsesc/download/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.nlark.com/jsesc/download/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha1-gFZNLkg9rPbo7yCWUKZ98/DCg6Q= + +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.nlark.com/json-parse-better-errors/download/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk= + +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.nlark.com/json-parse-even-better-errors/download/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha1-fEeAWpQxmSjgV3dAXcEuH3pO4C0= + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.nlark.com/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha1-afaofZUTq4u4/mO9sJecRI5oRmA= + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.nlark.com/json-schema/download/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.nlark.com/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +json5@2.x, json5@^2.1.2: + version "2.2.0" + resolved "https://registry.nlark.com/json5/download/json5-2.2.0.tgz?cache=0&sync_timestamp=1624607963605&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjson5%2Fdownload%2Fjson5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" + integrity sha1-Lf7+cgxrpSXZ69kJlQ8FFTFsiaM= + dependencies: + minimist "^1.2.5" + +json5@^0.5.1: + version "0.5.1" + resolved "https://registry.nlark.com/json5/download/json5-0.5.1.tgz?cache=0&sync_timestamp=1624607963605&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjson5%2Fdownload%2Fjson5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.nlark.com/jsprim/download/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.nlark.com/kind-of/download/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/kind-of/download/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.nlark.com/kind-of/download/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha1-cpyR4thXt6QZofmqZWhcTDP1hF0= + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.nlark.com/kind-of/download/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha1-B8BQNKbDSfoG4k+jWqdttFgM5N0= + +kleur@^3.0.3: + version "3.0.3" + resolved "https://registry.nlark.com/kleur/download/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha1-p5yezIbuHOP6YgbRIWxQHxR/wH4= + +lcov-parse@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/lcov-parse/download/lcov-parse-1.0.0.tgz#eb0d46b54111ebc561acb4c408ef9363bdc8f7e0" + integrity sha1-6w1GtUER68VhrLTECO+TY73I9+A= + +left-pad@^1.3.0: + version "1.3.0" + resolved "https://registry.nlark.com/left-pad/download/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" + integrity sha1-W4o6d2Xf4AEmHd6RVYnngvjJTR4= + +leven@^2.1.0: + version "2.1.0" + resolved "https://registry.nlark.com/leven/download/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + integrity sha1-wuep93IJTe6dNCAq6KzORoeHVYA= + +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.nlark.com/leven/download/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha1-d4kd6DQGTMy6gq54QrtrFKE+1/I= + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.nlark.com/levn/download/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +lines-and-columns@^1.1.6: + version "1.1.6" + resolved "https://registry.nlark.com/lines-and-columns/download/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" + integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.nlark.com/load-json-file/download/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/locate-path/download/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/locate-path/download/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha1-2+w7OrdZdYBxtY/ln8QYca8hQA4= + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.nlark.com/locate-path/download/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha1-Gvujlq/WdqbUJQTQpno6frn2KqA= + dependencies: + p-locate "^4.1.0" + +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.nlark.com/lodash.sortby/download/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= + +lodash@^4.17.19, lodash@^4.17.4, lodash@^4.7.0: + version "4.17.21" + resolved "https://registry.nlark.com/lodash/download/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha1-Z5WRxWTDv/quhFTPCz3zcMPWkRw= + +log-driver@^1.2.7: + version "1.2.7" + resolved "https://registry.nlark.com/log-driver/download/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" + integrity sha1-Y7lQIfBwL+36LJuwok53l9cYcdg= + +loose-envify@^1.0.0: + version "1.4.0" + resolved "https://registry.nlark.com/loose-envify/download/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha1-ce5R+nvkyuwaY4OffmgtgTLTDK8= + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.nlark.com/lru-cache/download/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ= + dependencies: + yallist "^4.0.0" + +make-dir@^3.0.0: + version "3.1.0" + resolved "https://registry.nlark.com/make-dir/download/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha1-QV6WcEazp/HRhSd9hKpYIDcmoT8= + dependencies: + semver "^6.0.0" + +make-error@1.x: + version "1.3.6" + resolved "https://registry.nlark.com/make-error/download/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha1-LrLjfqm2fEiR9oShOUeZr0hM96I= + +makeerror@1.0.x: + version "1.0.11" + resolved "https://registry.nlark.com/makeerror/download/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + integrity sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw= + dependencies: + tmpl "1.0.x" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.nlark.com/map-cache/download/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/map-visit/download/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +math-random@^1.0.1: + version "1.0.4" + resolved "https://registry.nlark.com/math-random/download/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c" + integrity sha1-XdaUPJOFSCZwFtTjTwV1gwgMUUw= + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/merge-stream/download/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha1-UoI2KaFN0AyXcPtq1H3GMQ8sH2A= + +micromatch@^2.3.11: + version "2.3.11" + resolved "https://registry.nlark.com/micromatch/download/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.nlark.com/micromatch/download/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha1-cIWbyVyYQJUvNZoGij/En57PrCM= + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +micromatch@^4.0.2: + version "4.0.4" + resolved "https://registry.nlark.com/micromatch/download/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" + integrity sha1-iW1Rnf6dsl/OlM63pQCRm/iB6/k= + dependencies: + braces "^3.0.1" + picomatch "^2.2.3" + +mime-db@1.49.0: + version "1.49.0" + resolved "https://registry.nlark.com/mime-db/download/mime-db-1.49.0.tgz#f3dfde60c99e9cf3bc9701d687778f537001cbed" + integrity sha1-89/eYMmenPO8lwHWh3ePU3ABy+0= + +mime-types@^2.1.12, mime-types@~2.1.19: + version "2.1.32" + resolved "https://registry.nlark.com/mime-types/download/mime-types-2.1.32.tgz?cache=0&sync_timestamp=1627407652875&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fmime-types%2Fdownload%2Fmime-types-2.1.32.tgz#1d00e89e7de7fe02008db61001d9e02852670fd5" + integrity sha1-HQDonn3n/gIAjbYQAdngKFJnD9U= + dependencies: + mime-db "1.49.0" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.nlark.com/mimic-fn/download/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha1-ftLCzMyvhNP/y3pptXcR/CCDQBs= + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.nlark.com/minimatch/download/minimatch-3.0.4.tgz?cache=0&sync_timestamp=1624607996146&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fminimatch%2Fdownload%2Fminimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM= + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.nlark.com/minimist/download/minimist-1.2.5.tgz?cache=0&sync_timestamp=1624607886507&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fminimist%2Fdownload%2Fminimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI= + +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.nlark.com/mixin-deep/download/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha1-ESC0PcNZp4Xc5ltVuC4lfM9HlWY= + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@0.x, mkdirp@^0.5.1: + version "0.5.5" + resolved "https://registry.nlark.com/mkdirp/download/mkdirp-0.5.5.tgz?cache=0&sync_timestamp=1624608019066&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fmkdirp%2Fdownload%2Fmkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha1-2Rzv1i0UNsoPQWIOJRKI1CAJne8= + dependencies: + minimist "^1.2.5" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/ms/download/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.nlark.com/ms/download/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk= + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.nlark.com/nanomatch/download/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha1-uHqKpPwN6P5r6IiVs4mD/yZb0Rk= + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.nlark.com/natural-compare/download/natural-compare-1.4.0.tgz?cache=0&sync_timestamp=1624608011507&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnatural-compare%2Fdownload%2Fnatural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.nlark.com/nice-try/download/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha1-ozeKdpbOfSI+iPybdkvX7xCJ42Y= + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.nlark.com/node-int64/download/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= + +node-modules-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/node-modules-regexp/download/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" + integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= + +node-notifier@^8.0.0: + version "8.0.2" + resolved "https://registry.nlark.com/node-notifier/download/node-notifier-8.0.2.tgz#f3167a38ef0d2c8a866a83e318c1ba0efeb702c5" + integrity sha1-8xZ6OO8NLIqGaoPjGMG6Dv63AsU= + dependencies: + growly "^1.3.0" + is-wsl "^2.2.0" + semver "^7.3.2" + shellwords "^0.1.1" + uuid "^8.3.0" + which "^2.0.2" + +node-releases@^1.1.75: + version "1.1.75" + resolved "https://registry.nlark.com/node-releases/download/node-releases-1.1.75.tgz?cache=0&sync_timestamp=1629280320667&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnode-releases%2Fdownload%2Fnode-releases-1.1.75.tgz#6dd8c876b9897a1b8e5a02de26afa79bb54ebbfe" + integrity sha1-bdjIdrmJehuOWgLeJq+nm7VOu/4= + +normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: + version "2.5.0" + resolved "https://registry.nlark.com/normalize-package-data/download/normalize-package-data-2.5.0.tgz?cache=0&sync_timestamp=1629301872905&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnormalize-package-data%2Fdownload%2Fnormalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha1-5m2xg4sgDB38IzIl0SyzZSDiNKg= + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.1, normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.nlark.com/normalize-path/download/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-path@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/normalize-path/download/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU= + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.nlark.com/npm-run-path/download/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +npm-run-path@^4.0.0: + version "4.0.1" + resolved "https://registry.nlark.com/npm-run-path/download/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha1-t+zR5e1T2o43pV4cImnguX7XSOo= + dependencies: + path-key "^3.0.0" + +nwsapi@^2.0.7, nwsapi@^2.2.0: + version "2.2.0" + resolved "https://registry.nlark.com/nwsapi/download/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" + integrity sha1-IEh5qePQaP8qVROcLHcngGgaOLc= + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.nlark.com/oauth-sign/download/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU= + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.nlark.com/object-assign/download/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.nlark.com/object-copy/download/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-inspect@^1.11.0, object-inspect@^1.9.0: + version "1.11.0" + resolved "https://registry.nlark.com/object-inspect/download/object-inspect-1.11.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fobject-inspect%2Fdownload%2Fobject-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" + integrity sha1-nc6xRs7dQUig2eUauI00z1CZIrE= + +object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.nlark.com/object-keys/download/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha1-HEfyct8nfzsdrwYWd9nILiMixg4= + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.nlark.com/object-visit/download/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.nlark.com/object.assign/download/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha1-DtVKNC7Os3s4/3brgxoOeIy2OUA= + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + +object.getownpropertydescriptors@^2.1.1: + version "2.1.2" + resolved "https://registry.nlark.com/object.getownpropertydescriptors/download/object.getownpropertydescriptors-2.1.2.tgz#1bd63aeacf0d5d2d2f31b5e393b03a7c601a23f7" + integrity sha1-G9Y66s8NXS0vMbXjk7A6fGAaI/c= + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.nlark.com/object.omit/download/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.nlark.com/object.pick/download/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.nlark.com/once/download/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^5.1.0: + version "5.1.2" + resolved "https://registry.nlark.com/onetime/download/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha1-0Oluu1awdHbfHdnEgG5SN5hcpF4= + dependencies: + mimic-fn "^2.1.0" + +optionator@^0.8.1: + version "0.8.3" + resolved "https://registry.nlark.com/optionator/download/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha1-hPodA2/p08fiHZmIS2ARZ+yPtJU= + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.nlark.com/os-homedir/download/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-tmpdir@^1.0.1: + version "1.0.2" + resolved "https://registry.nlark.com/os-tmpdir/download/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +p-each-series@^2.1.0: + version "2.2.0" + resolved "https://registry.nlark.com/p-each-series/download/p-each-series-2.2.0.tgz#105ab0357ce72b202a8a8b94933672657b5e2a9a" + integrity sha1-EFqwNXznKyAqiouUkzZyZXteKpo= + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/p-finally/download/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.nlark.com/p-limit/download/p-limit-1.3.0.tgz?cache=0&sync_timestamp=1628813055527&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fp-limit%2Fdownload%2Fp-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha1-uGvV8MJWkJEcdZD8v8IBDVSzzLg= + dependencies: + p-try "^1.0.0" + +p-limit@^2.0.0, p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.nlark.com/p-limit/download/p-limit-2.3.0.tgz?cache=0&sync_timestamp=1628813055527&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fp-limit%2Fdownload%2Fp-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha1-PdM8ZHohT9//2DWTPrCG2g3CHbE= + dependencies: + p-try "^2.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/p-locate/download/p-locate-2.0.0.tgz?cache=0&sync_timestamp=1629892708584&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fp-locate%2Fdownload%2Fp-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/p-locate/download/p-locate-3.0.0.tgz?cache=0&sync_timestamp=1629892708584&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fp-locate%2Fdownload%2Fp-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha1-Mi1poFwCZLJZl9n0DNiokasAZKQ= + dependencies: + p-limit "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.nlark.com/p-locate/download/p-locate-4.1.0.tgz?cache=0&sync_timestamp=1629892708584&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fp-locate%2Fdownload%2Fp-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha1-o0KLtwiLOmApL2aRkni3wpetTwc= + dependencies: + p-limit "^2.2.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/p-try/download/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.nlark.com/p-try/download/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha1-yyhoVA4xPWHeWPr741zpAE1VQOY= + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.nlark.com/parse-glob/download/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.nlark.com/parse-json/download/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + dependencies: + error-ex "^1.2.0" + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/parse-json/download/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +parse-json@^5.0.0: + version "5.2.0" + resolved "https://registry.nlark.com/parse-json/download/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha1-x2/Gbe5UIxyWKyK8yKcs8vmXU80= + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + +parse5@4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/parse5/download/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" + integrity sha1-bXhlbj2o14tOwLkG98CO8d/j9gg= + +parse5@6.0.1: + version "6.0.1" + resolved "https://registry.nlark.com/parse5/download/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha1-4aHAhcVps9wIMhGE8Zo5zCf3wws= + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.nlark.com/pascalcase/download/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.nlark.com/path-exists/download/path-exists-2.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpath-exists%2Fdownload%2Fpath-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/path-exists/download/path-exists-3.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpath-exists%2Fdownload%2Fpath-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/path-exists/download/path-exists-4.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpath-exists%2Fdownload%2Fpath-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha1-UTvb4tO5XXdi6METfvoZXGxhtbM= + +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/path-is-absolute/download/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.nlark.com/path-key/download/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.nlark.com/path-key/download/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U= + +path-parse@^1.0.6: + version "1.0.7" + resolved "https://registry.nlark.com/path-parse/download/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha1-+8EUtgykKzDZ2vWFjkvWi77bZzU= + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.nlark.com/path-type/download/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.nlark.com/performance-now/download/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +picomatch@^2.0.4, picomatch@^2.2.3: + version "2.3.0" + resolved "https://registry.nlark.com/picomatch/download/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" + integrity sha1-8fBh3o9qS/AiiS4tEoI0+5gwKXI= + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.nlark.com/pify/download/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/pify/download/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.nlark.com/pinkie-promise/download/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.nlark.com/pinkie/download/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + +pirates@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/pirates/download/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" + integrity sha1-ZDqSyviUVm+RsrmG0sZpUKji+4c= + dependencies: + node-modules-regexp "^1.0.0" + +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/pkg-dir/download/pkg-dir-3.0.0.tgz?cache=0&sync_timestamp=1624607963968&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpkg-dir%2Fdownload%2Fpkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha1-J0kCDyOe2ZCIGx9xIQ1R62UjvqM= + dependencies: + find-up "^3.0.0" + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.nlark.com/pkg-dir/download/pkg-dir-4.2.0.tgz?cache=0&sync_timestamp=1624607963968&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpkg-dir%2Fdownload%2Fpkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha1-8JkTPfft5CLoHR2ESCcO6z5CYfM= + dependencies: + find-up "^4.0.0" + +please-upgrade-node@^3.1.1: + version "3.2.0" + resolved "https://registry.nlark.com/please-upgrade-node/download/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" + integrity sha1-rt3T+ZTJM+StmLmdmlVu+g4v6UI= + dependencies: + semver-compare "^1.0.0" + +pn@^1.1.0: + version "1.1.0" + resolved "https://registry.nlark.com/pn/download/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" + integrity sha1-4vTO8OIZ9GPBeas3Rj5OHs3Muvs= + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.nlark.com/posix-character-classes/download/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.nlark.com/prelude-ls/download/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.nlark.com/preserve/download/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= + +prettier@^2.3.0: + version "2.3.2" + resolved "https://registry.nlark.com/prettier/download/prettier-2.3.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fprettier%2Fdownload%2Fprettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d" + integrity sha1-7ygKBewlNxLkhiM9tcbyNEHnNC0= + +pretty-format@^23.6.0: + version "23.6.0" + resolved "https://registry.nlark.com/pretty-format/download/pretty-format-23.6.0.tgz?cache=0&sync_timestamp=1630058513259&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpretty-format%2Fdownload%2Fpretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760" + integrity sha1-XqrI7razO5h7f+YJfqaooUarV2A= + dependencies: + ansi-regex "^3.0.0" + ansi-styles "^3.2.0" + +pretty-format@^26.6.2: + version "26.6.2" + resolved "https://registry.nlark.com/pretty-format/download/pretty-format-26.6.2.tgz?cache=0&sync_timestamp=1630058513259&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpretty-format%2Fdownload%2Fpretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" + integrity sha1-41wnBfFMt/4v6U+geDRbREEg/JM= + dependencies: + "@jest/types" "^26.6.2" + ansi-regex "^5.0.0" + ansi-styles "^4.0.0" + react-is "^17.0.1" + +private@^0.1.8: + version "0.1.8" + resolved "https://registry.nlark.com/private/download/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + integrity sha1-I4Hts2ifelPWUxkAYPz4ItLzaP8= + +prompts@^2.0.1: + version "2.4.1" + resolved "https://registry.nlark.com/prompts/download/prompts-2.4.1.tgz?cache=0&sync_timestamp=1624607972564&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fprompts%2Fdownload%2Fprompts-2.4.1.tgz#befd3b1195ba052f9fd2fde8a486c4e82ee77f61" + integrity sha1-vv07EZW6BS+f0v3opIbE6C7nf2E= + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.5" + +psl@^1.1.28, psl@^1.1.33: + version "1.8.0" + resolved "https://registry.nlark.com/psl/download/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha1-kyb4vPsBOtzABf3/BWrM4CDlHCQ= + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/pump/download/pump-3.0.0.tgz?cache=0&sync_timestamp=1624607960506&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpump%2Fdownload%2Fpump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha1-tKIRaBW94vTh6mAjVOjHVWUQemQ= + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.nlark.com/punycode/download/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha1-tYsBCsQMIsVldhbI0sLALHv0eew= + +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.nlark.com/qs/download/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha1-yzroBuh0BERYTvFUzo7pjUA/PjY= + +randomatic@^3.0.0: + version "3.1.1" + resolved "https://registry.nlark.com/randomatic/download/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" + integrity sha1-t3bvxZN1mE42xTey9RofCv8Noe0= + dependencies: + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" + +react-is@^17.0.1: + version "17.0.2" + resolved "https://registry.nlark.com/react-is/download/react-is-17.0.2.tgz?cache=0&sync_timestamp=1630340352016&other_urls=https%3A%2F%2Fregistry.nlark.com%2Freact-is%2Fdownload%2Freact-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" + integrity sha1-5pHUqOnHiTZWVVOas3J2Kw77VPA= + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/read-pkg-up/download/read-pkg-up-1.0.1.tgz?cache=0&sync_timestamp=1624607972945&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fread-pkg-up%2Fdownload%2Fread-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg-up@^7.0.1: + version "7.0.1" + resolved "https://registry.nlark.com/read-pkg-up/download/read-pkg-up-7.0.1.tgz?cache=0&sync_timestamp=1624607972945&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fread-pkg-up%2Fdownload%2Fread-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" + integrity sha1-86YTV1hFlzOuK5VjgFbhhU5+9Qc= + dependencies: + find-up "^4.1.0" + read-pkg "^5.2.0" + type-fest "^0.8.1" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.nlark.com/read-pkg/download/read-pkg-1.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fread-pkg%2Fdownload%2Fread-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +read-pkg@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/read-pkg/download/read-pkg-4.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fread-pkg%2Fdownload%2Fread-pkg-4.0.1.tgz#963625378f3e1c4d48c85872b5a6ec7d5d093237" + integrity sha1-ljYlN48+HE1IyFhytabsfV0JMjc= + dependencies: + normalize-package-data "^2.3.2" + parse-json "^4.0.0" + pify "^3.0.0" + +read-pkg@^5.2.0: + version "5.2.0" + resolved "https://registry.nlark.com/read-pkg/download/read-pkg-5.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fread-pkg%2Fdownload%2Fread-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" + integrity sha1-e/KVQ4yloz5WzTDgU7NO5yUMk8w= + dependencies: + "@types/normalize-package-data" "^2.4.0" + normalize-package-data "^2.5.0" + parse-json "^5.0.0" + type-fest "^0.6.0" + +realpath-native@^1.0.0: + version "1.1.0" + resolved "https://registry.nlark.com/realpath-native/download/realpath-native-1.1.0.tgz#2003294fea23fb0672f2476ebe22fcf498a2d65c" + integrity sha1-IAMpT+oj+wZy8kduviL89Jii1lw= + dependencies: + util.promisify "^1.0.0" + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.nlark.com/regenerator-runtime/download/regenerator-runtime-0.11.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk= + +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.nlark.com/regex-cache/download/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + integrity sha1-db3FiioUls7EihKDW8VMjVYjNt0= + dependencies: + is-equal-shallow "^0.1.3" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.nlark.com/regex-not/download/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw= + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.nlark.com/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + +repeat-element@^1.1.2: + version "1.1.4" + resolved "https://registry.nlark.com/repeat-element/download/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" + integrity sha1-vmgVIIR6tYx1aKx1+/rSjtQtOek= + +repeat-string@^1.5.2, repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.nlark.com/repeat-string/download/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.nlark.com/repeating/download/repeating-2.0.1.tgz?cache=0&sync_timestamp=1624608101869&other_urls=https%3A%2F%2Fregistry.nlark.com%2Frepeating%2Fdownload%2Frepeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= + dependencies: + is-finite "^1.0.0" + +request-promise-core@1.1.4: + version "1.1.4" + resolved "https://registry.nlark.com/request-promise-core/download/request-promise-core-1.1.4.tgz#3eedd4223208d419867b78ce815167d10593a22f" + integrity sha1-Pu3UIjII1BmGe3jOgVFn0QWToi8= + dependencies: + lodash "^4.17.19" + +request-promise-native@^1.0.5: + version "1.0.9" + resolved "https://registry.nlark.com/request-promise-native/download/request-promise-native-1.0.9.tgz#e407120526a5efdc9a39b28a5679bf47b9d9dc28" + integrity sha1-5AcSBSal79yaObKKVnm/R7nZ3Cg= + dependencies: + request-promise-core "1.1.4" + stealthy-require "^1.1.1" + tough-cookie "^2.3.3" + +request@^2.87.0, request@^2.88.2: + version "2.88.2" + resolved "https://registry.nlark.com/request/download/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha1-1zyRhzHLWofaBH4gcjQUb2ZNErM= + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.nlark.com/require-directory/download/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/require-main-filename/download/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/require-main-filename/download/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha1-0LMp7MfMD2Fkn2IhW+aa9UqomJs= + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/resolve-cwd/download/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha1-DwB18bslRHZs9zumpuKt/ryxPy0= + dependencies: + resolve-from "^5.0.0" + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/resolve-from/download/resolve-from-3.0.0.tgz?cache=0&sync_timestamp=1624607952279&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fresolve-from%2Fdownload%2Fresolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.nlark.com/resolve-from/download/resolve-from-5.0.0.tgz?cache=0&sync_timestamp=1624607952279&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fresolve-from%2Fdownload%2Fresolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha1-w1IlhD3493bfIcV1V7wIfp39/Gk= + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.nlark.com/resolve-url/download/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.nlark.com/resolve/download/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= + +resolve@1.x, resolve@^1.10.0, resolve@^1.18.1, resolve@^1.3.2: + version "1.20.0" + resolved "https://registry.nlark.com/resolve/download/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" + integrity sha1-YpoBP7P3B1XW8LeTXMHCxTeLGXU= + dependencies: + is-core-module "^2.2.0" + path-parse "^1.0.6" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.nlark.com/ret/download/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w= + +rimraf@^3.0.0: + version "3.0.2" + resolved "https://registry.nlark.com/rimraf/download/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho= + dependencies: + glob "^7.1.3" + +rsvp@^4.8.4: + version "4.8.5" + resolved "https://registry.nlark.com/rsvp/download/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" + integrity sha1-yPFVMR0Wf2jyHhaN9x7FsIMRNzQ= + +run-node@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/run-node/download/run-node-1.0.0.tgz#46b50b946a2aa2d4947ae1d886e9856fd9cabe5e" + integrity sha1-RrULlGoqotSUeuHYhumFb9nKvl4= + +safe-buffer@^5.0.1, safe-buffer@^5.1.2: + version "5.2.1" + resolved "https://registry.nlark.com/safe-buffer/download/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY= + +safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.nlark.com/safe-buffer/download/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha1-mR7GnSluAxN0fVm9/St0XDX4go0= + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.nlark.com/safe-regex/download/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.nlark.com/safer-buffer/download/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo= + +sane@^4.0.3: + version "4.1.0" + resolved "https://registry.nlark.com/sane/download/sane-4.1.0.tgz?cache=0&sync_timestamp=1624844585538&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsane%2Fdownload%2Fsane-4.1.0.tgz#ed881fd922733a6c461bc189dc2b6c006f3ffded" + integrity sha1-7Ygf2SJzOmxGG8GJ3CtsAG8//e0= + dependencies: + "@cnakazawa/watch" "^1.0.3" + anymatch "^2.0.0" + capture-exit "^2.0.0" + exec-sh "^0.3.2" + execa "^1.0.0" + fb-watchman "^2.0.0" + micromatch "^3.1.4" + minimist "^1.1.1" + walker "~1.0.5" + +sax@^1.2.4: + version "1.2.4" + resolved "https://registry.nlark.com/sax/download/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha1-KBYjTiN4vdxOU1T6tcqold9xANk= + +saxes@^5.0.1: + version "5.0.1" + resolved "https://registry.nlark.com/saxes/download/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" + integrity sha1-7rq5U/o7dgjb6U5drbFciI+maW0= + dependencies: + xmlchars "^2.2.0" + +semver-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/semver-compare/download/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" + integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= + +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5, semver@^5.5.0: + version "5.7.1" + resolved "https://registry.nlark.com/semver/download/semver-5.7.1.tgz?cache=0&sync_timestamp=1624607961409&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver%2Fdownload%2Fsemver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha1-qVT5Ma66UI0we78Gnv8MAclhFvc= + +semver@^6.0.0, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.nlark.com/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1624607961409&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0= + +semver@^7.3.2: + version "7.3.5" + resolved "https://registry.nlark.com/semver/download/semver-7.3.5.tgz?cache=0&sync_timestamp=1624607961409&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver%2Fdownload%2Fsemver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha1-C2Ich5NI2JmOSw5L6Us/EuYBjvc= + dependencies: + lru-cache "^6.0.0" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/set-blocking/download/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.nlark.com/set-value/download/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha1-oY1AUw5vB95CKMfe/kInr4ytAFs= + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.nlark.com/shebang-command/download/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/shebang-command/download/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo= + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/shebang-regex/download/shebang-regex-1.0.0.tgz?cache=0&sync_timestamp=1628896660639&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fshebang-regex%2Fdownload%2Fshebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/shebang-regex/download/shebang-regex-3.0.0.tgz?cache=0&sync_timestamp=1628896660639&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fshebang-regex%2Fdownload%2Fshebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI= + +shellwords@^0.1.1: + version "0.1.1" + resolved "https://registry.nlark.com/shellwords/download/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" + integrity sha1-1rkYHBpI05cyTISHHvvPxz/AZUs= + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.nlark.com/side-channel/download/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha1-785cj9wQTudRslxY1CkAEfpeos8= + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.3" + resolved "https://registry.nlark.com/signal-exit/download/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha1-oUEMLt2PB3sItOJTyOrPyvBXRhw= + +sisteransi@^1.0.5: + version "1.0.5" + resolved "https://registry.nlark.com/sisteransi/download/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + integrity sha1-E01oEpd1ZDfMBcoBNw06elcQde0= + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/slash/download/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= + +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/slash/download/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha1-3lUoUaF1nfOo8gZTVEL17E3eq0Q= + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/slash/download/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha1-ZTm+hwwWWtvVJAIg2+Nh8bxNRjQ= + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.nlark.com/snapdragon-node/download/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha1-bBdfhv8UvbByRWPo88GwIaKGhTs= + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.nlark.com/snapdragon-util/download/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI= + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.nlark.com/snapdragon/download/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0= + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://registry.nlark.com/source-map-resolve/download/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha1-GQhmvs51U+H48mei7oLGBrVQmho= + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@^0.4.15: + version "0.4.18" + resolved "https://registry.nlark.com/source-map-support/download/source-map-support-0.4.18.tgz?cache=0&sync_timestamp=1624608061410&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsource-map-support%2Fdownload%2Fsource-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + integrity sha1-Aoam3ovkJkEzhZTpfM6nXwosWF8= + dependencies: + source-map "^0.5.6" + +source-map-support@^0.5.6: + version "0.5.19" + resolved "https://registry.nlark.com/source-map-support/download/source-map-support-0.5.19.tgz?cache=0&sync_timestamp=1624608061410&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsource-map-support%2Fdownload%2Fsource-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha1-qYti+G3K9PZzmWSMCFKRq56P7WE= + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.1" + resolved "https://registry.nlark.com/source-map-url/download/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" + integrity sha1-CvZmBadFpaL5HPG7+KevvCg97FY= + +source-map@^0.5.0, source-map@^0.5.6, source-map@^0.5.7: + version "0.5.7" + resolved "https://registry.nlark.com/source-map/download/source-map-0.5.7.tgz?cache=0&sync_timestamp=1624608014898&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsource-map%2Fdownload%2Fsource-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.nlark.com/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1624608014898&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha1-dHIq8y6WFOnCh6jQu95IteLxomM= + +source-map@^0.7.3: + version "0.7.3" + resolved "https://registry.nlark.com/source-map/download/source-map-0.7.3.tgz?cache=0&sync_timestamp=1624608014898&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsource-map%2Fdownload%2Fsource-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" + integrity sha1-UwL4FpAxc1ImVECS5kmB91F1A4M= + +spdx-correct@^3.0.0: + version "3.1.1" + resolved "https://registry.nlark.com/spdx-correct/download/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha1-3s6BrJweZxPl99G28X1Gj6U9iak= + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.nlark.com/spdx-exceptions/download/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha1-PyjOGnegA3JoPq3kpDMYNSeiFj0= + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.nlark.com/spdx-expression-parse/download/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha1-z3D1BILu/cmOPOCmgz5KU87rpnk= + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.10" + resolved "https://registry.nlark.com/spdx-license-ids/download/spdx-license-ids-3.0.10.tgz#0d9becccde7003d6c658d487dd48a32f0bf3014b" + integrity sha1-DZvszN5wA9bGWNSH3UijLwvzAUs= + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.nlark.com/split-string/download/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha1-fLCd2jqGWFcFxks5pkZgOGguj+I= + dependencies: + extend-shallow "^3.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.nlark.com/sprintf-js/download/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.nlark.com/sshpk/download/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha1-+2YcC+8ps520B2nuOfpwCT1vaHc= + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +stack-utils@^1.0.1: + version "1.0.5" + resolved "https://registry.nlark.com/stack-utils/download/stack-utils-1.0.5.tgz#a19b0b01947e0029c8e451d5d61a498f5bb1471b" + integrity sha1-oZsLAZR+ACnI5FHV1hpJj1uxRxs= + dependencies: + escape-string-regexp "^2.0.0" + +stack-utils@^2.0.2: + version "2.0.3" + resolved "https://registry.nlark.com/stack-utils/download/stack-utils-2.0.3.tgz#cd5f030126ff116b78ccb3c027fe302713b61277" + integrity sha1-zV8DASb/EWt4zLPAJ/4wJxO2Enc= + dependencies: + escape-string-regexp "^2.0.0" + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.nlark.com/static-extend/download/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +stealthy-require@^1.1.1: + version "1.1.1" + resolved "https://registry.nlark.com/stealthy-require/download/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" + integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= + +string-length@^4.0.1: + version "4.0.2" + resolved "https://registry.nlark.com/string-length/download/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" + integrity sha1-qKjce9XBqCubPIuH4SX2aHG25Xo= + dependencies: + char-regex "^1.0.2" + strip-ansi "^6.0.0" + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.2" + resolved "https://registry.nlark.com/string-width/download/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" + integrity sha1-2v1PlVmnWFz7pSnGoKT3NIjr1MU= + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +string.prototype.trimend@^1.0.4: + version "1.0.4" + resolved "https://registry.nlark.com/string.prototype.trimend/download/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" + integrity sha1-51rpDClCxjUEaGwYsoe0oLGkX4A= + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +string.prototype.trimstart@^1.0.4: + version "1.0.4" + resolved "https://registry.nlark.com/string.prototype.trimstart/download/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" + integrity sha1-s2OZr0qymZtMnGSL16P7K7Jv7u0= + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +strip-ansi@^3.0.0: + version "3.0.1" + resolved "https://registry.nlark.com/strip-ansi/download/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/strip-ansi/download/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.nlark.com/strip-ansi/download/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha1-CxVx3XZpzNTz4G4U7x7tJiJa5TI= + dependencies: + ansi-regex "^5.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/strip-bom/download/strip-bom-2.0.0.tgz?cache=0&sync_timestamp=1624608094529&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fstrip-bom%2Fdownload%2Fstrip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= + dependencies: + is-utf8 "^0.2.0" + +strip-bom@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/strip-bom/download/strip-bom-4.0.0.tgz?cache=0&sync_timestamp=1624608094529&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fstrip-bom%2Fdownload%2Fstrip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + integrity sha1-nDUFwdtFvO3KPZz3oW9cWqOQGHg= + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/strip-eof/download/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/strip-final-newline/download/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha1-ibhS+y/L6Tb29LMYevsKEsGrWK0= + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/supports-color/download/supports-color-2.0.0.tgz?cache=0&sync_timestamp=1626703455199&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.nlark.com/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1626703455199&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha1-4uaaRKyHcveKHsCzW2id9lMO/I8= + dependencies: + has-flag "^3.0.0" + +supports-color@^7.0.0, supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.nlark.com/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1626703455199&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha1-G33NyzK4E4gBs+R4umpRyqiWSNo= + dependencies: + has-flag "^4.0.0" + +supports-hyperlinks@^2.0.0: + version "2.2.0" + resolved "https://registry.nlark.com/supports-hyperlinks/download/supports-hyperlinks-2.2.0.tgz#4f77b42488765891774b70c79babd87f9bd594bb" + integrity sha1-T3e0JIh2WJF3S3DHm6vYf5vVlLs= + dependencies: + has-flag "^4.0.0" + supports-color "^7.0.0" + +symbol-tree@^3.2.2, symbol-tree@^3.2.4: + version "3.2.4" + resolved "https://registry.nlark.com/symbol-tree/download/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" + integrity sha1-QwY30ki6d+B4iDlR+5qg7tfGP6I= + +terminal-link@^2.0.0: + version "2.1.1" + resolved "https://registry.nlark.com/terminal-link/download/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" + integrity sha1-FKZKJ6s8Dfkz6lRvulXy0HjtyZQ= + dependencies: + ansi-escapes "^4.2.1" + supports-hyperlinks "^2.0.0" + +test-exclude@^4.2.1: + version "4.2.3" + resolved "https://registry.nlark.com/test-exclude/download/test-exclude-4.2.3.tgz#a9a5e64474e4398339245a0a769ad7c2f4a97c20" + integrity sha1-qaXmRHTkOYM5JFoKdprXwvSpfCA= + dependencies: + arrify "^1.0.1" + micromatch "^2.3.11" + object-assign "^4.1.0" + read-pkg-up "^1.0.1" + require-main-filename "^1.0.1" + +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.nlark.com/test-exclude/download/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha1-BKhphmHYBepvopO2y55jrARO8V4= + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + +throat@^5.0.0: + version "5.0.0" + resolved "https://registry.nlark.com/throat/download/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" + integrity sha1-xRmSNYA6rRh1SmZ9ZZtecs4Wdks= + +tmpl@1.0.x: + version "1.0.4" + resolved "https://registry.nlark.com/tmpl/download/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.nlark.com/to-fast-properties/download/to-fast-properties-1.0.3.tgz?cache=0&sync_timestamp=1628418893613&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fto-fast-properties%2Fdownload%2Fto-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/to-fast-properties/download/to-fast-properties-2.0.0.tgz?cache=0&sync_timestamp=1628418893613&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fto-fast-properties%2Fdownload%2Fto-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.nlark.com/to-object-path/download/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.nlark.com/to-regex-range/download/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.nlark.com/to-regex-range/download/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ= + dependencies: + is-number "^7.0.0" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.nlark.com/to-regex/download/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4= + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +tough-cookie@^2.3.3, tough-cookie@^2.3.4, tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.nlark.com/tough-cookie/download/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha1-zZ+yoKodWhK0c72fuW+j3P9lreI= + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tough-cookie@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/tough-cookie/download/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" + integrity sha1-2CIjTuyogvmR8PkIgkrSYi3b7OQ= + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.1.2" + +tr46@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/tr46/download/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= + dependencies: + punycode "^2.1.0" + +tr46@^2.1.0: + version "2.1.0" + resolved "https://registry.nlark.com/tr46/download/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240" + integrity sha1-+oeqgcpdWUHajL8fm3SdyWmk4kA= + dependencies: + punycode "^2.1.1" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/trim-right/download/trim-right-1.0.1.tgz?cache=0&sync_timestamp=1625851480077&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftrim-right%2Fdownload%2Ftrim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= + +ts-jest@^23.1.4: + version "23.10.5" + resolved "https://registry.nlark.com/ts-jest/download/ts-jest-23.10.5.tgz?cache=0&sync_timestamp=1629175766766&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fts-jest%2Fdownload%2Fts-jest-23.10.5.tgz#cdb550df4466a30489bf70ba867615799f388dd5" + integrity sha1-zbVQ30RmowSJv3C6hnYVeZ84jdU= + dependencies: + bs-logger "0.x" + buffer-from "1.x" + fast-json-stable-stringify "2.x" + json5 "2.x" + make-error "1.x" + mkdirp "0.x" + resolve "1.x" + semver "^5.5" + yargs-parser "10.x" + +tslib@^1.8.0, tslib@^1.8.1: + version "1.14.1" + resolved "https://registry.nlark.com/tslib/download/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha1-zy04vcNKE0vK8QkcQfZhni9nLQA= + +tslint-config-prettier@^1.15.0: + version "1.18.0" + resolved "https://registry.nlark.com/tslint-config-prettier/download/tslint-config-prettier-1.18.0.tgz#75f140bde947d35d8f0d238e0ebf809d64592c37" + integrity sha1-dfFAvelH012PDSOODr+AnWRZLDc= + +tslint@^5.11.0: + version "5.20.1" + resolved "https://registry.nlark.com/tslint/download/tslint-5.20.1.tgz?cache=0&sync_timestamp=1624608047867&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslint%2Fdownload%2Ftslint-5.20.1.tgz#e401e8aeda0152bc44dd07e614034f3f80c67b7d" + integrity sha1-5AHortoBUrxE3QfmFANPP4DGe30= + dependencies: + "@babel/code-frame" "^7.0.0" + builtin-modules "^1.1.1" + chalk "^2.3.0" + commander "^2.12.1" + diff "^4.0.1" + glob "^7.1.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + mkdirp "^0.5.1" + resolve "^1.3.2" + semver "^5.3.0" + tslib "^1.8.0" + tsutils "^2.29.0" + +tsutils@^2.29.0: + version "2.29.0" + resolved "https://registry.nlark.com/tsutils/download/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" + integrity sha1-MrSIUBRnrL7dS4VJhnOggSrKC5k= + dependencies: + tslib "^1.8.1" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.nlark.com/tunnel-agent/download/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.nlark.com/tweetnacl/download/tweetnacl-0.14.5.tgz?cache=0&sync_timestamp=1624607953624&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftweetnacl%2Fdownload%2Ftweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.nlark.com/type-check/download/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + +type-detect@4.0.8: + version "4.0.8" + resolved "https://registry.nlark.com/type-detect/download/type-detect-4.0.8.tgz?cache=0&sync_timestamp=1624607980886&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftype-detect%2Fdownload%2Ftype-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha1-dkb7XxiHHPu3dJ5pvTmmOI63RQw= + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.nlark.com/type-fest/download/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha1-0mCiSwGYQ24TP6JqUkptZfo7Ljc= + +type-fest@^0.6.0: + version "0.6.0" + resolved "https://registry.nlark.com/type-fest/download/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" + integrity sha1-jSojcNPfiG61yQraHFv2GIrPg4s= + +type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.nlark.com/type-fest/download/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha1-CeJJ696FHTseSNJ8EFREZn8XuD0= + +typedarray-to-buffer@^3.1.5: + version "3.1.5" + resolved "https://registry.nlark.com/typedarray-to-buffer/download/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha1-qX7nqf9CaRufeD/xvFES/j/KkIA= + dependencies: + is-typedarray "^1.0.0" + +typescript@^3.0.1: + version "3.9.10" + resolved "https://registry.nlark.com/typescript/download/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" + integrity sha1-cPORCselHta+952ngAaQsZv3eLg= + +unbox-primitive@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/unbox-primitive/download/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" + integrity sha1-CF4hViXsMWJXTciFmr7nilmxRHE= + dependencies: + function-bind "^1.1.1" + has-bigints "^1.0.1" + has-symbols "^1.0.2" + which-boxed-primitive "^1.0.2" + +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.nlark.com/union-value/download/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha1-C2/nuDWuzaYcbqTU8CwUIh4QmEc= + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + +universalify@^0.1.2: + version "0.1.2" + resolved "https://registry.nlark.com/universalify/download/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha1-tkb2m+OULavOzJ1mOcgNwQXvqmY= + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/unset-value/download/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.nlark.com/uri-js/download/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha1-mxpSWVIlhZ5V9mnZKPiMbFfyp34= + dependencies: + punycode "^2.1.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.nlark.com/urix/download/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.nlark.com/use/download/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha1-1QyMrHmhn7wg8pEfVuuXP04QBw8= + +util.promisify@^1.0.0: + version "1.1.1" + resolved "https://registry.nlark.com/util.promisify/download/util.promisify-1.1.1.tgz#77832f57ced2c9478174149cae9b96e9918cd54b" + integrity sha1-d4MvV87SyUeBdBScrpuW6ZGM1Us= + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + for-each "^0.3.3" + has-symbols "^1.0.1" + object.getownpropertydescriptors "^2.1.1" + +uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.nlark.com/uuid/download/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4= + +uuid@^8.3.0: + version "8.3.2" + resolved "https://registry.nlark.com/uuid/download/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha1-gNW1ztJxu5r2xEXyGhoExgbO++I= + +v8-to-istanbul@^7.0.0: + version "7.1.2" + resolved "https://registry.nlark.com/v8-to-istanbul/download/v8-to-istanbul-7.1.2.tgz#30898d1a7fa0c84d225a2c1434fb958f290883c1" + integrity sha1-MImNGn+gyE0iWiwUNPuVjykIg8E= + dependencies: + "@types/istanbul-lib-coverage" "^2.0.1" + convert-source-map "^1.6.0" + source-map "^0.7.3" + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.nlark.com/validate-npm-package-license/download/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha1-/JH2uce6FchX9MssXe/uw51PQQo= + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.nlark.com/verror/download/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +w3c-hr-time@^1.0.1, w3c-hr-time@^1.0.2: + version "1.0.2" + resolved "https://registry.nlark.com/w3c-hr-time/download/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" + integrity sha1-ConN9cwVgi35w2BUNnaWPgzDCM0= + dependencies: + browser-process-hrtime "^1.0.0" + +w3c-xmlserializer@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/w3c-xmlserializer/download/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" + integrity sha1-PnEEoFt1FGzGD1ZDgLf2g6zxAgo= + dependencies: + xml-name-validator "^3.0.0" + +walker@^1.0.7, walker@~1.0.5: + version "1.0.7" + resolved "https://registry.nlark.com/walker/download/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs= + dependencies: + makeerror "1.0.x" + +webidl-conversions@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/webidl-conversions/download/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha1-qFWYCx8LazWbodXZ+zmulB+qY60= + +webidl-conversions@^5.0.0: + version "5.0.0" + resolved "https://registry.nlark.com/webidl-conversions/download/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" + integrity sha1-rlnIoAsSFUOirMZcBDT1ew/BGv8= + +webidl-conversions@^6.1.0: + version "6.1.0" + resolved "https://registry.nlark.com/webidl-conversions/download/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" + integrity sha1-kRG01+qArNQPUnDWZmIa+ni2lRQ= + +whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3, whatwg-encoding@^1.0.5: + version "1.0.5" + resolved "https://registry.nlark.com/whatwg-encoding/download/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" + integrity sha1-WrrPd3wyFmpR0IXWtPPn0nET3bA= + dependencies: + iconv-lite "0.4.24" + +whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0, whatwg-mimetype@^2.3.0: + version "2.3.0" + resolved "https://registry.nlark.com/whatwg-mimetype/download/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" + integrity sha1-PUseAxLSB5h5+Cav8Y2+7KWWD78= + +whatwg-url@^6.4.1: + version "6.5.0" + resolved "https://registry.nlark.com/whatwg-url/download/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" + integrity sha1-8t8Cv/F2/WUHDfdK1cy7WhmZZag= + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + +whatwg-url@^7.0.0: + version "7.1.0" + resolved "https://registry.nlark.com/whatwg-url/download/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" + integrity sha1-wsSS8eymEpiO/T0iZr4bn8YXDQY= + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + +whatwg-url@^8.0.0, whatwg-url@^8.5.0: + version "8.7.0" + resolved "https://registry.nlark.com/whatwg-url/download/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" + integrity sha1-ZWp45RD/jzk3vAvL6fXArDWUG3c= + dependencies: + lodash "^4.7.0" + tr46 "^2.1.0" + webidl-conversions "^6.1.0" + +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.nlark.com/which-boxed-primitive/download/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha1-E3V7yJsgmwSf5dhkMOIc9AqJqOY= + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/which-module/download/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@^1.2.9: + version "1.3.1" + resolved "https://registry.nlark.com/which/download/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo= + dependencies: + isexe "^2.0.0" + +which@^2.0.1, which@^2.0.2: + version "2.0.2" + resolved "https://registry.nlark.com/which/download/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE= + dependencies: + isexe "^2.0.0" + +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.nlark.com/word-wrap/download/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha1-YQY29rH3A4kb00dxzLF/uTtHB5w= + +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.nlark.com/wrap-ansi/download/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha1-6Tk7oHEC5skaOyIUePAlfNKFblM= + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.nlark.com/wrappy/download/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +write-file-atomic@^3.0.0: + version "3.0.3" + resolved "https://registry.nlark.com/write-file-atomic/download/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" + integrity sha1-Vr1cWlxwSBzRnFcb05q5ZaXeVug= + dependencies: + imurmurhash "^0.1.4" + is-typedarray "^1.0.0" + signal-exit "^3.0.2" + typedarray-to-buffer "^3.1.5" + +ws@^5.2.0: + version "5.2.3" + resolved "https://registry.nlark.com/ws/download/ws-5.2.3.tgz?cache=0&sync_timestamp=1630167106943&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fws%2Fdownload%2Fws-5.2.3.tgz#05541053414921bc29c63bee14b8b0dd50b07b3d" + integrity sha1-BVQQU0FJIbwpxjvuFLiw3VCwez0= + dependencies: + async-limiter "~1.0.0" + +ws@^7.4.6: + version "7.5.4" + resolved "https://registry.nlark.com/ws/download/ws-7.5.4.tgz?cache=0&sync_timestamp=1630167106943&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fws%2Fdownload%2Fws-7.5.4.tgz#56bfa20b167427e138a7795de68d134fe92e21f9" + integrity sha1-Vr+iCxZ0J+E4p3ld5o0TT+kuIfk= + +xml-name-validator@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/xml-name-validator/download/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" + integrity sha1-auc+Bt5NjG5H+fsYH3jWSK1FfGo= + +xml@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/xml/download/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" + integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU= + +xmlchars@^2.2.0: + version "2.2.0" + resolved "https://registry.nlark.com/xmlchars/download/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" + integrity sha1-Bg/hvLf5x2/ioX24apvDq4lCEMs= + +y18n@^4.0.0: + version "4.0.3" + resolved "https://registry.nlark.com/y18n/download/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + integrity sha1-tfJZyCzW4zaSHv17/Yv1YN6e7t8= + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/yallist/download/yallist-4.0.0.tgz?cache=0&sync_timestamp=1624607893982&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fyallist%2Fdownload%2Fyallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI= + +yargs-parser@10.x: + version "10.1.0" + resolved "https://registry.nlark.com/yargs-parser/download/yargs-parser-10.1.0.tgz?cache=0&sync_timestamp=1624608003030&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fyargs-parser%2Fdownload%2Fyargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" + integrity sha1-cgImW4n36eny5XZeD+c1qQXtuqg= + dependencies: + camelcase "^4.1.0" + +yargs-parser@^18.1.2: + version "18.1.3" + resolved "https://registry.nlark.com/yargs-parser/download/yargs-parser-18.1.3.tgz?cache=0&sync_timestamp=1624608003030&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fyargs-parser%2Fdownload%2Fyargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha1-vmjEl1xrKr9GkjawyHA2L6sJp7A= + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs@^15.4.1: + version "15.4.1" + resolved "https://registry.nlark.com/yargs/download/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha1-DYehbeAa7p2L7Cv7909nhRcw9Pg= + dependencies: + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^18.1.2"