/*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.CreateReplaceRootVolumeTaskRequestMarshaller;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateReplaceRootVolumeTaskRequest extends AmazonWebServiceRequest implements Serializable, Cloneable,
DryRunSupportedRequest
* The ID of the instance for which to replace the root volume.
*
* The ID of the snapshot from which to restore the replacement root volume. The specified snapshot must be a
* snapshot that you previously created from the original root volume.
*
* If you want to restore the replacement root volume to the initial launch state, or if you want to restore the
* replacement root volume from an AMI, omit this parameter.
*
* Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a
* client token, a randomly generated token is used for the request to ensure idempotency. For more information, see
* Ensuring
* idempotency.
*
* The tags to apply to the root volume replacement task.
*
* The ID of the AMI to use to restore the root volume. The specified AMI must have the same product code, billing
* information, architecture type, and virtualization type as that of the instance.
*
* If you want to restore the replacement volume from a specific snapshot, or if you want to restore it to its
* launch state, omit this parameter.
*
* Indicates whether to automatically delete the original root volume after the root volume replacement task
* completes. To delete the original root volume, specify
* The ID of the instance for which to replace the root volume.
*
* The ID of the instance for which to replace the root volume.
*
* The ID of the instance for which to replace the root volume.
*
* The ID of the snapshot from which to restore the replacement root volume. The specified snapshot must be a
* snapshot that you previously created from the original root volume.
*
* If you want to restore the replacement root volume to the initial launch state, or if you want to restore the
* replacement root volume from an AMI, omit this parameter.
* true
. If you choose to keep the original root
* volume after the replacement task completes, you must manually delete it when you no longer need it.
*
* If you want to restore the replacement root volume to the initial launch state, or if you want to restore * the replacement root volume from an AMI, omit this parameter. */ public void setSnapshotId(String snapshotId) { this.snapshotId = snapshotId; } /** *
* The ID of the snapshot from which to restore the replacement root volume. The specified snapshot must be a * snapshot that you previously created from the original root volume. *
** If you want to restore the replacement root volume to the initial launch state, or if you want to restore the * replacement root volume from an AMI, omit this parameter. *
* * @return The ID of the snapshot from which to restore the replacement root volume. The specified snapshot must be * a snapshot that you previously created from the original root volume. ** If you want to restore the replacement root volume to the initial launch state, or if you want to restore * the replacement root volume from an AMI, omit this parameter. */ public String getSnapshotId() { return this.snapshotId; } /** *
* The ID of the snapshot from which to restore the replacement root volume. The specified snapshot must be a * snapshot that you previously created from the original root volume. *
** If you want to restore the replacement root volume to the initial launch state, or if you want to restore the * replacement root volume from an AMI, omit this parameter. *
* * @param snapshotId * The ID of the snapshot from which to restore the replacement root volume. The specified snapshot must be a * snapshot that you previously created from the original root volume. ** If you want to restore the replacement root volume to the initial launch state, or if you want to restore * the replacement root volume from an AMI, omit this parameter. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateReplaceRootVolumeTaskRequest withSnapshotId(String snapshotId) { setSnapshotId(snapshotId); return this; } /** *
* Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a * client token, a randomly generated token is used for the request to ensure idempotency. For more information, see * Ensuring * idempotency. *
* * @param clientToken * Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not * specify a client token, a randomly generated token is used for the request to ensure idempotency. For more * information, see Ensuring * idempotency. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** ** Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a * client token, a randomly generated token is used for the request to ensure idempotency. For more information, see * Ensuring * idempotency. *
* * @return Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not * specify a client token, a randomly generated token is used for the request to ensure idempotency. For * more information, see Ensuring * idempotency. */ public String getClientToken() { return this.clientToken; } /** ** Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a * client token, a randomly generated token is used for the request to ensure idempotency. For more information, see * Ensuring * idempotency. *
* * @param clientToken * Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not * specify a client token, a randomly generated token is used for the request to ensure idempotency. For more * information, see Ensuring * idempotency. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateReplaceRootVolumeTaskRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** ** The tags to apply to the root volume replacement task. *
* * @return The tags to apply to the root volume replacement task. */ public java.util.List* The tags to apply to the root volume replacement task. *
* * @param tagSpecifications * The tags to apply to the root volume replacement task. */ public void setTagSpecifications(java.util.Collection* The tags to apply to the root volume replacement task. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTagSpecifications(java.util.Collection)} or {@link #withTagSpecifications(java.util.Collection)} if * you want to override the existing values. *
* * @param tagSpecifications * The tags to apply to the root volume replacement task. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateReplaceRootVolumeTaskRequest withTagSpecifications(TagSpecification... tagSpecifications) { if (this.tagSpecifications == null) { setTagSpecifications(new com.amazonaws.internal.SdkInternalList* The tags to apply to the root volume replacement task. *
* * @param tagSpecifications * The tags to apply to the root volume replacement task. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateReplaceRootVolumeTaskRequest withTagSpecifications(java.util.Collection* The ID of the AMI to use to restore the root volume. The specified AMI must have the same product code, billing * information, architecture type, and virtualization type as that of the instance. *
** If you want to restore the replacement volume from a specific snapshot, or if you want to restore it to its * launch state, omit this parameter. *
* * @param imageId * The ID of the AMI to use to restore the root volume. The specified AMI must have the same product code, * billing information, architecture type, and virtualization type as that of the instance. ** If you want to restore the replacement volume from a specific snapshot, or if you want to restore it to * its launch state, omit this parameter. */ public void setImageId(String imageId) { this.imageId = imageId; } /** *
* The ID of the AMI to use to restore the root volume. The specified AMI must have the same product code, billing * information, architecture type, and virtualization type as that of the instance. *
** If you want to restore the replacement volume from a specific snapshot, or if you want to restore it to its * launch state, omit this parameter. *
* * @return The ID of the AMI to use to restore the root volume. The specified AMI must have the same product code, * billing information, architecture type, and virtualization type as that of the instance. ** If you want to restore the replacement volume from a specific snapshot, or if you want to restore it to * its launch state, omit this parameter. */ public String getImageId() { return this.imageId; } /** *
* The ID of the AMI to use to restore the root volume. The specified AMI must have the same product code, billing * information, architecture type, and virtualization type as that of the instance. *
** If you want to restore the replacement volume from a specific snapshot, or if you want to restore it to its * launch state, omit this parameter. *
* * @param imageId * The ID of the AMI to use to restore the root volume. The specified AMI must have the same product code, * billing information, architecture type, and virtualization type as that of the instance. ** If you want to restore the replacement volume from a specific snapshot, or if you want to restore it to * its launch state, omit this parameter. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateReplaceRootVolumeTaskRequest withImageId(String imageId) { setImageId(imageId); return this; } /** *
* Indicates whether to automatically delete the original root volume after the root volume replacement task
* completes. To delete the original root volume, specify true
. If you choose to keep the original root
* volume after the replacement task completes, you must manually delete it when you no longer need it.
*
true
. If you choose to keep the
* original root volume after the replacement task completes, you must manually delete it when you no longer
* need it.
*/
public void setDeleteReplacedRootVolume(Boolean deleteReplacedRootVolume) {
this.deleteReplacedRootVolume = deleteReplacedRootVolume;
}
/**
*
* Indicates whether to automatically delete the original root volume after the root volume replacement task
* completes. To delete the original root volume, specify true
. If you choose to keep the original root
* volume after the replacement task completes, you must manually delete it when you no longer need it.
*
true
. If you choose to keep the
* original root volume after the replacement task completes, you must manually delete it when you no longer
* need it.
*/
public Boolean getDeleteReplacedRootVolume() {
return this.deleteReplacedRootVolume;
}
/**
*
* Indicates whether to automatically delete the original root volume after the root volume replacement task
* completes. To delete the original root volume, specify true
. If you choose to keep the original root
* volume after the replacement task completes, you must manually delete it when you no longer need it.
*
true
. If you choose to keep the
* original root volume after the replacement task completes, you must manually delete it when you no longer
* need it.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateReplaceRootVolumeTaskRequest withDeleteReplacedRootVolume(Boolean deleteReplacedRootVolume) {
setDeleteReplacedRootVolume(deleteReplacedRootVolume);
return this;
}
/**
*
* Indicates whether to automatically delete the original root volume after the root volume replacement task
* completes. To delete the original root volume, specify true
. If you choose to keep the original root
* volume after the replacement task completes, you must manually delete it when you no longer need it.
*
true
. If you choose to keep the
* original root volume after the replacement task completes, you must manually delete it when you no longer
* need it.
*/
public Boolean isDeleteReplacedRootVolume() {
return this.deleteReplacedRootVolume;
}
/**
* This method is intended for internal use only. Returns the marshaled request configured with additional
* parameters to enable operation dry-run.
*/
@Override
public Request