# coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# NOTE: This class is auto generated by the jdcloud code generator program.
[docs]class ForwardRule(object):
def __init__(self, id=None, instanceId=None, protocol=None, cname=None, originType=None, serviceIp=None, serviceIpConfig=None, port=None, algorithm=None, originAddr=None, onlineAddr=None, originDomain=None, originPort=None, status=None):
"""
:param id: (Optional) 规则 Id
:param instanceId: (Optional) 实例 Id
:param protocol: (Optional) TCP 或 UDP
:param cname: (Optional) 规则的 CNAME
:param originType: (Optional) 回源类型: ip 或者 domain
:param serviceIp: (Optional) 该规则使用中的高防 IP
:param serviceIpConfig: (Optional) 已配置的高防 IP 列表
:param port: (Optional) 端口号
:param algorithm: (Optional) 转发规则. <br>- wrr: 带权重的轮询<br>- rr: 不带权重的轮询<br>- sh: 源地址hash
:param originAddr: (Optional)
:param onlineAddr: (Optional) 备用的回源地址列表
:param originDomain: (Optional) 回源域名
:param originPort: (Optional) 回源端口号
:param status: (Optional) 0: 防御状态<br>1: 回源状态
"""
self.id = id
self.instanceId = instanceId
self.protocol = protocol
self.cname = cname
self.originType = originType
self.serviceIp = serviceIp
self.serviceIpConfig = serviceIpConfig
self.port = port
self.algorithm = algorithm
self.originAddr = originAddr
self.onlineAddr = onlineAddr
self.originDomain = originDomain
self.originPort = originPort
self.status = status