This is an archive version of the document. To get the most up-to-date information, see the current version.

Add Amazon Connection

You can an amazon connection to Veeam Backup for AWS.

Request

To add an amazon connection, send the HTTP POST request to the /amazonConnections endpoint.

HTTP Request

POST https://<hostname>:<port>/api/v1/amazonConnections

Request Headers

The request contains the following headers.

Header

Required/Optional

Value

Description

Authorization

Required

Bearer <Access-Token>

Authenticates a client who sends the request to the server. Must contain the access token for the current logon session in the Bearer <Access-Token> format.

x-api-version

Required

1.0-rev0

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

Content-Type

Required

application/json

Identifies a media type that is used in the body of the request.

Accept

Optional

  • application/json
  • application/problem+json

Specifies a media type of representation that is required in the response message. If the requested type is not supported, the server will return the response in the application/json media type.

Request Body

To add a new amazon connection, send the following parameters in the request body.

Parameter

Type

Description

amazonAccountId

string($uuid)

[Applies if you use an IAM role to add the connection] Specifies a system ID assigned to the IAM role in the Veeam Backup for AWS REST API.

accessKey

string

[Applies if you use access and secret keys to build the connection] Specifies the access key of the AWS account.

secretKey

string

[Applies if you use access and secret keys to build the connection] Specifies the secret key of the AWS account.

regionId

string($uuid)

Specifies a system ID assigned to an AWS region in the Veeam Backup for AWS REST API.

Set the parameter values in the following format:

{

 "amazonAccountId": "string($uuid)",

 "regionId": "string($uuid)"

}

-OR-

{

 "accessKey": "string",

 "secretKey": "string",

 "regionId": "string($uuid)"

}

Response

The server returns the following response to the client.

Response Code

A successfully completed operation returns a response code 201 (Created).

Response Headers

The response to this request contains the following headers. The response may also include additional standard HTTP headers.

Header

Value

Description

Content-Length

integer

Identifies the length of the response body message, in bytes.

Content-Type

  • application/json
  • application/problem+json

Identifies the media type of the response body message.

Response Body

In the response body, Veeam Backup for AWS returns a representation of the added amazon connection. The AmazonConnection schema is used for the resource representation.

Add Amazon ConnectionExample

The following request adds a new amazon connection for an IAM role with the ID d98f4d37-7874-4be1-9702-770078f5c9cd and an AWS region with the ID 35981651-f781-4041-9300-02967d13b944.

Request:

POST https://135.169.170.192:11005/api/v1/amazonConnections

 

Request Header:

Authorization: Bearer <Access-Token>

x-api-version: 1.0-rev0

Content-Type: application/json

 

Request Body:

{

 "amazonAccountId": "d98f4d37-7874-4be1-9702-770078f5c9cd",

 "regionId": "35981651-f781-4041-9300-02967d13b944"

}

 

Response:

201

 

Response Body:

{

 "id": "2c7eb8fb-40e3-4495-9dc9-30f969277917",

 "_links": [

  {

         "method": "GET",

         "rel": "self",

         "href": "https://135.169.170.192:11005/api/v1/amazonConnections/2c7eb8fb-40e3-4495-9dc9-30f969277917"

       },

       {

         "method": "DELETE",

         "rel": "delete",

         "href": "https://135.169.170.192:11005/api/v1/amazonConnections/2c7eb8fb-40e3-4495-9dc9-30f969277917"

       },

       {

         "method": "GET",

         "rel": "CloudNetworks",

         "href": "https://135.169.170.192:11005/api/v1/amazonConnections/2c7eb8fb-40e3-4495-9dc9-30f969277917/cloudNetworks"

       },

       {

         "method": "GET",

         "rel": "CloudSubNetworks",

         "href": "https://135.169.170.192:11005/api/v1/amazonConnections/2c7eb8fb-40e3-4495-9dc9-30f969277917/cloudSubnetworks"

       },

       {

         "method": "GET",

         "rel": "CloudSecurityGroups",

         "href": "https://135.169.170.192:11005/api/v1/amazonConnections/2c7eb8fb-40e3-4495-9dc9-30f969277917/cloudSecurityGroups"

       },

       {

         "method": "GET",

         "rel": "AvailabilityZones",

         "href": "https://135.169.170.192:11005/api/v1/amazonConnections/2c7eb8fb-40e3-4495-9dc9-30f969277917/availabilityZones"

       },

       {

         "method": "GET",

         "rel": "ValidateS3Endpoint",

         "href": "https://135.169.170.192:11005/api/v1/amazonConnections/2c7eb8fb-40e3-4495-9dc9-30f969277917/validateS3endpoint"

       },

       {

         "method": "GET",

         "rel": "CloudEncryptionKeys",

         "href": "https://135.169.170.192:11005/api/v1/amazonConnections/2c7eb8fb-40e3-4495-9dc9-30f969277917/cloudEncryptionKeys"

       },

       {

         "method": "GET",

         "rel": "BucketFolders",

         "href": "https://135.169.170.192:11005/api/v1/amazonConnections/2c7eb8fb-40e3-4495-9dc9-30f969277917/browseBucketFolders"

       }

     ]

   }

 ],

 "_links": [

   {

     "method": "POST",

     "rel": "create",

     "href": "https://135.169.170.192:11005/api/v1/amazonConnections"

   }

 ]

}