tencentcloud-sdk-nodejs
Version:
129 lines (128 loc) • 4.08 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Client = void 0;
/* eslint-disable @typescript-eslint/no-unused-vars */
/*
* Copyright (c) 2018 Tencent. 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");
/**
* ags client
* @class
*/
class Client extends abstract_client_1.AbstractClient {
constructor(clientConfig) {
super("ags.tencentcloudapi.com", "2025-09-20", clientConfig);
}
/**
* 创建镜像预热任务
*/
async CreatePreCacheImageTask(req, cb) {
return this.request("CreatePreCacheImageTask", req, cb);
}
/**
* 更新沙箱实例
*/
async UpdateSandboxInstance(req, cb) {
return this.request("UpdateSandboxInstance", req, cb);
}
/**
* 启动沙箱实例
*/
async StartSandboxInstance(req, cb) {
return this.request("StartSandboxInstance", req, cb);
}
/**
* 获取访问沙箱工具时所需要使用的访问Token,创建沙箱实例后需调用此接口获取沙箱实例访问Token。
此Token可用于调用代码沙箱实例执行代码,或浏览器沙箱实例进行浏览器操作等。
*/
async AcquireSandboxInstanceToken(req, cb) {
return this.request("AcquireSandboxInstanceToken", req, cb);
}
/**
* 查询镜像预热任务信息
*/
async DescribePreCacheImageTask(req, cb) {
return this.request("DescribePreCacheImageTask", req, cb);
}
/**
* 恢复沙箱实例
*/
async ResumeSandboxInstance(req, cb) {
return this.request("ResumeSandboxInstance", req, cb);
}
/**
* 查询沙箱工具列表
*/
async DescribeSandboxToolList(req, cb) {
return this.request("DescribeSandboxToolList", req, cb);
}
/**
* 获取API密钥列表,包含API密钥简略信息,包含名称、创建时间等。
*/
async DescribeAPIKeyList(req, cb) {
return this.request("DescribeAPIKeyList", req, cb);
}
/**
* 查询沙箱实例列表
*/
async DescribeSandboxInstanceList(req, cb) {
return this.request("DescribeSandboxInstanceList", req, cb);
}
/**
* 创建新的API密钥,用于调用Agent Sandbox接口。相较于腾讯云Secret ID Secret Key支持调用所有接口使用,仅有部分接口支持使用API密钥调用。
*/
async CreateAPIKey(req, cb) {
return this.request("CreateAPIKey", req, cb);
}
/**
* 删除沙箱工具
*/
async DeleteSandboxTool(req, cb) {
return this.request("DeleteSandboxTool", req, cb);
}
/**
* 暂停沙箱实例
*/
async PauseSandboxInstance(req, cb) {
return this.request("PauseSandboxInstance", req, cb);
}
/**
* 停止沙箱实例
*/
async StopSandboxInstance(req, cb) {
return this.request("StopSandboxInstance", req, cb);
}
/**
* 删除API密钥。注意区别于腾讯云Secret ID Secret Key,本接口删除的是Agent Sandbox专用API key。
*/
async DeleteAPIKey(req, cb) {
return this.request("DeleteAPIKey", req, cb);
}
/**
* 创建沙箱工具
*/
async CreateSandboxTool(req, cb) {
return this.request("CreateSandboxTool", req, cb);
}
/**
* 更新沙箱工具
*/
async UpdateSandboxTool(req, cb) {
return this.request("UpdateSandboxTool", req, cb);
}
}
exports.Client = Client;