Class IpPermission
- All Implemented Interfaces:
Serializable
,Cloneable
Describes a security group rule.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
The start of port range for the TCP and UDP protocols, or an ICMP type number.One or more IP ranges.(Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service.The end of port range for the TCP and UDP protocols, or an ICMP code.One or more security group and AWS account ID pairs.int
hashCode()
void
setFromPort
(Integer fromPort) The start of port range for the TCP and UDP protocols, or an ICMP type number.void
setIpProtocol
(String ipProtocol) void
setIpRanges
(Collection<String> ipRanges) One or more IP ranges.void
setPrefixListIds
(Collection<PrefixListId> prefixListIds) (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service.void
The end of port range for the TCP and UDP protocols, or an ICMP code.void
setUserIdGroupPairs
(Collection<UserIdGroupPair> userIdGroupPairs) One or more security group and AWS account ID pairs.toString()
Returns a string representation of this object; useful for testing and debugging.withFromPort
(Integer fromPort) The start of port range for the TCP and UDP protocols, or an ICMP type number.withIpProtocol
(String ipProtocol) withIpRanges
(String... ipRanges) One or more IP ranges.withIpRanges
(Collection<String> ipRanges) One or more IP ranges.withPrefixListIds
(PrefixListId... prefixListIds) (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service.withPrefixListIds
(Collection<PrefixListId> prefixListIds) (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service.withToPort
(Integer toPort) The end of port range for the TCP and UDP protocols, or an ICMP code.withUserIdGroupPairs
(UserIdGroupPair... userIdGroupPairs) One or more security group and AWS account ID pairs.withUserIdGroupPairs
(Collection<UserIdGroupPair> userIdGroupPairs) One or more security group and AWS account ID pairs.
-
Constructor Details
-
IpPermission
public IpPermission()
-
-
Method Details
-
setIpProtocol
The IP protocol name (for
tcp
,udp
, andicmp
) or number (see Protocol Numbers).[EC2-VPC only] When you authorize or revoke security group rules, you can use
-1
to specify all.- Parameters:
ipProtocol
- The IP protocol name (fortcp
,udp
, andicmp
) or number (see Protocol Numbers).[EC2-VPC only] When you authorize or revoke security group rules, you can use
-1
to specify all.
-
getIpProtocol
The IP protocol name (for
tcp
,udp
, andicmp
) or number (see Protocol Numbers).[EC2-VPC only] When you authorize or revoke security group rules, you can use
-1
to specify all.- Returns:
- The IP protocol name (for
tcp
,udp
, andicmp
) or number (see Protocol Numbers).[EC2-VPC only] When you authorize or revoke security group rules, you can use
-1
to specify all.
-
withIpProtocol
The IP protocol name (for
tcp
,udp
, andicmp
) or number (see Protocol Numbers).[EC2-VPC only] When you authorize or revoke security group rules, you can use
-1
to specify all.- Parameters:
ipProtocol
- The IP protocol name (fortcp
,udp
, andicmp
) or number (see Protocol Numbers).[EC2-VPC only] When you authorize or revoke security group rules, you can use
-1
to specify all.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setFromPort
The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of
-1
indicates all ICMP types.- Parameters:
fromPort
- The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of-1
indicates all ICMP types.
-
getFromPort
The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of
-1
indicates all ICMP types.- Returns:
- The start of port range for the TCP and UDP protocols, or an ICMP
type number. A value of
-1
indicates all ICMP types.
-
withFromPort
The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of
-1
indicates all ICMP types.- Parameters:
fromPort
- The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of-1
indicates all ICMP types.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setToPort
The end of port range for the TCP and UDP protocols, or an ICMP code. A value of
-1
indicates all ICMP codes for the specified ICMP type.- Parameters:
toPort
- The end of port range for the TCP and UDP protocols, or an ICMP code. A value of-1
indicates all ICMP codes for the specified ICMP type.
-
getToPort
The end of port range for the TCP and UDP protocols, or an ICMP code. A value of
-1
indicates all ICMP codes for the specified ICMP type.- Returns:
- The end of port range for the TCP and UDP protocols, or an ICMP
code. A value of
-1
indicates all ICMP codes for the specified ICMP type.
-
withToPort
The end of port range for the TCP and UDP protocols, or an ICMP code. A value of
-1
indicates all ICMP codes for the specified ICMP type.- Parameters:
toPort
- The end of port range for the TCP and UDP protocols, or an ICMP code. A value of-1
indicates all ICMP codes for the specified ICMP type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getUserIdGroupPairs
One or more security group and AWS account ID pairs.
- Returns:
- One or more security group and AWS account ID pairs.
-
setUserIdGroupPairs
One or more security group and AWS account ID pairs.
- Parameters:
userIdGroupPairs
- One or more security group and AWS account ID pairs.
-
withUserIdGroupPairs
One or more security group and AWS account ID pairs.
NOTE: This method appends the values to the existing list (if any). Use
setUserIdGroupPairs(java.util.Collection)
orwithUserIdGroupPairs(java.util.Collection)
if you want to override the existing values.- Parameters:
userIdGroupPairs
- One or more security group and AWS account ID pairs.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withUserIdGroupPairs
One or more security group and AWS account ID pairs.
- Parameters:
userIdGroupPairs
- One or more security group and AWS account ID pairs.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getIpRanges
One or more IP ranges.
- Returns:
- One or more IP ranges.
-
setIpRanges
One or more IP ranges.
- Parameters:
ipRanges
- One or more IP ranges.
-
withIpRanges
One or more IP ranges.
NOTE: This method appends the values to the existing list (if any). Use
setIpRanges(java.util.Collection)
orwithIpRanges(java.util.Collection)
if you want to override the existing values.- Parameters:
ipRanges
- One or more IP ranges.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withIpRanges
One or more IP ranges.
- Parameters:
ipRanges
- One or more IP ranges.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getPrefixListIds
(Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.
- Returns:
- (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.
-
setPrefixListIds
(Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.
- Parameters:
prefixListIds
- (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.
-
withPrefixListIds
(Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.
NOTE: This method appends the values to the existing list (if any). Use
setPrefixListIds(java.util.Collection)
orwithPrefixListIds(java.util.Collection)
if you want to override the existing values.- Parameters:
prefixListIds
- (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withPrefixListIds
(Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.
- Parameters:
prefixListIds
- (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-