tencentcloud-sdk-python-ags 3.0.1485__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,46 @@
1
+ Metadata-Version: 2.1
2
+ Name: tencentcloud-sdk-python-ags
3
+ Version: 3.0.1485
4
+ Summary: Tencent Cloud Ags SDK for Python
5
+ Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
+ Author: Tencent Cloud
7
+ Maintainer-email: tencentcloudapi@tencent.com
8
+ License: Apache License 2.0
9
+ Platform: any
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python
14
+ Classifier: Programming Language :: Python :: 2.7
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.6
17
+ Classifier: Programming Language :: Python :: 3.7
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.0.1485
19
+
20
+ ============================
21
+ Tencent Cloud SDK for Python
22
+ ============================
23
+
24
+ Tencent Cloud Python Ags SDK is the official software development kit, which allows Python developers to write software that makes use of Tencent Cloud services like CVM and CBS.
25
+ The SDK works on Python versions:
26
+
27
+ * 2.7 and greater, including 3.x
28
+
29
+ Quick Start
30
+ -----------
31
+
32
+ First, install the library:
33
+
34
+ .. code-block:: sh
35
+
36
+ $ pip install tencentcloud-sdk-python-common
37
+ $ pip install tencentcloud-sdk-python-ags
38
+
39
+ or download source code from github and install:
40
+
41
+ .. code-block:: sh
42
+
43
+ $ git clone https://github.com/tencentcloud/tencentcloud-sdk-python.git
44
+ $ cd tencentcloud-sdk-python
45
+ $ python package.py --components common ags
46
+
@@ -0,0 +1,27 @@
1
+ ============================
2
+ Tencent Cloud SDK for Python
3
+ ============================
4
+
5
+ Tencent Cloud Python Ags SDK is the official software development kit, which allows Python developers to write software that makes use of Tencent Cloud services like CVM and CBS.
6
+ The SDK works on Python versions:
7
+
8
+ * 2.7 and greater, including 3.x
9
+
10
+ Quick Start
11
+ -----------
12
+
13
+ First, install the library:
14
+
15
+ .. code-block:: sh
16
+
17
+ $ pip install tencentcloud-sdk-python-common
18
+ $ pip install tencentcloud-sdk-python-ags
19
+
20
+ or download source code from github and install:
21
+
22
+ .. code-block:: sh
23
+
24
+ $ git clone https://github.com/tencentcloud/tencentcloud-sdk-python.git
25
+ $ cd tencentcloud-sdk-python
26
+ $ python package.py --components common ags
27
+
@@ -0,0 +1,7 @@
1
+ [bdist_wheel]
2
+ universal = 1
3
+
4
+ [egg_info]
5
+ tag_build =
6
+ tag_date = 0
7
+
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env python
2
+ import os
3
+ from setuptools import setup, find_packages
4
+
5
+ import tencentcloud
6
+
7
+ ROOT = os.path.dirname(__file__)
8
+
9
+ setup(
10
+ name='tencentcloud-sdk-python-ags',
11
+ install_requires=["tencentcloud-sdk-python-common>=3.0.1485,<4.0.0"],
12
+ version=tencentcloud.__version__,
13
+ description='Tencent Cloud Ags SDK for Python',
14
+ long_description=open('README.rst').read(),
15
+ author='Tencent Cloud',
16
+ url='https://github.com/TencentCloud/tencentcloud-sdk-python',
17
+ maintainer_email="tencentcloudapi@tencent.com",
18
+ scripts=[],
19
+ packages=find_packages(exclude=["tests*"]),
20
+ license="Apache License 2.0",
21
+ platforms='any',
22
+ classifiers=[
23
+ 'Development Status :: 5 - Production/Stable',
24
+ 'Intended Audience :: Developers',
25
+ 'License :: OSI Approved :: Apache Software License',
26
+ 'Programming Language :: Python',
27
+ 'Programming Language :: Python :: 2.7',
28
+ 'Programming Language :: Python :: 3',
29
+ 'Programming Language :: Python :: 3.6',
30
+ 'Programming Language :: Python :: 3.7',
31
+ ],
32
+ )
@@ -0,0 +1,17 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 1999-2018 Tencent Ltd.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+
17
+ __version__ = '3.0.1485'
@@ -0,0 +1,303 @@
1
+ # -*- coding: utf8 -*-
2
+ # Copyright (c) 2017-2025 Tencent. All Rights Reserved.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ import json
17
+
18
+ from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException
19
+ from tencentcloud.common.abstract_client import AbstractClient
20
+ from tencentcloud.ags.v20250920 import models
21
+
22
+
23
+ class AgsClient(AbstractClient):
24
+ _apiVersion = '2025-09-20'
25
+ _endpoint = 'ags.tencentcloudapi.com'
26
+ _service = 'ags'
27
+
28
+
29
+ def AcquireSandboxInstanceToken(self, request):
30
+ r"""获取访问沙箱工具时所需要使用的访问Token,创建沙箱实例后需调用此接口获取沙箱实例访问Token。
31
+ 此Token可用于调用代码沙箱实例执行代码,或浏览器沙箱实例进行浏览器操作等。
32
+
33
+ :param request: Request instance for AcquireSandboxInstanceToken.
34
+ :type request: :class:`tencentcloud.ags.v20250920.models.AcquireSandboxInstanceTokenRequest`
35
+ :rtype: :class:`tencentcloud.ags.v20250920.models.AcquireSandboxInstanceTokenResponse`
36
+
37
+ """
38
+ try:
39
+ params = request._serialize()
40
+ headers = request.headers
41
+ body = self.call("AcquireSandboxInstanceToken", params, headers=headers)
42
+ response = json.loads(body)
43
+ model = models.AcquireSandboxInstanceTokenResponse()
44
+ model._deserialize(response["Response"])
45
+ return model
46
+ except Exception as e:
47
+ if isinstance(e, TencentCloudSDKException):
48
+ raise
49
+ else:
50
+ raise TencentCloudSDKException(type(e).__name__, str(e))
51
+
52
+
53
+ def CreateAPIKey(self, request):
54
+ r"""创建新的API密钥,用于调用Agent Sandbox接口。相较于腾讯云Secret ID Secret Key支持调用所有接口使用,仅有部分接口支持使用API密钥调用。
55
+
56
+ :param request: Request instance for CreateAPIKey.
57
+ :type request: :class:`tencentcloud.ags.v20250920.models.CreateAPIKeyRequest`
58
+ :rtype: :class:`tencentcloud.ags.v20250920.models.CreateAPIKeyResponse`
59
+
60
+ """
61
+ try:
62
+ params = request._serialize()
63
+ headers = request.headers
64
+ body = self.call("CreateAPIKey", params, headers=headers)
65
+ response = json.loads(body)
66
+ model = models.CreateAPIKeyResponse()
67
+ model._deserialize(response["Response"])
68
+ return model
69
+ except Exception as e:
70
+ if isinstance(e, TencentCloudSDKException):
71
+ raise
72
+ else:
73
+ raise TencentCloudSDKException(type(e).__name__, str(e))
74
+
75
+
76
+ def CreateSandboxTool(self, request):
77
+ r"""创建沙箱工具
78
+
79
+ :param request: Request instance for CreateSandboxTool.
80
+ :type request: :class:`tencentcloud.ags.v20250920.models.CreateSandboxToolRequest`
81
+ :rtype: :class:`tencentcloud.ags.v20250920.models.CreateSandboxToolResponse`
82
+
83
+ """
84
+ try:
85
+ params = request._serialize()
86
+ headers = request.headers
87
+ body = self.call("CreateSandboxTool", params, headers=headers)
88
+ response = json.loads(body)
89
+ model = models.CreateSandboxToolResponse()
90
+ model._deserialize(response["Response"])
91
+ return model
92
+ except Exception as e:
93
+ if isinstance(e, TencentCloudSDKException):
94
+ raise
95
+ else:
96
+ raise TencentCloudSDKException(type(e).__name__, str(e))
97
+
98
+
99
+ def DeleteAPIKey(self, request):
100
+ r"""删除API密钥。注意区别于腾讯云Secret ID Secret Key,本接口删除的是Agent Sandbox专用API key。
101
+
102
+ :param request: Request instance for DeleteAPIKey.
103
+ :type request: :class:`tencentcloud.ags.v20250920.models.DeleteAPIKeyRequest`
104
+ :rtype: :class:`tencentcloud.ags.v20250920.models.DeleteAPIKeyResponse`
105
+
106
+ """
107
+ try:
108
+ params = request._serialize()
109
+ headers = request.headers
110
+ body = self.call("DeleteAPIKey", params, headers=headers)
111
+ response = json.loads(body)
112
+ model = models.DeleteAPIKeyResponse()
113
+ model._deserialize(response["Response"])
114
+ return model
115
+ except Exception as e:
116
+ if isinstance(e, TencentCloudSDKException):
117
+ raise
118
+ else:
119
+ raise TencentCloudSDKException(type(e).__name__, str(e))
120
+
121
+
122
+ def DeleteSandboxTool(self, request):
123
+ r"""删除沙箱工具
124
+
125
+ :param request: Request instance for DeleteSandboxTool.
126
+ :type request: :class:`tencentcloud.ags.v20250920.models.DeleteSandboxToolRequest`
127
+ :rtype: :class:`tencentcloud.ags.v20250920.models.DeleteSandboxToolResponse`
128
+
129
+ """
130
+ try:
131
+ params = request._serialize()
132
+ headers = request.headers
133
+ body = self.call("DeleteSandboxTool", params, headers=headers)
134
+ response = json.loads(body)
135
+ model = models.DeleteSandboxToolResponse()
136
+ model._deserialize(response["Response"])
137
+ return model
138
+ except Exception as e:
139
+ if isinstance(e, TencentCloudSDKException):
140
+ raise
141
+ else:
142
+ raise TencentCloudSDKException(type(e).__name__, str(e))
143
+
144
+
145
+ def DescribeAPIKeyList(self, request):
146
+ r"""获取API密钥列表,包含API密钥简略信息,包含名称、创建时间等。
147
+
148
+ :param request: Request instance for DescribeAPIKeyList.
149
+ :type request: :class:`tencentcloud.ags.v20250920.models.DescribeAPIKeyListRequest`
150
+ :rtype: :class:`tencentcloud.ags.v20250920.models.DescribeAPIKeyListResponse`
151
+
152
+ """
153
+ try:
154
+ params = request._serialize()
155
+ headers = request.headers
156
+ body = self.call("DescribeAPIKeyList", params, headers=headers)
157
+ response = json.loads(body)
158
+ model = models.DescribeAPIKeyListResponse()
159
+ model._deserialize(response["Response"])
160
+ return model
161
+ except Exception as e:
162
+ if isinstance(e, TencentCloudSDKException):
163
+ raise
164
+ else:
165
+ raise TencentCloudSDKException(type(e).__name__, str(e))
166
+
167
+
168
+ def DescribeSandboxInstanceList(self, request):
169
+ r"""查询沙箱实例列表
170
+
171
+ :param request: Request instance for DescribeSandboxInstanceList.
172
+ :type request: :class:`tencentcloud.ags.v20250920.models.DescribeSandboxInstanceListRequest`
173
+ :rtype: :class:`tencentcloud.ags.v20250920.models.DescribeSandboxInstanceListResponse`
174
+
175
+ """
176
+ try:
177
+ params = request._serialize()
178
+ headers = request.headers
179
+ body = self.call("DescribeSandboxInstanceList", params, headers=headers)
180
+ response = json.loads(body)
181
+ model = models.DescribeSandboxInstanceListResponse()
182
+ model._deserialize(response["Response"])
183
+ return model
184
+ except Exception as e:
185
+ if isinstance(e, TencentCloudSDKException):
186
+ raise
187
+ else:
188
+ raise TencentCloudSDKException(type(e).__name__, str(e))
189
+
190
+
191
+ def DescribeSandboxToolList(self, request):
192
+ r"""查询沙箱工具列表
193
+
194
+ :param request: Request instance for DescribeSandboxToolList.
195
+ :type request: :class:`tencentcloud.ags.v20250920.models.DescribeSandboxToolListRequest`
196
+ :rtype: :class:`tencentcloud.ags.v20250920.models.DescribeSandboxToolListResponse`
197
+
198
+ """
199
+ try:
200
+ params = request._serialize()
201
+ headers = request.headers
202
+ body = self.call("DescribeSandboxToolList", params, headers=headers)
203
+ response = json.loads(body)
204
+ model = models.DescribeSandboxToolListResponse()
205
+ model._deserialize(response["Response"])
206
+ return model
207
+ except Exception as e:
208
+ if isinstance(e, TencentCloudSDKException):
209
+ raise
210
+ else:
211
+ raise TencentCloudSDKException(type(e).__name__, str(e))
212
+
213
+
214
+ def StartSandboxInstance(self, request):
215
+ r"""启动沙箱实例
216
+
217
+ :param request: Request instance for StartSandboxInstance.
218
+ :type request: :class:`tencentcloud.ags.v20250920.models.StartSandboxInstanceRequest`
219
+ :rtype: :class:`tencentcloud.ags.v20250920.models.StartSandboxInstanceResponse`
220
+
221
+ """
222
+ try:
223
+ params = request._serialize()
224
+ headers = request.headers
225
+ body = self.call("StartSandboxInstance", params, headers=headers)
226
+ response = json.loads(body)
227
+ model = models.StartSandboxInstanceResponse()
228
+ model._deserialize(response["Response"])
229
+ return model
230
+ except Exception as e:
231
+ if isinstance(e, TencentCloudSDKException):
232
+ raise
233
+ else:
234
+ raise TencentCloudSDKException(type(e).__name__, str(e))
235
+
236
+
237
+ def StopSandboxInstance(self, request):
238
+ r"""停止沙箱实例
239
+
240
+ :param request: Request instance for StopSandboxInstance.
241
+ :type request: :class:`tencentcloud.ags.v20250920.models.StopSandboxInstanceRequest`
242
+ :rtype: :class:`tencentcloud.ags.v20250920.models.StopSandboxInstanceResponse`
243
+
244
+ """
245
+ try:
246
+ params = request._serialize()
247
+ headers = request.headers
248
+ body = self.call("StopSandboxInstance", params, headers=headers)
249
+ response = json.loads(body)
250
+ model = models.StopSandboxInstanceResponse()
251
+ model._deserialize(response["Response"])
252
+ return model
253
+ except Exception as e:
254
+ if isinstance(e, TencentCloudSDKException):
255
+ raise
256
+ else:
257
+ raise TencentCloudSDKException(type(e).__name__, str(e))
258
+
259
+
260
+ def UpdateSandboxInstance(self, request):
261
+ r"""更新沙箱实例
262
+
263
+ :param request: Request instance for UpdateSandboxInstance.
264
+ :type request: :class:`tencentcloud.ags.v20250920.models.UpdateSandboxInstanceRequest`
265
+ :rtype: :class:`tencentcloud.ags.v20250920.models.UpdateSandboxInstanceResponse`
266
+
267
+ """
268
+ try:
269
+ params = request._serialize()
270
+ headers = request.headers
271
+ body = self.call("UpdateSandboxInstance", params, headers=headers)
272
+ response = json.loads(body)
273
+ model = models.UpdateSandboxInstanceResponse()
274
+ model._deserialize(response["Response"])
275
+ return model
276
+ except Exception as e:
277
+ if isinstance(e, TencentCloudSDKException):
278
+ raise
279
+ else:
280
+ raise TencentCloudSDKException(type(e).__name__, str(e))
281
+
282
+
283
+ def UpdateSandboxTool(self, request):
284
+ r"""更新沙箱工具
285
+
286
+ :param request: Request instance for UpdateSandboxTool.
287
+ :type request: :class:`tencentcloud.ags.v20250920.models.UpdateSandboxToolRequest`
288
+ :rtype: :class:`tencentcloud.ags.v20250920.models.UpdateSandboxToolResponse`
289
+
290
+ """
291
+ try:
292
+ params = request._serialize()
293
+ headers = request.headers
294
+ body = self.call("UpdateSandboxTool", params, headers=headers)
295
+ response = json.loads(body)
296
+ model = models.UpdateSandboxToolResponse()
297
+ model._deserialize(response["Response"])
298
+ return model
299
+ except Exception as e:
300
+ if isinstance(e, TencentCloudSDKException):
301
+ raise
302
+ else:
303
+ raise TencentCloudSDKException(type(e).__name__, str(e))
@@ -0,0 +1,81 @@
1
+ # -*- coding: utf8 -*-
2
+ # Copyright (c) 2017-2025 Tencent. All Rights Reserved.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+
17
+ # 操作失败。
18
+ FAILEDOPERATION = 'FailedOperation'
19
+
20
+ # 重复请求(幂等性检查)
21
+ FAILEDOPERATION_DUPLICATEREQUEST = 'FailedOperation.DuplicateRequest'
22
+
23
+ # 请求正在处理中(幂等性检查)
24
+ FAILEDOPERATION_REQUESTINPROGRESS = 'FailedOperation.RequestInProgress'
25
+
26
+ # 内部错误。
27
+ INTERNALERROR = 'InternalError'
28
+
29
+ # 参数错误。
30
+ INVALIDPARAMETER = 'InvalidParameter'
31
+
32
+ # 参数取值错误。
33
+ INVALIDPARAMETERVALUE = 'InvalidParameterValue'
34
+
35
+ # InstanceIds 参数格式错误或 ID 列表超过最大数量限制
36
+ INVALIDPARAMETERVALUE_INSTANCEIDS = 'InvalidParameterValue.InstanceIds'
37
+
38
+ # 沙箱工具名称不可用,可能是已经存在
39
+ INVALIDPARAMETERVALUE_SANDBOXTOOL = 'InvalidParameterValue.SandboxTool'
40
+
41
+ # 超时时间格式错误或超过最大限制
42
+ INVALIDPARAMETERVALUE_TIMEOUT = 'InvalidParameterValue.Timeout'
43
+
44
+ # ToolIds 参数格式错误或 ID 列表超过最大数量限制
45
+ INVALIDPARAMETERVALUE_TOOLIDS = 'InvalidParameterValue.ToolIds'
46
+
47
+ # 不支持的沙箱工具类型
48
+ INVALIDPARAMETERVALUE_TOOLTYPE = 'InvalidParameterValue.ToolType'
49
+
50
+ # 账号下 API 密钥数量达到上限
51
+ LIMITEXCEEDED_APIKEYQUOTA = 'LimitExceeded.APIKeyQuota'
52
+
53
+ # 沙箱实例配额超限
54
+ LIMITEXCEEDED_SANDBOXINSTANCE = 'LimitExceeded.SandboxInstance'
55
+
56
+ # 缺少参数错误。
57
+ MISSINGPARAMETER = 'MissingParameter'
58
+
59
+ # 沙箱工具正在使用中
60
+ RESOURCEINUSE_SANDBOXTOOL = 'ResourceInUse.SandboxTool'
61
+
62
+ # 资源不存在。
63
+ RESOURCENOTFOUND = 'ResourceNotFound'
64
+
65
+ # 沙箱实例不存在
66
+ RESOURCENOTFOUND_SANDBOXINSTANCE = 'ResourceNotFound.SandboxInstance'
67
+
68
+ # 沙箱工具不存在
69
+ RESOURCENOTFOUND_SANDBOXTOOL = 'ResourceNotFound.SandboxTool'
70
+
71
+ # 沙箱工具不可用
72
+ RESOURCEUNAVAILABLE_SANDBOXTOOL = 'ResourceUnavailable.SandboxTool'
73
+
74
+ # 未授权操作。
75
+ UNAUTHORIZEDOPERATION = 'UnauthorizedOperation'
76
+
77
+ # 操作不支持。
78
+ UNSUPPORTEDOPERATION = 'UnsupportedOperation'
79
+
80
+ # 实例状态不允许修改(只有RUNNING状态的实例可以修改)
81
+ UNSUPPORTEDOPERATION_SANDBOXINSTANCE = 'UnsupportedOperation.SandboxInstance'