@Generated(value="software.amazon.awssdk:codegen") public final class AuthorizeSecurityGroupIngressRequest extends Ec2Request implements ToCopyableBuilder<AuthorizeSecurityGroupIngressRequest.Builder,AuthorizeSecurityGroupIngressRequest>
Contains the parameters for AuthorizeSecurityGroupIngress.
Modifier and Type | Class and Description |
---|---|
static interface |
AuthorizeSecurityGroupIngressRequest.Builder |
Modifier and Type | Method and Description |
---|---|
static AuthorizeSecurityGroupIngressRequest.Builder |
builder() |
String |
cidrIp()
The CIDR IPv4 address range.
|
boolean |
equals(Object obj) |
Integer |
fromPort()
The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz)
Used to retrieve the value of a field from any class that extends
SdkRequest . |
String |
groupId()
The ID of the security group.
|
String |
groupName()
[EC2-Classic, default VPC] The name of the security group.
|
int |
hashCode() |
List<IpPermission> |
ipPermissions()
One or more sets of IP permissions.
|
String |
ipProtocol()
|
static Class<? extends AuthorizeSecurityGroupIngressRequest.Builder> |
serializableBuilderClass() |
String |
sourceSecurityGroupName()
[EC2-Classic, default VPC] The name of the source security group.
|
String |
sourceSecurityGroupOwnerId()
[EC2-Classic] The AWS account ID for the source security group, if the source security group is in a different
account.
|
AuthorizeSecurityGroupIngressRequest.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
Integer |
toPort()
The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code number.
|
String |
toString() |
overrideConfiguration
copy
public String cidrIp()
The CIDR IPv4 address range. You can't specify this parameter when specifying a source security group.
public Integer fromPort()
The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. For the ICMP/ICMPv6 type
number, use -1
to specify all types. If you specify all ICMP/ICMPv6 types, you must specify all
codes.
-1
to specify all types. If you specify all ICMP/ICMPv6 types, you must
specify all codes.public String groupId()
The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.
public String groupName()
[EC2-Classic, default VPC] The name of the security group. You must specify either the security group ID or the security group name in the request.
public List<IpPermission> ipPermissions()
One or more sets of IP permissions. Can be used to specify multiple rules in a single command.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public String ipProtocol()
The IP protocol name (tcp
, udp
, icmp
) or number (see Protocol Numbers). (VPC only)
Use -1
to specify all protocols. If you specify -1
, or a protocol number other than
tcp
, udp
, icmp
, or 58
(ICMPv6), traffic on all ports is
allowed, regardless of any ports you specify. For tcp
, udp
, and icmp
, you
must specify a port range. For protocol 58
(ICMPv6), you can optionally specify a port range; if you
don't, traffic for all types and codes is allowed.
tcp
, udp
, icmp
) or number (see Protocol Numbers).
(VPC only) Use -1
to specify all protocols. If you specify -1
, or a protocol
number other than tcp
, udp
, icmp
, or 58
(ICMPv6),
traffic on all ports is allowed, regardless of any ports you specify. For tcp
,
udp
, and icmp
, you must specify a port range. For protocol 58
(ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is
allowed.public String sourceSecurityGroupName()
[EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead. For EC2-VPC, the source security group must be in the same VPC.
public String sourceSecurityGroupOwnerId()
[EC2-Classic] The AWS account ID for the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead.
public Integer toPort()
The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code number. For the ICMP/ICMPv6 code
number, use -1
to specify all codes. If you specify all ICMP/ICMPv6 types, you must specify all
codes.
-1
to specify all codes. If you specify all ICMP/ICMPv6 types, you must
specify all codes.public AuthorizeSecurityGroupIngressRequest.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<AuthorizeSecurityGroupIngressRequest.Builder,AuthorizeSecurityGroupIngressRequest>
toBuilder
in class Ec2Request
public static AuthorizeSecurityGroupIngressRequest.Builder builder()
public static Class<? extends AuthorizeSecurityGroupIngressRequest.Builder> serializableBuilderClass()
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
SdkRequest
SdkRequest
. The field name
specified should match the member name from the corresponding service-2.json model specified in the
codegen-resources folder for a given service. The class specifies what class to cast the returned value to.
If the returned value is also a modeled class, the SdkRequest.getValueForField(String, Class)
method will
again be available.getValueForField
in class SdkRequest
fieldName
- The name of the member to be retrieved.clazz
- The class to cast the returned object to.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.