public class SecurityGroup
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Describes a security group
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
description
A description of the security group.
|
private java.lang.String |
groupId
The ID of the security group.
|
private java.lang.String |
groupName
The name of the security group.
|
private SdkInternalList<IpPermission> |
ipPermissions
One or more inbound rules associated with the security group.
|
private SdkInternalList<IpPermission> |
ipPermissionsEgress
[EC2-VPC] One or more outbound rules associated with the security group.
|
private java.lang.String |
ownerId
The AWS account ID of the owner of the security group.
|
private SdkInternalList<Tag> |
tags
Any tags assigned to the security group.
|
private java.lang.String |
vpcId
[EC2-VPC] The ID of the VPC for the security group.
|
Constructor and Description |
---|
SecurityGroup() |
Modifier and Type | Method and Description |
---|---|
SecurityGroup |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getDescription()
A description of the security group.
|
java.lang.String |
getGroupId()
The ID of the security group.
|
java.lang.String |
getGroupName()
The name of the security group.
|
java.util.List<IpPermission> |
getIpPermissions()
One or more inbound rules associated with the security group.
|
java.util.List<IpPermission> |
getIpPermissionsEgress()
[EC2-VPC] One or more outbound rules associated with the security group.
|
java.lang.String |
getOwnerId()
The AWS account ID of the owner of the security group.
|
java.util.List<Tag> |
getTags()
Any tags assigned to the security group.
|
java.lang.String |
getVpcId()
[EC2-VPC] The ID of the VPC for the security group.
|
int |
hashCode() |
void |
setDescription(java.lang.String description)
A description of the security group.
|
void |
setGroupId(java.lang.String groupId)
The ID of the security group.
|
void |
setGroupName(java.lang.String groupName)
The name of the security group.
|
void |
setIpPermissions(java.util.Collection<IpPermission> ipPermissions)
One or more inbound rules associated with the security group.
|
void |
setIpPermissionsEgress(java.util.Collection<IpPermission> ipPermissionsEgress)
[EC2-VPC] One or more outbound rules associated with the security group.
|
void |
setOwnerId(java.lang.String ownerId)
The AWS account ID of the owner of the security group.
|
void |
setTags(java.util.Collection<Tag> tags)
Any tags assigned to the security group.
|
void |
setVpcId(java.lang.String vpcId)
[EC2-VPC] The ID of the VPC for the security group.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
SecurityGroup |
withDescription(java.lang.String description)
A description of the security group.
|
SecurityGroup |
withGroupId(java.lang.String groupId)
The ID of the security group.
|
SecurityGroup |
withGroupName(java.lang.String groupName)
The name of the security group.
|
SecurityGroup |
withIpPermissions(java.util.Collection<IpPermission> ipPermissions)
One or more inbound rules associated with the security group.
|
SecurityGroup |
withIpPermissions(IpPermission... ipPermissions)
One or more inbound rules associated with the security group.
|
SecurityGroup |
withIpPermissionsEgress(java.util.Collection<IpPermission> ipPermissionsEgress)
[EC2-VPC] One or more outbound rules associated with the security group.
|
SecurityGroup |
withIpPermissionsEgress(IpPermission... ipPermissionsEgress)
[EC2-VPC] One or more outbound rules associated with the security group.
|
SecurityGroup |
withOwnerId(java.lang.String ownerId)
The AWS account ID of the owner of the security group.
|
SecurityGroup |
withTags(java.util.Collection<Tag> tags)
Any tags assigned to the security group.
|
SecurityGroup |
withTags(Tag... tags)
Any tags assigned to the security group.
|
SecurityGroup |
withVpcId(java.lang.String vpcId)
[EC2-VPC] The ID of the VPC for the security group.
|
private java.lang.String ownerId
The AWS account ID of the owner of the security group.
private java.lang.String groupName
The name of the security group.
private java.lang.String groupId
The ID of the security group.
private java.lang.String description
A description of the security group.
private SdkInternalList<IpPermission> ipPermissions
One or more inbound rules associated with the security group.
private SdkInternalList<IpPermission> ipPermissionsEgress
[EC2-VPC] One or more outbound rules associated with the security group.
private java.lang.String vpcId
[EC2-VPC] The ID of the VPC for the security group.
private SdkInternalList<Tag> tags
Any tags assigned to the security group.
public void setOwnerId(java.lang.String ownerId)
The AWS account ID of the owner of the security group.
ownerId
- The AWS account ID of the owner of the security group.public java.lang.String getOwnerId()
The AWS account ID of the owner of the security group.
public SecurityGroup withOwnerId(java.lang.String ownerId)
The AWS account ID of the owner of the security group.
ownerId
- The AWS account ID of the owner of the security group.public void setGroupName(java.lang.String groupName)
The name of the security group.
groupName
- The name of the security group.public java.lang.String getGroupName()
The name of the security group.
public SecurityGroup withGroupName(java.lang.String groupName)
The name of the security group.
groupName
- The name of the security group.public void setGroupId(java.lang.String groupId)
The ID of the security group.
groupId
- The ID of the security group.public java.lang.String getGroupId()
The ID of the security group.
public SecurityGroup withGroupId(java.lang.String groupId)
The ID of the security group.
groupId
- The ID of the security group.public void setDescription(java.lang.String description)
A description of the security group.
description
- A description of the security group.public java.lang.String getDescription()
A description of the security group.
public SecurityGroup withDescription(java.lang.String description)
A description of the security group.
description
- A description of the security group.public java.util.List<IpPermission> getIpPermissions()
One or more inbound rules associated with the security group.
public void setIpPermissions(java.util.Collection<IpPermission> ipPermissions)
One or more inbound rules associated with the security group.
ipPermissions
- One or more inbound rules associated with the security group.public SecurityGroup withIpPermissions(IpPermission... ipPermissions)
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)
or
withIpPermissions(java.util.Collection)
if you want to override
the existing values.
ipPermissions
- One or more inbound rules associated with the security group.public SecurityGroup withIpPermissions(java.util.Collection<IpPermission> ipPermissions)
One or more inbound rules associated with the security group.
ipPermissions
- One or more inbound rules associated with the security group.public java.util.List<IpPermission> getIpPermissionsEgress()
[EC2-VPC] One or more outbound rules associated with the security group.
public void setIpPermissionsEgress(java.util.Collection<IpPermission> ipPermissionsEgress)
[EC2-VPC] One or more outbound rules associated with the security group.
ipPermissionsEgress
- [EC2-VPC] One or more outbound rules associated with the security
group.public SecurityGroup withIpPermissionsEgress(IpPermission... ipPermissionsEgress)
[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)
or
withIpPermissionsEgress(java.util.Collection)
if you want to
override the existing values.
ipPermissionsEgress
- [EC2-VPC] One or more outbound rules associated with the security
group.public SecurityGroup withIpPermissionsEgress(java.util.Collection<IpPermission> ipPermissionsEgress)
[EC2-VPC] One or more outbound rules associated with the security group.
ipPermissionsEgress
- [EC2-VPC] One or more outbound rules associated with the security
group.public void setVpcId(java.lang.String vpcId)
[EC2-VPC] The ID of the VPC for the security group.
vpcId
- [EC2-VPC] The ID of the VPC for the security group.public java.lang.String getVpcId()
[EC2-VPC] The ID of the VPC for the security group.
public SecurityGroup withVpcId(java.lang.String vpcId)
[EC2-VPC] The ID of the VPC for the security group.
vpcId
- [EC2-VPC] The ID of the VPC for the security group.public java.util.List<Tag> getTags()
Any tags assigned to the security group.
public void setTags(java.util.Collection<Tag> tags)
Any tags assigned to the security group.
tags
- Any tags assigned to the security group.public SecurityGroup withTags(Tag... tags)
Any tags assigned to the security group.
NOTE: This method appends the values to the existing list (if
any). Use setTags(java.util.Collection)
or
withTags(java.util.Collection)
if you want to override the
existing values.
tags
- Any tags assigned to the security group.public SecurityGroup withTags(java.util.Collection<Tag> tags)
Any tags assigned to the security group.
tags
- Any tags assigned to the security group.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public SecurityGroup clone()
clone
in class java.lang.Object