跳转到主要内容
资源中心/网络服务/网络服务相关接口/安全组相关接口

更新安全组

更新安全组

PUT/zstack/v1/security-groups/{uuid}/actions

操作 ID

UpdateSecurityGroup

起始版本

0.6

执行模式

同步

认证信息

需要认证

认证信息

调用该 API 时需要在请求头中携带以下认证信息。

Authorizationstring必填

Bearer 令牌

X-Tenant-IDstring

X-Tenant-ID

请求参数

application/json

路径参数

  • uuid
    String必填

    资源的UUID,唯一标示该资源

请求体字段

  • name
    String

    资源名称

  • description
    String

    资源的详细描述

  • systemTags
    List

    系统标签

  • userTags
    List

    用户标签

响应状态

200 OK
200 OK

该 API 成功时返回以下响应结构。

  • error
    ErrorCode必填

    错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error

    • code
      String必填

      错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001

    • description
      String必填

      错误的概要描述

    • details
      String必填

      错误的详细信息

    • elaboration
      String必填

      保留字段,默认为null

    • opaque
      LinkedHashMap必填

      保留字段,默认为null

    • cause
      ErrorCode必填

      根错误,引发当前错误的源错误,若无原错误,该字段为null

  • inventory
    SecurityGroupInventory必填

    详情参考inventory

    • uuid
      String必填

      资源的UUID,唯一标示该资源

    • name
      String必填

      资源名称

    • description
      String必填

      资源的详细描述

    • state
      String必填

      当前状态。

    • createDate
      Timestamp必填

      创建时间

    • lastOpDate
      Timestamp必填

      最后一次修改时间

    • attachedL3NetworkUuids
      Set必填

      暂无描述。

    • rules
      List必填

      详情参考rules

      • uuid
        String必填

        资源的UUID,唯一标示该资源

      • securityGroupUuid
        String必填

        安全组UUID

      • type
        String必填

        流量类型

      • startPort
        Integer必填

        如果协议是TCP/UDP, 它是端口范围(port range)的起始端口号; 如果协议是ICMP, 它是ICMP类型(type)

      • endPort
        Integer必填

        如果协议是TCP/UDP, 它是端口范围(port range)的起始端口号; 如果协议是ICMP, 它是ICMP类型(type)

      • protocol
        String必填

        流量协议类型

      • state
        String必填

        规则的可用状态, 当前版本未实现

      • allowedCidr
        String必填

        允许的CIDR,根据流量类型的不同, 允许的CIDR有不同的含义,如果流量类型是Ingress, 允许的CIDR是允许访问虚拟机网卡的源CIDR,如果流量类型是Egress, 允许的CIDR是允许从虚拟机网卡离开并到达的目的地CIDR

      • createDate
        Timestamp必填

        创建时间

      • lastOpDate
        Timestamp必填

        最后一次修改时间