EC2 Instances

The /virtualMachines resource collection represents all EC2 instances that reside in AWS Regions selected in the backup policy settings and can be protected by Veeam Backup for AWS.

Get Collection of EC2 Instances

The HTTP GET request to the /virtualMachines endpoint retrieves a list of all EC2 instances that can be protected by Veeam Backup for AWS.

SecurityBearer
Request
query Parameters
SearchPattern
string

Returns only those items of a resource collection whose names match the specified search pattern in the parameter value.

ResourceAwsAccountId
string

Returns only EC2 instances that belong to an AWS Account with the specified AWS ID.

ResourceAwsOrganizationId
string

Returns only EC2 instances that belong to an AWS Organization with the specified AWS ID.

RegionId
string <uuid>

Returns only EC2 instances that reside in the regions with the specified ID.

Offset
integer <int32>

Excludes from a response the first N items of a resource collection.

Limit
integer <int32>

Specifies the maximum number of items of a resource collection to return in a response.

Sort
Array of strings (VirtualMachinesSortColumns)

Specifies the order of items in the response. For more information, see the Veeam Backup for AWS REST API Reference Overview, section Sort Parameter.

Items Enum: "nameAsc" "nameDesc" "locationAsc" "locationDesc" "resourceAwsAccountIdAsc" "resourceAwsAccountIdDesc"
ProtectedByPolicy
string

Returns only EC2 instances with the specified protection status (EC2 instances that are protected by backup policies or EC2 instances that are not protected by any of backup policies). For more information, see the Veeam Backup for AWS REST API Reference Overview, section Filter Parameter.

Enum: "Protected" "Unprotected"
BackupType
Array of strings

Returns only EC2 instances with the specified backup type. For more information, see the Veeam Backup for AWS REST API Reference Overview, section Filter Parameter.

Items Enum: "Snapshot" "Backup" "ManualSnapshot"
BackupState
string

Returns only EC2 instances with the specified backup state (EC2 instances that have backups or EC2 instances that have no backups). For more information, see the Veeam Backup for AWS REST API Reference Overview, section Filter Parameter.

Enum: "Protected" "Unprotected"
header Parameters
x-api-version
required
string
Default: 1.7-rev0

Specifies the current version and revision of the Veeam Backup for AWS REST API.

Responses
200

OK

400

Bad Request. The request body is malformed, incomplete or otherwise invalid.

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

404

Not Found. One or more resources specified in the request could not be found in the specified resource collection.

500

Internal Server Error. The request has been received but could not be completed because of an internal error on the server side.

503

Service Unavailable

504

Gateway Timeout

get/api/v1/virtualMachines
Request samples
curl -i -X GET \
  'https://helpcenter.veeam.com/api/v1/virtualMachines?SearchPattern=string&ResourceAwsAccountId=string&ResourceAwsOrganizationId=string&RegionId=497f6eca-6276-4993-bfeb-53cbbbba6f08&Offset=0&Limit=0&Sort=nameAsc&ProtectedByPolicy=Protected&BackupType=Snapshot&BackupState=Protected' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'x-api-version: 1.7-rev0'
Response samples
{}

Perform Infrastructure Rescan for EC2 Instances

The HTTP POST request to the /virtualMachines/rescan endpoint runs the infrastructure rescanning operation for EC2 instances.

SecurityBearer
Request
header Parameters
x-api-version
required
string
Default: 1.7-rev0

Specifies the current version and revision of the Veeam Backup for AWS REST API.

Responses
202

Accepted

400

Bad Request. The request body is malformed, incomplete or otherwise invalid

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending a request does not have adequate privileges to access one or more objects specified in the request.

404

Not Found. One or more resources specified in the request could not be found in the specified resource collection.

500

Internal Server Error. The request has been received but could not be completed because of an internal error on the server side.

503

Service Unavailable

504

Gateway Timeout

post/api/v1/virtualMachines/rescan
Request samples
curl -i -X POST \
  https://helpcenter.veeam.com/api/v1/virtualMachines/rescan \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'x-api-version: 1.7-rev0'
Response samples
{}

Get EC2 Instance Data

The HTTP GET request to the /virtualMachines/{virtualMachineId} endpoint retrieves information on an EC2 instance with the specified ID.

SecurityBearer
Request
path Parameters
virtualMachineId
required
string <uuid>

System ID assigned to the EC2 instance in the Veeam Backup for AWS REST API.

Example: 51ee4beb-7cbb-4208-86a8-09f89308bbe5
header Parameters
x-api-version
required
string
Default: 1.7-rev0

