latest
Models
Powered By GitBook
VolumeApi
All URIs are relative to https://api.ionos.com/cloudapi/v5
Method
HTTP request
Description
Post /datacenters/{datacenterId}/volumes/{volumeId}/create-snapshot
Create Volume Snapshot
Delete /datacenters/{datacenterId}/volumes/{volumeId}
Delete a Volume
Get /datacenters/{datacenterId}/volumes/{volumeId}
Retrieve a Volume
Get /datacenters/{datacenterId}/volumes
List Volumes
Patch /datacenters/{datacenterId}/volumes/{volumeId}
Partially modify a Volume
Post /datacenters/{datacenterId}/volumes
Create a Volume
Put /datacenters/{datacenterId}/volumes/{volumeId}
Modify a Volume
Post /datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot
Restore Volume Snapshot

DatacentersVolumesCreateSnapshotPost

1
var result Snapshot = DatacentersVolumesCreateSnapshotPost(ctx, datacenterId, volumeId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Name(name)
6
.Description(description)
7
.SecAuthProtection(secAuthProtection)
8
.LicenceType(licenceType)
9
.Execute()
Copied!
Create Volume Snapshot

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
12
volumeId := "volumeId_example" // string | The unique ID of the Volume
13
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
14
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)
15
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
16
name := "name_example" // string | The name of the snapshot (optional)
17
description := "description_example" // string | The description of the snapshot (optional)
18
secAuthProtection := true // bool | Flag representing if extra protection is enabled on snapshot e.g. Two Factor protection etc. (optional)
19
licenceType := "licenceType_example" // string | The OS type of this Snapshot (optional)
20
21
configuration := openapiclient.NewConfiguration()
22
api_client := openapiclient.NewAPIClient(configuration)
23
resp, r, err := api_client.VolumeApi.DatacentersVolumesCreateSnapshotPost(context.Background(), datacenterId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Name(name).Description(description).SecAuthProtection(secAuthProtection).LicenceType(licenceType).Execute()
24
if err != nil {
25
fmt.Fprintf(os.Stderr, "Error when calling `VolumeApi.DatacentersVolumesCreateSnapshotPost``: %v\n", err)
26
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
27
}
28
// response from `DatacentersVolumesCreateSnapshotPost`: Snapshot
29
fmt.Fprintf(os.Stdout, "Response from `VolumeApi.DatacentersVolumesCreateSnapshotPost`: %v\n", resp)
30
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
volumeId
string
The unique ID of the Volume

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersVolumesCreateSnapshotPostRequest struct via the builder pattern
Name
Type
Description
Notes
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
name
string
The name of the snapshot
description
string
The description of the snapshot
secAuthProtection
bool
Flag representing if extra protection is enabled on snapshot e.g. Two Factor protection etc.
licenceType
string
The OS type of this Snapshot

Return type

Snapshot

HTTP request headers

    Content-Type: application/x-www-form-urlencoded
    Accept: application/json

DatacentersVolumesDelete

1
var result map[string]interface{} = DatacentersVolumesDelete(ctx, datacenterId, volumeId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Execute()
Copied!
Delete a Volume

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
12
volumeId := "volumeId_example" // string | The unique ID of the Volume
13
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
14
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)
15
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
16
17
configuration := openapiclient.NewConfiguration()
18
api_client := openapiclient.NewAPIClient(configuration)
19
resp, r, err := api_client.VolumeApi.DatacentersVolumesDelete(context.Background(), datacenterId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
20
if err != nil {
21
fmt.Fprintf(os.Stderr, "Error when calling `VolumeApi.DatacentersVolumesDelete``: %v\n", err)
22
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23
}
24
// response from `DatacentersVolumesDelete`: map[string]interface{}
25
fmt.Fprintf(os.Stdout, "Response from `VolumeApi.DatacentersVolumesDelete`: %v\n", resp)
26
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
volumeId
string
The unique ID of the Volume

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersVolumesDeleteRequest struct via the builder pattern
Name
Type
Description
Notes
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

DatacentersVolumesFindById

1
var result Volume = DatacentersVolumesFindById(ctx, datacenterId, volumeId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Execute()
Copied!
Retrieve a Volume

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
12
volumeId := "volumeId_example" // string | The unique ID of the Volume
13
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
14
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)
15
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
16
17
configuration := openapiclient.NewConfiguration()
18
api_client := openapiclient.NewAPIClient(configuration)
19
resp, r, err := api_client.VolumeApi.DatacentersVolumesFindById(context.Background(), datacenterId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
20
if err != nil {
21
fmt.Fprintf(os.Stderr, "Error when calling `VolumeApi.DatacentersVolumesFindById``: %v\n", err)
22
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23
}
24
// response from `DatacentersVolumesFindById`: Volume
25
fmt.Fprintf(os.Stdout, "Response from `VolumeApi.DatacentersVolumesFindById`: %v\n", resp)
26
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
volumeId
string
The unique ID of the Volume

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersVolumesFindByIdRequest struct via the builder pattern
Name
Type
Description
Notes
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

Volume

HTTP request headers

    Content-Type: Not defined
    Accept: application/json

DatacentersVolumesGet

1
var result Volumes = DatacentersVolumesGet(ctx, datacenterId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Offset(offset)
6
.Limit(limit)
7
.Execute()
Copied!
List Volumes

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
12
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
13
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)
14
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
15
offset := int32(56) // int32 | the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination) (optional) (default to 0)
16
limit := int32(56) // int32 | the maximum number of elements to return (use together with <code>offset</code> for pagination) (optional) (default to 1000)
17
18
configuration := openapiclient.NewConfiguration()
19
api_client := openapiclient.NewAPIClient(configuration)
20
resp, r, err := api_client.VolumeApi.DatacentersVolumesGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
21
if err != nil {
22
fmt.Fprintf(os.Stderr, "Error when calling `VolumeApi.DatacentersVolumesGet``: %v\n", err)
23
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24
}
25
// response from `DatacentersVolumesGet`: Volumes
26
fmt.Fprintf(os.Stdout, "Response from `VolumeApi.DatacentersVolumesGet`: %v\n", resp)
27
}
Copied!

Path Parameters

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

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersVolumesGetRequest struct via the builder pattern
Name
Type
Description
Notes
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
offset
int32
the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)
[default to 0]
limit
int32
the maximum number of elements to return (use together with <code>offset</code> for pagination)
[default to 1000]

Return type

Volumes

HTTP request headers

    Content-Type: Not defined
    Accept: application/json

DatacentersVolumesPatch

1
var result Volume = DatacentersVolumesPatch(ctx, datacenterId, volumeId)
2
.Volume(volume)
3
.Pretty(pretty)
4
.Depth(depth)
5
.XContractNumber(xContractNumber)
6
.Execute()
Copied!
Partially modify a Volume

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
12
volumeId := "volumeId_example" // string | The unique ID of the Volume
13
volume := *openapiclient.NewVolumeProperties(float32(100.0)) // VolumeProperties | Modified properties of Volume
14
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
15
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)
16
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
17
18
configuration := openapiclient.NewConfiguration()
19
api_client := openapiclient.NewAPIClient(configuration)
20
resp, r, err := api_client.VolumeApi.DatacentersVolumesPatch(context.Background(), datacenterId, volumeId).Volume(volume).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
21
if err != nil {
22
fmt.Fprintf(os.Stderr, "Error when calling `VolumeApi.DatacentersVolumesPatch``: %v\n", err)
23
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24
}
25
// response from `DatacentersVolumesPatch`: Volume
26
fmt.Fprintf(os.Stdout, "Response from `VolumeApi.DatacentersVolumesPatch`: %v\n", resp)
27
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
volumeId
string
The unique ID of the Volume

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersVolumesPatchRequest struct via the builder pattern
Name
Type
Description
Notes
volume
Modified properties of Volume
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

