Skip to content

Commit 9f04fea

Browse files
authored
Merge pull request #125 from Tanc009/master
publish jdcloud-sdk-python 1.6.90
2 parents 2ce3ddf + 5ad0851 commit 9f04fea

23 files changed

+669
-10
lines changed

jdcloud_sdk/services/cps/ChangeLog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# 更新历史 #
22

3-
API版本:2.4.1
3+
API版本:2.4.3
44

55
|发布时间|版本号|更新|说明|
66
|---|---|---|---|
7+
|2021-01-07|2.4.3|接口变更|* 增加EIP和SLB资源标签接口<br> *实例批量开关机<br> *查询云物理服务器监控报警日志信息<br>
8+
|2021-01-07|2.4.2|接口变更|* 创建EIP时校验资源是否可以打标<br> * 创建负载均衡实例时校验资源是否可以打标<br> * 物理机添加批量开机、关机、重启操作接口<br>
79
|2020-12-30|2.4.1|接口变更|* 创建物理机时支持设置IPV6地址<br> * 创建物理机支持双网口模式<br> * 物理机支持添加别名IP<br> * 私有网络支持开通IPv6网关<br> * 子网支持IPV6网段<br> * 子网支持添加次要CIDR网段|
810
|2020-05-06|2.3.0|接口变更|* 支持创建实例时添加标签|
911
|2019-11-29|2.2.1|文档完善|* 整理文档,完善描述|
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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 CreateCertRequest(JDCloudRequest):
23+
"""
24+
创建证书
25+
26+
"""
27+
28+
def __init__(self, parameters, header=None, version="v1"):
29+
super(CreateCertRequest, self).__init__(
30+
'/regions/{regionId}/certs', 'PUT', header, version)
31+
self.parameters = parameters
32+
33+
34+
class CreateCertParameters(object):
35+
36+
def __init__(self, regionId, certSpec):
37+
"""
38+
:param regionId: 地域ID,可调用接口(describeRegiones)获取云物理服务器支持的地域
39+
:param certSpec: 弹性公网IP配置
40+
"""
41+
42+
self.regionId = regionId
43+
self.clientToken = None
44+
self.certSpec = certSpec
45+
46+
def setClientToken(self, clientToken):
47+
"""
48+
:param clientToken: (Optional) 由客户端生成,用于保证请求的幂等性,长度不能超过36个字符;<br/>
49+
如果多个请求使用了相同的clientToken,只会执行第一个请求,之后的请求直接返回第一个请求的结果<br/>
50+
51+
"""
52+
self.clientToken = clientToken
53+
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 DescribeCertRequest(JDCloudRequest):
23+
"""
24+
查询证书详情
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(DescribeCertRequest, self).__init__(
29+
'/regions/{regionId}/certs/{certId}', 'GET', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DescribeCertParameters(object):
34+
35+
def __init__(self, regionId, certId, ):
36+
"""
37+
:param regionId: 地域ID,可调用接口(describeRegiones)获取云物理服务器支持的地域
38+
:param certId: 证书ID
39+
"""
40+
41+
self.regionId = regionId
42+
self.certId = certId
43+
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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 DescribeCertsRequest(JDCloudRequest):
23+
"""
24+
查询证书列表<br/>
25+
支持分页查询,默认每页20条<br/>
26+
27+
"""
28+
29+
def __init__(self, parameters, header=None, version="v1"):
30+
super(DescribeCertsRequest, self).__init__(
31+
'/regions/{regionId}/certs', 'GET', header, version)
32+
self.parameters = parameters
33+
34+
35+
class DescribeCertsParameters(object):
36+
37+
def __init__(self, regionId, ):
38+
"""
39+
:param regionId: 地域ID,可调用接口(describeRegiones)获取云物理服务器支持的地域
40+
"""
41+
42+
self.regionId = regionId
43+
self.pageNumber = None
44+
self.pageSize = None
45+
self.name = None
46+
self.filters = None
47+
48+
def setPageNumber(self, pageNumber):
49+
"""
50+
:param pageNumber: (Optional) 页码;默认为1
51+
"""
52+
self.pageNumber = pageNumber
53+
54+
def setPageSize(self, pageSize):
55+
"""
56+
:param pageSize: (Optional) 分页大小;默认为20;取值范围[20, 100]
57+
"""
58+
self.pageSize = pageSize
59+
60+
def setName(self, name):
61+
"""
62+
:param name: (Optional) 证书名称
63+
"""
64+
self.name = name
65+
66+
def setFilters(self, filters):
67+
"""
68+
:param filters: (Optional) certId - 证书ID,精确匹配,支持多个<br/>
69+
70+
"""
71+
self.filters = filters
72+
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 DescribeElasticIpNameRequest(JDCloudRequest):
23+
"""
24+
查询EIP名称
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(DescribeElasticIpNameRequest, self).__init__(
29+
'/regions/{regionId}/elasticIp/{elasticIpId}:describeElasticIpName', 'GET', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DescribeElasticIpNameParameters(object):
34+
35+
def __init__(self, regionId, elasticIpId, ):
36+
"""
37+
:param regionId: 地域ID,可调用接口(describeRegiones)获取云物理服务器支持的地域
38+
:param elasticIpId: 弹性公网IPID
39+
"""
40+
41+
self.regionId = regionId
42+
self.elasticIpId = elasticIpId
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 DescribeSlbsNameRequest(JDCloudRequest):
23+
"""
24+
查询SLB名称
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(DescribeSlbsNameRequest, self).__init__(
29+
'/regions/{regionId}/slbs/{loadBalancerId}:describeSlbsName', 'GET', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DescribeSlbsNameParameters(object):
34+
35+
def __init__(self, regionId, loadBalancerId, ):
36+
"""
37+
:param regionId: 地域ID,可调用接口(describeCPSLBRegions)获取云物理服务器支持的地域
38+
:param loadBalancerId: 负载均衡实例ID
39+
"""
40+
41+
self.regionId = regionId
42+
self.loadBalancerId = loadBalancerId
43+
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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 ModifyCertRequest(JDCloudRequest):
23+
"""
24+
修改证书名称
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(ModifyCertRequest, self).__init__(
29+
'/regions/{regionId}/certs/{certId}:modifyCert', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class ModifyCertParameters(object):
34+
35+
def __init__(self, regionId, certId, ):
36+
"""
37+
:param regionId: 地域ID,可调用接口(describeRegiones)获取云物理服务器支持的地域
38+
:param certId: 证书ID
39+
"""
40+
41+
self.regionId = regionId
42+
self.certId = certId
43+
self.name = None
44+
45+
def setName(self, name):
46+
"""
47+
:param name: (Optional) 证书名称
48+
"""
49+
self.name = name
50+

jdcloud_sdk/services/cps/apis/ModifyListenerRequest.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ def __init__(self, regionId, listenerId, ):
5151
self.healthyThreshold = None
5252
self.unhealthyThreshold = None
5353
self.serverGroupId = None
54+
self.stickySessionTimeout = None
55+
self.cookieType = None
56+
self.healthCheckUri = None
57+
self.healthCheckHttpCode = None
58+
self.certificateId = None
59+
self.headers = None
5460

5561
def setAlgorithm(self, algorithm):
5662
"""
@@ -118,3 +124,39 @@ def setServerGroupId(self, serverGroupId):
118124
"""
119125
self.serverGroupId = serverGroupId
120126

127+
def setStickySessionTimeout(self, stickySessionTimeout):
128+
"""
129+
:param stickySessionTimeout: (Optional) 会话保持超时时间,单位s
130+
"""
131+
self.stickySessionTimeout = stickySessionTimeout
132+
133+
def setCookieType(self, cookieType):
134+
"""
135+
:param cookieType: (Optional) 会话类型,植入Cookie or 重写Cookie
136+
"""
137+
self.cookieType = cookieType
138+
139+
def setHealthCheckUri(self, healthCheckUri):
140+
"""
141+
:param healthCheckUri: (Optional) 检查路径
142+
"""
143+
self.healthCheckUri = healthCheckUri
144+
145+
def setHealthCheckHttpCode(self, healthCheckHttpCode):
146+
"""
147+
:param healthCheckHttpCode: (Optional) 正常态码,要使用的Http状态码
148+
"""
149+
self.healthCheckHttpCode = healthCheckHttpCode
150+
151+
def setCertificateId(self, certificateId):
152+
"""
153+
:param certificateId: (Optional) 证书ID
154+
"""
155+
self.certificateId = certificateId
156+
157+
def setHeaders(self, headers):
158+
"""
159+
:param headers: (Optional) 获取HTTP头字段:X-Forwarded-For、X-Forwarded-Proto、X- Forwarded-Port、X-Forwarded-LBIP
160+
"""
161+
self.headers = headers
162+

0 commit comments

Comments
 (0)