com.amazonaws.services.ec2.model
Class DescribeSecurityGroupsRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.DescribeSecurityGroupsRequest
All Implemented Interfaces:
DryRunSupportedRequest<DescribeSecurityGroupsRequest>, java.io.Serializable

public class DescribeSecurityGroupsRequest
extends AmazonWebServiceRequest
implements java.io.Serializable, DryRunSupportedRequest<DescribeSecurityGroupsRequest>

Container for the parameters to the DescribeSecurityGroups operation.

Describes one or more of your security groups.

A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see Amazon EC2 Security Groups in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide .

See Also:
AmazonEC2.describeSecurityGroups(DescribeSecurityGroupsRequest), Serialized Form

Constructor Summary
DescribeSecurityGroupsRequest()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 Request<DescribeSecurityGroupsRequest> getDryRunRequest()
          This method is intended for internal use only.
 java.util.List<Filter> getFilters()
          One or more filters.
 java.util.List<java.lang.String> getGroupIds()
          One or more security group IDs.
 java.util.List<java.lang.String> getGroupNames()
          [EC2-Classic, default VPC] One or more security group names.
 int hashCode()
           
 void setFilters(java.util.Collection<Filter> filters)
          One or more filters.
 void setGroupIds(java.util.Collection<java.lang.String> groupIds)
          One or more security group IDs.
 void setGroupNames(java.util.Collection<java.lang.String> groupNames)
          [EC2-Classic, default VPC] One or more security group names.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 DescribeSecurityGroupsRequest withFilters(java.util.Collection<Filter> filters)
          One or more filters.
 DescribeSecurityGroupsRequest withFilters(Filter... filters)
          One or more filters.
 DescribeSecurityGroupsRequest withGroupIds(java.util.Collection<java.lang.String> groupIds)
          One or more security group IDs.
 DescribeSecurityGroupsRequest withGroupIds(java.lang.String... groupIds)
          One or more security group IDs.
 DescribeSecurityGroupsRequest withGroupNames(java.util.Collection<java.lang.String> groupNames)
          [EC2-Classic, default VPC] One or more security group names.
 DescribeSecurityGroupsRequest withGroupNames(java.lang.String... groupNames)
          [EC2-Classic, default VPC] One or more security group names.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setDelegationToken, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DescribeSecurityGroupsRequest

public DescribeSecurityGroupsRequest()
Method Detail

getGroupNames

public java.util.List<java.lang.String> getGroupNames()
[EC2-Classic, default VPC] One or more security group names.

Default: Describes all your security groups.

Returns:
[EC2-Classic, default VPC] One or more security group names.

Default: Describes all your security groups.


setGroupNames

public void setGroupNames(java.util.Collection<java.lang.String> groupNames)
[EC2-Classic, default VPC] One or more security group names.

Default: Describes all your security groups.

Parameters:
groupNames - [EC2-Classic, default VPC] One or more security group names.

Default: Describes all your security groups.


withGroupNames

public DescribeSecurityGroupsRequest withGroupNames(java.lang.String... groupNames)
[EC2-Classic, default VPC] One or more security group names.

Default: Describes all your security groups.

Returns a reference to this object so that method calls can be chained together.

Parameters:
groupNames - [EC2-Classic, default VPC] One or more security group names.

Default: Describes all your security groups.

Returns:
A reference to this updated object so that method calls can be chained together.

withGroupNames

public DescribeSecurityGroupsRequest withGroupNames(java.util.Collection<java.lang.String> groupNames)
[EC2-Classic, default VPC] One or more security group names.

Default: Describes all your security groups.

Returns a reference to this object so that method calls can be chained together.

Parameters:
groupNames - [EC2-Classic, default VPC] One or more security group names.

Default: Describes all your security groups.

Returns:
A reference to this updated object so that method calls can be chained together.

getGroupIds

public java.util.List<java.lang.String> getGroupIds()
One or more security group IDs.

Default: Describes all your security groups.

Returns:
One or more security group IDs.

Default: Describes all your security groups.


setGroupIds

public void setGroupIds(java.util.Collection<java.lang.String> groupIds)
One or more security group IDs.

Default: Describes all your security groups.

Parameters:
groupIds - One or more security group IDs.

Default: Describes all your security groups.


withGroupIds

public DescribeSecurityGroupsRequest withGroupIds(java.lang.String... groupIds)
One or more security group IDs.

Default: Describes all your security groups.

Returns a reference to this object so that method calls can be chained together.

Parameters:
groupIds - One or more security group IDs.

Default: Describes all your security groups.

Returns:
A reference to this updated object so that method calls can be chained together.

withGroupIds

public DescribeSecurityGroupsRequest withGroupIds(java.util.Collection<java.lang.String> groupIds)
One or more security group IDs.

Default: Describes all your security groups.

