Skip to content

Commit 88d78be

Browse files
Merge pull request #168 from jdcloud-apigateway/master
20220428 publish jdcloud-sdk-python 1.6.160
2 parents ba8d3a4 + 7b2d32e commit 88d78be

64 files changed

Lines changed: 2611 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 更新历史 #
2+
API版本:1.0.0
3+
4+
|发布时间|版本号|更新|说明|
5+
|---|---|---|---|
6+
|2020-04-14|1.0.0|接口更新|* 新增创建实例接口<br>* 新增删除实例接口<br>* 新增实例详情接口|

jdcloud_sdk/services/tidb/__init__.py

Whitespace-only changes.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class AddWhiteListGroupRequest(JDCloudRequest):
23+
"""
24+
增加白名单分组。
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(AddWhiteListGroupRequest, self).__init__(
29+
'/regions/{regionId}/instances/{instanceId}/whiteList', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class AddWhiteListGroupParameters(object):
34+
35+
def __init__(self, regionId,instanceId,name):
36+
"""
37+
:param regionId: 地域代码
38+
:param instanceId: 实例ID
39+
:param name: 白名单分组名
40+
"""
41+
42+
self.regionId = regionId
43+
self.instanceId = instanceId
44+
self.name = name
45+
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class CreateAccountRequest(JDCloudRequest):
23+
"""
24+
创建数据库账号,用户可以使用客户端,应用程序等通过该账号和密码登录数据库实例。
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(CreateAccountRequest, self).__init__(
29+
'/regions/{regionId}/instances/{instanceId}/accounts', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreateAccountParameters(object):
34+
35+
def __init__(self, regionId,instanceId,accountName, accountPassword):
36+
"""
37+
:param regionId: 地域代码
38+
:param instanceId: 实例ID
39+
:param accountName: 账号名,在同一个实例中,账号名不能重复
40+
:param accountPassword: 密码
41+
"""
42+
43+
self.regionId = regionId
44+
self.instanceId = instanceId
45+
self.accountName = accountName
46+
self.accountPassword = accountPassword
47+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class CreateBackupRequest(JDCloudRequest):
23+
"""
24+
创建一个实例全量备份,可以对整个实例所有的数据库进行全量备份。同一时间点,只能有一个正在运行的备份任务
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(CreateBackupRequest, self).__init__(
29+
'/regions/{regionId}/backups', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreateBackupParameters(object):
34+
35+
def __init__(self, regionId,instanceId, backupSpec):
36+
"""
37+
:param regionId: 地域代码
38+
:param instanceId: 实例ID,唯一标识一个实例
39+
:param backupSpec: 备份创建信息
40+
"""
41+
42+
self.regionId = regionId
43+
self.instanceId = instanceId
44+
self.backupSpec = backupSpec
45+
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class CreateDataMigrationRequest(JDCloudRequest):
23+
"""
24+
查询 TiDB 数据迁移任务的信息
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(CreateDataMigrationRequest, self).__init__(
29+
'/regions/{regionId}/instances/{instanceId}/migration', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreateDataMigrationParameters(object):
34+
35+
def __init__(self, regionId,instanceId,migrationType, importTask):
36+
"""
37+
:param regionId: 地域代码
38+
:param instanceId: 实例ID
39+
:param migrationType: 迁移任务类型,支持以下类型(大小写不敏感):-FULL_IMPORT:全量数据导入
40+
:param importTask: 使用 TiDB Lightning 进行的数据迁移任务
41+
"""
42+
43+
self.regionId = regionId
44+
self.instanceId = instanceId
45+
self.migrationType = migrationType
46+
self.importTask = importTask
47+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class CreateInstanceFromBackupRequest(JDCloudRequest):
23+
"""
24+
根据源实例全量备份创建一个新实例
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(CreateInstanceFromBackupRequest, self).__init__(
29+
'/regions/{regionId}/instances:createInstanceFromBackup', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreateInstanceFromBackupParameters(object):
34+
35+
def __init__(self, regionId,backupId, instanceSpec):
36+
"""
37+
:param regionId: 地域代码
38+
:param backupId: 要恢复的备份的ID
39+
:param instanceSpec: 新建实例规格
40+
"""
41+
42+
self.regionId = regionId
43+
self.backupId = backupId
44+
self.instanceSpec = instanceSpec
45+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class CreateInstanceRequest(JDCloudRequest):
23+
"""
24+
创建一个TiDB实例
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(CreateInstanceRequest, self).__init__(
29+
'/regions/{regionId}/instances', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreateInstanceParameters(object):
34+
35+
def __init__(self, regionId,instanceSpec):
36+
"""
37+
:param regionId: 地域代码
38+
:param instanceSpec: 新建实例规格
39+
"""
40+
41+
self.regionId = regionId
42+
self.instanceSpec = instanceSpec
43+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class DeleteBackupRequest(JDCloudRequest):
23+
"""
24+
删除TiDB的备份,仅允许删除用户生成的备份,系统自动备份不允许删除。
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(DeleteBackupRequest, self).__init__(
29+
'/regions/{regionId}/backups/{backupId}', 'DELETE', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DeleteBackupParameters(object):
34+
35+
def __init__(self, regionId,backupId,):
36+
"""
37+
:param regionId: 地域代码
38+
:param backupId: 备份ID
39+
"""
40+
41+
self.regionId = regionId
42+
self.backupId = backupId
43+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class DeleteInstanceRequest(JDCloudRequest):
23+
"""
24+
删除一个TiDB实例
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(DeleteInstanceRequest, self).__init__(
29+
'/regions/{regionId}/instances/{instanceId}', 'DELETE', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DeleteInstanceParameters(object):
34+
35+
def __init__(self, regionId,instanceId,):
36+
"""
37+
:param regionId: 地域代码
38+
:param instanceId: 实例ID
39+
"""
40+
41+
self.regionId = regionId
42+
self.instanceId = instanceId
43+

0 commit comments

Comments
 (0)