public class DeleteSecurityGroupRequest extends AmazonWebServiceRequest implements java.io.Serializable, DryRunSupportedRequest<DeleteSecurityGroupRequest>
DeleteSecurityGroup operation
.
Deletes a security group.
If you attempt to delete a security group that is associated with an
instance, or is referenced by another security group, the operation
fails with InvalidGroup.InUse
in EC2-Classic or
DependencyViolation
in EC2-VPC.
Constructor and Description |
---|
DeleteSecurityGroupRequest()
Default constructor for a new DeleteSecurityGroupRequest object.
|
DeleteSecurityGroupRequest(java.lang.String groupName)
Constructs a new DeleteSecurityGroupRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
Request<DeleteSecurityGroupRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
java.lang.String |
getGroupId()
The ID of the security group.
|
java.lang.String |
getGroupName()
[EC2-Classic, default VPC] The name of the security group.
|
int |
hashCode() |
void |
setGroupId(java.lang.String groupId)
The ID of the security group.
|
void |
setGroupName(java.lang.String groupName)
[EC2-Classic, default VPC] The name of the security group.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
DeleteSecurityGroupRequest |
withGroupId(java.lang.String groupId)
The ID of the security group.
|
DeleteSecurityGroupRequest |
withGroupName(java.lang.String groupName)
[EC2-Classic, default VPC] The name of the security group.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public DeleteSecurityGroupRequest()
public DeleteSecurityGroupRequest(java.lang.String groupName)
groupName
- [EC2-Classic, default VPC] The name of the security
group. You can specify either the security group name or the security
group ID.public java.lang.String getGroupName()
public void setGroupName(java.lang.String groupName)
groupName
- [EC2-Classic, default VPC] The name of the security group. You can
specify either the security group name or the security group ID.public DeleteSecurityGroupRequest withGroupName(java.lang.String groupName)
Returns a reference to this object so that method calls can be chained together.
groupName
- [EC2-Classic, default VPC] The name of the security group. You can
specify either the security group name or the security group ID.public java.lang.String getGroupId()
public void setGroupId(java.lang.String groupId)
groupId
- The ID of the security group. Required for a nondefault VPC.public DeleteSecurityGroupRequest withGroupId(java.lang.String groupId)
Returns a reference to this object so that method calls can be chained together.
groupId
- The ID of the security group. Required for a nondefault VPC.public Request<DeleteSecurityGroupRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<DeleteSecurityGroupRequest>
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.