Package com.ibm.cloud.is.vpc.v1.model
Class SecurityGroupRulePatch
- java.lang.Object
-
- com.ibm.cloud.sdk.core.service.model.GenericModel
-
- com.ibm.cloud.is.vpc.v1.model.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SecurityGroupRulePatch.Builder
Builder.static interface
SecurityGroupRulePatch.Direction
The direction of traffic to allow.static interface
SecurityGroupRulePatch.IpVersion
The IP version to allow.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
asPatch()
Construct a JSON merge-patch from the SecurityGroupRulePatch.Long
code()
Gets the code.String
direction()
Gets the direction.String
ipVersion()
Gets the ipVersion.SecurityGroupRuleLocalPatch
local()
Gets the local.SecurityGroupRulePatch.Builder
newBuilder()
New builder.Long
portMax()
Gets the portMax.Long
portMin()
Gets the portMin.SecurityGroupRuleRemotePatch
remote()
Gets the remote.Long
type()
Gets the type.
-
-
-
Method Detail
-
newBuilder
public SecurityGroupRulePatch.Builder newBuilder()
New builder.- Returns:
- a SecurityGroupRulePatch builder
-
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
-
-