public class AuthorizeSecurityGroupIngressRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest<AuthorizeSecurityGroupIngressRequest>
AuthorizeSecurityGroupIngress operation
.
The AuthorizeSecurityGroupIngress operation adds permissions to a security group.
Permissions are specified by the IP protocol (TCP, UDP or ICMP), the source of the request (by IP range or an Amazon EC2 user-group pair), the source
and destination port ranges (for TCP and UDP), and the ICMP codes and types (for ICMP). When authorizing ICMP, -1
can be used as a
wildcard in the type and code fields.
Permission changes are propagated to instances within the security group as quickly as possible. However, depending on the number of instances, a small delay might occur.
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()
Deprecated
|
Request<AuthorizeSecurityGroupIngressRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
Integer |
getFromPort()
Deprecated
|
String |
getGroupId()
ID of the standard (EC2) or VPC security group to modify.
|
String |
getGroupName()
Name of the standard (EC2) security group to modify.
|
List<IpPermission> |
getIpPermissions()
List of IP permissions to authorize on the specified security group.
|
String |
getIpProtocol()
Deprecated
|
String |
getSourceSecurityGroupName()
Deprecated
|
String |
getSourceSecurityGroupOwnerId()
Deprecated
|
Integer |
getToPort()
Deprecated
|
int |
hashCode() |
void |
setCidrIp(String cidrIp)
Deprecated
|
void |
setFromPort(Integer fromPort)
Deprecated
|
void |
setGroupId(String groupId)
ID of the standard (EC2) or VPC security group to modify.
|
void |
setGroupName(String groupName)
Name of the standard (EC2) security group to modify.
|
void |
setIpPermissions(Collection<IpPermission> ipPermissions)
List of IP permissions to authorize on the specified security group.
|
void |
setIpProtocol(String ipProtocol)
Deprecated
|
void |
setSourceSecurityGroupName(String sourceSecurityGroupName)
Deprecated
|
void |
setSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
Deprecated
|
void |
setToPort(Integer toPort)
Deprecated
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
AuthorizeSecurityGroupIngressRequest |
withCidrIp(String cidrIp)
Deprecated
|
AuthorizeSecurityGroupIngressRequest |
withFromPort(Integer fromPort)
Deprecated
|
AuthorizeSecurityGroupIngressRequest |
withGroupId(String groupId)
ID of the standard (EC2) or VPC security group to modify.
|
AuthorizeSecurityGroupIngressRequest |
withGroupName(String groupName)
Name of the standard (EC2) security group to modify.
|
AuthorizeSecurityGroupIngressRequest |
withIpPermissions(Collection<IpPermission> ipPermissions)
List of IP permissions to authorize on the specified security group.
|
AuthorizeSecurityGroupIngressRequest |
withIpPermissions(IpPermission... ipPermissions)
List of IP permissions to authorize on the specified security group.
|
AuthorizeSecurityGroupIngressRequest |
withIpProtocol(String ipProtocol)
Deprecated
|
AuthorizeSecurityGroupIngressRequest |
withSourceSecurityGroupName(String sourceSecurityGroupName)
Deprecated
|
AuthorizeSecurityGroupIngressRequest |
withSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
Deprecated
|
AuthorizeSecurityGroupIngressRequest |
withToPort(Integer toPort)
Deprecated
|
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
public AuthorizeSecurityGroupIngressRequest()
public AuthorizeSecurityGroupIngressRequest(String groupName, List<IpPermission> ipPermissions)
groupName
- Name of the standard (EC2) security group to modify.
The group must belong to your account. Can be used instead of GroupID
for standard (EC2) security groups.ipPermissions
- List of IP permissions to authorize on the
specified security group. Specifying permissions through IP
permissions is the preferred way of authorizing permissions since it
offers more flexibility and control.public String getGroupName()
public void setGroupName(String groupName)
groupName
- Name of the standard (EC2) security group to modify. The group must
belong to your account. Can be used instead of GroupID for standard
(EC2) security groups.public AuthorizeSecurityGroupIngressRequest withGroupName(String groupName)
Returns a reference to this object so that method calls can be chained together.
groupName
- Name of the standard (EC2) security group to modify. The group must
belong to your account. Can be used instead of GroupID for standard
(EC2) security groups.public String getGroupId()
public void setGroupId(String groupId)
groupId
- ID of the standard (EC2) or VPC security group to modify. The group
must belong to your account. Required for VPC security groups; can be
used instead of GroupName for standard (EC2) security groups.public AuthorizeSecurityGroupIngressRequest withGroupId(String groupId)
Returns a reference to this object so that method calls can be chained together.
groupId
- ID of the standard (EC2) or VPC security group to modify. The group
must belong to your account. Required for VPC security groups; can be
used instead of GroupName for standard (EC2) security groups.public String getSourceSecurityGroupName()
public void setSourceSecurityGroupName(String sourceSecurityGroupName)
sourceSecurityGroupName
- Deprecatedpublic AuthorizeSecurityGroupIngressRequest withSourceSecurityGroupName(String sourceSecurityGroupName)
Returns a reference to this object so that method calls can be chained together.
sourceSecurityGroupName
- Deprecatedpublic String getSourceSecurityGroupOwnerId()
public void setSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
sourceSecurityGroupOwnerId
- Deprecatedpublic AuthorizeSecurityGroupIngressRequest withSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
Returns a reference to this object so that method calls can be chained together.
sourceSecurityGroupOwnerId
- Deprecatedpublic String getIpProtocol()
public void setIpProtocol(String ipProtocol)
ipProtocol
- Deprecatedpublic AuthorizeSecurityGroupIngressRequest withIpProtocol(String ipProtocol)
Returns a reference to this object so that method calls can be chained together.
ipProtocol
- Deprecatedpublic Integer getFromPort()
public void setFromPort(Integer fromPort)
fromPort
- Deprecatedpublic AuthorizeSecurityGroupIngressRequest withFromPort(Integer fromPort)
Returns a reference to this object so that method calls can be chained together.
fromPort
- Deprecatedpublic Integer getToPort()
public void setToPort(Integer toPort)
toPort
- Deprecatedpublic AuthorizeSecurityGroupIngressRequest withToPort(Integer toPort)
Returns a reference to this object so that method calls can be chained together.
toPort
- Deprecatedpublic String getCidrIp()
public void setCidrIp(String cidrIp)
cidrIp
- Deprecatedpublic AuthorizeSecurityGroupIngressRequest withCidrIp(String cidrIp)
Returns a reference to this object so that method calls can be chained together.
cidrIp
- Deprecatedpublic List<IpPermission> getIpPermissions()
public void setIpPermissions(Collection<IpPermission> ipPermissions)
ipPermissions
- List of IP permissions to authorize on the specified security group.
Specifying permissions through IP permissions is the preferred way of
authorizing permissions since it offers more flexibility and control.public AuthorizeSecurityGroupIngressRequest withIpPermissions(IpPermission... ipPermissions)
Returns a reference to this object so that method calls can be chained together.
ipPermissions
- List of IP permissions to authorize on the specified security group.
Specifying permissions through IP permissions is the preferred way of
authorizing permissions since it offers more flexibility and control.public AuthorizeSecurityGroupIngressRequest withIpPermissions(Collection<IpPermission> ipPermissions)
Returns a reference to this object so that method calls can be chained together.
ipPermissions
- List of IP permissions to authorize on the specified security group.
Specifying permissions through IP permissions is the preferred way of
authorizing permissions since it offers more flexibility and control.public Request<AuthorizeSecurityGroupIngressRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<AuthorizeSecurityGroupIngressRequest>
public String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.