Volume

HTTP request headers

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

DatacentersVolumesPost

1
var result Volume = DatacentersVolumesPost(ctx, datacenterId)
2
.Volume(volume)
3
.Pretty(pretty)
4
.Depth(depth)
5
.XContractNumber(xContractNumber)
6
.Execute()
Copied!
Create a Volume

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
12
volume := *openapiclient.NewVolume(*openapiclient.NewVolumeProperties(float32(100.0))) // Volume | Volume to be created
13
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
14
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)
15
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
16
17
configuration := openapiclient.NewConfiguration()
18
api_client := openapiclient.NewAPIClient(configuration)
19
resp, r, err := api_client.VolumeApi.DatacentersVolumesPost(context.Background(), datacenterId).Volume(volume).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
20
if err != nil {
21
fmt.Fprintf(os.Stderr, "Error when calling `VolumeApi.DatacentersVolumesPost``: %v\n", err)
22
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23
}
24
// response from `DatacentersVolumesPost`: Volume
25
fmt.Fprintf(os.Stdout, "Response from `VolumeApi.DatacentersVolumesPost`: %v\n", resp)
26
}
Copied!

Path Parameters

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

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersVolumesPostRequest struct via the builder pattern
Name
Type
Description
Notes
volume
Volume
Volume to be created
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

