Interface CreateReplaceRootVolumeTaskRequest.Builder
- All Superinterfaces:
AwsRequest.Builder
,Buildable
,CopyableBuilder<CreateReplaceRootVolumeTaskRequest.Builder,
,CreateReplaceRootVolumeTaskRequest> Ec2Request.Builder
,SdkBuilder<CreateReplaceRootVolumeTaskRequest.Builder,
,CreateReplaceRootVolumeTaskRequest> SdkPojo
,SdkRequest.Builder
- Enclosing class:
CreateReplaceRootVolumeTaskRequest
-
Method Summary
Modifier and TypeMethodDescriptionclientToken
(String clientToken) Unique, case-sensitive identifier you provide to ensure the idempotency of the request.deleteReplacedRootVolume
(Boolean deleteReplacedRootVolume) Indicates whether to automatically delete the original root volume after the root volume replacement task completes.Checks whether you have the required permissions for the action, without actually making the request, and provides an error response.The ID of the AMI to use to restore the root volume.instanceId
(String instanceId) The ID of the instance for which to replace the root volume.overrideConfiguration
(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration
(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.snapshotId
(String snapshotId) The ID of the snapshot from which to restore the replacement root volume.tagSpecifications
(Collection<TagSpecification> tagSpecifications) The tags to apply to the root volume replacement task.tagSpecifications
(Consumer<TagSpecification.Builder>... tagSpecifications) The tags to apply to the root volume replacement task.tagSpecifications
(TagSpecification... tagSpecifications) The tags to apply to the root volume replacement task.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfiguration
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.services.ec2.model.Ec2Request.Builder
build
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
instanceId
The ID of the instance for which to replace the root volume.
- Parameters:
instanceId
- The ID of the instance for which to replace the root volume.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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.
- Parameters:
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dryRun
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.- Parameters:
dryRun
- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response isDryRunOperation
. Otherwise, it isUnauthorizedOperation
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tagSpecifications
CreateReplaceRootVolumeTaskRequest.Builder tagSpecifications(Collection<TagSpecification> tagSpecifications) The tags to apply to the root volume replacement task.
- Parameters:
tagSpecifications
- The tags to apply to the root volume replacement task.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tagSpecifications
The tags to apply to the root volume replacement task.
- Parameters:
tagSpecifications
- The tags to apply to the root volume replacement task.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tagSpecifications
CreateReplaceRootVolumeTaskRequest.Builder tagSpecifications(Consumer<TagSpecification.Builder>... tagSpecifications) The tags to apply to the root volume replacement task.
This is a convenience method that creates an instance of theTagSpecification.Builder
avoiding the need to create one manually viaTagSpecification.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed totagSpecifications(List<TagSpecification>)
.- Parameters:
tagSpecifications
- a consumer that will call methods onTagSpecification.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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.
- Parameters:
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
deleteReplacedRootVolume
CreateReplaceRootVolumeTaskRequest.Builder deleteReplacedRootVolume(Boolean 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.- Parameters:
deleteReplacedRootVolume
- Indicates whether to automatically delete the original root volume after the root volume replacement task completes. To delete the original root volume, specifytrue
. 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
overrideConfiguration
CreateReplaceRootVolumeTaskRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
overrideConfiguration
- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
CreateReplaceRootVolumeTaskRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
builderConsumer
- AConsumer
to which an emptyAwsRequestOverrideConfiguration.Builder
will be given.- Returns:
- This object for method chaining.
-