public class AuthorizeSecurityGroupEgressRequest extends AmazonWebServiceRequest implements java.io.Serializable, DryRunSupportedRequest<AuthorizeSecurityGroupEgressRequest>
AuthorizeSecurityGroupEgress operation
.
[EC2-VPC only] Adds one or more egress rules to a security group for use with a VPC. Specifically, this action permits instances to send traffic to one or more destination CIDR IP address ranges, or to one or more destination security groups for the same VPC. This action doesn't apply to security groups for use in EC2-Classic. For more information, see Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide .
IMPORTANT: You can have up to 50 rules per security group (covering both ingress and egress rules).
Each rule consists of the protocol (for example, TCP), plus either a CIDR range or a source group. For the TCP and UDP protocols, you must also specify the destination port or port range. For the ICMP protocol, you must also specify the ICMP type and code. You can use -1 for the type or code to mean all types or all codes.
Rule changes are propagated to affected instances as quickly as possible. However, a small delay might occur.
Constructor and Description |
---|
AuthorizeSecurityGroupEgressRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getCidrIp()
The CIDR IP address range.
|
Request<AuthorizeSecurityGroupEgressRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
java.lang.Integer |
getFromPort()
The start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
java.lang.String |
getGroupId()
The ID of the security group.
|
java.util.List<IpPermission> |
getIpPermissions()
A set of IP permissions.
|
java.lang.String |
getIpProtocol()
The IP protocol name or number.
|
java.lang.String |
getSourceSecurityGroupName()
The name of a destination security group.
|
java.lang.String |
getSourceSecurityGroupOwnerId()
The AWS account number for a destination security group.
|
java.lang.Integer |
getToPort()
The end of port range for the TCP and UDP protocols, or an ICMP type
number.
|
int |
hashCode() |
void |
setCidrIp(java.lang.String cidrIp)
The CIDR IP address range.
|
void |
setFromPort(java.lang.Integer fromPort)
The start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
void |
setGroupId(java.lang.String groupId)
The ID of the security group.
|
void |
setIpPermissions(java.util.Collection<IpPermission> ipPermissions)
A set of IP permissions.
|
void |
setIpProtocol(java.lang.String ipProtocol)
The IP protocol name or number.
|
void |
setSourceSecurityGroupName(java.lang.String sourceSecurityGroupName)
The name of a destination security group.
|
void |
setSourceSecurityGroupOwnerId(java.lang.String sourceSecurityGroupOwnerId)
The AWS account number for a destination security group.
|
void |
setToPort(java.lang.Integer toPort)
The end of port range for the TCP and UDP protocols, or an ICMP type
number.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
AuthorizeSecurityGroupEgressRequest |
withCidrIp(java.lang.String cidrIp)
The CIDR IP address range.
|
AuthorizeSecurityGroupEgressRequest |
withFromPort(java.lang.Integer fromPort)
The start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
AuthorizeSecurityGroupEgressRequest |
withGroupId(java.lang.String groupId)
The ID of the security group.
|
AuthorizeSecurityGroupEgressRequest |
withIpPermissions(java.util.Collection<IpPermission> ipPermissions)
A set of IP permissions.
|
AuthorizeSecurityGroupEgressRequest |
withIpPermissions(IpPermission... ipPermissions)
A set of IP permissions.
|
AuthorizeSecurityGroupEgressRequest |
withIpProtocol(java.lang.String ipProtocol)
The IP protocol name or number.
|
AuthorizeSecurityGroupEgressRequest |
withSourceSecurityGroupName(java.lang.String sourceSecurityGroupName)
The name of a destination security group.
|
AuthorizeSecurityGroupEgressRequest |
withSourceSecurityGroupOwnerId(java.lang.String sourceSecurityGroupOwnerId)
The AWS account number for a destination security group.
|
AuthorizeSecurityGroupEgressRequest |
withToPort(java.lang.Integer toPort)
The end of port range for the TCP and UDP protocols, or an ICMP type
number.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.lang.String getGroupId()
public void setGroupId(java.lang.String groupId)
groupId
- The ID of the security group.public AuthorizeSecurityGroupEgressRequest withGroupId(java.lang.String groupId)
Returns a reference to this object so that method calls can be chained together.
groupId
- The ID of the security group.public java.lang.String getSourceSecurityGroupName()
public void setSourceSecurityGroupName(java.lang.String sourceSecurityGroupName)
sourceSecurityGroupName
- The name of a destination security group. To authorize outbound access
to a destination security group, we recommend that you use a set of IP
permissions instead.public AuthorizeSecurityGroupEgressRequest withSourceSecurityGroupName(java.lang.String sourceSecurityGroupName)
Returns a reference to this object so that method calls can be chained together.
sourceSecurityGroupName
- The name of a destination security group. To authorize outbound access
to a destination security group, we recommend that you use a set of IP
permissions instead.public java.lang.String getSourceSecurityGroupOwnerId()
public void setSourceSecurityGroupOwnerId(java.lang.String sourceSecurityGroupOwnerId)
sourceSecurityGroupOwnerId
- The AWS account number for a destination security group. To authorize
outbound access to a destination security group, we recommend that you
use a set of IP permissions instead.public AuthorizeSecurityGroupEgressRequest withSourceSecurityGroupOwnerId(java.lang.String sourceSecurityGroupOwnerId)
Returns a reference to this object so that method calls can be chained together.
sourceSecurityGroupOwnerId
- The AWS account number for a destination security group. To authorize
outbound access to a destination security group, we recommend that you
use a set of IP permissions instead.public java.lang.String getIpProtocol()
public void setIpProtocol(java.lang.String ipProtocol)
ipProtocol
- The IP protocol name or number. We recommend that you specify the
protocol in a set of IP permissions instead.public AuthorizeSecurityGroupEgressRequest withIpProtocol(java.lang.String ipProtocol)
Returns a reference to this object so that method calls can be chained together.
ipProtocol
- The IP protocol name or number. We recommend that you specify the
protocol in a set of IP permissions instead.public java.lang.Integer getFromPort()
public void setFromPort(java.lang.Integer fromPort)
fromPort
- The start of port range for the TCP and UDP protocols, or an ICMP type
number. We recommend that you specify the port range in a set of IP
permissions instead.public AuthorizeSecurityGroupEgressRequest withFromPort(java.lang.Integer fromPort)
Returns a reference to this object so that method calls can be chained together.
fromPort
- The start of port range for the TCP and UDP protocols, or an ICMP type
number. We recommend that you specify the port range in a set of IP
permissions instead.public java.lang.Integer getToPort()
public void setToPort(java.lang.Integer toPort)
toPort
- The end of port range for the TCP and UDP protocols, or an ICMP type
number. We recommend that you specify the port range in a set of IP
permissions instead.public AuthorizeSecurityGroupEgressRequest withToPort(java.lang.Integer toPort)
Returns a reference to this object so that method calls can be chained together.
toPort
- The end of port range for the TCP and UDP protocols, or an ICMP type
number. We recommend that you specify the port range in a set of IP
permissions instead.public java.lang.String getCidrIp()
public void setCidrIp(java.lang.String cidrIp)
cidrIp
- The CIDR IP address range. We recommend that you specify the CIDR
range in a set of IP permissions instead.public AuthorizeSecurityGroupEgressRequest withCidrIp(java.lang.String cidrIp)
Returns a reference to this object so that method calls can be chained together.
cidrIp
- The CIDR IP address range. We recommend that you specify the CIDR
range in a set of IP permissions instead.public java.util.List<IpPermission> getIpPermissions()
public void setIpPermissions(java.util.Collection<IpPermission> ipPermissions)
ipPermissions
- A set of IP permissions. You can't specify a destination security
group and a CIDR IP address range.public AuthorizeSecurityGroupEgressRequest withIpPermissions(IpPermission... ipPermissions)
Returns a reference to this object so that method calls can be chained together.
ipPermissions
- A set of IP permissions. You can't specify a destination security
group and a CIDR IP address range.public AuthorizeSecurityGroupEgressRequest withIpPermissions(java.util.Collection<IpPermission> ipPermissions)
Returns a reference to this object so that method calls can be chained together.
ipPermissions
- A set of IP permissions. You can't specify a destination security
group and a CIDR IP address range.public Request<AuthorizeSecurityGroupEgressRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<AuthorizeSecurityGroupEgressRequest>
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.