Skip to content

Commit da991e4

Browse files
Merge pull request #147 from jdcloud-apigateway/master
sdk-update
2 parents 4aed1a2 + 40915e7 commit da991e4

57 files changed

Lines changed: 1989 additions & 129 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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# 更新历史 #
2-
API版本:0.0.1
2+
API版本:0.0.2
33

44
| 发布时间 | 版本号 | 更新 | 说明 |
55
| ---------- | ------ | ------------- | -------------- |
6-
| 2021-10-28 | 0.0.1 | starshield | * 初始版本 |
6+
| 2021-11-17 | 0.0.2 | 提供DNS记录、资源缓存、防火墙规则、页面规则管理接口 ||
7+
| 2021-10-28 | 0.0.1 | 提供实例、SSL证书、WAF规则管理接口 ||
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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 CreateDNSRecordRequest(JDCloudRequest):
23+
"""
24+
创建DNS记录
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(CreateDNSRecordRequest, self).__init__(
29+
'/zones/{zone_identifier}/dns_records', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreateDNSRecordParameters(object):
34+
35+
def __init__(self, zone_identifier, name, content, ttl, ):
36+
"""
37+
:param zone_identifier:
38+
:param name: DNS记录名称
39+
:param content: DNS记录内容
40+
:param ttl: DNS记录的生存时间。值为1是 "自动"。
41+
"""
42+
43+
self.zone_identifier = zone_identifier
44+
self.ty_pe = None
45+
self.name = name
46+
self.content = content
47+
self.ttl = ttl
48+
self.priority = None
49+
self.proxied = None
50+
self.srvData = None
51+
self.caaData = None
52+
53+
def setTy_pe(self, ty_pe):
54+
"""
55+
:param ty_pe: (Optional) DNS记录类型
56+
"""
57+
self.ty_pe = ty_pe
58+
59+
def setPriority(self, priority):
60+
"""
61+
:param priority: (Optional) 与一些记录如MX和SRV一起使用,以确定优先级。如果你没有为MX记录提供一个优先级,默认值为0将被设置。
62+
"""
63+
self.priority = priority
64+
65+
def setProxied(self, proxied):
66+
"""
67+
:param proxied: (Optional) 是否利用星盾的性能和安全优势
68+
"""
69+
self.proxied = proxied
70+
71+
def setSrvData(self, srvData):
72+
"""
73+
:param srvData: (Optional)
74+
"""
75+
self.srvData = srvData
76+
77+
def setCaaData(self, caaData):
78+
"""
79+
:param caaData: (Optional)
80+
"""
81+
self.caaData = caaData
82+
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 CreateFiltersRequest(JDCloudRequest):
23+
"""
24+
创建新过滤器
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(CreateFiltersRequest, self).__init__(
29+
'/zones/{zone_identifier}/filters', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreateFiltersParameters(object):
34+
35+
def __init__(self, zone_identifier, ):
36+
"""
37+
:param zone_identifier:
38+
"""
39+
40+
self.zone_identifier = zone_identifier
41+
self.filters = None
42+
43+
def setFilters(self, filters):
44+
"""
45+
:param filters: (Optional)
46+
"""
47+
self.filters = filters
48+
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 CreateFirewallRulesRequest(JDCloudRequest):
23+
"""
24+
创建新的防火墙规则。
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(CreateFirewallRulesRequest, self).__init__(
29+
'/zones/{zone_identifier}/firewall$$rules', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreateFirewallRulesParameters(object):
34+
35+
def __init__(self, zone_identifier, ):
36+
"""
37+
:param zone_identifier:
38+
"""
39+
40+
self.zone_identifier = zone_identifier
41+
self.firewallRules = None
42+
43+
def setFirewallRules(self, firewallRules):
44+
"""
45+
:param firewallRules: (Optional)
46+
"""
47+
self.firewallRules = firewallRules
48+
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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 CreateFlowPackRequest(JDCloudRequest):
23+
"""
24+
购买流量包
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(CreateFlowPackRequest, self).__init__(
29+
'/regions/{regionId}/instances/{instanceId}/flowPack', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreateFlowPackParameters(object):
34+
35+
def __init__(self, regionId, instanceId, ):
36+
"""
37+
:param regionId: 地域ID
38+
:param instanceId: 实例ID
39+
"""
40+
41+
self.regionId = regionId
42+
self.instanceId = instanceId
43+
self.flowPackNum = None
44+
self.returnUrl = None
45+
46+
def setFlowPackNum(self, flowPackNum):
47+
"""
48+
:param flowPackNum: (Optional) 流量包数量
49+
"""
50+
self.flowPackNum = flowPackNum
51+
52+
def setReturnUrl(self, returnUrl):
53+
"""
54+
:param returnUrl: (Optional) 支付成功返回路径
55+
"""
56+
self.returnUrl = returnUrl
57+

jdcloud_sdk/services/starshield/apis/CreateInstanceRequest.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,26 @@ def __init__(self, regionId, ):
5151
def setChargeMode(self, chargeMode):
5252
"""
5353
:param chargeMode: (Optional) 计费模式(CONFIG、FLOW、MONTHLY、ONCE)
54+
CONFIG 按配置
55+
FLOW 按用量
56+
MONTHLY 包年包月
57+
ONCE 一次性
58+
5459
"""
5560
self.chargeMode = chargeMode
5661

5762
def setPackType(self, packType):
5863
"""
59-
:param packType: (Optional) 套餐类型(FREE、BASIC、PROFESSIONAL、ENTERPRISE、ULTIMATE、SMB_BASIC、SMB_BUSINESS)
64+
:param packType: (Optional) 套餐类型(BASIC、PROFESSIONAL、ENTERPRISE、ULTIMATE、SMB_EXPERIENCE、SMB_BASIC、SMB_BUSINESS)
65+
BASIC 包年包月 基础版
66+
PROFESSIONAL 包年包月 专业版
67+
ENTERPRISE 包年包月 企业版
68+
ULTIMATE 包年包月 旗舰版
69+
--------------------------
70+
SMB_EXPERIENCE 按流量 体验版
71+
SMB_BASIC 按流量 基础版
72+
SMB_BUSINESS 按流量 商业版
73+
6074
"""
6175
self.packType = packType
6276

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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 CreatePageRuleRequest(JDCloudRequest):
23+
"""
24+
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(CreatePageRuleRequest, self).__init__(
29+
'/zones/{zone_identifier}/pagerules', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreatePageRuleParameters(object):
34+
35+
def __init__(self, zone_identifier, ):
36+
"""
37+
:param zone_identifier:
38+
"""
39+
40+
self.zone_identifier = zone_identifier
41+
self.targets = None
42+
self.actions = None
43+
self.priority = None
44+
self.status = None
45+
46+
def setTargets(self, targets):
47+
"""
48+
:param targets: (Optional) 根据请求评估的目标
49+
"""
50+
self.targets = targets
51+
52+
def setActions(self, actions):
53+
"""
54+
:param actions: (Optional) 如果此规则的目标与请求匹配,则要执行的操作集。操作可以将url重定向到另一个url或覆盖设置(但不能同时覆盖两者)
55+
"""
56+
self.actions = actions
57+
58+
def setPriority(self, priority):
59+
"""
60+
:param priority: (Optional) 一个数字,表示一个页面规则优先于另一个页面规则。
61+
如果您可能有一个全面的页面规则(例如#1 “/images/”)
62+
但是想要更具体的规则优先(例如#2 '/images/special/'),
63+
您需要在后者(#2)上指定更高的优先级,以便它将覆盖第一个优先级。
64+
65+
"""
66+
self.priority = priority
67+
68+
def setStatus(self, status):
69+
"""
70+
:param status: (Optional) 页面规则的状态
71+
"""
72+
self.status = status
73+

0 commit comments

Comments
 (0)