Specifies the current version and revision of the Veeam Backup for AWS REST API.

Responses
200

OK

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

404

Not Found. One or more resources specified in the request could not be found in the specified resource collection.

500

Internal Server Error. The request has been received but could not be completed because of an internal error on the server side.

503

Service Unavailable

504

Gateway Timeout

get/api/v1/virtualMachines/{virtualMachineId}
Request samples
curl -i -X GET \
  'https://helpcenter.veeam.com/api/v1/virtualMachines/{virtualMachineId}' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'x-api-version: 1.7-rev0'
Response samples
{}

Create Snapshot of EC2 Instance

The HTTP POST request to the /virtualMachines/{virtualMachineId}/takeSnapshot endpoint creates a manual snapshot of an EC2 instance with the specified ID.

NOTE
When you create a snapshot manually, Veeam Backup for AWS detects if there is a snapshot chain for the processed EC2 instance. If the snapshot chain exists, Veeam Backup for AWS continues the existing chain. Otherwise, the created snapshot starts a new snapshot chain for the processed EC2 instance.

SecurityBearer
Request
path Parameters
virtualMachineId
required
string <uuid>

System ID assigned to the EC2 instance in the Veeam Backup for AWS REST API.

header Parameters
x-api-version
required
string
Default: 1.7-rev0

Specifies the current version and revision of the Veeam Backup for AWS REST API.

Request Body schema: application/json
required
IAMRoleId
required
string <uuid>

System ID assigned in the Veeam Backup for AWS REST API to an IAM role whose permissions Veeam Backup for AWS will use to create a cloud-native snapshot.

targetIAMRoleIdToCopySnapshots
string <uuid>

[Applies to the Remote region snapshot mode] Specifies an IAM role that has permissions to store snapshots in the target AWS Region.

targetRegionIdToCopySnapshots
string <uuid>

[Applies to the Remote region snapshot mode] Specifies a target AWS Region to store the created snapshot.

encryptionKey
string

[Applies to the Remote region snapshot mode with encryption enabled] Specifies the ARN of a KMS key used for snapshot encryption.

Array of objects (TagSpec)

Specifies custom tags to be assigned to the snapshots and replicas created by the policy.

copyTagsFromVolumeEnabled
boolean

Defines whether to copy tags of EBS volumes attached to processed EC2 instances and assign them to snapshots and replicas created by the policy. The default value is false.

Responses
202

Accepted

400

Bad Request. The request body is malformed, incomplete or otherwise invalid

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

404

Not Found. One or more resources specified in the request could not be found in the specified resource collection.

500

Internal Server Error. The request has been received but could not be completed because of an internal error on the server side.

503

Service Unavailable

504

Gateway Timeout

post/api/v1/virtualMachines/{virtualMachineId}/takeSnapshot
Request samples
application/json
{
  • "IAMRoleId": "eca01dcc-d324-4017-92cb-04ec240aaf0a",
  • "copyTagsFromVolumeEnabled": true
}
Response samples
{}

Remove Snapshots of EC2 Instance

The HTTP POST request to the /virtualMachines/{virtualMachineId}/deleteSnapshots endpoint removes the whole snapshot chain of an EC2 instance with the specified ID.

SecurityBearer
Request
path Parameters
virtualMachineId
required
string <uuid>

System ID assigned to the EC2 instance in the Veeam Backup for AWS REST API.

header Parameters
x-api-version
required
string
Default: 1.7-rev0

Specifies the current version and revision of the Veeam Backup for AWS REST API.

Request Body schema: application/json

The snapshot removal specification.

snapshotType
string (DeleteSnapshotType)

Specifies the type of snapshots that will be deleted.

Enum: "All" "Standard" "Replica" "Manual"
Responses
202

Accepted

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

404

Not Found. One or more resources specified in the request could not be found in the specified resource collection.

500

Internal Server Error. The request has been received but could not be completed because of an internal error on the server side.

503

Service Unavailable

504

Gateway Timeout

post/api/v1/virtualMachines/{virtualMachineId}/deleteSnapshots
Request samples
application/json
{
  • "snapshotType": "All"
}
Response samples
{}

Remove Backups of EC2 Instance

The HTTP POST request to the /virtualMachines/{virtualMachineId}/deleteBackups endpoint removes the whole backup chain of an EC2 instance with the specified ID.

SecurityBearer
Request
path Parameters
virtualMachineId
required
string <uuid>

System ID assigned to the EC2 instance in the Veeam Backup for AWS REST API.

