跳到主要内容

修改防火牆規則

描述​

修改防火牆規則資訊。

請求引數​

引數名引數型別是否必填引數說明
ActionString是操作方法:ModifyFirewallRuleAttributes
RegionString是機房標識,取值參見地域列表
IdString是防火牆規則標識
NameString否名稱
DirectionString是方向:
  • ingress
  • egress
  • PortStartString否起始埠,TCP、UPD、ICMP協議時必傳,其他協議不能傳此引數
    PortEndString否結束埠,TCP、UPD、ICMP協議時必傳,其他協議不能傳此引數
    ProtocolString是協議:
  • TCP
  • UDP
  • ICMP
  • GRE
  • ESP
  • AH
  • IPIP
  • ALL(所有協議)
  • PriorityString否優先順序
    RemoteIpPrefixString是允許的IP地址範圍,允許所有傳0.0.0.0/0
    EnabledBoolean是是否啟用

    返回引數​

    名稱型別說明
    ActionString執行的操作
    TaskIdString請求標識

    請求示例​

    https://api.yunpanel.com/v2/?Action=ModifyFirewallRuleAttributes
    &Region=cn-wuxi1
    &Id=fr-sddc
    &Name=ssss
    &<公共請求引數>

    返回示例​

    {
    "code": 10000,
    "message": "",
    "data": {
    "TaskId": "bb112c20170506133720502",
    "Action": "ModifyFirewallRuleAttributes"
    }
    }