虚拟私有云 VPC-批量创建安全组规则:请求示例

时间:2024-09-14 15:40:20

请求示例

在安全组15457509-18f9-4387-bae6-d4ed1898b301中创建入方向规则,忽略重复规则,两条规则相同。

POST https://{Endpoint}/v3/{project_id}/vpc/security-groups/15457509-18f9-4387-bae6-d4ed1898b301/security-group-rules/batch-create

{
  "ignore_duplicate" : true,
  "security_group_rules" : [ {
    "direction" : "ingress",
    "description" : "",
    "protocol" : "tcp",
    "action" : "allow",
    "priority" : 1,
    "ethertype" : "IPv4",
    "multiport" : "22",
    "remote_ip_prefix" : "117.78.12.122/32"
  }, {
    "direction" : "ingress",
    "description" : "",
    "protocol" : "tcp",
    "action" : "allow",
    "priority" : 1,
    "ethertype" : "IPv4",
    "multiport" : "22",
    "remote_ip_prefix" : "117.78.12.122/32"
  } ]
}
support.huaweicloud.com/api-vpc/BatchCreateSecurityGroupRules.html