/
teo_client.py
2224 lines (1835 loc) · 95.5 KB
/
teo_client.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# -*- coding: utf8 -*-
# Copyright (c) 2017-2021 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.
import json
from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException
from tencentcloud.common.abstract_client import AbstractClient
from tencentcloud.teo.v20220901 import models
class TeoClient(AbstractClient):
_apiVersion = '2022-09-01'
_endpoint = 'teo.tencentcloudapi.com'
_service = 'teo'
def BindSecurityTemplateToEntity(self, request):
"""This API is used to bind/unbind a domain name to/from a specific policy template.
:param request: Request instance for BindSecurityTemplateToEntity.
:type request: :class:`tencentcloud.teo.v20220901.models.BindSecurityTemplateToEntityRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.BindSecurityTemplateToEntityResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("BindSecurityTemplateToEntity", params, headers=headers)
response = json.loads(body)
model = models.BindSecurityTemplateToEntityResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def BindSharedCNAME(self, request):
"""This API is used to bind/unbind a domain name to/from a shared CNAME. It is now only available to beta users.
:param request: Request instance for BindSharedCNAME.
:type request: :class:`tencentcloud.teo.v20220901.models.BindSharedCNAMERequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.BindSharedCNAMEResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("BindSharedCNAME", params, headers=headers)
response = json.loads(body)
model = models.BindSharedCNAMEResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def BindZoneToPlan(self, request):
"""This API is used to bind a site to a plan.
:param request: Request instance for BindZoneToPlan.
:type request: :class:`tencentcloud.teo.v20220901.models.BindZoneToPlanRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.BindZoneToPlanResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("BindZoneToPlan", params, headers=headers)
response = json.loads(body)
model = models.BindZoneToPlanResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CheckCnameStatus(self, request):
"""This API is used to query the CNAME status of a domain name.
:param request: Request instance for CheckCnameStatus.
:type request: :class:`tencentcloud.teo.v20220901.models.CheckCnameStatusRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CheckCnameStatusResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CheckCnameStatus", params, headers=headers)
response = json.loads(body)
model = models.CheckCnameStatusResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateAccelerationDomain(self, request):
"""This API is used to create an acceleration domain name.
For sites connected via the CNAME, if you have not verified the ownership of the domain name, the ownership verification information of the domain name is returned. To verify your ownership of the domain name, see [Ownership Verification](https://intl.cloud.tencent.com/document/product/1552/70789?from_cn_redirect=1).
:param request: Request instance for CreateAccelerationDomain.
:type request: :class:`tencentcloud.teo.v20220901.models.CreateAccelerationDomainRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CreateAccelerationDomainResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateAccelerationDomain", params, headers=headers)
response = json.loads(body)
model = models.CreateAccelerationDomainResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateAliasDomain(self, request):
"""This API is used to create an alias domain name.
:param request: Request instance for CreateAliasDomain.
:type request: :class:`tencentcloud.teo.v20220901.models.CreateAliasDomainRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CreateAliasDomainResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateAliasDomain", params, headers=headers)
response = json.loads(body)
model = models.CreateAliasDomainResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateApplicationProxy(self, request):
"""This API is on an earlier version. If you want to call it, please switch to the latest version [CreateL4Proxy] (https://intl.cloud.tencent.com/document/product/1552/103417?from_cn_redirect=1).
:param request: Request instance for CreateApplicationProxy.
:type request: :class:`tencentcloud.teo.v20220901.models.CreateApplicationProxyRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CreateApplicationProxyResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateApplicationProxy", params, headers=headers)
response = json.loads(body)
model = models.CreateApplicationProxyResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateApplicationProxyRule(self, request):
"""This API is on an earlier version. If you want to call it, please switch to the latest version. For details, see [CreateL4ProxyRules] (https://intl.cloud.tencent.com/document/product/1552/103416?from_cn_redirect=1).
:param request: Request instance for CreateApplicationProxyRule.
:type request: :class:`tencentcloud.teo.v20220901.models.CreateApplicationProxyRuleRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CreateApplicationProxyRuleResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateApplicationProxyRule", params, headers=headers)
response = json.loads(body)
model = models.CreateApplicationProxyRuleResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateCLSIndex(self, request):
"""This API is used to create key-value indexes for relevant delivered log fields in the corresponding Tencent Cloud CLS log topic for a specified real-time log delivery task (task-id). If such indexes have been created in CLS, this API will append indexes through merging.
:param request: Request instance for CreateCLSIndex.
:type request: :class:`tencentcloud.teo.v20220901.models.CreateCLSIndexRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CreateCLSIndexResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateCLSIndex", params, headers=headers)
response = json.loads(body)
model = models.CreateCLSIndexResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateConfigGroupVersion(self, request):
"""This API is used to create a new version for the specified configuration group in version management mode. The version management feature is currently undergoing beta testing and is accessible only to users on the whitelist.
:param request: Request instance for CreateConfigGroupVersion.
:type request: :class:`tencentcloud.teo.v20220901.models.CreateConfigGroupVersionRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CreateConfigGroupVersionResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateConfigGroupVersion", params, headers=headers)
response = json.loads(body)
model = models.CreateConfigGroupVersionResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateL4Proxy(self, request):
"""This API is used to create Layer 4 proxy instances.
:param request: Request instance for CreateL4Proxy.
:type request: :class:`tencentcloud.teo.v20220901.models.CreateL4ProxyRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CreateL4ProxyResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateL4Proxy", params, headers=headers)
response = json.loads(body)
model = models.CreateL4ProxyResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateL4ProxyRules(self, request):
"""This API is used to create Layer 4 proxy instance rules, supporting both individual and batch creation.
:param request: Request instance for CreateL4ProxyRules.
:type request: :class:`tencentcloud.teo.v20220901.models.CreateL4ProxyRulesRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CreateL4ProxyRulesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateL4ProxyRules", params, headers=headers)
response = json.loads(body)
model = models.CreateL4ProxyRulesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateOriginGroup(self, request):
"""This API is used to create an origin group for easy management. The created origin server group can be used for **adding acceleration domain names** and **layer-4 proxy configuration**.
:param request: Request instance for CreateOriginGroup.
:type request: :class:`tencentcloud.teo.v20220901.models.CreateOriginGroupRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CreateOriginGroupResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateOriginGroup", params, headers=headers)
response = json.loads(body)
model = models.CreateOriginGroupResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreatePlanForZone(self, request):
"""This API is used to purchase a plan for a new site.
:param request: Request instance for CreatePlanForZone.
:type request: :class:`tencentcloud.teo.v20220901.models.CreatePlanForZoneRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CreatePlanForZoneResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreatePlanForZone", params, headers=headers)
response = json.loads(body)
model = models.CreatePlanForZoneResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreatePrefetchTask(self, request):
"""This API is used to create a pre-warming task.
:param request: Request instance for CreatePrefetchTask.
:type request: :class:`tencentcloud.teo.v20220901.models.CreatePrefetchTaskRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CreatePrefetchTaskResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreatePrefetchTask", params, headers=headers)
response = json.loads(body)
model = models.CreatePrefetchTaskResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreatePurgeTask(self, request):
"""When there are resources updated on the origin with the TTL remaining valid, users cannot access the latest resources. In this case, you can purge the cache using this API. There are two methods: <li>Delete: This method deletes the node cache without verification and retrieves the latest resources from the origin when receiving a request.</li><li>Invalidate: This method marks the node cache as invalid and sends a request with the If-None-Match and If-Modified-Since headers to the origin. If the origin responses with 200, the latest resources are retrieved to be cached on the node. If a 304 response is returned, the latest resources are not cached on the node.
</li>For more details, see [Cache Purge](https://intl.cloud.tencent.com/document/product/1552/70759?from_cn_redirect=1). </li>
:param request: Request instance for CreatePurgeTask.
:type request: :class:`tencentcloud.teo.v20220901.models.CreatePurgeTaskRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CreatePurgeTaskResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreatePurgeTask", params, headers=headers)
response = json.loads(body)
model = models.CreatePurgeTaskResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateRealtimeLogDeliveryTask(self, request):
"""This API is used to create a real-time log delivery task. The following limits apply:
An entity (a Layer 7 domain name or a Layer 4 proxy instance) under the combination of the same data delivery type (LogType) and data delivery area (Area) can be added to only one real-time log delivery task. It is recommended to first query the real-time log delivery task list by entity through the [DescribeRealtimeLogDeliveryTasks](https://intl.cloud.tencent.com/document/product/1552/104110?from_cn_redirect=1) API to check whether the entity has been added to another real-time log delivery task.
:param request: Request instance for CreateRealtimeLogDeliveryTask.
:type request: :class:`tencentcloud.teo.v20220901.models.CreateRealtimeLogDeliveryTaskRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CreateRealtimeLogDeliveryTaskResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateRealtimeLogDeliveryTask", params, headers=headers)
response = json.loads(body)
model = models.CreateRealtimeLogDeliveryTaskResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateRule(self, request):
"""This API is used to create a rule in the rule engine.
:param request: Request instance for CreateRule.
:type request: :class:`tencentcloud.teo.v20220901.models.CreateRuleRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CreateRuleResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateRule", params, headers=headers)
response = json.loads(body)
model = models.CreateRuleResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateSecurityIPGroup(self, request):
"""This API is used to create a security IP group.
:param request: Request instance for CreateSecurityIPGroup.
:type request: :class:`tencentcloud.teo.v20220901.models.CreateSecurityIPGroupRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CreateSecurityIPGroupResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateSecurityIPGroup", params, headers=headers)
response = json.loads(body)
model = models.CreateSecurityIPGroupResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateSharedCNAME(self, request):
"""This API is used to create a shared CNAME. It is now only available to beta users.
:param request: Request instance for CreateSharedCNAME.
:type request: :class:`tencentcloud.teo.v20220901.models.CreateSharedCNAMERequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CreateSharedCNAMEResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateSharedCNAME", params, headers=headers)
response = json.loads(body)
model = models.CreateSharedCNAMEResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateZone(self, request):
"""This API is used to create a site. After you create the site, you can connect it to EdgeOne via the CNAME or NS (see [Quick Start](https://intl.cloud.tencent.com/document/product/1552/87601?from_cn_redirect=1)), or connect it without a domain name (see [Quick Access to L4 Proxy Service](https://intl.cloud.tencent.com/document/product/1552/96051?from_cn_redirect=1)).
If there are already EdgeOne plans under the current account, it is recommended to pass in the `PlanId` to bind the site with the plan directly. If `PlanId` is not passed in, the created site is not activated. You need to call [BindZoneToPlan](https://intl.cloud.tencent.com/document/product/1552/83042?from_cn_redirect=1) to bind the site with a plan. To purchase a plan, please go to the EdgeOne console.
:param request: Request instance for CreateZone.
:type request: :class:`tencentcloud.teo.v20220901.models.CreateZoneRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.CreateZoneResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateZone", params, headers=headers)
response = json.loads(body)
model = models.CreateZoneResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteAccelerationDomains(self, request):
"""This API is used to batch remove accelerated domain names.
:param request: Request instance for DeleteAccelerationDomains.
:type request: :class:`tencentcloud.teo.v20220901.models.DeleteAccelerationDomainsRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DeleteAccelerationDomainsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteAccelerationDomains", params, headers=headers)
response = json.loads(body)
model = models.DeleteAccelerationDomainsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteAliasDomain(self, request):
"""This API is used to delete an alias domain name.
:param request: Request instance for DeleteAliasDomain.
:type request: :class:`tencentcloud.teo.v20220901.models.DeleteAliasDomainRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DeleteAliasDomainResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteAliasDomain", params, headers=headers)
response = json.loads(body)
model = models.DeleteAliasDomainResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteApplicationProxy(self, request):
"""This API is on an earlier version. If you want to call it, please switch to the latest version. For details, see [DeleteL4Proxy] (https://intl.cloud.tencent.com/document/product/1552/103415?from_cn_redirect=1).
:param request: Request instance for DeleteApplicationProxy.
:type request: :class:`tencentcloud.teo.v20220901.models.DeleteApplicationProxyRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DeleteApplicationProxyResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteApplicationProxy", params, headers=headers)
response = json.loads(body)
model = models.DeleteApplicationProxyResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteApplicationProxyRule(self, request):
"""This API is on an earlier version. If you want to call it, please switch to the latest version. For details, see [DeleteL4ProxyRules] (https://intl.cloud.tencent.com/document/product/1552/103414?from_cn_redirect=1).
:param request: Request instance for DeleteApplicationProxyRule.
:type request: :class:`tencentcloud.teo.v20220901.models.DeleteApplicationProxyRuleRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DeleteApplicationProxyRuleResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteApplicationProxyRule", params, headers=headers)
response = json.loads(body)
model = models.DeleteApplicationProxyRuleResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteL4Proxy(self, request):
"""This API is used to delete a Layer 4 proxy instance.
:param request: Request instance for DeleteL4Proxy.
:type request: :class:`tencentcloud.teo.v20220901.models.DeleteL4ProxyRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DeleteL4ProxyResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteL4Proxy", params, headers=headers)
response = json.loads(body)
model = models.DeleteL4ProxyResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteL4ProxyRules(self, request):
"""This API is used to delete Layer 4 proxy forwarding rules, supporting both individual and batch operation.
:param request: Request instance for DeleteL4ProxyRules.
:type request: :class:`tencentcloud.teo.v20220901.models.DeleteL4ProxyRulesRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DeleteL4ProxyRulesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteL4ProxyRules", params, headers=headers)
response = json.loads(body)
model = models.DeleteL4ProxyRulesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteOriginGroup(self, request):
"""This API is used to delete an origin group. Note that an origin group can not be deleted if it is referenced by services (e.g. L4 Proxy, domain name service, load balancing, rule engines).
:param request: Request instance for DeleteOriginGroup.
:type request: :class:`tencentcloud.teo.v20220901.models.DeleteOriginGroupRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DeleteOriginGroupResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteOriginGroup", params, headers=headers)
response = json.loads(body)
model = models.DeleteOriginGroupResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteRealtimeLogDeliveryTask(self, request):
"""This API is used to delete a real-time log delivery task.
:param request: Request instance for DeleteRealtimeLogDeliveryTask.
:type request: :class:`tencentcloud.teo.v20220901.models.DeleteRealtimeLogDeliveryTaskRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DeleteRealtimeLogDeliveryTaskResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteRealtimeLogDeliveryTask", params, headers=headers)
response = json.loads(body)
model = models.DeleteRealtimeLogDeliveryTaskResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteRules(self, request):
"""This API is used to batch delete rules from the rule engine.
:param request: Request instance for DeleteRules.
:type request: :class:`tencentcloud.teo.v20220901.models.DeleteRulesRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DeleteRulesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteRules", params, headers=headers)
response = json.loads(body)
model = models.DeleteRulesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteSecurityIPGroup(self, request):
"""This API is used to delete a specified security IP group. Note that the security IP group cannot be deleted if it is referenced in a rule.
:param request: Request instance for DeleteSecurityIPGroup.
:type request: :class:`tencentcloud.teo.v20220901.models.DeleteSecurityIPGroupRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DeleteSecurityIPGroupResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteSecurityIPGroup", params, headers=headers)
response = json.loads(body)
model = models.DeleteSecurityIPGroupResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteSharedCNAME(self, request):
"""This API is used to delete a shared CNAME. It is now only available to beta users.
:param request: Request instance for DeleteSharedCNAME.
:type request: :class:`tencentcloud.teo.v20220901.models.DeleteSharedCNAMERequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DeleteSharedCNAMEResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteSharedCNAME", params, headers=headers)
response = json.loads(body)
model = models.DeleteSharedCNAMEResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteZone(self, request):
"""This API is used to delete a site.
:param request: Request instance for DeleteZone.
:type request: :class:`tencentcloud.teo.v20220901.models.DeleteZoneRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DeleteZoneResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteZone", params, headers=headers)
response = json.loads(body)
model = models.DeleteZoneResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeployConfigGroupVersion(self, request):
"""This API is used to release versions in version management mode. Users can deploy the version to either the testing environment or the production environment by specifying the EnvId parameter. The version management feature is currently undergoing beta testing and is accessible only to users on the whitelist.
:param request: Request instance for DeployConfigGroupVersion.
:type request: :class:`tencentcloud.teo.v20220901.models.DeployConfigGroupVersionRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DeployConfigGroupVersionResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeployConfigGroupVersion", params, headers=headers)
response = json.loads(body)
model = models.DeployConfigGroupVersionResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeAccelerationDomains(self, request):
"""This API is used to query domain name information of a site, including the acceleration domain name, origin, and domain name status. You can query the information of all domain names, or specific domain names by specifying filters information.
:param request: Request instance for DescribeAccelerationDomains.
:type request: :class:`tencentcloud.teo.v20220901.models.DescribeAccelerationDomainsRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DescribeAccelerationDomainsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeAccelerationDomains", params, headers=headers)
response = json.loads(body)
model = models.DescribeAccelerationDomainsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeAliasDomains(self, request):
"""This API is used to query the information of alias domain names.
:param request: Request instance for DescribeAliasDomains.
:type request: :class:`tencentcloud.teo.v20220901.models.DescribeAliasDomainsRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DescribeAliasDomainsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeAliasDomains", params, headers=headers)
response = json.loads(body)
model = models.DescribeAliasDomainsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeApplicationProxies(self, request):
"""This API is on an earlier version. If you want to call it, please switch to the latest version. In the latest version, this API has been split into two APIs: one for querying the Layer 4 proxy instance list and the other for querying Layer 4 forwarding rules. For details, see [DescribeL4Proxy] (https://intl.cloud.tencent.com/document/product/1552/103413?from_cn_redirect=1) and [DescribeL4ProxyRules] (https://intl.cloud.tencent.com/document/product/1552/103412?from_cn_redirect=1).
:param request: Request instance for DescribeApplicationProxies.
:type request: :class:`tencentcloud.teo.v20220901.models.DescribeApplicationProxiesRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DescribeApplicationProxiesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeApplicationProxies", params, headers=headers)
response = json.loads(body)
model = models.DescribeApplicationProxiesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeAvailablePlans(self, request):
"""This API is used to query plan options available for purchase.
:param request: Request instance for DescribeAvailablePlans.
:type request: :class:`tencentcloud.teo.v20220901.models.DescribeAvailablePlansRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DescribeAvailablePlansResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeAvailablePlans", params, headers=headers)
response = json.loads(body)
model = models.DescribeAvailablePlansResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeBillingData(self, request):
"""This API is used to query billing data.
:param request: Request instance for DescribeBillingData.
:type request: :class:`tencentcloud.teo.v20220901.models.DescribeBillingDataRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DescribeBillingDataResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeBillingData", params, headers=headers)
response = json.loads(body)
model = models.DescribeBillingDataResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeConfigGroupVersionDetail(self, request):
"""This API is used to obtain detailed information about a version in version management mode. The response includes the version ID, description, status, creation time, configuration group information, and the content of the version configuration file. The version management feature is currently undergoing beta testing and is accessible only to users on the whitelist.
:param request: Request instance for DescribeConfigGroupVersionDetail.
:type request: :class:`tencentcloud.teo.v20220901.models.DescribeConfigGroupVersionDetailRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DescribeConfigGroupVersionDetailResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeConfigGroupVersionDetail", params, headers=headers)
response = json.loads(body)
model = models.DescribeConfigGroupVersionDetailResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeConfigGroupVersions(self, request):
"""This API is used to query the version list for the specified configuration group in version management mode. The version management feature is currently undergoing beta testing and is accessible only to users on the whitelist.
:param request: Request instance for DescribeConfigGroupVersions.
:type request: :class:`tencentcloud.teo.v20220901.models.DescribeConfigGroupVersionsRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DescribeConfigGroupVersionsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeConfigGroupVersions", params, headers=headers)
response = json.loads(body)
model = models.DescribeConfigGroupVersionsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeContentQuota(self, request):
"""This API is used to query content management quotas.
:param request: Request instance for DescribeContentQuota.
:type request: :class:`tencentcloud.teo.v20220901.models.DescribeContentQuotaRequest`
:rtype: :class:`tencentcloud.teo.v20220901.models.DescribeContentQuotaResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeContentQuota", params, headers=headers)
response = json.loads(body)
model = models.DescribeContentQuotaResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))