Volume

HTTP request headers

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

DatacentersVolumesPut

1
var result Volume = DatacentersVolumesPut(ctx, datacenterId, volumeId)
2
.Volume(volume)
3
.Pretty(pretty)
4
.Depth(depth)
5
.XContractNumber(xContractNumber)
6
.Execute()
Copied!
Modify a Volume

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
12
volumeId := "volumeId_example" // string | The unique ID of the Volume
13
volume := *openapiclient.NewVolume(*openapiclient.NewVolumeProperties(float32(100.0))) // Volume | Modified Volume
14
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
15
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)
16
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
17
18
configuration := openapiclient.NewConfiguration()
19
api_client := openapiclient.NewAPIClient(configuration)
20
resp, r, err := api_client.VolumeApi.DatacentersVolumesPut(context.Background(), datacenterId, volumeId).Volume(volume).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
21
if err != nil {
22
fmt.Fprintf(os.Stderr, "Error when calling `VolumeApi.DatacentersVolumesPut``: %v\n", err)
23
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24
}
25
// response from `DatacentersVolumesPut`: Volume
26
fmt.Fprintf(os.Stdout, "Response from `VolumeApi.DatacentersVolumesPut`: %v\n", resp)
27
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
volumeId
string
The unique ID of the Volume

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersVolumesPutRequest struct via the builder pattern
Name
Type
Description
Notes
volume
Volume
Modified Volume
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

Volume

HTTP request headers

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

DatacentersVolumesRestoreSnapshotPost

1
var result map[string]interface{} = DatacentersVolumesRestoreSnapshotPost(ctx, datacenterId, volumeId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.SnapshotId(snapshotId)
6
.Execute()
Copied!
Restore Volume Snapshot

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
12
volumeId := "volumeId_example" // string | The unique ID of the Volume
13
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
14
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)
15
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
16
snapshotId := "snapshotId_example" // string | This is the ID of the snapshot (optional)
17
18
configuration := openapiclient.NewConfiguration()
19
api_client := openapiclient.NewAPIClient(configuration)
20
resp, r, err := api_client.VolumeApi.DatacentersVolumesRestoreSnapshotPost(context.Background(), datacenterId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).SnapshotId(snapshotId).Execute()
21
if err != nil {
22
fmt.Fprintf(os.Stderr, "Error when calling `VolumeApi.DatacentersVolumesRestoreSnapshotPost``: %v\n", err)
23
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24
}
25
// response from `DatacentersVolumesRestoreSnapshotPost`: map[string]interface{}
26
fmt.Fprintf(os.Stdout, "Response from `VolumeApi.DatacentersVolumesRestoreSnapshotPost`: %v\n", resp)
27
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
volumeId
string
The unique ID of the Volume

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersVolumesRestoreSnapshotPostRequest struct via the builder pattern
Name
Type
Description
Notes
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
snapshotId
string
This is the ID of the snapshot

Return type

map[string]interface{}

HTTP request headers

    Content-Type: application/x-www-form-urlencoded
    Accept: application/json
Last modified 14d ago