Skip to content

Commit 3752878

Browse files
authored
Merge pull request #126 from Tanc009/master
publish jdcloud-sdk-python 1.6.91
2 parents 9f04fea + 7069eb9 commit 3752878

File tree

54 files changed

+1615
-22
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1615
-22
lines changed

jdcloud_sdk/services/disk/ChangeLog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# 更新历史 #
2-
API版本:0.12.5
2+
API版本:0.12.6
33

44
|发布时间|版本号|更新|说明|
55
|---|---|---|---|
6+
| 2020-03-02|0.12.6|新增接口|新增quota查询和快照策略相关接口|
67
| 2020-02-12|0.12.5|新增接口|新增批量删除快照接口|
78
| 2019-10-21|0.12.4|升级|升级charge版本|
89
| 2019-06-27|0.12.3|新增接口|新增续费系统查询资源名称/资源绑定关系接口|
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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 ApplySnapshotPoliciesRequest(JDCloudRequest):
23+
"""
24+
绑定/解绑快照策略与磁盘关系
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(ApplySnapshotPoliciesRequest, self).__init__(
29+
'/regions/{regionId}/snapshotPolicies:apply', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class ApplySnapshotPoliciesParameters(object):
34+
35+
def __init__(self, regionId, ):
36+
"""
37+
:param regionId: 地域ID
38+
"""
39+
40+
self.regionId = regionId
41+
self.relations = None
42+
43+
def setRelations(self, relations):
44+
"""
45+
:param relations: (Optional) 绑定/解绑操作
46+
"""
47+
self.relations = relations
48+
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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 CreateSnapshotPolicyRequest(JDCloudRequest):
23+
"""
24+
创建快照策略
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(CreateSnapshotPolicyRequest, self).__init__(
29+
'/regions/{regionId}/snapshotPolicy', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreateSnapshotPolicyParameters(object):
34+
35+
def __init__(self, regionId, name, interval, effectiveTime, snapshotLifecycle, status):
36+
"""
37+
:param regionId: 地域ID
38+
:param name: 策略名称
39+
:param interval: 策略执行周期,单位:秒,不小于12小时
40+
:param effectiveTime: 策略生效时间,格式`YYYY-MM-DDTHH:mm:ss+xx:xx`。如`2020-02-02T20:02:00+08:00`
41+
:param snapshotLifecycle: 快照保留时间,单位:秒,0:表示不删除
42+
:param status: 策略状态。1:启用 2:禁用
43+
"""
44+
45+
self.regionId = regionId
46+
self.name = name
47+
self.interval = interval
48+
self.effectiveTime = effectiveTime
49+
self.snapshotLifecycle = snapshotLifecycle
50+
self.contactInfo = None
51+
self.status = status
52+
53+
def setContactInfo(self, contactInfo):
54+
"""
55+
:param contactInfo: (Optional) 联系人信息
56+
"""
57+
self.contactInfo = contactInfo
58+
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 DeleteSnapshotPolicyRequest(JDCloudRequest):
23+
"""
24+
删除快照策略
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(DeleteSnapshotPolicyRequest, self).__init__(
29+
'/regions/{regionId}/snapshotPolicy/{policyId}', 'DELETE', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DeleteSnapshotPolicyParameters(object):
34+
35+
def __init__(self, regionId, policyId, ):
36+
"""
37+
:param regionId: 地域ID
38+
:param policyId: 策略ID
39+
"""
40+
41+
self.regionId = regionId
42+
self.policyId = policyId
43+

jdcloud_sdk/services/disk/apis/DescribeDisksRequest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ def setFilters(self, filters):
7474
name - 云硬盘名称,模糊匹配,支持单个
7575
multiAttach - 云硬盘是否多点挂载,精确匹配,支持单个
7676
encrypted - 云硬盘是否加密,精确匹配,支持单个
77+
policyId - 绑定policyId的云硬盘,精确匹配,支持多个
78+
notPolicyId - 未绑定policyId的云硬盘,精确匹配,支持多个
7779
7880
"""
7981
self.filters = filters
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 DescribeQuotaRequest(JDCloudRequest):
23+
"""
24+
查询云硬盘和快照资源的配额
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(DescribeQuotaRequest, self).__init__(
29+
'/regions/{regionId}/quotas', 'GET', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DescribeQuotaParameters(object):
34+
35+
def __init__(self, regionId, type):
36+
"""
37+
:param regionId: 地域ID
38+
:param type: 资源类型 disk:用户能创建的云盘的配额 snapshot: 用户能创建的快照的配额 snapshot_policy: 用户能创建的快照策略的配额
39+
"""
40+
41+
self.regionId = regionId
42+
self.type = type
43+
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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 DescribeSnapPolicesRequest(JDCloudRequest):
23+
"""
24+
查询快照策略
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(DescribeSnapPolicesRequest, self).__init__(
29+
'/regions/{regionId}/snapPolicies:describe', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DescribeSnapPolicesParameters(object):
34+
35+
def __init__(self, regionId, ):
36+
"""
37+
:param regionId: 地域ID
38+
"""
39+
40+
self.regionId = regionId
41+
self.filterGroups = None
42+
self.order = None
43+
self.pageNumber = None
44+
self.pageSize = None
45+
46+
def setFilterGroups(self, filterGroups):
47+
"""
48+
:param filterGroups: (Optional) 过滤条件
49+
"""
50+
self.filterGroups = filterGroups
51+
52+
def setOrder(self, order):
53+
"""
54+
:param order: (Optional) 排序字段,只支持create_time和update_time字段
55+
"""
56+
self.order = order
57+
58+
def setPageNumber(self, pageNumber):
59+
"""
60+
:param pageNumber: (Optional) 页码, 默认为1, 取值范围:[1,∞)
61+
"""
62+
self.pageNumber = pageNumber
63+
64+
def setPageSize(self, pageSize):
65+
"""
66+
:param pageSize: (Optional) 分页大小,默认为20,取值范围:[10,100]
67+
"""
68+
self.pageSize = pageSize
69+
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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 DescribeSnapshotChainRequest(JDCloudRequest):
23+
"""
24+
查询快照链的快照个数和快照总容量
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(DescribeSnapshotChainRequest, self).__init__(
29+
'/regions/{regionId}/snapshots:chain', 'GET', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DescribeSnapshotChainParameters(object):
34+
35+
def __init__(self, regionId, ):
36+
"""
37+
:param regionId: 地域ID
38+
"""
39+
40+
self.regionId = regionId
41+
self.diskId = None
42+
self.snapshotId = None
43+
44+
def setDiskId(self, diskId):
45+
"""
46+
:param diskId: (Optional) 云硬盘ID
47+
"""
48+
self.diskId = diskId
49+
50+
def setSnapshotId(self, snapshotId):
51+
"""
52+
:param snapshotId: (Optional) 快照ID
53+
"""
54+
self.snapshotId = snapshotId
55+

0 commit comments

Comments
 (0)