Skip to main content
Resource Center/Network Service/Network Service Operations/VPC Firewall Operations

CreateFirewallRuleSet

CreateFirewallRuleSet

POST/zstack/v1/vpcfirewalls/ruleSets

Operation ID

CreateFirewallRuleSet

Since

3.6.0

Execution Mode

Synchronous

Auth Context

Auth Required

Auth Context

Send these values as request headers when calling this API.

AuthorizationstringRequired

Bearer Token

X-Tenant-IDstring

X-Tenant-ID

Request Inputs

application/json

Body Fields

  • params
    ObjectRequired

    Request body parameter object.

    • name
      StringRequired

      The ruleset name.

    • actionType
      String

      Optional. The action taken against data packets.

    • description
      String

      Optional. The detailed description of the ruleset.

    • resourceUuid
      String

      Optional. The ruleset UUID.

    • tagUuids
      List

      Optional. The tag UUIDs.

  • systemTags
    List

    Optional. The system tags.

  • userTags
    List

    Optional. The user tags.

Responses

200 OK
200 OK

On success, this API returns the following response structure.

  • error
    ErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • code
      StringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • description
      StringRequired

      The brief description of the error.

    • details
      StringRequired

      The details about the error.

    • elaboration
      StringRequired

      The reserved field. Default value: null.

    • opaque
      LinkedHashMapRequired

      The reserved field. Default value: null.

    • cause
      ErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • inventory
    VpcFirewallRuleSetInventoryRequired

    See inventory.

    • uuid
      StringRequired

      The resource UUID.

    • name
      StringRequired

      The resource name.

    • description
      StringRequired

      The detailed description of the resource.

    • isDefault
      booleanRequired

      Whether the resource is default.

    • isApplied
      booleanRequired

      Indicates whether the ruleset is applied.

    • createDate
      TimestampRequired

      The creation date.

    • lastOpDate
      TimestampRequired

      The last operation date.

    • actionType
      ActionTypeRequired

      See actionType.

      • drop
        ActionTypeRequired

        The drop.

      • reject
        ActionTypeRequired

        The reject.

      • accept
        ActionTypeRequired

        The accept.

    • rules
      ListRequired

      See rules.

      • uuid
        StringRequired

        The firewall rule UUID.

      • ruleSetUuid
        StringRequired

        The ruleset UUID.

      • destPort
        StringRequired

        The destination port.

      • sourcePort
        StringRequired

        The source port.

      • sourceIp
        StringRequired

        The source IP address.

      • destIp
        StringRequired

        The destination IP address.

      • ruleNumber
        IntegerRequired

        The priority of the rule.

      • allowStates
        StringRequired

        The allow status of data packets.

      • tcpFlag
        StringRequired

        The TCP flag.

      • icmpTypeName
        StringRequired

        The ICMP type.

      • isApplied
        booleanRequired

        Indicates whether the rule is applied.

      • expired
        booleanRequired

        Indicates whether the rule is expired.

      • isDefault
        booleanRequired

        Indicates whether the rule is a system rule.

      • description
        StringRequired

        The detailed description of the rule.

      • createDate
        TimestampRequired

        The time when the rule was created.

      • lastOpDate
        TimestampRequired

        The time when the rule was last modified.

      • action
        ActionTypeRequired

        See action.

        • drop
          ActionTypeRequired

          The drop.

        • reject
          ActionTypeRequired

          The reject.

        • accept
          ActionTypeRequired

          The accept.

      • protocol
        ProtocolTypeRequired

        See protocol.

        • tcp_udp
          ProtocolTypeRequired

          The tcp udp.

        • all
          ProtocolTypeRequired

          The all.

        • ah
          ProtocolTypeRequired

          The ah.

        • ax.25
          ProtocolTypeRequired

          The ax 25.

        • dccp
          ProtocolTypeRequired

          The dccp.

        • ddp
          ProtocolTypeRequired

          The ddp.

        • egp
          ProtocolTypeRequired

          The egp.

        • eigrp
          ProtocolTypeRequired

          The eigrp.

        • encap
          ProtocolTypeRequired

          The encap.

        • esp
          ProtocolTypeRequired

          The esp.

        • etherip
          ProtocolTypeRequired

          The etherip.

        • fc
          ProtocolTypeRequired

          The fc.

        • ggp
          ProtocolTypeRequired

          The ggp.

        • gre
          ProtocolTypeRequired

          The gre.

        • hip
          ProtocolTypeRequired

          The hip.

        • hmp
          ProtocolTypeRequired

          The hmp.

        • icmp
          ProtocolTypeRequired

          The icmp.

        • ipdr-cmtp
          ProtocolTypeRequired

          The ipdr cmtp.

        • idpr
          ProtocolTypeRequired

          The idpr.

        • igmp
          ProtocolTypeRequired

          The igmp.

        • igp
          ProtocolTypeRequired

          The igp.

        • ip
          ProtocolTypeRequired

          The IP address.

        • ipcomp
          ProtocolTypeRequired

          The ipcomp.

        • ipencap
          ProtocolTypeRequired

          The ipencap.

        • ipip
          ProtocolTypeRequired

          The ipip.

        • isis
          ProtocolTypeRequired

          The isis.

        • iso-tp4
          ProtocolTypeRequired

          The ISO tp 4.

        • l2tp
          ProtocolTypeRequired

          The L2 tp.

        • manet
          ProtocolTypeRequired

          The manet.

        • mpls-in-ip
          ProtocolTypeRequired

          The mpls in IP.

        • ospf
          ProtocolTypeRequired

          The ospf.

        • pim
          ProtocolTypeRequired

          The pim.

        • pup
          ProtocolTypeRequired

          The pup.

        • rdp
          ProtocolTypeRequired

          The rdp.

        • rohc
          ProtocolTypeRequired

          The rohc.

        • rspf
          ProtocolTypeRequired

          The rspf.

        • rsvp
          ProtocolTypeRequired

          The rsvp.

        • sctp
          ProtocolTypeRequired

          The sctp.

        • skip
          ProtocolTypeRequired

          The skip.

        • st
          ProtocolTypeRequired

          The st.

        • tcp
          ProtocolTypeRequired

          The tcp.

        • udp
          ProtocolTypeRequired

          The udp.

        • udplite
          ProtocolTypeRequired

          The udplite.

        • vmtp
          ProtocolTypeRequired

          The vmtp.

        • vrrp
          ProtocolTypeRequired

          The vrrp.

        • wesp
          ProtocolTypeRequired

          The wesp.

        • xns-idp
          ProtocolTypeRequired

          The xns idp.

        • xtp
          ProtocolTypeRequired

          The xtp.

      • state
        FirewallRuleStateRequired

        See state.

        • disable
          FirewallRuleStateRequired

          Whether the feature is disabled.

        • enable
          FirewallRuleStateRequired

          Whether the feature is enabled.