cloudfunctions/SegmentPortraitPic/node_modules/tencentcloud-sdk-nodejs/tencentcloud/services/cvm/v20170312/cvm_client.js
(开头部分) 42KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Client = void 0;
/* eslint-disable @typescript-eslint/no-unused-vars */
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
const abstract_client_1 = require("../../../common/abstract_client");
/**
* cvm client
* @class
*/
class Client extends abstract_client_1.AbstractClient {
constructor(clientConfig) {
super("cvm.tencentcloudapi.com", "2017-03-12", clientConfig);
}
/**
* 本接口(DescribeImageQuota)用于查询用户帐号的镜像配额。
*/
async DescribeImageQuota(req, cb) {
return this.request("DescribeImageQuota", req, cb);
}
/**
* 本接口 (StopInstances) 用于关闭一个或多个实例。
* 只有状态为`RUNNING`的实例才可以进行此操作。
* 接口调用成功时,实例会进入`STOPPING`状态;关闭实例成功时,实例会进入`STOPPED`状态。
* 支持强制关闭。强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。
* 支持批量操作。每次请求批量实例的上限为100。
* 本接口为异步接口,关闭实例请求发送成功后会返回一个RequestId,此时操作并未立即完成。实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表关闭实例操作成功。
*/
async StopInstances(req, cb) {
return this.request("StopInstances", req, cb);
}
/**
* 本接口 (DescribeInstancesStatus) 用于查询一个或多个实例的状态。
* 可以根据实例`ID`来查询实例的状态。
* 如果参数为空,返回当前用户一定数量(Limit所指定的数量,默认为20)的实例状态。
*/
async DescribeInstancesStatus(req, cb) {
return this.request("DescribeInstancesStatus", req, cb);
}
/**
* 本接口(ModifyImageSharePermission)用于修改镜像分享信息。
* 分享镜像后,被分享账户可以通过该镜像创建实例。
后面还有 642 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
