You need to enable JavaScript to run this app.
边缘计算节点

边缘计算节点

复制全文
外网防火墙
新增防火墙规则
复制全文
新增防火墙规则

本接口用于新增外网防火墙的出方向或入方向规则。
关于外网防火墙及规则的介绍,请参见外网防火墙概述

请求说明

  • 请求方式:POST
  • 请求地址:https://veenedge.volcengineapi.com/?Action=CreateSecurityGroupRules&Version=2021-04-30

请求参数

下表列出了接口特定的请求参数以及公共请求参数 Action 和 Version。 其他公共参数,请参见公共参数

Query

参数
类型
是否必选
示例值
描述
Action
String
CreateSecurityGroupRules
接口名称。当前 API 的名称为 CreateSecurityGroupRules
Version
String
2021-04-30
接口版本。当前 API 的版本为 2021-04-30

Body

参数
类型
是否必选
示例值
描述
group_identity
String
veew-sg-2551200256591525****
外网防火墙的 ID。您可以通过 DescribeSecurityGroups 接口查询外网防火墙的 ID。
rules
Object[]
-
规则列表。

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结果

参数
类型
示例值
描述
rules
Object[]
-
规则列表。

请求示例

POST https://veenedge.volcengineapi.com/?Action=CreateSecurityGroupRules&Version=2021-04-30
&<其他公共参数>
{
  "group_identity": "veew-sg-925050555151820****",
  "rules": [
    {
      "direction": "ingress",
      "ip_cidr": "0.0.0.0/0",
      "ports": "22,3389",
      "protocol": "TCP",
      "remark": "test"
    }
  ]
}

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202305191742201735834D64E1F175****",
        "Action": "CreateSecurityGroupRules",
        "Version": "2021-04-30",
        "Service": "veenedge",
        "Region": "cn-north-1"
    },
    "Result": {
        "rules": [
            {
                "rule_identity": "veew-sgr-5111222930090332****",
                "direction": "ingress",
                "rule": "allow",
                "protocol": "TCP",
                "ports": "22,3389",
                "ip_type": "ipv4",
                "ip_cidr": "0.0.0.0/0",
                "remark": "test",
                "group_identity": "veew-sg-925050555151820****",
                "status": 1,
                "create_time": 1684489341,
                "update_time": 1684489341
            }
        ]
    }
}

错误码

如果响应正文中包含 Error 字段,则表示 API 请求失败。关于错误码的更多信息,参见错误码

最近更新时间:2025.12.09 14:44:59
这个页面对您有帮助吗?
有用
有用
无用
无用