URI
POST https://ecpc-[regionCode].ctapi.ctyun.cn/v2/aclRule/modify
请求体
名称 | 类型 | 必填 | 描述 |
---|---|---|---|
aclOid | string | 是 | 被修改规则所属ACL ID |
aclRuleOid | string | 是 | ACL规则ID |
name | string | 是 | ACL规则名称,只能包含英文字母、数字、下划线、中划线,长度限制1-16个字符 |
type | string | 是 | 类型(ipv4-IPv4;ipv6-IPv6) |
strategy | string | 是 | 策略(allow-允许;deny-拒绝) |
protocol | string | 是 | 协议(tcp-TCP协议;udp-UDP协议;all-全部协议;icmpv4-ICMPv4协议;icmpv6-ICMPv6协议) |
sourceAddress | string | 否 | 此方向允许的源地址。当前支持形式:IP地址段。type为ipv4时,默认值为0.0.0.0/0;type为ipv6时,默认值为::/0,代表支持所有的IP地址 |
destinationAddress | string | 否 | 此方向允许的目的地址。当前支持形式:IP地址段。type为ipv4时,默认值为0.0.0.0/0;type为ipv6时,默认值为::/0,代表支持所有的IP地址 |
sourcePort | string | 否 | 源端口范围,选择TCP或UDP协议时必须填写,取值范围是1-65535的数字。 表示单个端口时,指定端口号。 表示某一范围时,两个数字以:分隔(例如,1:100);若为空,则表示全部端口(1-65535) |
destinationPort | string | 否 | 目的端口范围,选择TCP或UDP协议时必须填写,取值范围是1-65535的数字。 表示单个端口时,指定端口号。 表示某一范围时,两个数字以:分隔(例如,1:100);若为空,则表示全部端口(1-65535) |
description | string | 是 | 描述,字符数限制[0,100] |
返回结果
名称 | 类型 | 描述 |
---|---|---|
code | int | 状态码 |
msg | string | 返回消息(如有必要) |
示例
请求示例
POST https://ecpc-[regionCode].ctapi.ctyun.cn/v2/aclRule/modify
{
"aclOid":"acl-xxx",
"aclRuleOid":"arl-xxx",
"name":"abc-sFWIBU2j",
"type":"ipv4",
"strategy":"deny",
"protocol":"tcp",
"sourceAddress":null,
"destinationAddress":null,
"sourcePort":null,
"destinationPort":null,
"description":"decs-13HxaUIk"
}
正常返回示例
{
"code":0
}