public class AuthorizeSecurityGroupEgressRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest<AuthorizeSecurityGroupEgressRequest>
AuthorizeSecurityGroupEgress operation
.
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 CIDR IP address ranges, or to one or more security groups for the same VPC.
IMPORTANT: You can have up to 50 rules per security group (covering both ingress and egress rules).
A security group is for use with instances either in the EC2-Classic platform or in a specific 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 .
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.
NOOP
Constructor and Description |
---|
AuthorizeSecurityGroupEgressRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getCidrIp()
The CIDR IP address range.
|
Request<AuthorizeSecurityGroupEgressRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
Integer |
getFromPort()
The start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
String |
getGroupId()
The ID of the security group.
|
List<IpPermission> |
getIpPermissions()
|
String |
getIpProtocol()
|
String |
getSourceSecurityGroupName()
[EC2-Classic, default VPC] The name of the source security group.
|
String |
getSourceSecurityGroupOwnerId()
The ID of the source security group.
|
Integer |
getToPort()
The end of port range for the TCP and UDP protocols, or an ICMP code
number.
|
int |
hashCode() |
void |
setCidrIp(String cidrIp)
The CIDR IP address range.
|
void |
setFromPort(Integer fromPort)
The start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
void |
setGroupId(String groupId)
The ID of the security group.
|
void |
setIpPermissions(Collection<IpPermission> ipPermissions)
|
void |
setIpProtocol(String ipProtocol)
|
void |
setSourceSecurityGroupName(String sourceSecurityGroupName)
[EC2-Classic, default VPC] The name of the source security group.
|
void |
setSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
The ID of the source security group.
|
void |
setToPort(Integer toPort)
The end of port range for the TCP and UDP protocols, or an ICMP code
number.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
AuthorizeSecurityGroupEgressRequest |
withCidrIp(String cidrIp)
The CIDR IP address range.
|
AuthorizeSecurityGroupEgressRequest |
withFromPort(Integer fromPort)
The start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
AuthorizeSecurityGroupEgressRequest |
withGroupId(String groupId)
The ID of the security group.
|
AuthorizeSecurityGroupEgressRequest |
withIpPermissions(Collection<IpPermission> ipPermissions)
|
AuthorizeSecurityGroupEgressRequest |
withIpPermissions(IpPermission... ipPermissions)
|
AuthorizeSecurityGroupEgressRequest |
withIpProtocol(String ipProtocol)
|
AuthorizeSecurityGroupEgressRequest |
withSourceSecurityGroupName(String sourceSecurityGroupName)
[EC2-Classic, default VPC] The name of the source security group.
|
AuthorizeSecurityGroupEgressRequest |
withSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
The ID of the source security group.
|
AuthorizeSecurityGroupEgressRequest |
withToPort(Integer toPort)
The end of port range for the TCP and UDP protocols, or an ICMP code
number.
|
copyPrivateRequestParameters, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public String getGroupId()
public void setGroupId(String groupId)
groupId
- The ID of the security group.public AuthorizeSecurityGroupEgressRequest withGroupId(String groupId)
Returns a reference to this object so that method calls can be chained together.
groupId
- The ID of the security group.public String getSourceSecurityGroupName()
public void setSourceSecurityGroupName(String sourceSecurityGroupName)
sourceSecurityGroupName
- [EC2-Classic, default VPC] The name of the source security group. You
can't specify a source security group and a CIDR IP address range.public AuthorizeSecurityGroupEgressRequest withSourceSecurityGroupName(String sourceSecurityGroupName)
Returns a reference to this object so that method calls can be chained together.
sourceSecurityGroupName
- [EC2-Classic, default VPC] The name of the source security group. You
can't specify a source security group and a CIDR IP address range.public String getSourceSecurityGroupOwnerId()
public void setSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
sourceSecurityGroupOwnerId
- The ID of the source security group. You can't specify a source
security group and a CIDR IP address range.public AuthorizeSecurityGroupEgressRequest withSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
Returns a reference to this object so that method calls can be chained together.
sourceSecurityGroupOwnerId
- The ID of the source security group. You can't specify a source
security group and a CIDR IP address range.public String getIpProtocol()
tcp
, udp
,
icmp
) or number (see Protocol
Numbers). Use -1
to specify all.public void setIpProtocol(String ipProtocol)
ipProtocol
- The IP protocol name (tcp
, udp
,
icmp
) or number (see Protocol
Numbers). Use -1
to specify all.public AuthorizeSecurityGroupEgressRequest withIpProtocol(String ipProtocol)
tcp
, udp
,
icmp
) or number (see Protocol
Numbers). Use -1
to specify all.
Returns a reference to this object so that method calls can be chained together.
ipProtocol
- The IP protocol name (tcp
, udp
,
icmp
) or number (see Protocol
Numbers). Use -1
to specify all.public Integer getFromPort()
-1
to specify all
ICMP types.-1
to specify all
ICMP types.public void setFromPort(Integer fromPort)
-1
to specify all
ICMP types.fromPort
- The start of port range for the TCP and UDP protocols, or an ICMP type
number. For the ICMP type number, use -1
to specify all
ICMP types.public AuthorizeSecurityGroupEgressRequest withFromPort(Integer fromPort)
-1
to specify all
ICMP types.
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. For the ICMP type number, use -1
to specify all
ICMP types.public Integer getToPort()
-1
to specify all
ICMP codes for the ICMP type.-1
to specify all
ICMP codes for the ICMP type.public void setToPort(Integer toPort)
-1
to specify all
ICMP codes for the ICMP type.toPort
- The end of port range for the TCP and UDP protocols, or an ICMP code
number. For the ICMP code number, use -1
to specify all
ICMP codes for the ICMP type.public AuthorizeSecurityGroupEgressRequest withToPort(Integer toPort)
-1
to specify all
ICMP codes for the ICMP type.
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 code
number. For the ICMP code number, use -1
to specify all
ICMP codes for the ICMP type.public String getCidrIp()
public void setCidrIp(String cidrIp)
cidrIp
- The CIDR IP address range. You can't specify this parameter when
specifying a source security group.public AuthorizeSecurityGroupEgressRequest withCidrIp(String cidrIp)
Returns a reference to this object so that method calls can be chained together.
cidrIp
- The CIDR IP address range. You can't specify this parameter when
specifying a source security group.public List<IpPermission> getIpPermissions()
public void setIpPermissions(Collection<IpPermission> ipPermissions)
ipPermissions
- public AuthorizeSecurityGroupEgressRequest withIpPermissions(IpPermission... ipPermissions)
Returns a reference to this object so that method calls can be chained together.
ipPermissions
- public AuthorizeSecurityGroupEgressRequest withIpPermissions(Collection<IpPermission> ipPermissions)
Returns a reference to this object so that method calls can be chained together.
ipPermissions
- public Request<AuthorizeSecurityGroupEgressRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<AuthorizeSecurityGroupEgressRequest>
public String toString()
toString
in class Object
Object.toString()
Copyright © 2014. All rights reserved.