com.amazonaws.services.ec2.model
Class CreateVolumeRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.CreateVolumeRequest

public class CreateVolumeRequest
extends AmazonWebServiceRequest

Container for the parameters to the CreateVolume operation.

Initializes an empty volume of a given size.

See Also:
AmazonEC2.createVolume(CreateVolumeRequest)

Constructor Summary
CreateVolumeRequest()
          Default constructor for a new CreateVolumeRequest object.
CreateVolumeRequest(Integer size, String availabilityZone)
          Constructs a new CreateVolumeRequest object.
CreateVolumeRequest(String snapshotId, String availabilityZone)
          Constructs a new CreateVolumeRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 String getAvailabilityZone()
          The Availability Zone in which to create the new volume.
 Integer getIops()
          Returns the value of the Iops property for this object.
 Integer getSize()
          The size of the volume, in gigabytes.
 String getSnapshotId()
          The ID of the snapshot from which to create the new volume.
 String getVolumeType()
          Returns the value of the VolumeType property for this object.
 int hashCode()
           
 void setAvailabilityZone(String availabilityZone)
          The Availability Zone in which to create the new volume.
 void setIops(Integer iops)
          Sets the value of the Iops property for this object.
 void setSize(Integer size)
          The size of the volume, in gigabytes.
 void setSnapshotId(String snapshotId)
          The ID of the snapshot from which to create the new volume.
 void setVolumeType(String volumeType)
          Sets the value of the VolumeType property for this object.
 void setVolumeType(VolumeType volumeType)
          Sets the value of the VolumeType property for this object.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CreateVolumeRequest withAvailabilityZone(String availabilityZone)
          The Availability Zone in which to create the new volume.
 CreateVolumeRequest withIops(Integer iops)
          Sets the value of the Iops property for this object.
 CreateVolumeRequest withSize(Integer size)
          The size of the volume, in gigabytes.
 CreateVolumeRequest withSnapshotId(String snapshotId)
          The ID of the snapshot from which to create the new volume.
 CreateVolumeRequest withVolumeType(String volumeType)
          Sets the value of the VolumeType property for this object.
 CreateVolumeRequest withVolumeType(VolumeType volumeType)
          Sets the value of the VolumeType property for this object.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CreateVolumeRequest

public CreateVolumeRequest()
Default constructor for a new CreateVolumeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


CreateVolumeRequest

public CreateVolumeRequest(Integer size,
                           String availabilityZone)
Constructs a new CreateVolumeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
size - The size of the volume, in gigabytes. Required if you are not creating a volume from a snapshot.
availabilityZone - The Availability Zone in which to create the new volume.

CreateVolumeRequest

public CreateVolumeRequest(String snapshotId,
                           String availabilityZone)
Constructs a new CreateVolumeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
snapshotId - The ID of the snapshot from which to create the new volume.
availabilityZone - The Availability Zone in which to create the new volume.
Method Detail

getSize

public Integer getSize()
The size of the volume, in gigabytes. Required if you are not creating a volume from a snapshot.

Returns:
The size of the volume, in gigabytes. Required if you are not creating a volume from a snapshot.

setSize

public void setSize(Integer size)
The size of the volume, in gigabytes. Required if you are not creating a volume from a snapshot.

Parameters:
size - The size of the volume, in gigabytes. Required if you are not creating a volume from a snapshot.

withSize

public CreateVolumeRequest withSize(Integer size)
The size of the volume, in gigabytes. Required if you are not creating a volume from a snapshot.

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

Parameters:
size - The size of the volume, in gigabytes. Required if you are not creating a volume from a snapshot.
Returns:
A reference to this updated object so that method calls can be chained together.

getSnapshotId

public String getSnapshotId()
The ID of the snapshot from which to create the new volume.

Returns:
The ID of the snapshot from which to create the new volume.

setSnapshotId

public void setSnapshotId(String snapshotId)
The ID of the snapshot from which to create the new volume.

Parameters:
snapshotId - The ID of the snapshot from which to create the new volume.

withSnapshotId

public CreateVolumeRequest withSnapshotId(String snapshotId)
The ID of the snapshot from which to create the new volume.

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

Parameters:
snapshotId - The ID of the snapshot from which to create the new volume.
Returns:
A reference to this updated object so that method calls can be chained together.

getAvailabilityZone

public String getAvailabilityZone()
The Availability Zone in which to create the new volume.

Returns:
The Availability Zone in which to create the new volume.

setAvailabilityZone

public void setAvailabilityZone(String availabilityZone)
The Availability Zone in which to create the new volume.

Parameters:
availabilityZone - The Availability Zone in which to create the new volume.

withAvailabilityZone

public CreateVolumeRequest withAvailabilityZone(String availabilityZone)
The Availability Zone in which to create the new volume.

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

Parameters:
availabilityZone - The Availability Zone in which to create the new volume.
Returns:
A reference to this updated object so that method calls can be chained together.

getVolumeType

public String getVolumeType()
Returns the value of the VolumeType property for this object.

Constraints:
Allowed Values: standard, io1

Returns:
The value of the VolumeType property for this object.
See Also:
VolumeType

setVolumeType

public void setVolumeType(String volumeType)
Sets the value of the VolumeType property for this object.

Constraints:
Allowed Values: standard, io1

Parameters:
volumeType - The new value for the VolumeType property for this object.
See Also:
VolumeType

withVolumeType

public CreateVolumeRequest withVolumeType(String volumeType)
Sets the value of the VolumeType property for this object.

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

Constraints:
Allowed Values: standard, io1

Parameters:
volumeType - The new value for the VolumeType property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
VolumeType

setVolumeType

public void setVolumeType(VolumeType volumeType)
Sets the value of the VolumeType property for this object.

Constraints:
Allowed Values: standard, io1

Parameters:
volumeType - The new value for the VolumeType property for this object.
See Also:
VolumeType

withVolumeType

public CreateVolumeRequest withVolumeType(VolumeType volumeType)
Sets the value of the VolumeType property for this object.

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

Constraints:
Allowed Values: standard, io1

Parameters:
volumeType - The new value for the VolumeType property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
VolumeType

getIops

public Integer getIops()
Returns the value of the Iops property for this object.

Returns:
The value of the Iops property for this object.

setIops

public void setIops(Integer iops)
Sets the value of the Iops property for this object.

Parameters:
iops - The new value for the Iops property for this object.

withIops

public CreateVolumeRequest withIops(Integer iops)
Sets the value of the Iops property for this object.

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

Parameters:
iops - The new value for the Iops property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

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

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


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