public class Reservation
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Describes a reservation.
Modifier and Type | Field and Description |
---|---|
private SdkInternalList<java.lang.String> |
groupNames
One or more security group names.
|
private SdkInternalList<GroupIdentifier> |
groups
[EC2-Classic only] One or more security groups.
|
private SdkInternalList<Instance> |
instances
One or more instances.
|
private java.lang.String |
ownerId
The ID of the AWS account that owns the reservation.
|
private java.lang.String |
requesterId
The ID of the requester that launched the instances on your behalf (for
example, AWS Management Console or Auto Scaling).
|
private java.lang.String |
reservationId
The ID of the reservation.
|
Constructor and Description |
---|
Reservation() |
Modifier and Type | Method and Description |
---|---|
Reservation |
clone() |
boolean |
equals(java.lang.Object obj) |
java.util.List<java.lang.String> |
getGroupNames()
One or more security group names.
|
java.util.List<GroupIdentifier> |
getGroups()
[EC2-Classic only] One or more security groups.
|
java.util.List<Instance> |
getInstances()
One or more instances.
|
java.lang.String |
getOwnerId()
The ID of the AWS account that owns the reservation.
|
java.lang.String |
getRequesterId()
The ID of the requester that launched the instances on your behalf (for
example, AWS Management Console or Auto Scaling).
|
java.lang.String |
getReservationId()
The ID of the reservation.
|
int |
hashCode() |
void |
setGroupNames(java.util.Collection<java.lang.String> groupNames)
One or more security group names.
|
void |
setGroups(java.util.Collection<GroupIdentifier> groups)
[EC2-Classic only] One or more security groups.
|
void |
setInstances(java.util.Collection<Instance> instances)
One or more instances.
|
void |
setOwnerId(java.lang.String ownerId)
The ID of the AWS account that owns the reservation.
|
void |
setRequesterId(java.lang.String requesterId)
The ID of the requester that launched the instances on your behalf (for
example, AWS Management Console or Auto Scaling).
|
void |
setReservationId(java.lang.String reservationId)
The ID of the reservation.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Reservation |
withGroupNames(java.util.Collection<java.lang.String> groupNames)
One or more security group names.
|
Reservation |
withGroupNames(java.lang.String... groupNames)
One or more security group names.
|
Reservation |
withGroups(java.util.Collection<GroupIdentifier> groups)
[EC2-Classic only] One or more security groups.
|
Reservation |
withGroups(GroupIdentifier... groups)
[EC2-Classic only] One or more security groups.
|
Reservation |
withInstances(java.util.Collection<Instance> instances)
One or more instances.
|
Reservation |
withInstances(Instance... instances)
One or more instances.
|
Reservation |
withOwnerId(java.lang.String ownerId)
The ID of the AWS account that owns the reservation.
|
Reservation |
withRequesterId(java.lang.String requesterId)
The ID of the requester that launched the instances on your behalf (for
example, AWS Management Console or Auto Scaling).
|
Reservation |
withReservationId(java.lang.String reservationId)
The ID of the reservation.
|
private java.lang.String reservationId
The ID of the reservation.
private java.lang.String ownerId
The ID of the AWS account that owns the reservation.
private java.lang.String requesterId
The ID of the requester that launched the instances on your behalf (for example, AWS Management Console or Auto Scaling).
private SdkInternalList<GroupIdentifier> groups
[EC2-Classic only] One or more security groups.
private SdkInternalList<Instance> instances
One or more instances.
private SdkInternalList<java.lang.String> groupNames
One or more security group names.
public void setReservationId(java.lang.String reservationId)
The ID of the reservation.
reservationId
- The ID of the reservation.public java.lang.String getReservationId()
The ID of the reservation.
public Reservation withReservationId(java.lang.String reservationId)
The ID of the reservation.
reservationId
- The ID of the reservation.public void setOwnerId(java.lang.String ownerId)
The ID of the AWS account that owns the reservation.
ownerId
- The ID of the AWS account that owns the reservation.public java.lang.String getOwnerId()
The ID of the AWS account that owns the reservation.
public Reservation withOwnerId(java.lang.String ownerId)
The ID of the AWS account that owns the reservation.
ownerId
- The ID of the AWS account that owns the reservation.public void setRequesterId(java.lang.String requesterId)
The ID of the requester that launched the instances on your behalf (for example, AWS Management Console or Auto Scaling).
requesterId
- The ID of the requester that launched the instances on your behalf
(for example, AWS Management Console or Auto Scaling).public java.lang.String getRequesterId()
The ID of the requester that launched the instances on your behalf (for example, AWS Management Console or Auto Scaling).
public Reservation withRequesterId(java.lang.String requesterId)
The ID of the requester that launched the instances on your behalf (for example, AWS Management Console or Auto Scaling).
requesterId
- The ID of the requester that launched the instances on your behalf
(for example, AWS Management Console or Auto Scaling).public java.util.List<GroupIdentifier> getGroups()
[EC2-Classic only] One or more security groups.
public void setGroups(java.util.Collection<GroupIdentifier> groups)
[EC2-Classic only] One or more security groups.
groups
- [EC2-Classic only] One or more security groups.public Reservation withGroups(GroupIdentifier... groups)
[EC2-Classic only] One or more security groups.
NOTE: This method appends the values to the existing list (if
any). Use setGroups(java.util.Collection)
or
withGroups(java.util.Collection)
if you want to override the
existing values.
groups
- [EC2-Classic only] One or more security groups.public Reservation withGroups(java.util.Collection<GroupIdentifier> groups)
[EC2-Classic only] One or more security groups.
groups
- [EC2-Classic only] One or more security groups.public java.util.List<Instance> getInstances()
One or more instances.
public void setInstances(java.util.Collection<Instance> instances)
One or more instances.
instances
- One or more instances.public Reservation withInstances(Instance... instances)
One or more instances.
NOTE: This method appends the values to the existing list (if
any). Use setInstances(java.util.Collection)
or
withInstances(java.util.Collection)
if you want to override the
existing values.
instances
- One or more instances.public Reservation withInstances(java.util.Collection<Instance> instances)
One or more instances.
instances
- One or more instances.public java.util.List<java.lang.String> getGroupNames()
One or more security group names.
public void setGroupNames(java.util.Collection<java.lang.String> groupNames)
One or more security group names.
groupNames
- One or more security group names.public Reservation withGroupNames(java.lang.String... groupNames)
One or more security group names.
NOTE: This method appends the values to the existing list (if
any). Use setGroupNames(java.util.Collection)
or
withGroupNames(java.util.Collection)
if you want to override the
existing values.
groupNames
- One or more security group names.public Reservation withGroupNames(java.util.Collection<java.lang.String> groupNames)
One or more security group names.
groupNames
- One or more security group names.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 Reservation clone()
clone
in class java.lang.Object