@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class SecurityGroupRule extends Object implements Serializable, Cloneable
Describes a security group rule.
Constructor and Description |
---|
SecurityGroupRule() |
Modifier and Type | Method and Description |
---|---|
SecurityGroupRule |
clone() |
boolean |
equals(Object obj) |
String |
getCidrIpv4()
The IPv4 CIDR range.
|
String |
getCidrIpv6()
The IPv6 CIDR range.
|
String |
getDescription()
The security group rule description.
|
Integer |
getFromPort()
If the protocol is TCP or UDP, this is the start of the port range.
|
String |
getGroupId()
The ID of the security group.
|
String |
getGroupOwnerId()
The ID of the Amazon Web Services account that owns the security group.
|
String |
getIpProtocol()
|
Boolean |
getIsEgress()
Indicates whether the security group rule is an outbound rule.
|
String |
getPrefixListId()
The ID of the prefix list.
|
ReferencedSecurityGroup |
getReferencedGroupInfo()
Describes the security group that is referenced in the rule.
|
String |
getSecurityGroupRuleId()
The ID of the security group rule.
|
List<Tag> |
getTags()
The tags applied to the security group rule.
|
Integer |
getToPort()
If the protocol is TCP or UDP, this is the end of the port range.
|
int |
hashCode() |
Boolean |
isEgress()
Indicates whether the security group rule is an outbound rule.
|
void |
setCidrIpv4(String cidrIpv4)
The IPv4 CIDR range.
|
void |
setCidrIpv6(String cidrIpv6)
The IPv6 CIDR range.
|
void |
setDescription(String description)
The security group rule description.
|
void |
setFromPort(Integer fromPort)
If the protocol is TCP or UDP, this is the start of the port range.
|
void |
setGroupId(String groupId)
The ID of the security group.
|
void |
setGroupOwnerId(String groupOwnerId)
The ID of the Amazon Web Services account that owns the security group.
|
void |
setIpProtocol(String ipProtocol)
|
void |
setIsEgress(Boolean isEgress)
Indicates whether the security group rule is an outbound rule.
|
void |
setPrefixListId(String prefixListId)
The ID of the prefix list.
|
void |
setReferencedGroupInfo(ReferencedSecurityGroup referencedGroupInfo)
Describes the security group that is referenced in the rule.
|
void |
setSecurityGroupRuleId(String securityGroupRuleId)
The ID of the security group rule.
|
void |
setTags(Collection<Tag> tags)
The tags applied to the security group rule.
|
void |
setToPort(Integer toPort)
If the protocol is TCP or UDP, this is the end of the port range.
|
String |
toString()
Returns a string representation of this object.
|
SecurityGroupRule |
withCidrIpv4(String cidrIpv4)
The IPv4 CIDR range.
|
SecurityGroupRule |
withCidrIpv6(String cidrIpv6)
The IPv6 CIDR range.
|
SecurityGroupRule |
withDescription(String description)
The security group rule description.
|
SecurityGroupRule |
withFromPort(Integer fromPort)
If the protocol is TCP or UDP, this is the start of the port range.
|
SecurityGroupRule |
withGroupId(String groupId)
The ID of the security group.
|
SecurityGroupRule |
withGroupOwnerId(String groupOwnerId)
The ID of the Amazon Web Services account that owns the security group.
|
SecurityGroupRule |
withIpProtocol(String ipProtocol)
|
SecurityGroupRule |
withIsEgress(Boolean isEgress)
Indicates whether the security group rule is an outbound rule.
|
SecurityGroupRule |
withPrefixListId(String prefixListId)
The ID of the prefix list.
|
SecurityGroupRule |
withReferencedGroupInfo(ReferencedSecurityGroup referencedGroupInfo)
Describes the security group that is referenced in the rule.
|
SecurityGroupRule |
withSecurityGroupRuleId(String securityGroupRuleId)
The ID of the security group rule.
|
SecurityGroupRule |
withTags(Collection<Tag> tags)
The tags applied to the security group rule.
|
SecurityGroupRule |
withTags(Tag... tags)
The tags applied to the security group rule.
|
SecurityGroupRule |
withToPort(Integer toPort)
If the protocol is TCP or UDP, this is the end of the port range.
|
public void setSecurityGroupRuleId(String securityGroupRuleId)
The ID of the security group rule.
securityGroupRuleId
- The ID of the security group rule.public String getSecurityGroupRuleId()
The ID of the security group rule.
public SecurityGroupRule withSecurityGroupRuleId(String securityGroupRuleId)
The ID of the security group rule.
securityGroupRuleId
- The ID of the security group rule.public void setGroupId(String groupId)
The ID of the security group.
groupId
- The ID of the security group.public String getGroupId()
The ID of the security group.
public SecurityGroupRule withGroupId(String groupId)
The ID of the security group.
groupId
- The ID of the security group.public void setGroupOwnerId(String groupOwnerId)
The ID of the Amazon Web Services account that owns the security group.
groupOwnerId
- The ID of the Amazon Web Services account that owns the security group.public String getGroupOwnerId()
The ID of the Amazon Web Services account that owns the security group.
public SecurityGroupRule withGroupOwnerId(String groupOwnerId)
The ID of the Amazon Web Services account that owns the security group.
groupOwnerId
- The ID of the Amazon Web Services account that owns the security group.public void setIsEgress(Boolean isEgress)
Indicates whether the security group rule is an outbound rule.
isEgress
- Indicates whether the security group rule is an outbound rule.public Boolean getIsEgress()
Indicates whether the security group rule is an outbound rule.
public SecurityGroupRule withIsEgress(Boolean isEgress)
Indicates whether the security group rule is an outbound rule.
isEgress
- Indicates whether the security group rule is an outbound rule.public Boolean isEgress()
Indicates whether the security group rule is an outbound rule.
public void setIpProtocol(String ipProtocol)
The IP protocol name (tcp
, udp
, icmp
, icmpv6
) or number (see
Protocol Numbers).
Use -1
to specify all protocols.
ipProtocol
- The IP protocol name (tcp
, udp
, icmp
, icmpv6
) or
number (see Protocol
Numbers).
Use -1
to specify all protocols.
public String getIpProtocol()
The IP protocol name (tcp
, udp
, icmp
, icmpv6
) or number (see
Protocol Numbers).
Use -1
to specify all protocols.
tcp
, udp
, icmp
, icmpv6
) or
number (see Protocol
Numbers).
Use -1
to specify all protocols.
public SecurityGroupRule withIpProtocol(String ipProtocol)
The IP protocol name (tcp
, udp
, icmp
, icmpv6
) or number (see
Protocol Numbers).
Use -1
to specify all protocols.
ipProtocol
- The IP protocol name (tcp
, udp
, icmp
, icmpv6
) or
number (see Protocol
Numbers).
Use -1
to specify all protocols.
public void setFromPort(Integer fromPort)
If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP type or -1 (all ICMP types).
fromPort
- If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6,
this is the ICMP type or -1 (all ICMP types).public Integer getFromPort()
If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP type or -1 (all ICMP types).
public SecurityGroupRule withFromPort(Integer fromPort)
If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP type or -1 (all ICMP types).
fromPort
- If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6,
this is the ICMP type or -1 (all ICMP types).public void setToPort(Integer toPort)
If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP codes).
toPort
- If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this
is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must
be -1 (all ICMP codes).public Integer getToPort()
If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP codes).
public SecurityGroupRule withToPort(Integer toPort)
If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP codes).
toPort
- If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this
is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must
be -1 (all ICMP codes).public void setCidrIpv4(String cidrIpv4)
The IPv4 CIDR range.
cidrIpv4
- The IPv4 CIDR range.public String getCidrIpv4()
The IPv4 CIDR range.
public SecurityGroupRule withCidrIpv4(String cidrIpv4)
The IPv4 CIDR range.
cidrIpv4
- The IPv4 CIDR range.public void setCidrIpv6(String cidrIpv6)
The IPv6 CIDR range.
cidrIpv6
- The IPv6 CIDR range.public String getCidrIpv6()
The IPv6 CIDR range.
public SecurityGroupRule withCidrIpv6(String cidrIpv6)
The IPv6 CIDR range.
cidrIpv6
- The IPv6 CIDR range.public void setPrefixListId(String prefixListId)
The ID of the prefix list.
prefixListId
- The ID of the prefix list.public String getPrefixListId()
The ID of the prefix list.
public SecurityGroupRule withPrefixListId(String prefixListId)
The ID of the prefix list.
prefixListId
- The ID of the prefix list.public void setReferencedGroupInfo(ReferencedSecurityGroup referencedGroupInfo)
Describes the security group that is referenced in the rule.
referencedGroupInfo
- Describes the security group that is referenced in the rule.public ReferencedSecurityGroup getReferencedGroupInfo()
Describes the security group that is referenced in the rule.
public SecurityGroupRule withReferencedGroupInfo(ReferencedSecurityGroup referencedGroupInfo)
Describes the security group that is referenced in the rule.
referencedGroupInfo
- Describes the security group that is referenced in the rule.public void setDescription(String description)
The security group rule description.
description
- The security group rule description.public String getDescription()
The security group rule description.
public SecurityGroupRule withDescription(String description)
The security group rule description.
description
- The security group rule description.public List<Tag> getTags()
The tags applied to the security group rule.
public void setTags(Collection<Tag> tags)
The tags applied to the security group rule.
tags
- The tags applied to the security group rule.public SecurityGroupRule withTags(Tag... tags)
The tags applied to the security group rule.
NOTE: This method appends the values to the existing list (if any). Use
setTags(java.util.Collection)
or withTags(java.util.Collection)
if you want to override the
existing values.
tags
- The tags applied to the security group rule.public SecurityGroupRule withTags(Collection<Tag> tags)
The tags applied to the security group rule.
tags
- The tags applied to the security group rule.public String toString()
toString
in class Object
Object.toString()
public SecurityGroupRule clone()