header Parameters
x-api-version
required
string
Default: 1.7-rev0

Specifies the current version and revision of the Veeam Backup for AWS REST API.

Request Body schema: application/json

The backup removal specification.

backupType
string (DeleteBackupType)

Specifies the type of backups that will be deleted.

Enum: "All" "Standard" "Archived"
Responses
202

Accepted

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

404

Not Found. One or more resources specified in the request could not be found in the specified resource collection.

500

Internal Server Error. The request has been received but could not be completed because of an internal error on the server side.

503

Service Unavailable

504

Gateway Timeout

post/api/v1/virtualMachines/{virtualMachineId}/deleteBackups
Request samples
application/json
{
  • "backupType": "All"
}
Response samples
{}

Remove Restore Points of EC2 Instance

The HTTP DELETE request to the virtualMachines/{virtualMachineId}/restorePoints endpoint deletes all restore points of an EC2 instance with the specified ID.

SecurityBearer
Request
path Parameters
virtualMachineId
required
string <uuid>

System ID assigned to the EC2 instance in the Veeam Backup for AWS REST API.

header Parameters
x-api-version
required
string
Default: 1.7-rev0

Specifies the current version and revision of the Veeam Backup for AWS REST API.

Responses
202

Accepted

400

Bad Request. The request body is malformed, incomplete or otherwise invalid

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending a request does not have adequate privileges to access one or more objects specified in the request.

404

Not Found. One or more resources specified in the request could not be found in the specified resource collection.

500

Internal Server Error. The request has been received but could not be completed because of an internal error on the server side.

503

Service Unavailable

504

Gateway Timeout

delete/api/v1/virtualMachines/{virtualMachineId}/restorePoints
Request samples
curl -i -X DELETE \
  'https://helpcenter.veeam.com/api/v1/virtualMachines/{virtualMachineId}/restorePoints' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'x-api-version: 1.7-rev0'
Response samples
{}

Get EBS Volumes

The HTTP GET request to the /virtualMachines/volumes endpoint retrieves a list of EBS volumes that can be protected by Veeam Backup for AWS.

SecurityBearer
Request
query Parameters
SearchPattern
string

Returns only those items of a resource collection whose names match the specified search pattern in the parameter value.

AwsAccounts
Array of strings <uuid>

Returns only EBS volumes to which an IAM role with the specified ID has permissions. For more information, see the Veeam Backup for AWS REST API Reference Overview, section Filter Parameter.

Locations
Array of strings <uuid>

Returns only EBS volumes residing in an AWS Region with the specified ID. For more information, see the Veeam Backup for AWS REST API Reference Overview, section Filter Parameter.

Offset
integer <int32>

Excludes from a response the first N items of a resource collection.

Limit
integer <int32>

Specifies the maximum number of items of a resource collection to return in a response.

header Parameters
x-api-version
required
string
Default: 1.7-rev0

Specifies the current version and revision of the Veeam Backup for AWS REST API.

Responses
200

OK

400

Bad Request. The request body is malformed, incomplete or otherwise invalid.

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

404

Not Found. One or more resources specified in the request could not be found in the specified resource collection.

500

Internal Server Error. The request has been received but could not be completed because of an internal error on the server side.

503

Service Unavailable

504

Gateway Timeout

get/api/v1/virtualMachines/volumes
Request samples
curl -i -X GET \
  'https://helpcenter.veeam.com/api/v1/virtualMachines/volumes?SearchPattern=string&AwsAccounts=497f6eca-6276-4993-bfeb-53cbbbba6f08&Locations=497f6eca-6276-4993-bfeb-53cbbbba6f08&Offset=0&Limit=0' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'x-api-version: 1.7-rev0'
Response samples
{
  • "data": [
    ],
  • "totalCount": 2,
  • "_links": []
}

Export Collection of EC2 Instances

The HTTP POST request to the /virtualMachines/export endpoint exports a list of EC2 instances to a .CSV or an .XML file. To specify the required type of the file, use the Accept request header.

SecurityBearer
Request
header Parameters
x-api-version
required
string
Default: 1.7-rev0

Specifies the current version and revision of the Veeam Backup for AWS REST API.

Responses
200

OK

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

500

Internal Server Error. The request has been received but could not be completed because of an internal error on the server side.

503

Service Unavailable

504

Gateway Timeout

post/api/v1/virtualMachines/export
Request samples
curl -i -X POST \
  https://helpcenter.veeam.com/api/v1/virtualMachines/export \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'x-api-version: 1.7-rev0'