BackupUnitApi

All URIs are relative to https://api.ionos.com/cloudapi/v5

MethodHTTP requestDescription

Delete /backupunits/{backupunitId}

Delete a Backup Unit

Get /backupunits/{backupunitId}

Returns the specified backup Unit

Get /backupunits

List Backup Units

Patch /backupunits/{backupunitId}

Partially modify a Backup Unit

Post /backupunits

Create a Backup Unit

Put /backupunits/{backupunitId}

Modify a Backup Unit

Get /backupunits/{backupunitId}/ssourl

Returns a single signon URL for the specified backup Unit.

BackupunitsDelete

var result map[string]interface{} = BackupunitsDelete(ctx, backupunitId)
                      .Pretty(pretty)
                      .Depth(depth)
                      .XContractNumber(xContractNumber)
                      .Execute()

Delete a Backup Unit

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    backupunitId := "backupunitId_example" // string | The unique ID of the backup Unit
    pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
    depth := int32(56) // int32 | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) 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)
    xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.BackupUnitApi.BackupunitsDelete(context.Background(), backupunitId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitApi.BackupunitsDelete``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `BackupunitsDelete`: map[string]interface{}
    fmt.Fprintf(os.Stdout, "Response from `BackupUnitApi.BackupunitsDelete`: %v\n", resp)
}

Path Parameters

NameTypeDescriptionNotes

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

NameTypeDescriptionNotes

pretty

bool

Controls whether response is pretty-printed (with indentation and new lines)

[default to true]

depth

int32

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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 having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

map[string]interface{}

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

BackupunitsFindById

var result BackupUnit = BackupunitsFindById(ctx, backupunitId)
                      .Pretty(pretty)
                      .Depth(depth)
                      .XContractNumber(xContractNumber)
                      .Execute()

Returns the specified backup Unit

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    backupunitId := "backupunitId_example" // string | The unique ID of the backup unit
    pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
    depth := int32(56) // int32 | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) 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)
    xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.BackupUnitApi.BackupunitsFindById(context.Background(), backupunitId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitApi.BackupunitsFindById``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `BackupunitsFindById`: BackupUnit
    fmt.Fprintf(os.Stdout, "Response from `BackupUnitApi.BackupunitsFindById`: %v\n", resp)
}

Path Parameters

NameTypeDescriptionNotes

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

NameTypeDescriptionNotes

pretty

bool

Controls whether response is pretty-printed (with indentation and new lines)

[default to true]

depth

int32

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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 having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

BackupUnit

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

BackupunitsGet

var result BackupUnits = BackupunitsGet(ctx)
                      .Pretty(pretty)
                      .Depth(depth)
                      .XContractNumber(xContractNumber)
                      .Execute()

