tencentcloud-sdk-python-intl-en 3.0.1079__py2.py3-none-any.whl → 3.0.1080__py2.py3-none-any.whl

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.

Potentially problematic release.


This version of tencentcloud-sdk-python-intl-en might be problematic. Click here for more details.

tencentcloud/__init__.py CHANGED
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
 
16
- __version__ = '3.0.1079'
16
+ __version__ = '3.0.1080'
File without changes
File without changes
@@ -0,0 +1,48 @@
1
+ # -*- coding: utf8 -*-
2
+ # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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
+ # Operation failed.
18
+ FAILEDOPERATION = 'FailedOperation'
19
+
20
+ # FailedOperation.ResourceInOperating
21
+ FAILEDOPERATION_RESOURCEINOPERATING = 'FailedOperation.ResourceInOperating'
22
+
23
+ # Internal error.
24
+ INTERNALERROR = 'InternalError'
25
+
26
+ # Parameter error.
27
+ INVALIDPARAMETER = 'InvalidParameter'
28
+
29
+ # InvalidParameter.FormatError
30
+ INVALIDPARAMETER_FORMATERROR = 'InvalidParameter.FormatError'
31
+
32
+ # InvalidParameter.RegionNotFound
33
+ INVALIDPARAMETER_REGIONNOTFOUND = 'InvalidParameter.RegionNotFound'
34
+
35
+ # Invalid parameter value.
36
+ INVALIDPARAMETERVALUE = 'InvalidParameterValue'
37
+
38
+ # The same value exists.
39
+ INVALIDPARAMETERVALUE_DUPLICATE = 'InvalidParameterValue.Duplicate'
40
+
41
+ # InvalidParameterValue.Length
42
+ INVALIDPARAMETERVALUE_LENGTH = 'InvalidParameterValue.Length'
43
+
44
+ # The quota limit is exceeded.
45
+ LIMITEXCEEDED = 'LimitExceeded'
46
+
47
+ # Unauthorized operation.
48
+ UNAUTHORIZEDOPERATION = 'UnauthorizedOperation'
@@ -0,0 +1,441 @@
1
+ # -*- coding: utf8 -*-
2
+ # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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.gwlb.v20240906 import models
21
+
22
+
23
+ class GwlbClient(AbstractClient):
24
+ _apiVersion = '2024-09-06'
25
+ _endpoint = 'gwlb.tencentcloudapi.com'
26
+ _service = 'gwlb'
27
+
28
+
29
+ def AssociateTargetGroups(self, request):
30
+ """This API is used to bind target groups to a CLB.This is an async API. After the API return succeeds, you can call the DescribeTaskStatus API with the returned RequestID as an input parameter to check whether this task is successful.
31
+
32
+ :param request: Request instance for AssociateTargetGroups.
33
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.AssociateTargetGroupsRequest`
34
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.AssociateTargetGroupsResponse`
35
+
36
+ """
37
+ try:
38
+ params = request._serialize()
39
+ headers = request.headers
40
+ body = self.call("AssociateTargetGroups", params, headers=headers)
41
+ response = json.loads(body)
42
+ model = models.AssociateTargetGroupsResponse()
43
+ model._deserialize(response["Response"])
44
+ return model
45
+ except Exception as e:
46
+ if isinstance(e, TencentCloudSDKException):
47
+ raise
48
+ else:
49
+ raise TencentCloudSDKException(type(e).__name__, str(e))
50
+
51
+
52
+ def CreateGatewayLoadBalancer(self, request):
53
+ """This API is used to create a GWLB instance. To use the GWLB service, you must purchase one or more GWLB instances. After this API is called successfully, a unique ID for the GWLB instance will be returned.Note: The default purchase quota for each account in each region is 10.This is an async API. After the API is called successfully, you can use the DescribeGatewayLoadBalancers API to query the status of the GWLB instance (such as creating and normal) to determine whether the creation is successful.
54
+
55
+ :param request: Request instance for CreateGatewayLoadBalancer.
56
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.CreateGatewayLoadBalancerRequest`
57
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.CreateGatewayLoadBalancerResponse`
58
+
59
+ """
60
+ try:
61
+ params = request._serialize()
62
+ headers = request.headers
63
+ body = self.call("CreateGatewayLoadBalancer", params, headers=headers)
64
+ response = json.loads(body)
65
+ model = models.CreateGatewayLoadBalancerResponse()
66
+ model._deserialize(response["Response"])
67
+ return model
68
+ except Exception as e:
69
+ if isinstance(e, TencentCloudSDKException):
70
+ raise
71
+ else:
72
+ raise TencentCloudSDKException(type(e).__name__, str(e))
73
+
74
+
75
+ def CreateTargetGroup(self, request):
76
+ """This API is used to create a target group. This feature is in beta testing. If you need to use it, please [submit a ticket](https://console.cloud.tencent.com/workorder/category?level1_id=6&level2_id=163&source=0&data_title=%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1%20LB&step=1).
77
+
78
+ :param request: Request instance for CreateTargetGroup.
79
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.CreateTargetGroupRequest`
80
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.CreateTargetGroupResponse`
81
+
82
+ """
83
+ try:
84
+ params = request._serialize()
85
+ headers = request.headers
86
+ body = self.call("CreateTargetGroup", params, headers=headers)
87
+ response = json.loads(body)
88
+ model = models.CreateTargetGroupResponse()
89
+ model._deserialize(response["Response"])
90
+ return model
91
+ except Exception as e:
92
+ if isinstance(e, TencentCloudSDKException):
93
+ raise
94
+ else:
95
+ raise TencentCloudSDKException(type(e).__name__, str(e))
96
+
97
+
98
+ def DeleteGatewayLoadBalancer(self, request):
99
+ """This API is used to delete one or more specified GWLB instances. After successful deletion, the GWLB instances will be unbound from the backend service.This is an async API. After the API return succeeds, you can call the DescribeTaskStatus API with the returned RequestId as an input parameter to check whether this task is successful.
100
+
101
+ :param request: Request instance for DeleteGatewayLoadBalancer.
102
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.DeleteGatewayLoadBalancerRequest`
103
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.DeleteGatewayLoadBalancerResponse`
104
+
105
+ """
106
+ try:
107
+ params = request._serialize()
108
+ headers = request.headers
109
+ body = self.call("DeleteGatewayLoadBalancer", params, headers=headers)
110
+ response = json.loads(body)
111
+ model = models.DeleteGatewayLoadBalancerResponse()
112
+ model._deserialize(response["Response"])
113
+ return model
114
+ except Exception as e:
115
+ if isinstance(e, TencentCloudSDKException):
116
+ raise
117
+ else:
118
+ raise TencentCloudSDKException(type(e).__name__, str(e))
119
+
120
+
121
+ def DeleteTargetGroups(self, request):
122
+ """This API is used to delete a target group.
123
+
124
+ :param request: Request instance for DeleteTargetGroups.
125
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.DeleteTargetGroupsRequest`
126
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.DeleteTargetGroupsResponse`
127
+
128
+ """
129
+ try:
130
+ params = request._serialize()
131
+ headers = request.headers
132
+ body = self.call("DeleteTargetGroups", params, headers=headers)
133
+ response = json.loads(body)
134
+ model = models.DeleteTargetGroupsResponse()
135
+ model._deserialize(response["Response"])
136
+ return model
137
+ except Exception as e:
138
+ if isinstance(e, TencentCloudSDKException):
139
+ raise
140
+ else:
141
+ raise TencentCloudSDKException(type(e).__name__, str(e))
142
+
143
+
144
+ def DeregisterTargetGroupInstances(self, request):
145
+ """This API is used to unbind a server from a target group.
146
+ This is an async API. After the API return succeeds, you can call the DescribeTaskStatus API with the returned RequestID as an input parameter to check whether this task is successful.
147
+
148
+ :param request: Request instance for DeregisterTargetGroupInstances.
149
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.DeregisterTargetGroupInstancesRequest`
150
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.DeregisterTargetGroupInstancesResponse`
151
+
152
+ """
153
+ try:
154
+ params = request._serialize()
155
+ headers = request.headers
156
+ body = self.call("DeregisterTargetGroupInstances", params, headers=headers)
157
+ response = json.loads(body)
158
+ model = models.DeregisterTargetGroupInstancesResponse()
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 DescribeGatewayLoadBalancers(self, request):
169
+ """This API is used to query the list of GWLB instances in a region.
170
+
171
+ :param request: Request instance for DescribeGatewayLoadBalancers.
172
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.DescribeGatewayLoadBalancersRequest`
173
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.DescribeGatewayLoadBalancersResponse`
174
+
175
+ """
176
+ try:
177
+ params = request._serialize()
178
+ headers = request.headers
179
+ body = self.call("DescribeGatewayLoadBalancers", params, headers=headers)
180
+ response = json.loads(body)
181
+ model = models.DescribeGatewayLoadBalancersResponse()
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 DescribeTargetGroupInstanceStatus(self, request):
192
+ """This API is used to query the backend service status of a target group. Currently, only GWLB type target groups support querying backend service status.
193
+
194
+ :param request: Request instance for DescribeTargetGroupInstanceStatus.
195
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.DescribeTargetGroupInstanceStatusRequest`
196
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.DescribeTargetGroupInstanceStatusResponse`
197
+
198
+ """
199
+ try:
200
+ params = request._serialize()
201
+ headers = request.headers
202
+ body = self.call("DescribeTargetGroupInstanceStatus", params, headers=headers)
203
+ response = json.loads(body)
204
+ model = models.DescribeTargetGroupInstanceStatusResponse()
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 DescribeTargetGroupInstances(self, request):
215
+ """This API is used to obtain information on servers bound to a target group.
216
+
217
+ :param request: Request instance for DescribeTargetGroupInstances.
218
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.DescribeTargetGroupInstancesRequest`
219
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.DescribeTargetGroupInstancesResponse`
220
+
221
+ """
222
+ try:
223
+ params = request._serialize()
224
+ headers = request.headers
225
+ body = self.call("DescribeTargetGroupInstances", params, headers=headers)
226
+ response = json.loads(body)
227
+ model = models.DescribeTargetGroupInstancesResponse()
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 DescribeTargetGroupList(self, request):
238
+ """This API is used to obtain a target group list.
239
+
240
+ :param request: Request instance for DescribeTargetGroupList.
241
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.DescribeTargetGroupListRequest`
242
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.DescribeTargetGroupListResponse`
243
+
244
+ """
245
+ try:
246
+ params = request._serialize()
247
+ headers = request.headers
248
+ body = self.call("DescribeTargetGroupList", params, headers=headers)
249
+ response = json.loads(body)
250
+ model = models.DescribeTargetGroupListResponse()
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 DescribeTargetGroups(self, request):
261
+ """This API is used to query target group information.
262
+
263
+ :param request: Request instance for DescribeTargetGroups.
264
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.DescribeTargetGroupsRequest`
265
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.DescribeTargetGroupsResponse`
266
+
267
+ """
268
+ try:
269
+ params = request._serialize()
270
+ headers = request.headers
271
+ body = self.call("DescribeTargetGroups", params, headers=headers)
272
+ response = json.loads(body)
273
+ model = models.DescribeTargetGroupsResponse()
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 DescribeTaskStatus(self, request):
284
+ """This API is used to query the execution status of an async task. After non-query APIs (for example, used to create/delete CLB instances) are called successfully, this API needs to be used to query whether the task is successful.
285
+
286
+ :param request: Request instance for DescribeTaskStatus.
287
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.DescribeTaskStatusRequest`
288
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.DescribeTaskStatusResponse`
289
+
290
+ """
291
+ try:
292
+ params = request._serialize()
293
+ headers = request.headers
294
+ body = self.call("DescribeTaskStatus", params, headers=headers)
295
+ response = json.loads(body)
296
+ model = models.DescribeTaskStatusResponse()
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))
304
+
305
+
306
+ def DisassociateTargetGroups(self, request):
307
+ """This API is used to disassociate a CLB from a target group.This is an async API. After the API return succeeds, you can call the DescribeTaskStatus API with the returned RequestID as an input parameter to check whether this task is successful.
308
+
309
+ :param request: Request instance for DisassociateTargetGroups.
310
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.DisassociateTargetGroupsRequest`
311
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.DisassociateTargetGroupsResponse`
312
+
313
+ """
314
+ try:
315
+ params = request._serialize()
316
+ headers = request.headers
317
+ body = self.call("DisassociateTargetGroups", params, headers=headers)
318
+ response = json.loads(body)
319
+ model = models.DisassociateTargetGroupsResponse()
320
+ model._deserialize(response["Response"])
321
+ return model
322
+ except Exception as e:
323
+ if isinstance(e, TencentCloudSDKException):
324
+ raise
325
+ else:
326
+ raise TencentCloudSDKException(type(e).__name__, str(e))
327
+
328
+
329
+ def InquirePriceCreateGatewayLoadBalancer(self, request):
330
+ """This API is used to query the price for creating a GWLB.
331
+
332
+ :param request: Request instance for InquirePriceCreateGatewayLoadBalancer.
333
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.InquirePriceCreateGatewayLoadBalancerRequest`
334
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.InquirePriceCreateGatewayLoadBalancerResponse`
335
+
336
+ """
337
+ try:
338
+ params = request._serialize()
339
+ headers = request.headers
340
+ body = self.call("InquirePriceCreateGatewayLoadBalancer", params, headers=headers)
341
+ response = json.loads(body)
342
+ model = models.InquirePriceCreateGatewayLoadBalancerResponse()
343
+ model._deserialize(response["Response"])
344
+ return model
345
+ except Exception as e:
346
+ if isinstance(e, TencentCloudSDKException):
347
+ raise
348
+ else:
349
+ raise TencentCloudSDKException(type(e).__name__, str(e))
350
+
351
+
352
+ def ModifyGatewayLoadBalancerAttribute(self, request):
353
+ """This API is used to modify the attributes of a CLB instance. It supports modifying the name and bandwidth cap of the CLB instance.
354
+
355
+ :param request: Request instance for ModifyGatewayLoadBalancerAttribute.
356
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.ModifyGatewayLoadBalancerAttributeRequest`
357
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.ModifyGatewayLoadBalancerAttributeResponse`
358
+
359
+ """
360
+ try:
361
+ params = request._serialize()
362
+ headers = request.headers
363
+ body = self.call("ModifyGatewayLoadBalancerAttribute", params, headers=headers)
364
+ response = json.loads(body)
365
+ model = models.ModifyGatewayLoadBalancerAttributeResponse()
366
+ model._deserialize(response["Response"])
367
+ return model
368
+ except Exception as e:
369
+ if isinstance(e, TencentCloudSDKException):
370
+ raise
371
+ else:
372
+ raise TencentCloudSDKException(type(e).__name__, str(e))
373
+
374
+
375
+ def ModifyTargetGroupAttribute(self, request):
376
+ """This API is used to modify the name, health check, and other attributes of the target group.
377
+
378
+ :param request: Request instance for ModifyTargetGroupAttribute.
379
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.ModifyTargetGroupAttributeRequest`
380
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.ModifyTargetGroupAttributeResponse`
381
+
382
+ """
383
+ try:
384
+ params = request._serialize()
385
+ headers = request.headers
386
+ body = self.call("ModifyTargetGroupAttribute", params, headers=headers)
387
+ response = json.loads(body)
388
+ model = models.ModifyTargetGroupAttributeResponse()
389
+ model._deserialize(response["Response"])
390
+ return model
391
+ except Exception as e:
392
+ if isinstance(e, TencentCloudSDKException):
393
+ raise
394
+ else:
395
+ raise TencentCloudSDKException(type(e).__name__, str(e))
396
+
397
+
398
+ def ModifyTargetGroupInstancesWeight(self, request):
399
+ """This API is used to modify the server weight of a target group.This is an async API. After the API return succeeds, you can call the DescribeTaskStatus API with the returned RequestID as an input parameter to check whether this task is successful.
400
+
401
+ :param request: Request instance for ModifyTargetGroupInstancesWeight.
402
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.ModifyTargetGroupInstancesWeightRequest`
403
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.ModifyTargetGroupInstancesWeightResponse`
404
+
405
+ """
406
+ try:
407
+ params = request._serialize()
408
+ headers = request.headers
409
+ body = self.call("ModifyTargetGroupInstancesWeight", params, headers=headers)
410
+ response = json.loads(body)
411
+ model = models.ModifyTargetGroupInstancesWeightResponse()
412
+ model._deserialize(response["Response"])
413
+ return model
414
+ except Exception as e:
415
+ if isinstance(e, TencentCloudSDKException):
416
+ raise
417
+ else:
418
+ raise TencentCloudSDKException(type(e).__name__, str(e))
419
+
420
+
421
+ def RegisterTargetGroupInstances(self, request):
422
+ """This API is used to register servers to a target group.This is an async API. After the API return succeeds, you can call the DescribeTaskStatus API with the returned RequestID as an input parameter to check whether this task is successful.
423
+
424
+ :param request: Request instance for RegisterTargetGroupInstances.
425
+ :type request: :class:`tencentcloud.gwlb.v20240906.models.RegisterTargetGroupInstancesRequest`
426
+ :rtype: :class:`tencentcloud.gwlb.v20240906.models.RegisterTargetGroupInstancesResponse`
427
+
428
+ """
429
+ try:
430
+ params = request._serialize()
431
+ headers = request.headers
432
+ body = self.call("RegisterTargetGroupInstances", params, headers=headers)
433
+ response = json.loads(body)
434
+ model = models.RegisterTargetGroupInstancesResponse()
435
+ model._deserialize(response["Response"])
436
+ return model
437
+ except Exception as e:
438
+ if isinstance(e, TencentCloudSDKException):
439
+ raise
440
+ else:
441
+ raise TencentCloudSDKException(type(e).__name__, str(e))