tencentcloud-sdk-python-intl-en 3.0.1147__py2.py3-none-any.whl → 3.0.1148__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.1147'
16
+ __version__ = '3.0.1148'
File without changes
File without changes
@@ -0,0 +1,210 @@
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.cdwpg.v20201230 import models
21
+
22
+
23
+ class CdwpgClient(AbstractClient):
24
+ _apiVersion = '2020-12-30'
25
+ _endpoint = 'cdwpg.tencentcloudapi.com'
26
+ _service = 'cdwpg'
27
+
28
+
29
+ def CreateInstanceByApi(self, request):
30
+ """This API is used to create instance
31
+
32
+ :param request: Request instance for CreateInstanceByApi.
33
+ :type request: :class:`tencentcloud.cdwpg.v20201230.models.CreateInstanceByApiRequest`
34
+ :rtype: :class:`tencentcloud.cdwpg.v20201230.models.CreateInstanceByApiResponse`
35
+
36
+ """
37
+ try:
38
+ params = request._serialize()
39
+ headers = request.headers
40
+ body = self.call("CreateInstanceByApi", params, headers=headers)
41
+ response = json.loads(body)
42
+ model = models.CreateInstanceByApiResponse()
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 DescribeInstance(self, request):
53
+ """This API is used to query the instance information by an instance ID.
54
+
55
+ :param request: Request instance for DescribeInstance.
56
+ :type request: :class:`tencentcloud.cdwpg.v20201230.models.DescribeInstanceRequest`
57
+ :rtype: :class:`tencentcloud.cdwpg.v20201230.models.DescribeInstanceResponse`
58
+
59
+ """
60
+ try:
61
+ params = request._serialize()
62
+ headers = request.headers
63
+ body = self.call("DescribeInstance", params, headers=headers)
64
+ response = json.loads(body)
65
+ model = models.DescribeInstanceResponse()
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 DescribeInstanceInfo(self, request):
76
+ """This API is used to get instance information.
77
+
78
+ :param request: Request instance for DescribeInstanceInfo.
79
+ :type request: :class:`tencentcloud.cdwpg.v20201230.models.DescribeInstanceInfoRequest`
80
+ :rtype: :class:`tencentcloud.cdwpg.v20201230.models.DescribeInstanceInfoResponse`
81
+
82
+ """
83
+ try:
84
+ params = request._serialize()
85
+ headers = request.headers
86
+ body = self.call("DescribeInstanceInfo", params, headers=headers)
87
+ response = json.loads(body)
88
+ model = models.DescribeInstanceInfoResponse()
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 DescribeInstanceState(self, request):
99
+ """This API is used to display instance status, process progress, etc., in the instance details page.
100
+
101
+ :param request: Request instance for DescribeInstanceState.
102
+ :type request: :class:`tencentcloud.cdwpg.v20201230.models.DescribeInstanceStateRequest`
103
+ :rtype: :class:`tencentcloud.cdwpg.v20201230.models.DescribeInstanceStateResponse`
104
+
105
+ """
106
+ try:
107
+ params = request._serialize()
108
+ headers = request.headers
109
+ body = self.call("DescribeInstanceState", params, headers=headers)
110
+ response = json.loads(body)
111
+ model = models.DescribeInstanceStateResponse()
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 DescribeInstances(self, request):
122
+ """This API is used to get a list of instances.
123
+
124
+ :param request: Request instance for DescribeInstances.
125
+ :type request: :class:`tencentcloud.cdwpg.v20201230.models.DescribeInstancesRequest`
126
+ :rtype: :class:`tencentcloud.cdwpg.v20201230.models.DescribeInstancesResponse`
127
+
128
+ """
129
+ try:
130
+ params = request._serialize()
131
+ headers = request.headers
132
+ body = self.call("DescribeInstances", params, headers=headers)
133
+ response = json.loads(body)
134
+ model = models.DescribeInstancesResponse()
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 DescribeSimpleInstances(self, request):
145
+ """This API is used to get a list of instance
146
+
147
+ :param request: Request instance for DescribeSimpleInstances.
148
+ :type request: :class:`tencentcloud.cdwpg.v20201230.models.DescribeSimpleInstancesRequest`
149
+ :rtype: :class:`tencentcloud.cdwpg.v20201230.models.DescribeSimpleInstancesResponse`
150
+
151
+ """
152
+ try:
153
+ params = request._serialize()
154
+ headers = request.headers
155
+ body = self.call("DescribeSimpleInstances", params, headers=headers)
156
+ response = json.loads(body)
157
+ model = models.DescribeSimpleInstancesResponse()
158
+ model._deserialize(response["Response"])
159
+ return model
160
+ except Exception as e:
161
+ if isinstance(e, TencentCloudSDKException):
162
+ raise
163
+ else:
164
+ raise TencentCloudSDKException(type(e).__name__, str(e))
165
+
166
+
167
+ def DestroyInstanceByApi(self, request):
168
+ """This API is used to destroy instance.
169
+
170
+ :param request: Request instance for DestroyInstanceByApi.
171
+ :type request: :class:`tencentcloud.cdwpg.v20201230.models.DestroyInstanceByApiRequest`
172
+ :rtype: :class:`tencentcloud.cdwpg.v20201230.models.DestroyInstanceByApiResponse`
173
+
174
+ """
175
+ try:
176
+ params = request._serialize()
177
+ headers = request.headers
178
+ body = self.call("DestroyInstanceByApi", params, headers=headers)
179
+ response = json.loads(body)
180
+ model = models.DestroyInstanceByApiResponse()
181
+ model._deserialize(response["Response"])
182
+ return model
183
+ except Exception as e:
184
+ if isinstance(e, TencentCloudSDKException):
185
+ raise
186
+ else:
187
+ raise TencentCloudSDKException(type(e).__name__, str(e))
188
+
189
+
190
+ def ModifyInstance(self, request):
191
+ """This API is used to modify instance information. Only the name of an instance can be modified currently.
192
+
193
+ :param request: Request instance for ModifyInstance.
194
+ :type request: :class:`tencentcloud.cdwpg.v20201230.models.ModifyInstanceRequest`
195
+ :rtype: :class:`tencentcloud.cdwpg.v20201230.models.ModifyInstanceResponse`
196
+
197
+ """
198
+ try:
199
+ params = request._serialize()
200
+ headers = request.headers
201
+ body = self.call("ModifyInstance", params, headers=headers)
202
+ response = json.loads(body)
203
+ model = models.ModifyInstanceResponse()
204
+ model._deserialize(response["Response"])
205
+ return model
206
+ except Exception as e:
207
+ if isinstance(e, TencentCloudSDKException):
208
+ raise
209
+ else:
210
+ raise TencentCloudSDKException(type(e).__name__, str(e))
@@ -0,0 +1,21 @@
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
+ # Internal error.
18
+ INTERNALERROR = 'InternalError'
19
+
20
+ # InternalError.SystemError
21
+ INTERNALERROR_SYSTEMERROR = 'InternalError.SystemError'