master
Models
BackupUnitsApi
All URIs are relative to https://api.ionos.com/cloudapi/v6
Method
HTTP request
Description
Delete /backupunits/{backupunitId}
Delete backup units
Get /backupunits/{backupunitId}
Retrieve backup units
Get /backupunits
List backup units
Patch /backupunits/{backupunitId}
Partially modify backup units
Post /backupunits
Create backup units
Put /backupunits/{backupunitId}
Modify backup units
Get /backupunits/{backupunitId}/ssourl
Retrieve BU single sign-on URLs

BackupunitsDelete

1
var result = BackupunitsDelete(ctx, backupunitId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Execute()
Copied!
Delete backup units

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
backupunitId := "backupunitId_example" // string | The unique ID of the backup unit.
12
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
13
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
14
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
15
16
configuration := openapiclient.NewConfiguration()
17
apiClient := openapiclient.NewAPIClient(configuration)
18
resp, r, err := apiClient.BackupUnitsApi.BackupunitsDelete(context.Background(), backupunitId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
19
if err != nil {
20
fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsDelete``: %v\n", err)
21
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22
}
23
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
backupunitId
string
The unique ID of the backup unit.

Other Parameters

Other parameters are passed through a pointer to a apiBackupunitsDeleteRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
xContractNumber
int32
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Return type

(empty response body)

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

BackupunitsFindById

1
var result BackupUnit = BackupunitsFindById(ctx, backupunitId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Execute()
Copied!
Retrieve backup units

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
backupunitId := "backupunitId_example" // string | The unique ID of the backup unit.
12
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
13
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
14
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
15
16
configuration := openapiclient.NewConfiguration()
17
apiClient := openapiclient.NewAPIClient(configuration)
18
resp, r, err := apiClient.BackupUnitsApi.BackupunitsFindById(context.Background(), backupunitId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
19
if err != nil {
20
fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsFindById``: %v\n", err)
21
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22
}
23
// response from `BackupunitsFindById`: BackupUnit
24
fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsFindById`: %v\n", resp)
25
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
backupunitId
string
The unique ID of the backup unit.

Other Parameters

Other parameters are passed through a pointer to a apiBackupunitsFindByIdRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
xContractNumber
int32
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Return type

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

BackupunitsGet

1
var result BackupUnits = BackupunitsGet(ctx)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Execute()
Copied!
List backup units

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
12
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
13
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
14
15
configuration := openapiclient.NewConfiguration()
16
apiClient := openapiclient.NewAPIClient(configuration)
17
resp, r, err := apiClient.BackupUnitsApi.BackupunitsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
18
if err != nil {
19
fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsGet``: %v\n", err)
20
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21
}
22
// response from `BackupunitsGet`: BackupUnits
23
fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsGet`: %v\n", resp)
24
}
Copied!

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiBackupunitsGetRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
xContractNumber
int32
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Return type

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

BackupunitsPatch

1
var result BackupUnit = BackupunitsPatch(ctx, backupunitId)
2
.BackupUnit(backupUnit)
3
.Pretty(pretty)
4
.Depth(depth)
5
.XContractNumber(xContractNumber)
6
.Execute()
Copied!
Partially modify backup units

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
backupunitId := "backupunitId_example" // string | The unique ID of the backup unit.
12
backupUnit := *openapiclient.NewBackupUnitProperties("BackupUnitName") // BackupUnitProperties | The properties of the backup unit to be updated.
13
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
14
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
15
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
16
17
configuration := openapiclient.NewConfiguration()
18
apiClient := openapiclient.NewAPIClient(configuration)
19
resp, r, err := apiClient.BackupUnitsApi.BackupunitsPatch(context.Background(), backupunitId).BackupUnit(backupUnit).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
20
if err != nil {
21
fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsPatch``: %v\n", err)
22
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23
}
24
// response from `BackupunitsPatch`: BackupUnit
25
fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsPatch`: %v\n", resp)
26
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
backupunitId
string
The unique ID of the backup unit.

Other Parameters

Other parameters are passed through a pointer to a apiBackupunitsPatchRequest struct via the builder pattern
Name
Type
Description
Notes
backupUnit
The properties of the backup unit to be updated.
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
xContractNumber
int32
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Return type

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

BackupunitsPost

1
var result BackupUnit = BackupunitsPost(ctx)
2
.BackupUnit(backupUnit)
3
.Pretty(pretty)
4
.Depth(depth)
5
.XContractNumber(xContractNumber)
6
.Execute()
Copied!
Create backup units

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
backupUnit := *openapiclient.NewBackupUnit(*openapiclient.NewBackupUnitProperties("BackupUnitName")) // BackupUnit | The backup unit to create.
12
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
13
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
14
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
15
16
configuration := openapiclient.NewConfiguration()
17
apiClient := openapiclient.NewAPIClient(configuration)
18
resp, r, err := apiClient.BackupUnitsApi.BackupunitsPost(context.Background()).BackupUnit(backupUnit).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
19
if err != nil {
20
fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsPost``: %v\n", err)
21
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22
}
23
// response from `BackupunitsPost`: BackupUnit
24
fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsPost`: %v\n", resp)
25
}
Copied!

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiBackupunitsPostRequest struct via the builder pattern
Name
Type
Description
Notes
backupUnit
The backup unit to create.
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
xContractNumber
int32
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Return type

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

BackupunitsPut

1
var result BackupUnit = BackupunitsPut(ctx, backupunitId)
2
.BackupUnit(backupUnit)
3
.Pretty(pretty)
4
.Depth(depth)
5
.XContractNumber(xContractNumber)
6
.Execute()
Copied!
Modify backup units

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
backupunitId := "backupunitId_example" // string | The unique ID of the backup unit.
12
backupUnit := *openapiclient.NewBackupUnit(*openapiclient.NewBackupUnitProperties("BackupUnitName")) // BackupUnit | The modified backup unit.
13
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
14
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
15
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
16
17
configuration := openapiclient.NewConfiguration()
18
apiClient := openapiclient.NewAPIClient(configuration)
19
resp, r, err := apiClient.BackupUnitsApi.BackupunitsPut(context.Background(), backupunitId).BackupUnit(backupUnit).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
20
if err != nil {
21
fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsPut``: %v\n", err)
22
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23
}
24
// response from `BackupunitsPut`: BackupUnit
25
fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsPut`: %v\n", resp)
26
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
backupunitId
string
The unique ID of the backup unit.

Other Parameters

Other parameters are passed through a pointer to a apiBackupunitsPutRequest struct via the builder pattern
Name
Type
Description
Notes
backupUnit
The modified backup unit.
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
xContractNumber
int32
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Return type

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

BackupunitsSsourlGet

1
var result BackupUnitSSO = BackupunitsSsourlGet(ctx, backupunitId)
2
.Pretty(pretty)
3
.XContractNumber(xContractNumber)
4
.Execute()
Copied!
Retrieve BU single sign-on URLs

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
backupunitId := "backupunitId_example" // string | The unique ID of the backup unit.
12
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
13
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
14
15
configuration := openapiclient.NewConfiguration()
16
apiClient := openapiclient.NewAPIClient(configuration)
17
resp, r, err := apiClient.BackupUnitsApi.BackupunitsSsourlGet(context.Background(), backupunitId).Pretty(pretty).XContractNumber(xContractNumber).Execute()
18
if err != nil {
19
fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsSsourlGet``: %v\n", err)
20
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21
}
22
// response from `BackupunitsSsourlGet`: BackupUnitSSO
23
fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsSsourlGet`: %v\n", resp)
24
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
backupunitId
string
The unique ID of the backup unit.

Other Parameters

Other parameters are passed through a pointer to a apiBackupunitsSsourlGetRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
xContractNumber
int32
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Return type

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json