public class AuthorizeSecurityGroupIngressRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest<AuthorizeSecurityGroupIngressRequest>
AuthorizeSecurityGroupIngress operation
.
Adds one or more ingress rules to a security group.
IMPORTANT: EC2-Classic: You can have up to 100 rules per group. EC2-VPC: You can have up to 50 rules per group (covering both ingress and egress rules).
Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.
[EC2-Classic] This action gives one or more CIDR IP address ranges permission to access a security group in your account, or gives one or more security groups (called the source groups ) permission to access a security group for your account. A source group can be for your own AWS account, or another.
[EC2-VPC] This action gives one or more CIDR IP address ranges permission to access a security group in your VPC, or gives one or more other security groups (called the source groups ) permission to access a security group for your VPC. The security groups must all be for the same VPC.
NOOP
Constructor and Description |
---|
AuthorizeSecurityGroupIngressRequest()
Default constructor for a new AuthorizeSecurityGroupIngressRequest object.
|
AuthorizeSecurityGroupIngressRequest(String groupName,
List<IpPermission> ipPermissions)
Constructs a new AuthorizeSecurityGroupIngressRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getCidrIp()
The CIDR IP address range.
|
Request<AuthorizeSecurityGroupIngressRequest> |
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.
|
String |
getGroupName()
[EC2-Classic, default VPC] The name of the security group.
|
List<IpPermission> |
getIpPermissions()
A set of IP permissions.
|
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 |
setGroupName(String groupName)
[EC2-Classic, default VPC] The name of the security group.
|
void |
setIpPermissions(Collection<IpPermission> ipPermissions)
A set of IP permissions.
|
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.
|
AuthorizeSecurityGroupIngressRequest |
withCidrIp(String cidrIp)
The CIDR IP address range.
|
AuthorizeSecurityGroupIngressRequest |
withFromPort(Integer fromPort)
The start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
AuthorizeSecurityGroupIngressRequest |
withGroupId(String groupId)
The ID of the security group.
|
AuthorizeSecurityGroupIngressRequest |
withGroupName(String groupName)
[EC2-Classic, default VPC] The name of the security group.
|
AuthorizeSecurityGroupIngressRequest |
withIpPermissions(Collection<IpPermission> ipPermissions)
A set of IP permissions.
|
AuthorizeSecurityGroupIngressRequest |
withIpPermissions(IpPermission... ipPermissions)
A set of IP permissions.
|
AuthorizeSecurityGroupIngressRequest |
withIpProtocol(String ipProtocol)
|
AuthorizeSecurityGroupIngressRequest |
withSourceSecurityGroupName(String sourceSecurityGroupName)
[EC2-Classic, default VPC] The name of the source security group.
|
AuthorizeSecurityGroupIngressRequest |
withSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
The ID of the source security group.
|
AuthorizeSecurityGroupIngressRequest |
withToPort(Integer toPort)
The end of port range for the TCP and UDP protocols, or an ICMP code
number.
|
copyBaseTo, copyPrivateRequestParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public AuthorizeSecurityGroupIngressRequest()
public AuthorizeSecurityGroupIngressRequest(String groupName, List<IpPermission> ipPermissions)
groupName
- [EC2-Classic, default VPC] The name of the security
group.ipPermissions
- A set of IP permissions. You can't specify a
source security group and a CIDR IP address range.public String getGroupName()
public void setGroupName(String groupName)
groupName
- [EC2-Classic, default VPC] The name of the security group.public AuthorizeSecurityGroupIngressRequest withGroupName(String groupName)
Returns a reference to this object so that method calls can be chained together.
groupName
- [EC2-Classic, default VPC] The name of the security group.public String getGroupId()
public void setGroupId(String groupId)
groupId
- The ID of the security group.public AuthorizeSecurityGroupIngressRequest 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 AuthorizeSecurityGroupIngressRequest 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 AuthorizeSecurityGroupIngressRequest 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). (VPC only) Use -1
to specify all.tcp
, udp
,
icmp
) or number (see Protocol
Numbers). (VPC only) Use -1
to specify all.public void setIpProtocol(String ipProtocol)
tcp
, udp
,
icmp
) or number (see Protocol
Numbers). (VPC only) Use -1
to specify all.ipProtocol
- The IP protocol name (tcp
, udp
,
icmp
) or number (see Protocol
Numbers). (VPC only) Use -1
to specify all.public AuthorizeSecurityGroupIngressRequest withIpProtocol(String ipProtocol)
tcp
, udp
,
icmp
) or number (see Protocol
Numbers). (VPC only) 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). (VPC only) 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 AuthorizeSecurityGroupIngressRequest 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 AuthorizeSecurityGroupIngressRequest 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 AuthorizeSecurityGroupIngressRequest 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
- A set of IP permissions. You can't specify a source security group and
a CIDR IP address range.public AuthorizeSecurityGroupIngressRequest 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 source security group and
a CIDR IP address range.public AuthorizeSecurityGroupIngressRequest withIpPermissions(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 source security group and
a CIDR IP address range.public Request<AuthorizeSecurityGroupIngressRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<AuthorizeSecurityGroupIngressRequest>
public String toString()
toString
in class Object
Object.toString()
Copyright © 2015. All rights reserved.