Returns a reference to this object so that method calls can be chained together.

Parameters:
groupIds - One or more security group IDs.

Default: Describes all your security groups.

Returns:
A reference to this updated object so that method calls can be chained together.

getFilters

public java.util.List<Filter> getFilters()
One or more filters.

Returns:
One or more filters.
  • description - The description of the security group.

  • group-id - The ID of the security group.

  • group-name - The name of the security group.

  • ip-permission.cidr - A CIDR range that has been granted permission.

  • ip-permission.from-port - The start of port range for the TCP and UDP protocols, or an ICMP type number.

  • ip-permission.group-id - The ID of a security group that has been granted permission.

  • ip-permission.group-name - The name of a security group that has been granted permission.

  • ip-permission.protocol - The IP protocol for the permission (tcp | udp | icmp or a protocol number).

  • ip-permission.to-port - The end of port range for the TCP and UDP protocols, or an ICMP code.

  • ip-permission.user-id - The ID of an AWS account that has been granted permission.

  • owner-id - The AWS account ID of the owner of the security group.

  • tag-key - The key of a tag assigned to the security group.

  • tag-value - The value of a tag assigned to the security group.

  • vpc-id - The ID of the VPC specified when the security group was created.


setFilters

public void setFilters(java.util.Collection<Filter> filters)
One or more filters.

Parameters:
filters - One or more filters.
  • description - The description of the security group.

  • group-id - The ID of the security group.

  • group-name - The name of the security group.

  • ip-permission.cidr - A CIDR range that has been granted permission.

  • ip-permission.from-port - The start of port range for the TCP and UDP protocols, or an ICMP type number.

  • ip-permission.group-id - The ID of a security group that has been granted permission.

  • ip-permission.group-name - The name of a security group that has been granted permission.

  • ip-permission.protocol - The IP protocol for the permission (tcp | udp | icmp or a protocol number).

  • ip-permission.to-port - The end of port range for the TCP and UDP protocols, or an ICMP code.

  • ip-permission.user-id - The ID of an AWS account that has been granted permission.

  • owner-id - The AWS account ID of the owner of the security group.

  • tag-key - The key of a tag assigned to the security group.

  • tag-value - The value of a tag assigned to the security group.

  • vpc-id - The ID of the VPC specified when the security group was created.


withFilters

public DescribeSecurityGroupsRequest withFilters(Filter... filters)
One or more filters.

Returns a reference to this object so that method calls can be chained together.

Parameters:
filters - One or more filters.
  • description - The description of the security group.

  • group-id - The ID of the security group.

  • group-name - The name of the security group.

  • ip-permission.cidr - A CIDR range that has been granted permission.

  • ip-permission.from-port - The start of port range for the TCP and UDP protocols, or an ICMP type number.

  • ip-permission.group-id - The ID of a security group that has been granted permission.

  • ip-permission.group-name - The name of a security group that has been granted permission.

  • ip-permission.protocol - The IP protocol for the permission (tcp | udp | icmp or a protocol number).

  • ip-permission.to-port - The end of port range for the TCP and UDP protocols, or an ICMP code.

  • ip-permission.user-id - The ID of an AWS account that has been granted permission.

  • owner-id - The AWS account ID of the owner of the security group.

  • tag-key - The key of a tag assigned to the security group.

  • tag-value - The value of a tag assigned to the security group.

  • vpc-id - The ID of the VPC specified when the security group was created.

Returns:
A reference to this updated object so that method calls can be chained together.

withFilters

public DescribeSecurityGroupsRequest withFilters(java.util.Collection<Filter> filters)
One or more filters.

Returns a reference to this object so that method calls can be chained together.

Parameters:
filters - One or more filters.
  • description - The description of the security group.

  • group-id - The ID of the security group.

  • group-name - The name of the security group.

  • ip-permission.cidr - A CIDR range that has been granted permission.

  • ip-permission.from-port - The start of port range for the TCP and UDP protocols, or an ICMP type number.

  • ip-permission.group-id - The ID of a security group that has been granted permission.

  • ip-permission.group-name - The name of a security group that has been granted permission.

  • ip-permission.protocol - The IP protocol for the permission (tcp | udp | icmp or a protocol number).

  • ip-permission.to-port - The end of port range for the TCP and UDP protocols, or an ICMP code.

  • ip-permission.user-id - The ID of an AWS account that has been granted permission.

  • owner-id - The AWS account ID of the owner of the security group.

  • tag-key - The key of a tag assigned to the security group.

  • tag-value - The value of a tag assigned to the security group.

  • vpc-id - The ID of the VPC specified when the security group was created.

Returns:
A reference to this updated object so that method calls can be chained together.

getDryRunRequest

public Request<DescribeSecurityGroupsRequest> 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<DescribeSecurityGroupsRequest>

toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.