Class AuthorizeSecurityGroupIngressRequest

java.lang.Object
com.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.ec2.model.AuthorizeSecurityGroupIngressRequest
All Implemented Interfaces:
ReadLimitInfo, DryRunSupportedRequest<AuthorizeSecurityGroupIngressRequest>, Serializable, Cloneable

public class AuthorizeSecurityGroupIngressRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<AuthorizeSecurityGroupIngressRequest>

Contains the parameters for AuthorizeSecurityGroupIngress.

See Also:
  • Constructor Details

    • AuthorizeSecurityGroupIngressRequest

      public AuthorizeSecurityGroupIngressRequest()
      Default constructor for AuthorizeSecurityGroupIngressRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
    • AuthorizeSecurityGroupIngressRequest

      public AuthorizeSecurityGroupIngressRequest(String groupName, List<IpPermission> ipPermissions)
      Constructs a new AuthorizeSecurityGroupIngressRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      Parameters:
      groupName - [EC2-Classic, default VPC] The name of the security group.
      ipPermissions - A set of IP permissions. Can be used to specify multiple rules in a single command.
  • Method Details

    • setGroupName

      public void setGroupName(String groupName)

      [EC2-Classic, default VPC] The name of the security group.

      Parameters:
      groupName - [EC2-Classic, default VPC] The name of the security group.
    • getGroupName

      public String getGroupName()

      [EC2-Classic, default VPC] The name of the security group.

      Returns:
      [EC2-Classic, default VPC] The name of the security group.
    • withGroupName

      public AuthorizeSecurityGroupIngressRequest withGroupName(String groupName)

      [EC2-Classic, default VPC] The name of the security group.

      Parameters:
      groupName - [EC2-Classic, default VPC] The name of the security group.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setGroupId

      public void setGroupId(String groupId)

      The ID of the security group. Required for a nondefault VPC.

      Parameters:
      groupId - The ID of the security group. Required for a nondefault VPC.
    • getGroupId

      public String getGroupId()

      The ID of the security group. Required for a nondefault VPC.

      Returns:
      The ID of the security group. Required for a nondefault VPC.
    • withGroupId

      public AuthorizeSecurityGroupIngressRequest withGroupId(String groupId)

      The ID of the security group. Required for a nondefault VPC.

      Parameters:
      groupId - The ID of the security group. Required for a nondefault VPC.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setSourceSecurityGroupName

      public void setSourceSecurityGroupName(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.

      Parameters:
      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.
    • getSourceSecurityGroupName

      public String getSourceSecurityGroupName()

      [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.

      Returns:
      [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.
    • withSourceSecurityGroupName

      public AuthorizeSecurityGroupIngressRequest withSourceSecurityGroupName(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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setSourceSecurityGroupOwnerId

      public void setSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)

      [EC2-Classic] The AWS account number 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.

      Parameters:
      sourceSecurityGroupOwnerId - [EC2-Classic] The AWS account number 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.
    • getSourceSecurityGroupOwnerId

      public String getSourceSecurityGroupOwnerId()

      [EC2-Classic] The AWS account number 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.

      Returns:
      [EC2-Classic] The AWS account number 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.
    • withSourceSecurityGroupOwnerId

      public AuthorizeSecurityGroupIngressRequest withSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)

      [EC2-Classic] The AWS account number 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.

      Parameters:
      sourceSecurityGroupOwnerId - [EC2-Classic] The AWS account number 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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setIpProtocol

      public void setIpProtocol(String ipProtocol)

      The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). (VPC only) Use -1 to specify all.

      Parameters:
      ipProtocol - The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). (VPC only) Use -1 to specify all.
    • getIpProtocol

      public String getIpProtocol()

      The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). (VPC only) Use -1 to specify all.

      Returns:
      The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). (VPC only) Use -1 to specify all.
    • withIpProtocol

      public AuthorizeSecurityGroupIngressRequest withIpProtocol(String ipProtocol)

      The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). (VPC only) Use -1 to specify all.

      Parameters:
      ipProtocol - The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). (VPC only) Use -1 to specify all.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setFromPort

      public void setFromPort(Integer 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.

      Parameters:
      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.
    • getFromPort

      public Integer getFromPort()

      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.

      Returns:
      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.
    • withFromPort

      public AuthorizeSecurityGroupIngressRequest withFromPort(Integer 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setToPort

      public void setToPort(Integer 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.

      Parameters:
      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.
    • getToPort

      public Integer getToPort()

      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.

      Returns:
      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.
    • withToPort

      public AuthorizeSecurityGroupIngressRequest withToPort(Integer 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setCidrIp

      public void setCidrIp(String cidrIp)

      The CIDR IP address range. You can't specify this parameter when specifying a source security group.

      Parameters:
      cidrIp - The CIDR IP address range. You can't specify this parameter when specifying a source security group.
    • getCidrIp

      public String getCidrIp()

      The CIDR IP address range. You can't specify this parameter when specifying a source security group.

      Returns:
      The CIDR IP address range. You can't specify this parameter when specifying a source security group.
    • withCidrIp

      public AuthorizeSecurityGroupIngressRequest withCidrIp(String cidrIp)

      The CIDR IP address range. You can't specify this parameter when specifying a source security group.

      Parameters:
      cidrIp - The CIDR IP address range. You can't specify this parameter when specifying a source security group.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getIpPermissions

      public List<IpPermission> getIpPermissions()

      A set of IP permissions. Can be used to specify multiple rules in a single command.

      Returns:
      A set of IP permissions. Can be used to specify multiple rules in a single command.
    • setIpPermissions

      public void setIpPermissions(Collection<IpPermission> ipPermissions)

      A set of IP permissions. Can be used to specify multiple rules in a single command.

      Parameters:
      ipPermissions - A set of IP permissions. Can be used to specify multiple rules in a single command.
    • withIpPermissions

      public AuthorizeSecurityGroupIngressRequest withIpPermissions(IpPermission... ipPermissions)

      A set of IP permissions. Can be used to specify multiple rules in a single command.

      NOTE: This method appends the values to the existing list (if any). Use setIpPermissions(java.util.Collection) or withIpPermissions(java.util.Collection) if you want to override the existing values.

      Parameters:
      ipPermissions - A set of IP permissions. Can be used to specify multiple rules in a single command.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withIpPermissions

      public AuthorizeSecurityGroupIngressRequest withIpPermissions(Collection<IpPermission> ipPermissions)

      A set of IP permissions. Can be used to specify multiple rules in a single command.

      Parameters:
      ipPermissions - A set of IP permissions. Can be used to specify multiple rules in a single command.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getDryRunRequest

      public Request<AuthorizeSecurityGroupIngressRequest> getDryRunRequest()
      This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.
      Specified by:
      getDryRunRequest in interface DryRunSupportedRequest<AuthorizeSecurityGroupIngressRequest>
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      Description copied from class: AmazonWebServiceRequest
      Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.
      Overrides:
      clone in class AmazonWebServiceRequest
      See Also: