com.amazonaws.services.ec2.model
Class CopyImageRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.CopyImageRequest
All Implemented Interfaces:
DryRunSupportedRequest<CopyImageRequest>, java.io.Serializable

public class CopyImageRequest
extends AmazonWebServiceRequest
implements java.io.Serializable, DryRunSupportedRequest<CopyImageRequest>

Container for the parameters to the CopyImage operation.

Initiates the copy of an AMI from the specified source region to the region in which the request was made. You specify the destination region by using its endpoint when making the request. AMIs that use encrypted Amazon EBS snapshots cannot be copied with this method.

For more information, see Copying AMIs in the Amazon Elastic Compute Cloud User Guide .

See Also:
AmazonEC2.copyImage(CopyImageRequest), Serialized Form

Constructor Summary
CopyImageRequest()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getClientToken()
          Unique, case-sensitive identifier you provide to ensure idempotency of the request.
 java.lang.String getDescription()
          A description for the new AMI in the destination region.
 Request<CopyImageRequest> getDryRunRequest()
          This method is intended for internal use only.
 java.lang.String getName()
          The name of the new AMI in the destination region.
 java.lang.String getSourceImageId()
          The ID of the AMI to copy.
 java.lang.String getSourceRegion()
          The name of the region that contains the AMI to copy.
 int hashCode()
           
 void setClientToken(java.lang.String clientToken)
          Unique, case-sensitive identifier you provide to ensure idempotency of the request.
 void setDescription(java.lang.String description)
          A description for the new AMI in the destination region.
 void setName(java.lang.String name)
          The name of the new AMI in the destination region.
 void setSourceImageId(java.lang.String sourceImageId)
          The ID of the AMI to copy.
 void setSourceRegion(java.lang.String sourceRegion)
          The name of the region that contains the AMI to copy.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CopyImageRequest withClientToken(java.lang.String clientToken)
          Unique, case-sensitive identifier you provide to ensure idempotency of the request.
 CopyImageRequest withDescription(java.lang.String description)
          A description for the new AMI in the destination region.
 CopyImageRequest withName(java.lang.String name)
          The name of the new AMI in the destination region.
 CopyImageRequest withSourceImageId(java.lang.String sourceImageId)
          The ID of the AMI to copy.
 CopyImageRequest withSourceRegion(java.lang.String sourceRegion)
          The name of the region that contains the AMI to copy.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setDelegationToken, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CopyImageRequest

public CopyImageRequest()
Method Detail

getSourceRegion

public java.lang.String getSourceRegion()
The name of the region that contains the AMI to copy.

Returns:
The name of the region that contains the AMI to copy.

setSourceRegion

public void setSourceRegion(java.lang.String sourceRegion)
The name of the region that contains the AMI to copy.

Parameters:
sourceRegion - The name of the region that contains the AMI to copy.

withSourceRegion

public CopyImageRequest withSourceRegion(java.lang.String sourceRegion)
The name of the region that contains the AMI to copy.

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

Parameters:
sourceRegion - The name of the region that contains the AMI to copy.
Returns:
A reference to this updated object so that method calls can be chained together.

getSourceImageId

public java.lang.String getSourceImageId()
The ID of the AMI to copy.

Returns:
The ID of the AMI to copy.

setSourceImageId

public void setSourceImageId(java.lang.String sourceImageId)
The ID of the AMI to copy.

Parameters:
sourceImageId - The ID of the AMI to copy.

withSourceImageId

public CopyImageRequest withSourceImageId(java.lang.String sourceImageId)
The ID of the AMI to copy.

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

Parameters:
sourceImageId - The ID of the AMI to copy.
Returns:
A reference to this updated object so that method calls can be chained together.

getName

public java.lang.String getName()
The name of the new AMI in the destination region.

Returns:
The name of the new AMI in the destination region.

setName

public void setName(java.lang.String name)
The name of the new AMI in the destination region.

Parameters:
name - The name of the new AMI in the destination region.

withName

public CopyImageRequest withName(java.lang.String name)
The name of the new AMI in the destination region.

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

Parameters:
name - The name of the new AMI in the destination region.
Returns:
A reference to this updated object so that method calls can be chained together.

getDescription

public java.lang.String getDescription()
A description for the new AMI in the destination region.

Returns:
A description for the new AMI in the destination region.

setDescription

public void setDescription(java.lang.String description)
A description for the new AMI in the destination region.

Parameters:
description - A description for the new AMI in the destination region.

withDescription

public CopyImageRequest withDescription(java.lang.String description)
A description for the new AMI in the destination region.

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

Parameters:
description - A description for the new AMI in the destination region.
Returns:
A reference to this updated object so that method calls can be chained together.

getClientToken

public java.lang.String getClientToken()
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.

Returns:
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.

setClientToken

public void setClientToken(java.lang.String clientToken)
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.

Parameters:
clientToken - Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.

withClientToken

public CopyImageRequest withClientToken(java.lang.String clientToken)
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.

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

Parameters:
clientToken - Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.
Returns:
A reference to this updated object so that method calls can be chained together.

getDryRunRequest

public Request<CopyImageRequest> getDryRunRequest()
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.

Specified by:
getDryRunRequest in interface DryRunSupportedRequest<CopyImageRequest>

toString

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

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


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