Skip to content

Commit 43e5b36

Browse files
Merge pull request #158 from jdcloud-apigateway/master
20220310
2 parents e7f8b18 + 892be9e commit 43e5b36

201 files changed

Lines changed: 6682 additions & 28 deletions

File tree

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版本:2.0.0
3+
4+
|发布时间|版本号|更新|说明|
5+
|---|---|---|---|
6+
|2021-06-26|2.0.0|初始化|* 初始化基本接口|

jdcloud_sdk/services/dbs/__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 AgentPlansRequest(JDCloudRequest):
23+
"""
24+
获取agent的备份计划
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v2"):
28+
super(AgentPlansRequest, self).__init__(
29+
'/regions/{regionId}/manage/{agentId}/plans', 'GET', header, version)
30+
self.parameters = parameters
31+
32+
33+
class AgentPlansParameters(object):
34+
35+
def __init__(self, regionId,agentId,mac):
36+
"""
37+
:param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》]
38+
:param agentId: Agent ID
39+
:param mac: agent的MAC地址
40+
"""
41+
42+
self.regionId = regionId
43+
self.agentId = agentId
44+
self.mac = mac
45+
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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 AgentRegisterRequest(JDCloudRequest):
23+
"""
24+
Agent 注册接口
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v2"):
28+
super(AgentRegisterRequest, self).__init__(
29+
'/regions/{regionId}/agent', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class AgentRegisterParameters(object):
34+
35+
def __init__(self, regionId,mac, stat, ):
36+
"""
37+
:param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》]
38+
:param mac: agent的 MAC
39+
:param stat: agent的状态
40+
"""
41+
42+
self.regionId = regionId
43+
self.ip = None
44+
self.mac = mac
45+
self.hostname = None
46+
self.stat = stat
47+
self.ver = None
48+
49+
def setIp(self, ip):
50+
"""
51+
:param ip: (Optional) agent的IP
52+
"""
53+
self.ip = ip
54+
55+
def setHostname(self, hostname):
56+
"""
57+
:param hostname: (Optional) agent的hostname
58+
"""
59+
self.hostname = hostname
60+
61+
def setVer(self, ver):
62+
"""
63+
:param ver: (Optional) agent的版本号
64+
"""
65+
self.ver = ver
66+
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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 AgentTasksRequest(JDCloudRequest):
23+
"""
24+
获取agent的任务
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v2"):
28+
super(AgentTasksRequest, self).__init__(
29+
'/regions/{regionId}/manage/{agentId}/tasks', 'GET', header, version)
30+
self.parameters = parameters
31+
32+
33+
class AgentTasksParameters(object):
34+
35+
def __init__(self, regionId,agentId,mac):
36+
"""
37+
:param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》]
38+
:param agentId: Agent ID
39+
:param mac: agent的MAC地址
40+
"""
41+
42+
self.regionId = regionId
43+
self.agentId = agentId
44+
self.stat = None
45+
self.mac = mac
46+
47+
def setStat(self, stat):
48+
"""
49+
:param stat: (Optional) agent的状态
50+
"""
51+
self.stat = stat
52+
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
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 BackupFileRequest(JDCloudRequest):
23+
"""
24+
上传备份文件信息
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v2"):
28+
super(BackupFileRequest, self).__init__(
29+
'/regions/{regionId}/backupFile', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class BackupFileParameters(object):
34+
35+
def __init__(self, regionId,planId, backupType, dataSourceId, isManual, filename, extInfo, path, size, storageType, taskId, ):
36+
"""
37+
:param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》]
38+
:param planId:
39+
:param backupType:
40+
:param dataSourceId:
41+
:param isManual: 0代表自动备份 1代表的是手动触发备份
42+
:param filename:
43+
:param extInfo:
44+
:param path:
45+
:param size:
46+
:param storageType:
47+
:param taskId:
48+
"""
49+
50+
self.regionId = regionId
51+
self.planId = planId
52+
self.backupType = backupType
53+
self.dataSourceId = dataSourceId
54+
self.isManual = isManual
55+
self.filename = filename
56+
self.extInfo = extInfo
57+
self.path = path
58+
self.size = size
59+
self.srcSize = None
60+
self.storageType = storageType
61+
self.taskId = taskId
62+
self.binlogStartTime = None
63+
self.binlogEndTime = None
64+
self.binlogStartPos = None
65+
self.binlogEndPos = None
66+
self.version = None
67+
68+
def setSrcSize(self, srcSize):
69+
"""
70+
:param srcSize: (Optional)
71+
"""
72+
self.srcSize = srcSize
73+
74+
def setBinlogStartTime(self, binlogStartTime):
75+
"""
76+
:param binlogStartTime: (Optional)
77+
"""
78+
self.binlogStartTime = binlogStartTime
79+
80+
def setBinlogEndTime(self, binlogEndTime):
81+
"""
82+
:param binlogEndTime: (Optional)
83+
"""
84+
self.binlogEndTime = binlogEndTime
85+
86+
def setBinlogStartPos(self, binlogStartPos):
87+
"""
88+
:param binlogStartPos: (Optional)
89+
"""
90+
self.binlogStartPos = binlogStartPos
91+
92+
def setBinlogEndPos(self, binlogEndPos):
93+
"""
94+
:param binlogEndPos: (Optional)
95+
"""
96+
self.binlogEndPos = binlogEndPos
97+
98+
def setVersion(self, version):
99+
"""
100+
:param version: (Optional)
101+
"""
102+
self.version = version
103+
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 CreateBackupPlanRequest(JDCloudRequest):
23+
"""
24+
创建备份计划
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v2"):
28+
super(CreateBackupPlanRequest, self).__init__(
29+
'/regions/{regionId}/backupPlans', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreateBackupPlanParameters(object):
34+
35+
def __init__(self, regionId,name, servicePackage, chargeSpec):
36+
"""
37+
:param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》]
38+
:param name: 备份计划名称,支持中文、数字、大小写字母、英文下划线“_”、减号“-”,且不少于2字符不超过64字符
39+
:param servicePackage: DBS服务包类型是枚举值, dbs.common.package 表示基础服务包,不含备份流量
40+
:param chargeSpec: 购买规格
41+
"""
42+
43+
self.regionId = regionId
44+
self.name = name
45+
self.servicePackage = servicePackage
46+
self.chargeSpec = chargeSpec
47+
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 CreateLogicalBackupRequest(JDCloudRequest):
23+
"""
24+
手动触发逻辑备份
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v2"):
28+
super(CreateLogicalBackupRequest, self).__init__(
29+
'/regions/{regionId}/backupPlans/{backupPlanId}:createLogicalBackup', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreateLogicalBackupParameters(object):
34+
35+
def __init__(self, regionId,backupPlanId,):
36+
"""
37+
:param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》]
38+
:param backupPlanId: 备份计划ID
39+
"""
40+
41+
self.regionId = regionId
42+
self.backupPlanId = backupPlanId
43+

0 commit comments

Comments
 (0)