List Backup Units

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
    depth := int32(56) // int32 | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) 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)
    xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.BackupUnitApi.BackupunitsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitApi.BackupunitsGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `BackupunitsGet`: BackupUnits
    fmt.Fprintf(os.Stdout, "Response from `BackupUnitApi.BackupunitsGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiBackupunitsGetRequest struct via the builder pattern

NameTypeDescriptionNotes

pretty

bool

Controls whether response is pretty-printed (with indentation and new lines)

[default to true]

depth

int32

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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 having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

BackupUnits

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

BackupunitsPatch

var result BackupUnit = BackupunitsPatch(ctx, backupunitId)
                      .BackupUnitProperties(backupUnitProperties)
                      .Pretty(pretty)
                      .Depth(depth)
                      .XContractNumber(xContractNumber)
                      .Execute()

Partially modify a Backup Unit

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    backupunitId := "backupunitId_example" // string | The unique ID of the backup unit
    backupUnitProperties := *openapiclient.NewBackupUnitProperties("BackupUnitName") // BackupUnitProperties | Modified backup Unit properties
    pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
    depth := int32(56) // int32 | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) 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)
    xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.BackupUnitApi.BackupunitsPatch(context.Background(), backupunitId).BackupUnitProperties(backupUnitProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitApi.BackupunitsPatch``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `BackupunitsPatch`: BackupUnit
    fmt.Fprintf(os.Stdout, "Response from `BackupUnitApi.BackupunitsPatch`: %v\n", resp)
}

Path Parameters

NameTypeDescriptionNotes

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

NameTypeDescriptionNotes

backupUnitProperties

Modified backup Unit properties

pretty

bool

Controls whether response is pretty-printed (with indentation and new lines)

[default to true]

depth

int32

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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 having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

BackupUnit

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

BackupunitsPost

var result BackupUnit = BackupunitsPost(ctx)
                      .BackupUnit(backupUnit)
                      .Pretty(pretty)
                      .Depth(depth)
                      .XContractNumber(xContractNumber)
                      .Execute()

Create a Backup Unit

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    backupUnit := *openapiclient.NewBackupUnit(*openapiclient.NewBackupUnitProperties("BackupUnitName")) // BackupUnit | Payload containing data to create a new Backup Unit
    pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
    depth := int32(56) // int32 | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) 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)
    xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.BackupUnitApi.BackupunitsPost(context.Background()).BackupUnit(backupUnit).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitApi.BackupunitsPost``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `BackupunitsPost`: BackupUnit
    fmt.Fprintf(os.Stdout, "Response from `BackupUnitApi.BackupunitsPost`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiBackupunitsPostRequest struct via the builder pattern

NameTypeDescriptionNotes

backupUnit

Payload containing data to create a new Backup Unit

pretty

bool

Controls whether response is pretty-printed (with indentation and new lines)

[default to true]

depth

int32

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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 having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

BackupUnit

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

BackupunitsPut

var result BackupUnit = BackupunitsPut(ctx, backupunitId)
                      .BackupUnit(backupUnit)
                      .Pretty(pretty)
                      .Depth(depth)
                      .XContractNumber(xContractNumber)
                      .Execute()

Modify a Backup Unit

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    backupunitId := "backupunitId_example" // string | The unique ID of the backup unit
    backupUnit := *openapiclient.NewBackupUnit(*openapiclient.NewBackupUnitProperties("BackupUnitName")) // BackupUnit | Modified backup Unit
    pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
    depth := int32(56) // int32 | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) 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)
    xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.BackupUnitApi.BackupunitsPut(context.Background(), backupunitId).BackupUnit(backupUnit).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitApi.BackupunitsPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `BackupunitsPut`: BackupUnit
    fmt.Fprintf(os.Stdout, "Response from `BackupUnitApi.BackupunitsPut`: %v\n", resp)
}

Path Parameters

NameTypeDescriptionNotes

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

NameTypeDescriptionNotes

backupUnit

Modified backup Unit

pretty

bool

Controls whether response is pretty-printed (with indentation and new lines)

[default to true]

depth

int32

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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 having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

BackupUnit

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

BackupunitsSsourlGet

var result BackupUnitSSO = BackupunitsSsourlGet(ctx, backupunitId)
                      .Pretty(pretty)
                      .XContractNumber(xContractNumber)
                      .Execute()

Returns a single signon URL for the specified backup Unit.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    backupunitId := "backupunitId_example" // string | The unique UUID of the backup unit
    pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
    xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.BackupUnitApi.BackupunitsSsourlGet(context.Background(), backupunitId).Pretty(pretty).XContractNumber(xContractNumber).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitApi.BackupunitsSsourlGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `BackupunitsSsourlGet`: BackupUnitSSO
    fmt.Fprintf(os.Stdout, "Response from `BackupUnitApi.BackupunitsSsourlGet`: %v\n", resp)
}

Path Parameters

NameTypeDescriptionNotes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

backupunitId

string

The unique UUID of the backup unit

Other Parameters

Other parameters are passed through a pointer to a apiBackupunitsSsourlGetRequest struct via the builder pattern

NameTypeDescriptionNotes

pretty

bool

Controls whether response is pretty-printed (with indentation and new lines)

[default to true]

xContractNumber

int32

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

BackupUnitSSO

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

Last updated