Class SecurityGroup
- All Implemented Interfaces:
Serializable
,Cloneable
Describes a security group
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
A description of the security group.The ID of the security group.The name of the security group.One or more inbound rules associated with the security group.[EC2-VPC] One or more outbound rules associated with the security group.The AWS account ID of the owner of the security group.getTags()
Any tags assigned to the security group.getVpcId()
[EC2-VPC] The ID of the VPC for the security group.int
hashCode()
void
setDescription
(String description) A description of the security group.void
setGroupId
(String groupId) The ID of the security group.void
setGroupName
(String groupName) The name of the security group.void
setIpPermissions
(Collection<IpPermission> ipPermissions) One or more inbound rules associated with the security group.void
setIpPermissionsEgress
(Collection<IpPermission> ipPermissionsEgress) [EC2-VPC] One or more outbound rules associated with the security group.void
setOwnerId
(String ownerId) The AWS account ID of the owner of the security group.void
setTags
(Collection<Tag> tags) Any tags assigned to the security group.void
[EC2-VPC] The ID of the VPC for the security group.toString()
Returns a string representation of this object; useful for testing and debugging.withDescription
(String description) A description of the security group.withGroupId
(String groupId) The ID of the security group.withGroupName
(String groupName) The name of the security group.withIpPermissions
(IpPermission... ipPermissions) One or more inbound rules associated with the security group.withIpPermissions
(Collection<IpPermission> ipPermissions) One or more inbound rules associated with the security group.withIpPermissionsEgress
(IpPermission... ipPermissionsEgress) [EC2-VPC] One or more outbound rules associated with the security group.withIpPermissionsEgress
(Collection<IpPermission> ipPermissionsEgress) [EC2-VPC] One or more outbound rules associated with the security group.withOwnerId
(String ownerId) The AWS account ID of the owner of the security group.Any tags assigned to the security group.withTags
(Collection<Tag> tags) Any tags assigned to the security group.[EC2-VPC] The ID of the VPC for the security group.
-
Constructor Details
-
SecurityGroup
public SecurityGroup()
-
-
Method Details
-
setOwnerId
The AWS account ID of the owner of the security group.
- Parameters:
ownerId
- The AWS account ID of the owner of the security group.
-
getOwnerId
The AWS account ID of the owner of the security group.
- Returns:
- The AWS account ID of the owner of the security group.
-
withOwnerId
The AWS account ID of the owner of the security group.
- Parameters:
ownerId
- The AWS account ID of the owner of the security group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setGroupName
The name of the security group.
- Parameters:
groupName
- The name of the security group.
-
getGroupName
The name of the security group.
- Returns:
- The name of the security group.
-
withGroupName
The name of the security group.
- Parameters:
groupName
- The name of the security group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setGroupId
The ID of the security group.
- Parameters:
groupId
- The ID of the security group.
-
getGroupId
The ID of the security group.
- Returns:
- The ID of the security group.
-
withGroupId
The ID of the security group.
- Parameters:
groupId
- The ID of the security group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDescription
A description of the security group.
- Parameters:
description
- A description of the security group.
-
getDescription
A description of the security group.
- Returns:
- A description of the security group.
-
withDescription
A description of the security group.
- Parameters:
description
- A description of the security group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getIpPermissions
One or more inbound rules associated with the security group.
- Returns:
- One or more inbound rules associated with the security group.
-
setIpPermissions
One or more inbound rules associated with the security group.
- Parameters:
ipPermissions
- One or more inbound rules associated with the security group.
-
withIpPermissions
One or more inbound rules associated with the security group.
NOTE: This method appends the values to the existing list (if any). Use
setIpPermissions(java.util.Collection)
orwithIpPermissions(java.util.Collection)
if you want to override the existing values.- Parameters:
ipPermissions
- One or more inbound rules associated with the security group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withIpPermissions
One or more inbound rules associated with the security group.
- Parameters:
ipPermissions
- One or more inbound rules associated with the security group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getIpPermissionsEgress
[EC2-VPC] One or more outbound rules associated with the security group.
- Returns:
- [EC2-VPC] One or more outbound rules associated with the security group.
-
setIpPermissionsEgress
[EC2-VPC] One or more outbound rules associated with the security group.
- Parameters:
ipPermissionsEgress
- [EC2-VPC] One or more outbound rules associated with the security group.
-
withIpPermissionsEgress
[EC2-VPC] One or more outbound rules associated with the security group.
NOTE: This method appends the values to the existing list (if any). Use
setIpPermissionsEgress(java.util.Collection)
orwithIpPermissionsEgress(java.util.Collection)
if you want to override the existing values.- Parameters:
ipPermissionsEgress
- [EC2-VPC] One or more outbound rules associated with the security group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withIpPermissionsEgress
[EC2-VPC] One or more outbound rules associated with the security group.
- Parameters:
ipPermissionsEgress
- [EC2-VPC] One or more outbound rules associated with the security group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setVpcId
[EC2-VPC] The ID of the VPC for the security group.
- Parameters:
vpcId
- [EC2-VPC] The ID of the VPC for the security group.
-
getVpcId
[EC2-VPC] The ID of the VPC for the security group.
- Returns:
- [EC2-VPC] The ID of the VPC for the security group.
-
withVpcId
[EC2-VPC] The ID of the VPC for the security group.
- Parameters:
vpcId
- [EC2-VPC] The ID of the VPC for the security group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getTags
Any tags assigned to the security group.
- Returns:
- Any tags assigned to the security group.
-
setTags
Any tags assigned to the security group.
- Parameters:
tags
- Any tags assigned to the security group.
-
withTags
Any tags assigned to the security group.
NOTE: This method appends the values to the existing list (if any). Use
setTags(java.util.Collection)
orwithTags(java.util.Collection)
if you want to override the existing values.- Parameters:
tags
- Any tags assigned to the security group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withTags
Any tags assigned to the security group.
- Parameters:
tags
- Any tags assigned to the security group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-