Class SecurityGroupRulePatch

  • All Implemented Interfaces:
    com.ibm.cloud.sdk.core.service.model.ObjectModel

    public class SecurityGroupRulePatch
    extends com.ibm.cloud.sdk.core.service.model.GenericModel
    SecurityGroupRulePatch.
    • Method Detail

      • code

        public Long code()
        Gets the code. The ICMP traffic code to allow. If set, `type` must also be set. Specify `null` to remove an existing ICMP traffic code.
        Returns:
        the code
      • direction

        public String direction()
        Gets the direction. The direction of traffic to allow.
        Returns:
        the direction
      • ipVersion

        public String ipVersion()
        Gets the ipVersion. The IP version to allow. The format of `local.address`, `remote.address`, `local.cidr_block` or `remote.cidr_block` must match this property, if they are used. If `remote` references a security group, then this rule only applies to IP addresses in that group matching this IP version.
        Returns:
        the ipVersion
      • local

        public SecurityGroupRuleLocalPatch local()
        Gets the local. The local IP address or range of local IP addresses to which this rule will allow inbound traffic (or from which, for outbound traffic). Can be specified as an IP address or a CIDR block. Specify a CIDR block of `0.0.0.0/0` to allow traffic to all local IP addresses (or from all local IP addresses, for outbound rules).
        Returns:
        the local
      • portMax

        public Long portMax()
        Gets the portMax. The inclusive upper bound of the protocol destination port range. If set, `port_min` must also be set, and must not be larger. Specify `null` to remove an existing upper bound.
        Returns:
        the portMax
      • portMin

        public Long portMin()
        Gets the portMin. The inclusive lower bound of the protocol destination port range. If set, `port_max` must also be set, and must not be smaller. Specify `null` to remove an existing lower bound.
        Returns:
        the portMin
      • remote

        public SecurityGroupRuleRemotePatch remote()
        Gets the remote. The remote IP addresses or security groups from which this rule will allow traffic (or to which, for outbound rules). Can be specified as an IP address, a CIDR block, or a security group. A CIDR block of `0.0.0.0/0` will allow traffic from any source (or to any destination, for outbound rules).
        Returns:
        the remote
      • type

        public Long type()
        Gets the type. The ICMP traffic type to allow. Specify `null` to remove an existing ICMP traffic type value.
        Returns:
        the type
      • asPatch

        public Map<String,​Object> asPatch()
        Construct a JSON merge-patch from the SecurityGroupRulePatch. Note that properties of the SecurityGroupRulePatch with null values are not represented in the constructed JSON merge-patch object, but can be explicitly set afterward to signify a property delete.
        Returns:
        a JSON merge-patch for the SecurityGroupRulePatch