\SnapshotApi

All URIs are relative to https://in-memory-db.de-fra.ionos.com

MethodHTTP requestDescription

Get /snapshots/{snapshotId}

Retrieve Snapshot

Get /snapshots

Retrieve all Snapshot

SnapshotsFindById

var result SnapshotRead = SnapshotsFindById(ctx, snapshotId)
                      .Execute()

Retrieve Snapshot

Example

package main

import (
    "context"
    "fmt"
    "os"

    ionoscloud "github.com/ionos-cloud/sdk-go-dbaas-in-memory-db"
)

func main() {
    snapshotId := "a8784665-3d99-5464-af32-30a2967f58e7" // string | The ID (UUID) of the Snapshot.

    configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := ionoscloud.NewAPIClient(configuration)
    resource, resp, err := apiClient.SnapshotApi.SnapshotsFindById(context.Background(), snapshotId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SnapshotApi.SnapshotsFindById``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
    // response from `SnapshotsFindById`: SnapshotRead
    fmt.Fprintf(os.Stdout, "Response from `SnapshotApi.SnapshotsFindById`: %v\n", resource)
}

Path Parameters

NameTypeDescriptionNotes

ctx

context.Context

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

snapshotId

string

The ID (UUID) of the Snapshot.

Other Parameters

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

Return type

SnapshotRead

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "SnapshotApiService.SnapshotsFindById" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
    "SnapshotApiService.SnapshotsFindById": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
    "SnapshotApiService.SnapshotsFindById": {
    "port": "8443",
},
})

SnapshotsGet

var result SnapshotReadList = SnapshotsGet(ctx)
                      .Offset(offset)
                      .Limit(limit)
                      .Execute()

Retrieve all Snapshot

Example

package main

import (
    "context"
    "fmt"
    "os"

    ionoscloud "github.com/ionos-cloud/sdk-go-dbaas-in-memory-db"
)

func main() {
    offset := int32(0) // int32 | The first element (of the total list of elements) to include in the response. Use together with limit for pagination. (optional) (default to 0)
    limit := int32(100) // int32 | The maximum number of elements to return. Use together with offset for pagination. (optional) (default to 100)

    configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := ionoscloud.NewAPIClient(configuration)
    resource, resp, err := apiClient.SnapshotApi.SnapshotsGet(context.Background()).Offset(offset).Limit(limit).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SnapshotApi.SnapshotsGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
    // response from `SnapshotsGet`: SnapshotReadList
    fmt.Fprintf(os.Stdout, "Response from `SnapshotApi.SnapshotsGet`: %v\n", resource)
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes

offset

int32

The first element (of the total list of elements) to include in the response. Use together with limit for pagination.

[default to 0]

limit

int32

The maximum number of elements to return. Use together with offset for pagination.

[default to 100]

Return type

SnapshotReadList

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "SnapshotApiService.SnapshotsGet" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
    "SnapshotApiService.SnapshotsGet": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
    "SnapshotApiService.SnapshotsGet": {
    "port": "8443",
},
})

Last updated