Restore an EC2 instance
Restores the specified EC2 instance backup to the specified target destination.
Query Parameters
- embed string
Embeds the details of each associated resource. Set the parameter to one of the following embeddable links to include additional details associated with the resource.
For more information about embedded links, refer to the Embedding Referenced Resources section of this guide.Embeddable Link Description read-task Embeds the associated task in the response. For example, ?embed=read-task
- application/json
Request Body required
source object required
The EC2 instance backup to be restored.
backup_id string requiredThe Clumio-assigned ID of the EC2 instance backup to be restored. Use the GET /backups/aws/ec2-instances endpoint to fetch valid values.
target object required
The target configuration per EC2 restore type. Only one of these fields should be set.
ami_restore_target object
The configuration for the restore to AMI.
description stringThe description for the AMI.
ebs_block_device_mappings object[] required
Block device mappings chosen for the EBS volumes being restored.
kms_key_native_id stringThe AWS-assigned ID for a customer managed KMS key under which the EBS volume is encrypted.
name string requiredThe device name where the EBS volume is attached to the instance, needed by instance_restore_target and ami_restore_target restore type and by volumes_restore_target when target_instance_native_id is provided.
tags object[]
The AWS tags to be applied to the volume.
key string requiredThe AWS-assigned tag key.
value stringThe AWS-assigned tag value.
volume_native_id string requiredThe AWS-assigned ID of the backed-up volume.
environment_id string requiredThe Clumio-assigned ID of the AWS environment to be used as the restore destination. Use the GET /datasources/aws/environments endpoint to fetch valid values.
name string requiredThe name for the AMI.
tags object[]
The AWS tags to be applied to the restored AMI.
key string requiredThe AWS-assigned tag key.
value stringThe AWS-assigned tag value.
instance_restore_target object
The configuration of an EC2 instance to be restored.
ami_native_id stringThe AWS-assigned ID of the Amazon Machine Image (AMI) used to launch the EC2 instance.
aws_az string requiredThe availability zone for the instance. This is determined by the subnet chosen to restore the EC2 instance into.
ebs_block_device_mappings object[] required
Block device mappings for the EBS volumes to restore.
kms_key_native_id stringThe AWS-assigned ID for a customer managed KMS key under which the EBS volume is encrypted.
name string requiredThe device name where the EBS volume is attached to the instance, needed by instance_restore_target and ami_restore_target restore type and by volumes_restore_target when target_instance_native_id is provided.
tags object[]
The AWS tags to be applied to the volume.
key string requiredThe AWS-assigned tag key.
value stringThe AWS-assigned tag value.
volume_native_id string requiredThe AWS-assigned ID of the backed-up volume.
environment_id string requiredThe Clumio-assigned ID of the AWS environment to be used as the restore destination. Use the GET /datasources/aws/environments endpoint to fetch valid values.
iam_instance_profile_name stringThe name of IAM instance profile to launch the instance with.
key_pair_name stringThe name of SSH KeyPair to be used.
network_interfaces object[] required
The network interfaces to associate with the instance.
device_index int64 requiredThe position of the network interface in the attachment order. A primary network interface has a device index of 0.
network_interface_native_id stringThe AWS-assigned ID of the existing network interface to attach to the restored instance. If one wishes to restore this network interface from the backup, then this field should be set to
null
.restore_default booleanWhether or not a default network interface should be restored. It will not have any of the same configurations as the backup network interface.
restore_from_backup booleanWhether or not the network interface should be restored the backup network interface. It will be configured with the same configurations as the backup network interface.
security_group_native_ids string[]The AWS-assigned IDs for the security groups to associate with this network interface. If one wishes to attach an existing network interface, then this field should be set to
null
.subnet_native_id stringThe AWS-assigned ID of the subnet associated with the network interface. If one wishes to attach an existing network interface, then this field should be set to
null
.should_power_on booleanDefault value:
false
Whether or not to power the instance on at the end of restore. If this is set to true, the instance state will be 'running.' If it is set to false, the state will be 'stopped.'
subnet_native_id string requiredThe AWS-assigned ID of the subnet to launch the instance into.
tags object[]
The AWS tags to be applied to the restored instance.
key string requiredThe AWS-assigned tag key.
value stringThe AWS-assigned tag value.
vpc_native_id string requiredThe AWS-assigned ID of the vpc to launch the instance into.
volumes_restore_target object
The target configuration for the volumes to be restored.
aws_az stringThe availability zone for restoring the volumes unattached. Either this or target_instance_native_id needs to be specified.
ebs_block_device_mappings object[] required
Block device mappings chosen for the EBS volumes being restored.
kms_key_native_id stringThe AWS-assigned ID for a customer managed KMS key under which the EBS volume is encrypted.
name string requiredThe device name where the EBS volume is attached to the instance, needed by instance_restore_target and ami_restore_target restore type and by volumes_restore_target when target_instance_native_id is provided.
tags object[]
The AWS tags to be applied to the volume.
key string requiredThe AWS-assigned tag key.
value stringThe AWS-assigned tag value.
volume_native_id string requiredThe AWS-assigned ID of the backed-up volume.
environment_id string requiredThe Clumio-assigned ID of the AWS environment to be used as the restore destination. Use the GET /datasources/aws/environments endpoint to fetch valid values.
target_instance_native_id stringThe aws native ID of the EC2 instance to be used to attach the restored volumes. If not present, then aws_az need to be specified.
- 202
- default
Success
- application/api.clumio.restored-aws-ec2-instances=v1+json
- Schema
- Example (from schema)
Schema
_embedded object
Embedded responses related to the resource.
read-task Embeds the associated task of a resource in the response if requested using the `embed` query parameter.Embeds the associated task of a resource in the response if requested using the
embed
query parameter._links object
URLs to pages related to the resource.
_self object
The HATEOAS link to this resource.
href stringThe URI for the referenced operation.
templated booleanDetermines whether the "href" link is a URI template. If set to
true
, the "href" link is a URI template.type stringThe HTTP method to be used with the "href" link for the referenced operation.
read-task object
A HATEOAS link to the task associated with this resource.
href stringThe URI for the referenced operation.
templated booleanDetermines whether the "href" link is a URI template. If set to
true
, the "href" link is a URI template.type stringThe HTTP method to be used with the "href" link for the referenced operation.
- task_id string
The Clumio-assigned ID of the task created by this restore request. The progress of the task can be monitored using the
GET /tasks/{task_id}
endpoint.
{
"_embedded": {},
"_links": {
"_self": {
"href": "string",
"templated": true,
"type": "string"
},
"read-task": {
"href": "string",
"templated": true,
"type": "string"
}
},
"task_id": "string"
}
Error
- application/json
- Schema
- Example (from schema)
Schema
errors object[]
A list of errors encountered during runtime.
error_code uint32error_message stringThe reason for the error.
{
"errors": [
{
"error_code": 0,
"error_message": "string"
}
]
}